diff --git a/.metadata b/.metadata index 3733535c..24a13c13 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,42 @@ # This file should be version controlled and should not be manually edited. version: - revision: 02c026b03cd31dd3f867e5faeb7e104cce174c5f - channel: stable + revision: "bae5e49bc2a867403c43b2aae2de8f8c33b037e4" + channel: "stable" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + - platform: android + create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + - platform: ios + create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + - platform: linux + create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + - platform: macos + create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + - platform: web + create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + - platform: windows + create_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + base_revision: bae5e49bc2a867403c43b2aae2de8f8c33b037e4 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 00000000..0d290213 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/app/libs/Bluetooth-release.aar b/android/app/libs/Bluetooth-release.aar deleted file mode 100644 index 01ae24ec..00000000 Binary files a/android/app/libs/Bluetooth-release.aar and /dev/null differ diff --git a/android/app/libs/amap-libs-release.aar b/android/app/libs/amap-libs-release.aar deleted file mode 100644 index b14b8e37..00000000 Binary files a/android/app/libs/amap-libs-release.aar and /dev/null differ diff --git a/android/app/libs/android-gif-drawable-release@1.2.23.aar b/android/app/libs/android-gif-drawable-release@1.2.23.aar deleted file mode 100644 index db9ed826..00000000 Binary files a/android/app/libs/android-gif-drawable-release@1.2.23.aar and /dev/null differ diff --git a/android/app/libs/contacts-release.aar b/android/app/libs/contacts-release.aar deleted file mode 100644 index 655c53bc..00000000 Binary files a/android/app/libs/contacts-release.aar and /dev/null differ diff --git a/android/app/libs/fingerprint-release.aar b/android/app/libs/fingerprint-release.aar deleted file mode 100644 index f472987e..00000000 Binary files a/android/app/libs/fingerprint-release.aar and /dev/null differ diff --git a/android/app/libs/geolocation-amap-release.aar b/android/app/libs/geolocation-amap-release.aar deleted file mode 100644 index a8dd2f1e..00000000 Binary files a/android/app/libs/geolocation-amap-release.aar and /dev/null differ diff --git a/android/app/libs/iBeacon-release.aar b/android/app/libs/iBeacon-release.aar deleted file mode 100644 index 6523f55e..00000000 Binary files a/android/app/libs/iBeacon-release.aar and /dev/null differ diff --git a/android/app/libs/map-amap-release.aar b/android/app/libs/map-amap-release.aar deleted file mode 100644 index 9864a85f..00000000 Binary files a/android/app/libs/map-amap-release.aar and /dev/null differ diff --git a/android/app/libs/messaging-release.aar b/android/app/libs/messaging-release.aar deleted file mode 100644 index f50b05cc..00000000 Binary files a/android/app/libs/messaging-release.aar and /dev/null differ diff --git a/android/app/libs/oaid_sdk_1.0.25.aar b/android/app/libs/oaid_sdk_1.0.25.aar deleted file mode 100644 index 47ca06de..00000000 Binary files a/android/app/libs/oaid_sdk_1.0.25.aar and /dev/null differ diff --git a/android/app/libs/payment-weixin-release.aar b/android/app/libs/payment-weixin-release.aar deleted file mode 100644 index 1e928015..00000000 Binary files a/android/app/libs/payment-weixin-release.aar and /dev/null differ diff --git a/android/app/libs/sqlite-release.aar b/android/app/libs/sqlite-release.aar deleted file mode 100644 index 5ebcb5f3..00000000 Binary files a/android/app/libs/sqlite-release.aar and /dev/null differ diff --git a/android/app/libs/uniMPSDK-release.aar b/android/app/libs/uniMPSDK-release.aar deleted file mode 100644 index 69dd9631..00000000 Binary files a/android/app/libs/uniMPSDK-release.aar and /dev/null differ diff --git a/android/app/libs/uniapp-release.aar b/android/app/libs/uniapp-release.aar deleted file mode 100644 index 1381712d..00000000 Binary files a/android/app/libs/uniapp-release.aar and /dev/null differ diff --git a/android/app/libs/weex_amap-release.aar b/android/app/libs/weex_amap-release.aar deleted file mode 100644 index e84f9033..00000000 Binary files a/android/app/libs/weex_amap-release.aar and /dev/null differ diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 80c412ed..14925040 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -76,7 +76,7 @@ @@ -87,7 +87,7 @@ diff --git a/android/app/src/main/assets/data/dcloud_control.xml b/android/app/src/main/assets/data/dcloud_control.xml deleted file mode 100644 index 2ce53996..00000000 --- a/android/app/src/main/assets/data/dcloud_control.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/assets/data/dcloud_error.html b/android/app/src/main/assets/data/dcloud_error.html deleted file mode 100644 index 1e01dc83..00000000 --- a/android/app/src/main/assets/data/dcloud_error.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - Error - - - - -
- - - - - - -

We're sorry ...

-

- -
Back
-
Close
-
Restart
- - \ No newline at end of file diff --git a/android/app/src/main/assets/data/dcloud_properties.xml b/android/app/src/main/assets/data/dcloud_properties.xml deleted file mode 100644 index 9e043b44..00000000 --- a/android/app/src/main/assets/data/dcloud_properties.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/assets/uni-jsframework.js b/android/app/src/main/assets/uni-jsframework.js deleted file mode 100644 index dfd6b991..00000000 --- a/android/app/src/main/assets/uni-jsframework.js +++ /dev/null @@ -1,2 +0,0 @@ -//{"version":"3.1.18"} -var __UniServiceStartTime__=Date.now(),global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";var subversion={framework:"0.29.6",transformer:">=0.1.5 <0.5"};function getHookKey(e,t,n){return t+"@"+n+"#"+e}var CallbackManager=function(e){this.instanceId=String(e),this.lastCallbackId=0,this.callbacks={},this.hooks={}};CallbackManager.prototype.add=function(e){return this.lastCallbackId++,this.callbacks[this.lastCallbackId]=e,this.lastCallbackId},CallbackManager.prototype.remove=function(e){var t=this.callbacks[e];return delete this.callbacks[e],t},CallbackManager.prototype.registerHook=function(e,t,n,r){var i=getHookKey(e,t,n);this.hooks[i]&&console.warn('[JS Framework] Override an existing component hook "'+i+'".'),this.hooks[i]=r},CallbackManager.prototype.triggerHook=function(e,t,n,r){var i=getHookKey(e,t,n),o=this.hooks[i];if("function"!=typeof o)return console.error("[JS Framework] Invalid hook function type ("+typeof o+') on "'+i+'".'),null;var a=null;try{a=o.apply(null,r||[])}catch(e){throw console.error('[JS Framework] Failed to execute the hook function on "'+i+'".'),e}return a},CallbackManager.prototype.consume=function(e,t,n){var r=this.callbacks[e];if(void 0!==n&&!1!==n||delete this.callbacks[e],"function"==typeof r)try{return r.call(null,t,n)}catch(e){throw console.error("[JS Framework] Failed to execute the callback function:\n "+e.toString()),e}return new Error('invalid callback id "'+e+'"')},CallbackManager.prototype.close=function(){this.callbacks={},this.hooks={}};var nextNodeRef=1;function uniqueId(){return(nextNodeRef++).toString()}function typof(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)}function isPlainObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function hasOwn(e,t){return isPlainObject(e)&&Object.prototype.hasOwnProperty.call(e,t)}function bufferToBase64(e){if("function"!=typeof btoa)return"";var t=Array.prototype.map.call(new Uint8Array(e),function(e){return String.fromCharCode(e)}).join("");return btoa(t)}function isEmpty(e){if(!e||"object"!=typeof e)return!0;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var LEVELS=["off","error","warn","info","log","debug"],levelMap={};function generateLevelMap(){LEVELS.forEach(function(t){var n=LEVELS.indexOf(t);levelMap[t]={},LEVELS.forEach(function(e){LEVELS.indexOf(e)<=n&&(levelMap[t][e]=!0)})})}function checkLevel(e){var t=global.WXEnvironment&&global.WXEnvironment.logLevel||"log";return levelMap[t]&&levelMap[t][e]}function debugLog(e){global.nativeLog("wxInteractionAnalyzer: [jsfm]"+e,"__DEBUG")}var docMap={};function addDoc(e,t){e&&(docMap[e]=t)}function getDoc(e){return docMap[e]}function removeDoc(e){delete docMap[e]}function getTaskCenter(e){var t=docMap[e];return t&&t.taskCenter?t.taskCenter:null}function appendBody(e,t,n){var r=e.documentElement;if(!(0 to "+this.children.length+" of <"+this.type+"> ("+this.ref+")."),moveIndex(e,this.children,this.children.length,!0),1===e.nodeType){var t=moveIndex(e,this.pureChildren,this.pureChildren.length),n=getTaskCenter(this.docId);n&&0<=t&&(this.computeChildrenClassList(e),n.send("dom",{action:"moveElement"},[e.ref,this.ref,t]))}}else if(checkLevel("debug")&&debugLog("[appendChild]("+this.docId+","+e.type+","+e.ref+") Append <"+e.type+"> to <"+this.type+"> ("+this.ref+")."),linkParent(e,this),insertIndex(e,this.children,this.children.length,!0),this.docId&®isterNode(this.docId,e),1===e.nodeType){insertIndex(e,this.pureChildren,this.pureChildren.length);var r=getTaskCenter(this.docId);r&&(this.computeChildrenClassList(e),r.send("dom",{action:"addElement"},[this.ref,e.toJSON(),-1])),e.ready=!0}},e.prototype.insertBefore=function(e,t){if(!(e.parentNode&&e.parentNode!==this||e===t||e.nextSibling&&e.nextSibling===t))if(e.parentNode){if(moveIndex(e,this.children,this.children.indexOf(t),!0),1===e.nodeType){var n=nextElement(t),r=moveIndex(e,this.pureChildren,n?this.pureChildren.indexOf(n):this.pureChildren.length),i=getTaskCenter(this.docId);i&&0<=r&&(this.computeChildrenClassList(e),i.send("dom",{action:"moveElement"},[e.ref,this.ref,r]))}}else if(checkLevel("debug")&&debugLog("[insertBefore]("+this.docId+","+e.type+","+e.ref+") Insert <"+e.type+"> to <"+this.type+"> ("+this.ref+"), before ("+t.ref+")."),linkParent(e,this),insertIndex(e,this.children,this.children.indexOf(t),!0),this.docId&®isterNode(this.docId,e),1===e.nodeType){var o=nextElement(t),a=insertIndex(e,this.pureChildren,o?this.pureChildren.indexOf(o):this.pureChildren.length),s=getTaskCenter(this.docId);s&&(this.computeChildrenClassList(e),s.send("dom",{action:"addElement"},[this.ref,e.toJSON(),a])),e.ready=!0}},e.prototype.insertAfter=function(e,t){if(!(e.parentNode&&e.parentNode!==this||e===t||e.previousSibling&&e.previousSibling===t))if(e.parentNode){if(moveIndex(e,this.children,this.children.indexOf(t)+1,!0),1===e.nodeType){var n=moveIndex(e,this.pureChildren,this.pureChildren.indexOf(previousElement(t))+1),r=getTaskCenter(this.docId);r&&0<=n&&(this.computeChildrenClassList(e),r.send("dom",{action:"moveElement"},[e.ref,this.ref,n]))}}else if(checkLevel("debug")&&debugLog("[insertAfter]("+this.docId+","+e.type+","+e.ref+") Insert <"+e.type+"> to <"+this.type+"> ("+this.ref+"), after ("+t.ref+")."),linkParent(e,this),insertIndex(e,this.children,this.children.indexOf(t)+1,!0),this.docId&®isterNode(this.docId,e),1===e.nodeType){var i=insertIndex(e,this.pureChildren,this.pureChildren.indexOf(previousElement(t))+1),o=getTaskCenter(this.docId);o&&(this.computeChildrenClassList(e),o.send("dom",{action:"addElement"},[this.ref,e.toJSON(),i])),e.ready=!0}},e.prototype.removeChild=function(e,t){if(e.parentNode){if(removeIndex(e,this.children,!0),1===e.nodeType){checkLevel("debug")&&debugLog("[removeChild]("+this.docId+","+e.type+","+e.ref+") Remove <"+e.type+"> from <"+this.type+"> ("+this.ref+")."),removeIndex(e,this.pureChildren);var n=getTaskCenter(this.docId);n&&n.send("dom",{action:"removeElement"},[e.ref]),e.ready=!1}this.computeChildrenClassList(e,e.nextSibling||{})}t||e.destroy()},e.prototype.clear=function(){var t=getTaskCenter(this.docId);this.pureChildren.forEach(function(e){t&&t.send("dom",{action:"removeElement"},[e.ref]),e.ready=!1}),this.children.forEach(function(e){e.destroy()}),this.children.length=0,this.pureChildren.length=0},e.prototype.setAttr=function(e,t,n){if(this.attr[e]!==t||!1===n){this.attr[e]=t;var r=getTaskCenter(this.docId);if(!n&&r){var i={};i[e]=t,r.send("dom",{action:"updateAttrs"},[this.ref,i])}}},e.prototype.setAttrs=function(e,t){if(!isEmpty(e)){var n={};for(var r in e)this.attr[r]!==e[r]&&(this.attr[r]=e[r],n[r]=e[r]);if(!isEmpty(n)){var i=getTaskCenter(this.docId);!t&&i&&i.send("dom",{action:"updateAttrs"},[this.ref,n])}}},e.prototype.setStyle=function(e,t,o){var a=this;expandShorthandProperty({property:e,value:t}).forEach(function(e){var t=e.property,n=e.value;if(a.style[t]!==n||!1===o){a.style[t]=n;var r=getTaskCenter(a.docId);if(!o&&r){var i={};i[t]=n,r.send("dom",{action:"updateStyle"},[a.ref,i])}}})},e.prototype.setStyles=function(e,t){var r=this;if(!isEmpty(e)){var i={};for(var n in e){expandShorthandProperty({property:n,value:e[n]}).forEach(function(e){var t=e.property,n=e.value;r.style[t]!==n&&(r.style[t]=n,i[t]=n)})}if(!isEmpty(i)){var o=getTaskCenter(this.docId);!t&&o&&o.send("dom",{action:"updateStyle"},[this.ref,i])}}},e.prototype.setClassStyle=function(e){for(var t in this.classStyle)this.classStyle[t]="";Object.assign(this.classStyle,e);var n=getTaskCenter(this.docId);n&&this.ready&&n.send("dom",{action:"updateStyle"},[this.ref,this.toStyle()])},e.prototype.addEvent=function(e,t,n){if(this.event||(this.event={}),!this.event[e]){checkLevel("debug")&&debugLog("[addEvent]("+this.docId+","+this.type+","+this.ref+') Add "'+e+'" event on <'+this.type+"> ("+this.ref+")."),this.event[e]={handler:t,params:n};var r=getTaskCenter(this.docId);r&&r.send("dom",{action:"addEvent"},[this.ref,e])}},e.prototype.removeEvent=function(e){if(this.event&&this.event[e]){checkLevel("debug")&&debugLog("[removeEvent]("+this.docId+","+this.type+","+this.ref+') Remove "'+e+'" event on <'+this.type+"> ("+this.ref+")."),delete this.event[e];var t=getTaskCenter(this.docId);t&&t.send("dom",{action:"removeEvent"},[this.ref,e])}},e.prototype.fireEvent=function(t,e,n,r){var i=null,o=!1,a=this.event[t];if(a&&e){checkLevel("debug")&&debugLog("[fireEvent]("+this.docId+","+this.type+","+this.ref+') Fire "'+t+'" event on <'+this.type+"> ("+this.ref+").");var s=a.handler;e.stopPropagation=function(){o=!0};try{i=r&&r.params?s.call.apply(s,[this].concat(r.params,[e])):s.call(this,e)}catch(e){throw console.error('[JS Framework] Failed to invoke the event handler of "'+t+'" on '+this.type+" ("+this.ref+"):\n "+e.toString()),e}}return!o&&n&&-1!==BUBBLE_EVENTS.indexOf(t)&&this.parentNode&&this.parentNode.fireEvent&&(e.currentTarget=this.parentNode,this.parentNode.fireEvent(t,e,n)),i},e.prototype.toStyle=function(){return Object.assign({},this.classStyle,this.style)},e.prototype.toJSON=function(e){void 0===e&&(e=!1);var t={ref:this.ref.toString(),type:this.type,attr:this.attr,style:normalizeUnit(this.toStyle())};this.classList&&this.classList.length&&(t.class=this.classList.join(" "));var n=[];for(var r in this.event){var i=this.event[r].params;i?n.push({type:r,params:i}):n.push(r)}return n.length&&(t.event=n),!e&&this.pureChildren.length&&(t.children=this.pureChildren.map(function(e){return e.toJSON()})),t},e.prototype.toString=function(){return"<"+this.type+" attr="+JSON.stringify(this.attr)+" style="+JSON.stringify(this.toStyle())+">"+this.pureChildren.map(function(e){return e.toString()}).join("")+""},e.prototype.setClassList=function(e){var t=this;e.length===this.classList.length&&0===e.filter(function(e){return!t.classList.includes(e)}).length||(this.classList=e,this.parentNode&&this.computeClassList())},e.prototype.setStylesheet=function(e){var t=this;e.length===this.stylesheet.length&&0===e.filter(function(e){return!t.stylesheet.includes(e)}).length||(this.stylesheet=e,this.classList.length&&this.parentNode&&this.computeClassList())},e.prototype.computeChildrenClassList=function(e,t){var n=this.children,r=t||e,i=r?n.indexOf(r):0,o=n.length-1;for(!e||e.classList&&e.classList.length||(o=t?i-1:i);0<=i&&i<=o;i++){var a=n[i];a.computeClassList&&a.computeClassList()}},e.prototype.computeClassList=function(){var u=this,e=this.classList,t=this.stylesheet,p={},h={};function l(e,t){var n=t&&t.classList;return n&&n.includes(e)}e.forEach(function(n){t.forEach(function(e,f){if((e["@VERSION"]||1)<2){var t=e[n];t&&Object.assign(p,t)}else{var c=e["."+n];c&&Object.keys(c).forEach(function(e){var t=u;if(e)for(var n=e.split("."),r=n.length-1;0 ]$/,"");if("~"===o||" "===o){for(var s="~"===o?"previousSibling":"parentNode";t&&!l(a,t=t[s]););if(!t)return}else if(">"===o?t=t&&t.parentNode:"+"===o&&(t=t&&t.previousSibling),!l(a,t))return}var d=c[e];Object.keys(d).forEach(function(e){var t=d[e],n=t[0],r=t[1],i=t[2],o=t[3],a=[r,i,f,o],s=h[e],c=!0;if(s)for(var u=0;u||||||",InputElementRegExp:"||||||",ReservedWord:"||",WhiteSpace:/[\t\v\f\u0020\u00A0\u1680\u180E\u2000-\u200A\u202F\u205f\u3000\uFEFF]/,LineTerminator:/[\n\r\u2028\u2029]/,Keyword:/new(?![_$a-zA-Z0-9])|void(?![_$a-zA-Z0-9])|delete(?![_$a-zA-Z0-9])|in(?![_$a-zA-Z0-9])|instanceof(?![_$a-zA-Z0-9])|typeof(?![_$a-zA-Z0-9])/,NullLiteral:/null(?![_$a-zA-Z0-9])/,BooleanLiteral:/(?:true|false)(?![_$a-zA-Z0-9])/,Identifier:/[_$a-zA-Z][_$a-zA-Z0-9]*/,Punctuator:/\/|=>|\*\*|>>>=|>>=|<<=|===|!==|>>>|<<|%=|\*=|-=|\+=|<=|>=|==|!=|\^=|\|=|\|\||&&|&=|>>|\+\+|--|\:|}|\*|&|\||\^|!|~|-|\+|\?|%|=|>|<|,|;|\.(?![0-9])|\]|\[|\)|\(|{/,DivPunctuator:/\/=|\//,NumericLiteral:/(?:0[xX][0-9a-fA-F]*|\.[0-9]+|(?:[1-9]+[0-9]*|0)(?:\.[0-9]*|\.)?)(?:[eE][+-]{0,1}[0-9]+)?(?![_$a-zA-Z0-9])/,StringLiteral:/"(?:[^"\n\\\r\u2028\u2029]|\\(?:['"\\bfnrtv\n\r\u2028\u2029]|\r\n)|\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\[^0-9ux'"\\bfnrtv\n\\\r\u2028\u2029])*"|'(?:[^'\n\\\r\u2028\u2029]|\\(?:['"\\bfnrtv\n\r\u2028\u2029]|\r\n)|\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\[^0-9ux'"\\bfnrtv\n\\\r\u2028\u2029])*'/,RegularExpressionLiteral:/\/(?:\[(?:\\[\s\S]|[^\]])*\]|[^*\/\\\n\r\u2028\u2029]|\\[^\n\r\u2028\u2029])(?:\[(?:\\[\s\S]|[^\]])*\]|[^\/\\\n\r\u2028\u2029]|\\[^\n\r\u2028\u2029])*\/[0-9a-zA-Z]*/};function XRegExp(r,e,i){var o=[e];var a=function n(e){var t=new RegExp;return t.compile(e.replace(/<([^>]+)>/g,function(e,t){return r[t]?(o.push(t),r[t]instanceof RegExp?"("+r[t].source+")":"("+n(r[t]).source+")"):""}),i),t}(r[e]);this.exec=function(e){var t=a.exec(e);if(null==t)return null;for(var n=new String(t[0]),r=0;rr.length)throw new SyntaxError("Unexpected token ILLEGAL");return o.lastIndex=t.lastIndex,a.lastIndex=t.lastIndex,r}}var rules={IdentifierName:[["Identifier"]],Literal:[["NullLiteral"],["BooleanLiteral"],["NumericLiteral"],["StringLiteral"],["RegularExpressionLiteral"]],PrimaryExpression:[["Identifier"],["Literal"],["(","Expression",")"]],CallExpression:[["PrimaryExpression","Arguments"],["CallExpression","Arguments"]],Arguments:[["(",")"],["(","ArgumentList",")"]],ArgumentList:[["ConditionalExpression"],["ArgumentList",",","ConditionalExpression"]],LeftHandSideExpression:[["PrimaryExpression"],["CallExpression"]],UnaryExpression:[["LeftHandSideExpression"],["void","UnaryExpression"],["+","UnaryExpression"],["-","UnaryExpression"],["~","UnaryExpression"],["!","UnaryExpression"]],ExponentiationExpression:[["UnaryExpression"],["ExponentiationExpression","**","UnaryExpression"]],MultiplicativeExpression:[["MultiplicativeExpression","/","ExponentiationExpression"],["ExponentiationExpression"],["MultiplicativeExpression","*","ExponentiationExpression"],["MultiplicativeExpression","%","ExponentiationExpression"]],AdditiveExpression:[["MultiplicativeExpression"],["AdditiveExpression","+","MultiplicativeExpression"],["AdditiveExpression","-","MultiplicativeExpression"]],ShiftExpression:[["AdditiveExpression"],["ShiftExpression","<<","AdditiveExpression"],["ShiftExpression",">>","AdditiveExpression"],["ShiftExpression",">>>","AdditiveExpression"]],RelationalExpression:[["ShiftExpression"],["RelationalExpression","<","ShiftExpression"],["RelationalExpression",">","ShiftExpression"],["RelationalExpression","<=","ShiftExpression"],["RelationalExpression",">=","ShiftExpression"],["RelationalExpression","instanceof","ShiftExpression"],["RelationalExpression","in","ShiftExpression"]],EqualityExpression:[["RelationalExpression"],["EqualityExpression","==","RelationalExpression"],["EqualityExpression","!=","RelationalExpression"],["EqualityExpression","===","RelationalExpression"],["EqualityExpression","!==","RelationalExpression"]],BitwiseANDExpression:[["EqualityExpression"],["BitwiseANDExpression","&","EqualityExpression"]],BitwiseXORExpression:[["BitwiseANDExpression"],["BitwiseXORExpression","^","BitwiseANDExpression"]],BitwiseORExpression:[["BitwiseXORExpression"],["BitwiseORExpression","|","BitwiseXORExpression"]],LogicalANDExpression:[["BitwiseORExpression"],["LogicalANDExpression","&&","BitwiseORExpression"]],LogicalORExpression:[["LogicalANDExpression"],["LogicalORExpression","||","LogicalANDExpression"]],ConditionalExpression:[["LogicalORExpression"],["LogicalORExpression","?","LogicalORExpression",":","LogicalORExpression"]],Expression:[["ConditionalExpression"],["Expression",",","ConditionalExpression"]],Program:[["Expression"]]};function Symbol$1(e,t){this.name=e,this.token=t,this.childNodes=[],this.toString=function(e){if(e||(e=""),1==this.childNodes.length)return this.childNodes[0].toString(e);for(var t=e+this.name+(null!=this.token&&this.name!=this.token?":"+this.token:"")+"\n",n=0;n","{","}","(",")","[","]",".",";",",","<",">","<=",">=","==","!=","===","!==","+","-","*","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","=","+=","-=","*=","%=","<<=",">>=",">>>=","&=","|=","^=","/","/=","instanceof","typeof","new","void","debugger","this","delete","in"].forEach(function(e){Object.defineProperty(a,e,{})}),this.reset=function(){this.lexicalParser.reset(),this.syntacticalParser.reset()},this.parse=function(e,t){var n,r=this,i=!1;this.lexicalParser.source=e;for(var o=!1;n=this.lexicalParser.getNextToken(o);){t&&t(n);try{if(Object.getOwnPropertyNames(n).some(function(e){return!!a.hasOwnProperty(e)&&(o=r.syntacticalParser.insertSymbol(new Symbol$1(e,n),i),!(i=!1))}))continue;(n.Keyword||n.Punctuator||n.DivPunctuator)&&a.hasOwnProperty(n.toString())&&(o=r.syntacticalParser.insertSymbol(new Symbol$1(n.toString(),n),i))}catch(e){throw new SyntaxError("Unexpected token "+n)}}return this.syntacticalParser.grammarTree}}var parser=new Parser;function JavaScriptExpression(text){parser.reset(),this.tree=parser.parse(text),this.paths=[];var context=Object.create(null),me=this,pathIndex=Object.create(null);function checkSimple(e){for(var t=e;t.childNodes.length<=1&&"MemberExpression"!==t.name;)t=t.childNodes[0];"MemberExpression"===t.name?me.isSimple=!0:me.isSimple=!1}function walk(e){if("CallExpression"===e.name&&"CallExpression"!==e.childNodes[e.childNodes.length-1].name){getPath(e.childNodes[1]);walk(e.childNodes[0])}else if("NewExpression"===e.name&&1===e.childNodes.length)getPath(e.childNodes[0]);else if("MemberExpression"===e.name&&1===e.childNodes.length)getPath(e);else for(var t=0;t>2],i+=o[(3&n[t])<<4|n[t+1]>>4],i+=o[(15&n[t+1])<<2|n[t+2]>>6],i+=o[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),l=new Uint8Array(u);for(t=0;t>4,l[c++]=(15&r)<<4|i>>2,l[c++]=(3&i)<<6|63&o;return u}}()}),fr=dr.encode,pr=dr.decode;var hr=Object.freeze({__proto__:null,base64ToArrayBuffer:function(e){return pr(e)},arrayBufferToBase64:function(e){return fr(e)}}),vr={};var gr=Object.freeze({__proto__:null,canIUse:function(e){return!b(vr,e)||vr[e]}}),mr={promiseInterceptor:R},yr=Object.freeze({__proto__:null,interceptors:mr,addInterceptor:function(e,t){"string"==typeof e&&E(t)?$(T[e]||(T[e]={}),t):E(e)&&$(C,e)},removeInterceptor:function(e,t){"string"==typeof e?E(t)?P(T[e],t):delete T[e]:E(e)&&P(C,e)}}),_r=!1,br=0,wr=0;function kr(e,t){return e=Number(e),isNaN(e)?t:e}var Sr=Object.freeze({__proto__:null,upx2px:function(e,t){var n,r,i,o;if(0===br&&(n=_h.getSystemInfoSync(),r=n.platform,i=n.pixelRatio,o=n.windowWidth,br=o,wr=i,_r="ios"===r),0===(e=Number(e)))return 0;var a=mh.globalStyle||mh.window||{},s=kr(a.rpxCalcMaxDeviceWidth,960),c=kr(a.rpxCalcBaseDeviceWidth,375),u=kr(a.rpxCalcIncludeWidth,750),l=t||br,d=e/750*(l=e===u||l<=s?l:c);return d<0&&(d=-d),0===(d=Math.floor(d+1e-4))&&(d=1!==wr&&_r?.5:1),e<0?-d:d}});function xr(e,t,n,r){fh.publishHandler(t+"-audio-"+e,{audioId:e,type:n,data:r},t)}var Cr=function(e,t){this.id=e,this.pageId=t};Cr.prototype.setSrc=function(e){xr(this.id,this.pageId,"setSrc",{src:e})},Cr.prototype.play=function(){xr(this.id,this.pageId,"play")},Cr.prototype.pause=function(){xr(this.id,this.pageId,"pause")},Cr.prototype.seek=function(e){xr(this.id,this.pageId,"seek",{position:e})};var Tr=Object.freeze({__proto__:null,createAudioContext:function(e,t){if(t)return new Cr(e,t.$page.id);var n=bh();if(n.$route&&n.$route.params.__id__)return new Cr(e,n.$route.params.__id__);fh.emit("onError","createAudioContext:fail")}}),Or=new uh;function Er(e,t,n){return e[t].apply(e,n)}function Ir(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return Er(Or,"$on",[].concat(t))}function Ar(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return Er(Or,"$off",[].concat(t))}function $r(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return Er(Or,"$once",[].concat(t))}function Pr(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return Er(Or,"$emit",[].concat(t))}var Mr,jr=Object.freeze({__proto__:null,$on:Ir,$off:Ar,$once:$r,$emit:Pr});function Br(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return fh.invokeCallbackHandler.apply(fh,e)}function Dr(e){return _h.requireNativePlugin(e)}function Nr(e){for(var t=[],n=arguments.length-1;0>>7)]}function Bu(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Du(e,t,n){e.bi_valid>pu-n?(e.bi_buf|=t<>pu-e.bi_valid,e.bi_valid+=n-pu):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function Ru(e,t,n){var r,i,o=new Array(fu+1),a=0;for(r=1;r<=fu;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=Lu(o[s]++,s))}}function Fu(e){var t;for(t=0;t>1;1<=n;n--)Uu(e,o,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Uu(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,Uu(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,c=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,v=0;for(o=0;o<=fu;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return nu;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return ru;for(t=32;t>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?Yu(e,t,n,r):4===e.strategy||o===i?(Du(e,2+(r?1:0),3),qu(e,Su,xu)):(Du(e,4+(r?1:0),3),function(e,t,n,r){var i;for(Du(e,t-257,5),Du(e,n-1,5),Du(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Tu[n]+su+1)]++,e.dyn_dtree[2*ju(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){var t;Du(e,2,3),Nu(e,vu,Su),16===(t=e).bi_valid?(Bu(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}};var Ku=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3>>1:e>>>1;t[n]=e}return t}();var Qu,el=function(e,t,n,r){var i=Zu,o=r+n;e^=-1;for(var a=r;a>>8^i[255&(e^t[a])];return-1^e},tl={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},nl=0,rl=4,il=0,ol=-2,al=-1,sl=4,cl=2,ul=8,ll=9,dl=286,fl=30,pl=19,hl=2*dl+1,vl=15,gl=3,ml=258,yl=ml+gl+1,_l=42,bl=113,wl=1,kl=2,Sl=3,xl=4;function Cl(e,t){return e.msg=tl[t],t}function Tl(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(tu.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function Il(e,t){Ju._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,El(e.strm)}function Al(e,t){e.pending_buf[e.pending++]=t}function $l(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Pl(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-yl?e.strstart-(e.w_size-yl):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+ml,p=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===h&&u[n+a-1]===p&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&oc&&0!=--i);return a<=e.lookahead?a:e.lookahead}function Ml(e){var t,n,r,i,o,a,s,c,u,l,d=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-yl)){for(tu.arraySet(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=n=e.hash_size;r=e.head[--t],e.head[t]=d<=r?r-d:0,--n;);for(t=n=d;r=e.prev[--t],e.prev[t]=d<=r?r-d:0,--n;);i+=d}if(0===e.strm.avail_in)break;if(a=e.strm,s=e.window,c=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u=gl)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=gl&&(e.ins_h=(e.ins_h<=gl)if(r=Ju._tr_tally(e,e.strstart-e.match_start,e.match_length-gl),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=gl){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=gl&&(e.ins_h=(e.ins_h<=gl&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-gl,r=Ju._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-gl),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ml(e),0===e.lookahead&&t===nl)return wl;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Il(e,!1),0===e.strm.avail_out))return wl;if(e.strstart-e.block_start>=e.w_size-yl&&(Il(e,!1),0===e.strm.avail_out))return wl}return e.insert=0,t===rl?(Il(e,!0),0===e.strm.avail_out?Sl:xl):(e.strstart>e.block_start&&(Il(e,!1),e.strm.avail_out),wl)}),new Dl(4,4,8,4,jl),new Dl(4,5,16,8,jl),new Dl(4,6,32,32,jl),new Dl(4,4,16,16,Bl),new Dl(8,16,32,32,Bl),new Dl(8,16,128,128,Bl),new Dl(8,32,128,256,Bl),new Dl(32,128,258,1024,Bl),new Dl(32,258,258,4096,Bl)];var zl={deflateInit:function(e,t){return Fl(e,t,ul,15,8,0)},deflateInit2:Fl,deflateReset:Rl,deflateResetKeep:Ll,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?ol:(e.state.gzhead=t,il):ol},deflate:function(e,t){var n,r,i,o;if(!e||!e.state||5>8&255),Al(r,r.gzhead.time>>16&255),Al(r,r.gzhead.time>>24&255),Al(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),Al(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Al(r,255&r.gzhead.extra.length),Al(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=el(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Al(r,0),Al(r,0),Al(r,0),Al(r,0),Al(r,0),Al(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),Al(r,3),r.status=bl);else{var a=ul+(r.w_bits-8<<4)<<8;a|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),a+=31-a%31,r.status=bl,$l(r,a),0!==r.strstart&&($l(r,e.adler>>>16),$l(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=el(e.adler,r.pending_buf,r.pending-i,i)),El(e),i=r.pending,r.pending!==r.pending_buf_size));)Al(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=el(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=el(e.adler,r.pending_buf,r.pending-i,i)),El(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}Al(r,o=r.gzindexi&&(e.adler=el(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=el(e.adler,r.pending_buf,r.pending-i,i)),El(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}Al(r,o=r.gzindexi&&(e.adler=el(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&El(e),r.pending+2<=r.pending_buf_size&&(Al(r,255&e.adler),Al(r,e.adler>>8&255),e.adler=0,r.status=bl)):r.status=bl),0!==r.pending){if(El(e),0===e.avail_out)return r.last_flush=-1,il}else if(0===e.avail_in&&Tl(t)<=Tl(n)&&t!==rl)return Cl(e,-5);if(666===r.status&&0!==e.avail_in)return Cl(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==nl&&666!==r.status){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Ml(e),0===e.lookahead)){if(t===nl)return wl;break}if(e.match_length=0,n=Ju._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Il(e,!1),0===e.strm.avail_out))return wl}return e.insert=0,t===rl?(Il(e,!0),0===e.strm.avail_out?Sl:xl):e.last_lit&&(Il(e,!1),0===e.strm.avail_out)?wl:kl}(r,t):3===r.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=ml){if(Ml(e),e.lookahead<=ml&&t===nl)return wl;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=gl&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=gl?(n=Ju._tr_tally(e,1,e.match_length-gl),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Ju._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Il(e,!1),0===e.strm.avail_out))return wl}return e.insert=0,t===rl?(Il(e,!0),0===e.strm.avail_out?Sl:xl):e.last_lit&&(Il(e,!1),0===e.strm.avail_out)?wl:kl}(r,t):Qu[r.level].func(r,t);if(s!==Sl&&s!==xl||(r.status=666),s===wl||s===Sl)return 0===e.avail_out&&(r.last_flush=-1),il;if(s===kl&&(1===t?Ju._tr_align(r):5!==t&&(Ju._tr_stored_block(r,0,0,!1),3===t&&(Ol(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),El(e),0===e.avail_out))return r.last_flush=-1,il}return t!==rl?il:r.wrap<=0?1:(2===r.wrap?(Al(r,255&e.adler),Al(r,e.adler>>8&255),Al(r,e.adler>>16&255),Al(r,e.adler>>24&255),Al(r,255&e.total_in),Al(r,e.total_in>>8&255),Al(r,e.total_in>>16&255),Al(r,e.total_in>>24&255)):($l(r,e.adler>>>16),$l(r,65535&e.adler)),El(e),0=n.w_size&&(0===o&&(Ol(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new tu.Buf8(n.w_size),tu.arraySet(u,t,l-n.w_size,n.w_size,0),t=u,l=n.w_size),a=e.avail_in,s=e.next_in,c=e.input,e.avail_in=l,e.next_in=0,e.input=t,Ml(n);n.lookahead>=gl;){for(r=n.strstart,i=n.lookahead-(gl-1);n.ins_h=(n.ins_h<>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},buf2binstring:function(e){return Hl(e,e.length)},binstring2buf:function(e){for(var t=new tu.Buf8(e.length),n=0,r=t.length;n>10&1023,s[r++]=56320|1023&i)}return Hl(s,r)},utf8border:function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+ql[e[n]]>t?n:t}};var Xl=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Yl=Object.prototype.toString,Jl=0,Kl=-1,Zl=0,Ql=8;function ed(e){if(!(this instanceof ed))return new ed(e);this.options=tu.assign({level:Kl,method:Ql,chunkSize:16384,windowBits:15,memLevel:8,strategy:Zl,to:""},e||{});var t=this.options;t.raw&&0>>=b=_>>>24,h-=b,0===(b=_>>>16&255))T[o++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=v[(65535&_)+(p&(1<>>=b,h-=b),h<15&&(p+=C[r++]<>>=b=_>>>24,h-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=g[(65535&_)+(p&(1<>>=b,h-=b,(b=o-a)>3,p&=(1<<(h-=w<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=rp?(v=P[M+a[_]],g=E[I+a[_]]):(v=96,g=0),c=1<>x)+(u-=c)]=h<<24|v<<16|g|0,0!==u;);for(c=1<>=1;if(0!==c?(O&=c-1,O+=c):O=0,_++,0==--A[y]){if(y===w)break;y=t[n+a[_]]}if(k>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function md(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new tu.Buf16(320),this.work=new tu.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function yd(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=pd,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new tu.Buf32(hd),t.distcode=t.distdyn=new tu.Buf32(vd),t.sane=1,t.back=-1,dd):fd}function _d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,yd(e)):fd}function bd(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(tu.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r<(i=o.wsize-o.wnext)&&(i=r),tu.arraySet(o.window,t,n-r,i,o.wnext),(r-=i)?(tu.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=el(n.check,O,2,0),l=u=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",n.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===n.wbits)n.wbits=k;else if(k>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(O[0]=255&u,O[1]=u>>>8&255,n.check=el(n.check,O,2,0)),l=u=0,n.mode=3;case 3:for(;l<32;){if(0===s)break e;s--,u+=r[o++]<>>8&255,O[2]=u>>>16&255,O[3]=u>>>24&255,n.check=el(n.check,O,4,0)),l=u=0,n.mode=4;case 4:for(;l<16;){if(0===s)break e;s--,u+=r[o++]<>8),512&n.flags&&(O[0]=255&u,O[1]=u>>>8&255,n.check=el(n.check,O,2,0)),l=u=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===s)break e;s--,u+=r[o++]<>>8&255,n.check=el(n.check,O,2,0)),l=u=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(s<(p=n.length)&&(p=s),p&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),tu.arraySet(n.head.extra,r,o,p,k)),512&n.flags&&(n.check=el(n.check,r,p,o)),s-=p,o+=p,n.length-=p),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;for(p=0;k=r[o+p++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k)),k&&p>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;l<32;){if(0===s)break e;s--,u+=r[o++]<>>=7&l,l-=7&l,n.mode=27;break}for(;l<3;){if(0===s)break e;s--,u+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(Cd(n),n.mode=20,6===t){u>>>=2,l-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===s)break e;s--,u+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&u,l=u=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(p=n.length){if(s>>=5,l-=5,n.ndist=1+(31&u),u>>>=5,l-=5,n.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;n.have<19;)n.lens[E[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,x={bits:n.lenbits},S=cd(0,n.lens,0,19,n.lencode,0,n.work,x),n.lenbits=x.bits,S){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,y=65535&T,!((g=T>>>24)<=l);){if(0===s)break e;s--,u+=r[o++]<>>=g,l-=g,n.lens[n.have++]=y;else{if(16===y){for(C=g+2;l>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}k=n.lens[n.have-1],p=3+(3&u),u>>>=2,l-=2}else if(17===y){for(C=g+3;l>>=g)),u>>>=3,l-=3}else{for(C=g+7;l>>=g)),u>>>=7,l-=7}if(n.have+p>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;p--;)n.lens[n.have++]=k}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,x={bits:n.lenbits},S=cd(ud,n.lens,0,n.nlen,n.lencode,0,n.work,x),n.lenbits=x.bits,S){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,x={bits:n.distbits},S=cd(ld,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,x),n.distbits=x.bits,S){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=s&&258<=c){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=l,rd(e,f),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,l=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;m=(T=n.lencode[u&(1<>>16&255,y=65535&T,!((g=T>>>24)<=l);){if(0===s)break e;s--,u+=r[o++]<>_)])>>>16&255,y=65535&T,!(_+(g=T>>>24)<=l);){if(0===s)break e;s--,u+=r[o++]<>>=_,l-=_,n.back+=_}if(u>>>=g,l-=g,n.back+=g,n.length=y,0===m){n.mode=26;break}if(32&m){n.back=-1,n.mode=12;break}if(64&m){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&m,n.mode=22;case 22:if(n.extra){for(C=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;m=(T=n.distcode[u&(1<>>16&255,y=65535&T,!((g=T>>>24)<=l);){if(0===s)break e;s--,u+=r[o++]<>_)])>>>16&255,y=65535&T,!(_+(g=T>>>24)<=l);){if(0===s)break e;s--,u+=r[o++]<>>=_,l-=_,n.back+=_}if(u>>>=g,l-=g,n.back+=g,64&m){e.msg="invalid distance code",n.mode=30;break}n.offset=y,n.extra=15&m,n.mode=24;case 24:if(n.extra){for(C=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===c)break e;if(p=f-c,n.offset>p){if((p=n.offset-p)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}p>n.wnext?(p-=n.wnext,h=n.wsize-p):h=n.wnext-p,p>n.length&&(p=n.length),v=n.window}else v=i,h=a-n.offset,p=n.length;for(cDate.now()},o.prototype.getOpenerEventChannel=function(){return this.$root.$scope.eventChannel||(this.$root.$scope.eventChannel=new Ys),this.$root.$scope.eventChannel},Object.defineProperty(o.prototype,"$page",{get:function(){return this.$root.$scope.$page}}),Object.defineProperty(o.prototype,"$mp",{get:function(){return{page:this.$root.$scope}}});var r=o.prototype.$mount;o.prototype.$mount=function(e,t){var n=this;if("app"===this.mpType){if(this.$options.render=function(){},lh.config.preload)return void lh.requireModule("globalEvent").addEventListener("launchApp",function(){dh.updateConfigInfo&&dh.updateConfigInfo(),Fp(n),r.call(n,e,t)});Fp(this)}return r.call(this,e,t)},o.prototype.$nextTick=function(t){var n=this,r=this._watcher,i="function"==typeof t,e=new Promise(function(e){r&&n._$queue.find(function(e){return r===e})?Ep.push(i?t.bind(n):e):o.nextTick(i?function(){return t.call(n)}:e),i&&e()});return i?void 0:e}}};return mp.__$wx__=yp,fh.publishHandler=function(e,t,n){t=JSON.stringify(t),Array.isArray(n)||(n=[n]);var r="typeof UniViewJSBridge !== 'undefined' && UniViewJSBridge.subscribeHandler(\""+e+'",'+t+",__PAGE_ID__)";n.forEach(function(e){var t=dh.webview.getWebviewById(String(e));t&&t.evalJS(r.replace("__PAGE_ID__",e))})},fh.invokeCallbackHandler=sr,fh.removeCallbackHandler=function(e){delete or[e]},{__vuePlugin:ch,__definePage:function(e,t){Ks[e]=t},__registerApp:Fp,__registerPage:ic,uni:mp,getApp:Np,getCurrentPages:nc}}(),_h=t.uni,bh=t.getApp,wh=t.getCurrentPages;return t}function initServiceJSBridge(e){var r=new e;UniServiceJSBridge={on:r.$on.bind(r),off:r.$off.bind(r),once:r.$once.bind(r),emit:r.$emit.bind(r),subscribe:function(e,t){return r.$on("view."+e,t)},unsubscribe:function(e,t){return r.$off("view."+e,t)},subscribeHandler:function(e,t,n){return r.$emit("view."+e,t,n)}}}function createInstanceContext$1(e){var t,n=e.weex,r=e.Vue,i=new e.WeexPlus(n);(UniServiceJSBridge||initServiceJSBridge(r),uni)||(t=createServiceContext(r,n,i,UniServiceJSBridge,e),__vuePlugin=t.__vuePlugin,__definePage=t.__definePage,__registerApp=t.__registerApp,__registerPage=t.__registerPage,uni=t.uni,getApp=t.getApp,getCurrentPages=t.getCurrentPages);return{__vuePlugin:__vuePlugin,__definePage:__definePage,__registerApp:__registerApp,__registerPage:__registerPage,plus:i,uni:uni,wx:uni.__$wx__||uni,getApp:getApp,getCurrentPages:getCurrentPages,UniServiceJSBridge:UniServiceJSBridge}}function styleMixin(e){e.prototype.__merge_style=function(r,e){if(void 0===r&&(r={}),r){var i=e||this.$options.style;Object.keys(r).forEach(function(e){var t=i[e];if(t){var n=r[e];Object.keys(n).forEach(function(e){var a=n[e],s=t[e];"object"==typeof a?("object"!=typeof s&&(s=t[e]={}),Object.keys(a).forEach(function(e){var t=!0;if(s[e])for(var n=a[e].slice(1,3),r=s[e].slice(1,3),i=0;iDate.now()}}WeexInstance.prototype.requireModule=function(n){var r=getId(this);if(r&&this.document&&this.document.taskCenter){if(isRegisteredModule(n)){var e={},t=getModuleDescription(n),i=function(t){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return handleModuleGetter(n,t,moduleGetter(r,n,t))},set:function(e){return moduleSetter(r,n,t,e)}})};for(var o in t)i(o);return e}console.warn("[JS Framework] 当前运行的基座不包含原生插件["+n+"],请在manifest中配置该插件,重新制作包括该原生插件的自定义运行基座")}else console.error('[JS Framework] Failed to requireModule("'+n+'"), instance ('+r+") doesn't exist anymore.")},WeexInstance.prototype.supports=function(e){if("string"!=typeof e)return null;var t=e.match(/^@(\w+)\/([\w-]+)(\.(\w+))?$/i);if(t){var n=t[1],r=t[2],i=t[4];switch(n){case"module":return isRegisteredModule(r,i);case"component":return isRegisteredComponent(r)}}return null},WeexInstance.prototype.importScript=function(e,r){void 0===r&&(r={});var i=getId(this),o=getTaskCenter(i);return new Promise(function(t,n){o&&"function"==typeof o.send||n(new Error('[JS Framework] Failed to import script "'+e+'", no taskCenter ('+i+") matched."));try{o.send("module",{module:"script",method:"importScript"},[e,r],{callback:[function(e){return t(e)},function(e){return n(e)}]})}catch(e){n(e)}})};var decode=decodeURIComponent;function parseQuery(e){var i={};return(e=e.trim().replace(/^(\?|#|&)/,""))&&e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),n=decode(t.shift()),r=0this._t&&(e=this._t,this._lastDt=e);var t=this._x_v*e+.5*this._x_a*Math.pow(e,2)+this._x_s,n=this._y_v*e+.5*this._y_a*Math.pow(e,2)+this._y_s;return(0this._endPositionX)&&(t=this._endPositionX),(0this._endPositionY)&&(n=this._endPositionY),{x:t,y:n}},Friction.prototype.ds=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),e>this._t&&(e=this._t),{dx:this._x_v+this._x_a*e,dy:this._y_v+this._y_a*e}},Friction.prototype.delta=function(){return{x:-1.5*Math.pow(this._x_v,2)/this._x_a||0,y:-1.5*Math.pow(this._y_v,2)/this._y_a||0}},Friction.prototype.dt=function(){return-this._x_v/this._x_a},Friction.prototype.done=function(){var t=e(this.s().x,this._endPositionX)||e(this.s().y,this._endPositionY)||this._lastDt===this._t;return this._lastDt=null,t},Friction.prototype.setEnd=function(e,t){this._endPositionX=e,this._endPositionY=t},Friction.prototype.reconfigure=function(e,t){this._m=e,this._f=1e3*t},Spring.prototype._solve=function(e,t){var n=this._c,r=this._m,i=this._k,o=n*n-4*r*i;if(0===o){var a=-n/(2*r),s=e,c=t/(a*e);return{x:function(e){return(s+c*e)*Math.pow(Math.E,a*e)},dx:function(e){var t=Math.pow(Math.E,a*e);return a*(s+c*e)*t+c*t}}}if(0this.maxX&&(this.outOfBounds?(i="touch-out-of-bounds",n=this.maxX+this._declineX.x(n-this.maxX)):n=this.maxX),rthis.maxY&&(this.outOfBounds?(i="touch-out-of-bounds",r=this.maxY+this._declineY.x(r-this.maxY)):r=this.maxY),_requestAnimationFrame(function(){t._setTransform(n,r,t._scale,i)})}}},__handleTouchEnd:function(){var r=this;if(!this._isScaling&&!this.disabled&&this._isTouching&&(this._isTouching=!1,!this._checkCanMove&&!this._revise("out-of-bounds")&&this.inertia)){var e=1e3*(this.__touchInfo.historyX[1]-this.__touchInfo.historyX[0])/(this.__touchInfo.historyT[1]-this.__touchInfo.historyT[0]),t=1e3*(this.__touchInfo.historyY[1]-this.__touchInfo.historyY[0])/(this.__touchInfo.historyT[1]-this.__touchInfo.historyT[0]);this._friction.setV(e,t),this._friction.setS(this._translateX,this._translateY);var n=this._friction.delta().x,i=this._friction.delta().y,o=n+this._translateX,a=i+this._translateY;othis.maxX&&(o=this.maxX,a=this._translateY+(this.maxX-this._translateX)*i/n),athis.maxY&&(a=this.maxY,o=this._translateX+(this.maxY-this._translateY)*n/i),this._friction.setEnd(o,a),this._FA=g(this._friction,function(){var e=r._friction.s(),t=e.x,n=e.y;r._setTransform(t,n,r._scale,"friction")},function(){r._FA.cancel()})}},_onTrack:function(e){switch(e.detail.state){case"start":this.__handleTouchStart();break;case"move":this.__handleTouchMove(e);break;case"end":this.__handleTouchEnd()}},_getLimitXY:function(e,t){var n=!1;return e>this.maxX?(e=this.maxX,n=!0):ethis.maxY?(t=this.maxY,n=!0):t should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab")}},render:function(e){return e("view",this._g({attrs:{hoverClass:this.hoverClass,hoverStopPropagation:this.hoverStopPropagation,hoverStartTime:this.hoverStartTime,hoverStayTime:this.hoverStayTime},on:{click:this._click}},this.$listeners),[this._t("default")],2)},style:{"navigator-hover":{backgroundColor:"rgba(0,0,0,0.1)",opacity:.7}}}}function init$13(e,t,n){e.component("navigator",getNavigator(t,n.uni))}function getRuntime(){return"object"==typeof window&&"object"==typeof navigator&&"object"==typeof document?"webview":"v8"}function getPageId(){return plus_.webview.currentWebview().id}var callbacks={};function onPlusMessage(e){var t=e.data&&e.data.__message;if(t&&t.__page){var n=t.__page,r=callbacks[n];r&&r(t),t.keep||delete callbacks[n]}}function addEventListener(e,t){"v8"===getRuntime()?(channel&&channel.close(),(channel=new BroadcastChannel_(getPageId())).onmessage=onPlusMessage):window.__plusMessage=onPlusMessage,callbacks[e]=t}var Page=function(e){this.webview=e};function showPage(e){var t=e.context;void 0===t&&(t={});var n=e.url,r=e.data;void 0===r&&(r={});var i=e.style;void 0===i&&(i={});var o=e.onMessage,a=e.onClose;plus_=t.plus||plus,BroadcastChannel_=t.BroadcastChannel||BroadcastChannel;var s="page"+Date.now();!1!==(i=Object.assign({},i)).titleNView&&"none"!==i.titleNView&&(i.titleNView=Object.assign({autoBackButton:!0,titleSize:"17px"},i.titleNView));var c={top:0,bottom:0,usingComponents:{},popGesture:"close",scrollIndicator:"none",animationType:"pop-in",animationDuration:200,uniNView:{path:("object"==typeof process&&process.env&&process.env.VUE_APP_TEMPLATE_PATH||"")+"/"+n+".js",defaultFontSize:plus_.screen.resolutionWidth/20,viewport:plus_.screen.resolutionWidth}};i=Object.assign(c,i);var u=plus_.webview.create("",s,i,{extras:{from:getPageId(),runtime:getRuntime(),data:r}});return u.addEventListener("close",a),addEventListener(s,function(e){"function"==typeof o&&o(e.data),e.keep||u.close("auto")}),u.show(i.animationType,i.animationDuration),new Page(u)}function getPicker(e,t){var o={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},a={YEAR:"year",MONTH:"month",DAY:"day"},r=["range","rangeKey","value","mode","fields","start","end","disabled"];function s(e){return 9",lt:"<",nbsp:" ",quot:'"',apos:"'"};function normalizeText(e){return e.replace(HTML_RE,function(e,t){return CHARS[t]})}function normalizeNode(t,e,n){var r=(t.name||"").toLowerCase(),i=strategies[r];-1===TAGS.indexOf(r)&&(r="span"),"img"===r&&(r="image");var o={type:r,attr:Object.create(null)};return("text"===t.type||t.text)&&(o.attr.value=normalizeText((t.text||"").trim())),t.attrs&&Object.keys(t.attrs).forEach(function(e){"class"!==e&&"style"!==e&&(o.attr[e]=t.attrs[e])}),o.style=normalizeUnit(parseStyle(t,e)),i&&i(o,n),o.children=normalizeNodes(t.children,e,n),o}function normalizeNodes(e,t,n){return Array.isArray(e)?e.map(function(e){return normalizeNode(e,t,n)}):[]}function getRichText(e){var t=e.config.env,n=t.scale,r=t.deviceWidth/n/20;return{name:"RichText",isReserved:!0,props:{nodes:{type:[Array,String],default:function(){return[]}}},render:function(e){var t=normalizeNodes(this.nodes||[],this.$vnode.context,{defaultFontSize:r});return e("u-rich-text",this._g({attrs:{value:t}},this.$listeners))}}}function init$18(e,t){e.component("rich-text",getRichText(t))}function getSwiperItem(e){return{name:"SwiperItem",isReserved:!0,props:{itemId:{type:String,default:""}},render:function(e){return e("div",this._g({staticClass:["uni-swiper-item"],staticStyle:{position:"absolute",left:0,top:0,right:0,bottom:0,overflow:"hidden"}},this.$listeners),this._t("default"),2)}}}function init$19(e,t){e.component("swiper-item",getSwiperItem(t))}function getSwiper(r){var t=r.requireModule("dom");return{name:"Swiper",isReserved:!0,mixins:[emitter],props:{indicatorDots:{type:[Boolean,String],default:!1},vertical:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},circular:{type:[Boolean,String],default:!1},interval:{type:[Number,String],default:5e3},duration:{type:[Number,String],default:500},current:{type:[Number,String],default:0},indicatorColor:{type:String,default:"rgba(0,0,0,.3)"},indicatorActiveColor:{type:String,default:"#000000"},previousMargin:{type:String,default:""},nextMargin:{type:String,default:""},currentItemId:{type:String,default:""},skipHiddenItemLayout:{type:[Boolean,String],default:!1},displayMultipleItems:{type:[Number,String],default:1},disableTouch:{type:[Boolean,String],default:!1}},data:function(){return{currentSync:this.current,currentChangeSource:"autoplay"}},watch:{current:function(){this._currentCheck()},currentItemId:function(){this._currentCheck()},currentSync:function(){this.$trigger("change",this._getDetail())}},methods:{onChange:function(e){var t=e.detail;"string"==typeof t.source&&(this.currentChangeSource=t.source),this.currentSync=t.index,this._lastOffsetRatio=0},onScroll:function(e){var t=this.vertical?e.detail.offsetYRatio:e.detail.offsetXRatio;if((e.drag||e.detail.drag)&&(this.currentChangeSource="touch"),0===t){var n=Math.abs(this._lastOffsetRatio);if(1===n)return;.5this.width&&(t=this.width),this.sliderValue=this._filterValue(t)},_filterValue:function(e){var t=e/this.width*(Number(this.max)-Number(this.min)),n=Number(this.step);return 0document.createEvent("Event").timeStamp&&(Gt=function(){return Xt.now()})}function Yt(){var e,t;for(Gt(),Wt=!0,zt.sort(function(e,t){return e.id-t.id}),Ht=0;Hte.id;)n--;zt.splice(n+1,0,e)}else zt.push(e);qt||(qt=!0,Ve(Yt))}}(this)},Kt.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||y(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){je(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Kt.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Kt.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Kt.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Zt={enumerable:!0,configurable:!0,get:T,set:T};function Qt(e,t,n){Zt.get=function(){return this[t][n]},Zt.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Zt)}function en(e){e._watchers=[];var t=e.$options;t.props&&function(n,r){var i=n.$options.propsData||{},o=n._props={},a=n.$options._propKeys=[];n.$parent&&ge(!1);var e=function(e){a.push(e);var t=Ae(e,r,i,n);_e(o,e,t),e in n||Qt(n,"_props",e)};for(var t in r)e(t);ge(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?T:k(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;u(t=e._data="function"==typeof t?function(e,t){oe();try{return e.call(t,t)}catch(e){return je(e,t,"data()"),{}}finally{ae()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&d(r,o)||(void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&Qt(e,"_data",o))}var a;ye(t,!0)}(e):ye(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=K();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new Kt(e,a||T,T,tn)),i in e||nn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;iparseInt(this.max)&&wn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};kn=gn,xn={get:function(){return L}},Object.defineProperty(kn,"config",xn),kn.util={warn:ne,extend:x,mergeOptions:Ee,defineReactive:_e},kn.set=be,kn.delete=we,kn.nextTick=Ve,kn.observable=function(e){return ye(e),e},kn.options=Object.create(null),D.forEach(function(e){kn.options[e+"s"]=Object.create(null)}),x((kn.options._base=kn).options.components,Tn),kn.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1"+this.pureChildren.map(function(e){return e.toString()}).join("")+""},e}(In),Fn=function(e,t){this.id=e?e.toString():"",this.URL=t,this.createDocumentElement()};Fn.prototype.createDocumentElement=function(){var n=this;if(!this.documentElement){var e=new Rn("document");e.docId=this.id,e.ownerDocument=this,e.role="documentElement",e.depth=0,e.ref="_documentElement",this.documentElement=e,Object.defineProperty(e,"appendChild",{configurable:!0,enumerable:!0,writable:!0,value:function(e){$n(n,e)}}),Object.defineProperty(e,"insertBefore",{configurable:!0,enumerable:!0,writable:!0,value:function(e,t){$n(n,e,t)}})}return this.documentElement},Fn.prototype.createBody=function(e){this.body||Pn(this,new Rn(e));return this.body},Fn.prototype.createElement=function(e){return new Rn(e)},Fn.prototype.createComment=function(e){return new An(e)},Fn.prototype.destroy=function(){};var zn=s("style,class"),Vn=(s("input,textarea,option,select,progress"),s("contenteditable,draggable,spellcheck"),s("events,caret,typing,plaintext-only"),s("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),s("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"));var Un=Object.freeze({createElement:function(e){return new Rn(e)},createElementNS:function(e,t){return new Rn(e+":"+t)},createTextNode:function(){return new Rn("text")},createComment:function(e){return new An(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.type},setTextContent:function(){},setStyleScope:function(){}}),qn={create:function(e,t){Wn(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Wn(e,!0),Wn(t))},destroy:function(e){Wn(e,!0)}};function Wn(e,t){var n=e.data.ref;if(I(n)){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?b(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}s("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),s("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0);var Hn=s("text,number,password,search,email,tel,url"),Gn=new se("",{},[]),Xn=["create","activate","update","remove","destroy"];function Yn(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&I(e.data)===I(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=I(n=e.data)&&I(n=n.attrs)&&n.type,i=I(n=t.data)&&I(n=n.attrs)&&n.type;return r===i||Hn(r)&&Hn(i)}(e,t)||A(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&E(t.asyncFactory.error))}function Jn(e,t,n){var r,i,o={};for(r=t;r<=n;++r)I(i=e[r].key)&&(o[i]=r);return o}var Kn={create:Zn,update:Zn,destroy:function(e){Zn(e,Gn)}};function Zn(e,t){(e.data.directives||t.data.directives)&&function(t,n){var e,r,i,o=t===Gn,a=n===Gn,s=er(t.data.directives,t.context),c=er(n.data.directives,n.context),u=[],l=[];for(e in c)r=s[e],i=c[e],r?(i.oldValue=r.value,i.oldArg=r.arg,tr(i,"update",n,t),i.def&&i.def.componentUpdated&&l.push(i)):(tr(i,"bind",n,t),i.def&&i.def.inserted&&u.push(i));if(u.length){var d=function(){for(var e=0;ei;)_has(r,n=t[i++])&&(~arrayIndexOf(o,n)||o.push(n));return o},_enumBugKeys="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),_objectKeys=Object.keys||function(e){return _objectKeysInternal(e,_enumBugKeys)},f$1=Object.getOwnPropertySymbols,_objectGops={f:f$1},f$2={}.propertyIsEnumerable,_objectPie={f:f$2},_toObject=function(e){return Object(_defined(e))},$assign=Object.assign,_objectAssign=!$assign||_fails(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||Object.keys($assign({},t)).join("")!=r})?function(e,t){for(var n=arguments,r=_toObject(e),i=arguments.length,o=1,a=_objectGops.f,s=_objectPie.f;odocument.F=Object<\/script>"),e.close(),createDict=e.F;n--;)delete createDict[PROTOTYPE$1][_enumBugKeys[n]];return createDict()},_objectCreate=Object.create||function(e,t){var n;return null!==e?(Empty[PROTOTYPE$1]=_anObject(e),n=new Empty,Empty[PROTOTYPE$1]=null,n[IE_PROTO$1]=e):n=createDict(),void 0===t?n:_objectDps(n,t)},def=_objectDp.f,TAG$1=_wks("toStringTag"),_setToStringTag=function(e,t,n){e&&!_has(e=n?e:e.prototype,TAG$1)&&def(e,TAG$1,{configurable:!0,value:t})},IteratorPrototype={};_hide(IteratorPrototype,_wks("iterator"),function(){return this});var _iterCreate=function(e,t,n){e.prototype=_objectCreate(IteratorPrototype,{next:_propertyDesc(1,n)}),_setToStringTag(e,t+" Iterator")},IE_PROTO$2=_sharedKey("IE_PROTO"),ObjectProto=Object.prototype,_objectGpo=Object.getPrototypeOf||function(e){return e=_toObject(e),_has(e,IE_PROTO$2)?e[IE_PROTO$2]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectProto:null},ITERATOR=_wks("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this},_iterDefine=function(e,t,n,r,i,o,a){_iterCreate(n,t,r);var s,c,u,l=function(e){if(!BUGGY&&e in h)return h[e];switch(e){case KEYS:case VALUES:return function(){return new n(this,e)}}return function(){return new n(this,e)}},d=t+" Iterator",f=i==VALUES,p=!1,h=e.prototype,v=h[ITERATOR]||h[FF_ITERATOR]||i&&h[i],g=v||l(i),m=i?f?l("entries"):g:void 0,y="Array"==t&&h.entries||v;if(y&&(u=_objectGpo(y.call(new e)))!==Object.prototype&&u.next&&(_setToStringTag(u,d,!0),_library||"function"==typeof u[ITERATOR]||_hide(u,ITERATOR,returnThis)),f&&v&&v.name!==VALUES&&(p=!0,g=function(){return v.call(this)}),_library&&!a||!BUGGY&&!p&&h[ITERATOR]||_hide(h,ITERATOR,g),_iterators[t]=g,_iterators[d]=returnThis,i)if(s={values:f?g:l(VALUES),keys:o?g:l(KEYS),entries:m},a)for(c in s)c in h||_redefine(h,c,s[c]);else _export(_export.P+_export.F*(BUGGY||p),t,s);return s},$at=_stringAt(!0);_iterDefine(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=$at(t,n),this._i+=e.length,{value:e,done:!1})});var UNSCOPABLES=_wks("unscopables"),ArrayProto=Array.prototype;null==ArrayProto[UNSCOPABLES]&&_hide(ArrayProto,UNSCOPABLES,{});var _addToUnscopables=function(e){ArrayProto[UNSCOPABLES][e]=!0},_iterStep=function(e,t){return{value:t,done:!!e}},es6_array_iterator=_iterDefine(Array,"Array",function(e,t){this._t=_toIobject(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,_iterStep(1)):_iterStep(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");_iterators.Arguments=_iterators.Array,_addToUnscopables("keys"),_addToUnscopables("values"),_addToUnscopables("entries");for(var ITERATOR$1=_wks("iterator"),TO_STRING_TAG=_wks("toStringTag"),ArrayValues=_iterators.Array,DOMIterables={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},collections=_objectKeys(DOMIterables),i=0;ir;)n.push(t[r++]);return queue[++counter]=function(){_invoke("function"==typeof e?e:Function(e),n)},defer(counter),counter},clearTask=function(e){delete queue[e]},"process"==_cof(process$2)?defer=function(e){process$2.nextTick(_ctx(run,e,1))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(_ctx(run,e,1))}:MessageChannel?(channel$1=new MessageChannel,port=channel$1.port2,channel$1.port1.onmessage=listener,defer=_ctx(port.postMessage,port,1)):_global.addEventListener&&"function"==typeof postMessage&&!_global.importScripts?(defer=function(e){_global.postMessage(e+"","*")},_global.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in _domCreate("script")?function(e){_html.appendChild(_domCreate("script"))[ONREADYSTATECHANGE]=function(){_html.removeChild(this),run.call(e)}}:function(e){setTimeout(_ctx(run,e,1),0)});var _task={set:setTask,clear:clearTask},macrotask=_task.set,Observer=_global.MutationObserver||_global.WebKitMutationObserver,process$3=_global.process,Promise$1=_global.Promise,isNode$1="process"==_cof(process$3),_microtask=function(){var n,r,i,e=function(){var e,t;for(isNode$1&&(e=process$3.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?i():r=void 0,e}}r=void 0,e&&e.enter()};if(isNode$1)i=function(){process$3.nextTick(e)};else if(!Observer||_global.navigator&&_global.navigator.standalone)if(Promise$1&&Promise$1.resolve){var t=Promise$1.resolve(void 0);i=function(){t.then(e)}}else i=function(){macrotask.call(_global,e)};else{var o=!0,a=document.createTextNode("");new Observer(e).observe(a,{characterData:!0}),i=function(){a.data=o=!o}}return function(e){var t={fn:e,next:void 0};r&&(r.next=t),n||(n=t,i()),r=t}};function PromiseCapability(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=_aFunction(n),this.reject=_aFunction(r)}var f$3=function(e){return new PromiseCapability(e)},_newPromiseCapability={f:f$3},_perform=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},navigator$1=_global.navigator,_userAgent=navigator$1&&navigator$1.userAgent||"",_promiseResolve=function(e,t){if(_anObject(e),_isObject(t)&&t.constructor===e)return t;var n=_newPromiseCapability.f(e);return(0,n.resolve)(t),n.promise},_redefineAll=function(e,t,n){for(var r in t)_redefine(e,r,t[r],n);return e},SPECIES$1=_wks("species"),_setSpecies=function(e){var t=_global[e];_descriptors&&t&&!t[SPECIES$1]&&_objectDp.f(t,SPECIES$1,{configurable:!0,get:function(){return this}})},ITERATOR$4=_wks("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR$4]();riter.return=function(){SAFE_CLOSING=!0}}catch(e){}var _iterDetect=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var n=!1;try{var r=[7],i=r[ITERATOR$4]();i.next=function(){return{done:n=!0}},r[ITERATOR$4]=function(){return i},e(r)}catch(e){}return n},task=_task.set,microtask=_microtask(),PROMISE="Promise",TypeError$1=_global.TypeError,process$1=_global.process,versions=process$1&&process$1.versions,v8=versions&&versions.v8||"",$Promise=_global[PROMISE],isNode="process"==_classof(process$1),empty=function(){},Internal,newGenericPromiseCapability,OwnPromiseCapability,Wrapper,newPromiseCapability=newGenericPromiseCapability=_newPromiseCapability.f,USE_NATIVE=!!function(){try{var e=$Promise.resolve(1),t=(e.constructor={})[_wks("species")]=function(e){e(empty,empty)};return(isNode||"function"==typeof PromiseRejectionEvent)&&e.then(empty)instanceof t&&0!==v8.indexOf("6.6")&&-1===_userAgent.indexOf("Chrome/66")}catch(e){}}(),isThenable=function(e){var t;return!(!_isObject(e)||"function"!=typeof(t=e.then))&&t},notify=function(l,n){if(!l._n){l._n=!0;var r=l._c;microtask(function(){for(var c=l._v,u=1==l._s,e=0,t=function(e){var t,n,r,i=u?e.ok:e.fail,o=e.resolve,a=e.reject,s=e.domain;try{i?(u||(2==l._h&&onHandleUnhandled(l),l._h=1),!0===i?t=c:(s&&s.enter(),t=i(c),s&&(s.exit(),r=!0)),t===e.promise?a(TypeError$1("Promise-chain cycle")):(n=isThenable(t))?n.call(t,o,a):o(t)):a(c)}catch(e){s&&!r&&s.exit(),a(e)}};r.length>e;)t(r[e++]);l._c=[],l._n=!1,n&&!l._h&&onUnhandled(l)})}},onUnhandled=function(o){task.call(_global,function(){var e,t,n,r=o._v,i=isUnhandled(o);if(i&&(e=_perform(function(){isNode?process$1.emit("unhandledRejection",r,o):(t=_global.onunhandledrejection)?t({promise:o,reason:r}):(n=_global.console)&&n.error&&n.error("Unhandled promise rejection",r)}),o._h=isNode||isUnhandled(o)?2:1),o._a=void 0,i&&e.e)throw e.v})},isUnhandled=function(e){return 1!==e._h&&0===(e._a||e._c).length},onHandleUnhandled=function(t){task.call(_global,function(){var e;isNode?process$1.emit("rejectionHandled",t):(e=_global.onrejectionhandled)&&e({promise:t,reason:t._v})})},$reject=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),notify(t,!0))},$resolve=function(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw TypeError$1("Promise can't be resolved itself");(n=isThenable(e))?microtask(function(){var t={_w:r,_d:!1};try{n.call(e,_ctx($resolve,t,1),_ctx($reject,t,1))}catch(e){$reject.call(t,e)}}):(r._v=e,r._s=1,notify(r,!1))}catch(e){$reject.call({_w:r,_d:!1},e)}}};USE_NATIVE||($Promise=function(e){_anInstance(this,$Promise,PROMISE,"_h"),_aFunction(e),Internal.call(this);try{e(_ctx($resolve,this,1),_ctx($reject,this,1))}catch(e){$reject.call(this,e)}},Internal=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Internal.prototype=_redefineAll($Promise.prototype,{then:function(e,t){var n=newPromiseCapability(_speciesConstructor(this,$Promise));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=isNode?process$1.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&¬ify(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal;this.promise=e,this.resolve=_ctx($resolve,e,1),this.reject=_ctx($reject,e,1)},_newPromiseCapability.f=newPromiseCapability=function(e){return e===$Promise||e===Wrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),_export(_export.G+_export.W+_export.F*!USE_NATIVE,{Promise:$Promise}),_setToStringTag($Promise,PROMISE),_setSpecies(PROMISE),Wrapper=_core[PROMISE],_export(_export.S+_export.F*!USE_NATIVE,PROMISE,{reject:function(e){var t=newPromiseCapability(this);return(0,t.reject)(e),t.promise}}),_export(_export.S+_export.F*(_library||!USE_NATIVE),PROMISE,{resolve:function(e){return _promiseResolve(_library&&this===Wrapper?$Promise:this,e)}}),_export(_export.S+_export.F*!(USE_NATIVE&&_iterDetect(function(e){$Promise.all(e).catch(empty)})),PROMISE,{all:function(e){var a=this,t=newPromiseCapability(a),s=t.resolve,c=t.reject,n=_perform(function(){var r=[],i=0,o=1;_forOf(e,!1,function(e){var t=i++,n=!1;r.push(void 0),o++,a.resolve(e).then(function(e){n||(n=!0,r[t]=e,--o||s(r))},c)}),--o||s(r)});return n.e&&c(n.v),t.promise},race:function(e){var t=this,n=newPromiseCapability(t),r=n.reject,i=_perform(function(){_forOf(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}});var $includes=_arrayIncludes(!0);_export(_export.P,"Array",{includes:function(e){return $includes(this,e,1a.createEvent("Event").timeStamp&&(pn=function(){return hn.now()})}function vn(){var e,t;for(pn(),dn=!0,sn.sort(function(e,t){return e.id-t.id}),fn=0;fne.id;)n--;sn.splice(n+1,0,e)}else sn.push(e);ln||(ln=!0,qe(vn))}}(this)},mn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||b(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){De(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},mn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},mn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},mn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||k(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var yn={enumerable:!0,configurable:!0,get:N,set:N};function _n(e,t,n){yn.get=function(){return this[t][n]},yn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,yn)}function bn(e){e._watchers=[];var t=e.$options;t.props&&function(n,r){var i=n.$options.propsData||{},o=n._props={},a=n.$options._propKeys=[];n.$parent&&ye(!1);var e=function(e){a.push(e);var t=Pe(e,r,i,n);we(o,e,t),e in n||_n(n,"_props",e)};for(var t in r)e(t);ye(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?N:m(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;d(t=e._data="function"==typeof t?wn(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&f(r,o)||(void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&_n(e,"_data",o))}var a;be(t,!0)}(e):be(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=Q();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new mn(e,a||N,N,kn)),i in e||Sn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==K&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;iparseInt(this.max)&&Vn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};Un=Nn,Wn={get:function(){return R}},Object.defineProperty(Un,"config",Wn),Un.util={warn:ie,extend:D,mergeOptions:Ae,defineReactive:we},Un.set=ke,Un.delete=Se,Un.nextTick=qe,Un.observable=function(e){return be(e),e},Un.options=Object.create(null),j.forEach(function(e){Un.options[e+"s"]=Object.create(null)}),D((Un.options._base=Un).options.components,Gn),Un.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1 = ArrayList() - sheetItems.add(item) - val config = DCSDKInitConfig.Builder() - .setCapsule(true) - .setMenuDefFontSize("16px") - .setMenuDefFontColor("#000000") - .setMenuDefFontWeight("normal") - .setMenuActionSheetItems(sheetItems) - .setEnableBackground(false) //后台运行 - .build() - DCUniMPSDK.getInstance().initialize(context, config) { - result.success(it) - } - DCUniMPSDK.getInstance().setDefMenuButtonClickCallBack { p0, p1 -> - Logger.e("p0: $p0 p1:$p1"); - when (p1) { - "tc" -> { - Logger.e("用户点击了退出"); - DCUniMPSDK.getInstance().closeCurrentApp() - } - } - } - DCUniMPSDK.getInstance().setUniMPOnCloseCallBack { - Logger.e("用户点击了退出 it: $it") - DCUniMPSDK.getInstance().closeCurrentApp() - } - } - } else if (call.method == "isInitialize") { - result.success(DCUniMPSDK.getInstance().isInitialize) - } else if (call.method == "isExistsApp") { - var appid = call.argument("appid"); - result.success(DCUniMPSDK.getInstance().isExistsApp(appid)) - } else if (call.method == "getAppVersionInfo") { - var appid = call.argument("appid"); - result.success(DCUniMPSDK.getInstance().getAppVersionInfo(appid)["name"]) - } else if (call.method == "closeCurrentApp") { - result.success(DCUniMPSDK.getInstance().closeCurrentApp()) - } else if (call.method == "getAppBasePath") { - result.success(DCUniMPSDK.getInstance().getAppBasePath(context)) - } else if (call.method == "runingAppid") { - result.success(DCUniMPSDK.getInstance().runingAppid) - } else if (call.method == "currentPageUrl") { - result.success(DCUniMPSDK.getInstance().currentPageUrl) - } else if (call.method == "startMin") { - try { - var appid = call.argument("appid") - var hashMap = call.argument>("json") - Logger.e("startMin_json: ${JSONObject(hashMap as Map<*, *>)}") - DCUniMPSDK.getInstance().startApp(context, appid, JSONObject(hashMap as Map<*, *>)) - } catch (e: Exception) { - e.printStackTrace() - } - result.success("") - } else if (call.method == "clickListener") { - DCUniMPSDK.getInstance().setDefMenuButtonClickCallBack { p0, p1 -> - Logger.e("p0: $p0 p1:$p1"); - when (p1) { - "tc" -> { - Logger.e("用户点击了退出"); - DCUniMPSDK.getInstance().closeCurrentApp() - } - } - } - DCUniMPSDK.getInstance().setUniMPOnCloseCallBack { - Logger.e("用户点击了退出 it: $it") - } - } else if (call.method == "reloadWgt") { - try { - var appid = call.argument("appid"); - var wgtPath = call.argument("wgtPath"); - DCUniMPSDK.getInstance().releaseWgtToRunPathFromePath(appid, wgtPath) { code, pArgs -> - if (code == 1) { //释放wgt完成 - result.success(true) - } else { - result.success(false) - } - null - } - } catch (e: Exception) { - e.printStackTrace() - } - } else { - result.notImplemented() - } - } - - override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { - channel.setMethodCallHandler(null) - } -} - diff --git a/android/app/src/main/kotlin/com/zsw/huixiang/wxapi/WXEntryActivity.kt b/android/app/src/main/kotlin/com/zsw/huixiang/wxapi/WXEntryActivity.kt deleted file mode 100644 index 19035447..00000000 --- a/android/app/src/main/kotlin/com/zsw/huixiang/wxapi/WXEntryActivity.kt +++ /dev/null @@ -1,67 +0,0 @@ -package com.zsw.huixiang.wxapi - -import android.content.Intent -import android.os.Bundle -import cn.sharesdk.wechat.utils.WechatHandlerActivity -import io.dcloud.feature.payment.weixin.AbsWXPayCallbackActivity -import io.flutter.Log - -class WXEntryActivity : WechatHandlerActivity() { - - - // IWXAPI 是第三方app和微信通信的openapi接口 - - public override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - Log.e("wx:", "onCreate:") - -// try { -// if (!WXAPiHandler.wxApiRegistered) { -// var appInfo = packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA) -// val wechatAppId = appInfo.metaData.getString("weChatAppId") -// if (wechatAppId != null ){ -// WXAPiHandler.setupWxApi(wechatAppId,this) -// WXAPiHandler.setCoolBool(true) -// Log.d("fluwx","weChatAppId:" + wechatAppId) -// }else { -// Log.e("fluwx","can't load meta-data weChatAppId") -// } -// } -// WXAPiHandler.wxApi?.handleIntent(intent, this) -// } catch (e: Exception) { -// e.printStackTrace() -// startSpecifiedActivity(defaultFlutterActivityAction()) -// finish() -// } - } - -// override fun onNewIntent(intent: Intent) { -// super.onNewIntent(intent) -// Log.e("wx:", "onNewIntent:") - -// setIntent(intent) - -// try { -// WXAPiHandler.wxApi?.handleIntent(intent, this) -// } catch (e: Exception) { -// e.printStackTrace() -// startSpecifiedActivity(defaultFlutterActivityAction()) -// finish() -// } -// } - - -// override fun onReq(baseReq: BaseReq) { -// Log.e("wx:", "onReq: ${baseReq.toString()}") - // FIXME: 可能是官方的Bug,从微信拉起APP的Intent类型不对,无法跳转回Flutter Activity - // 稳定复现场景:微信版本为7.0.5,小程序SDK为2.7.7 -// FluwxRequestHandler.onReq(baseReq,this) -// } - // 第三方应用发送到微信的请求处理后的响应结果,会回调到该方法 -// override fun onResp(resp: BaseResp) { -// Log.e("wx:", "onResp: ${resp.toString()}") -// FluwxResponseHandler.handleResponse(resp) -// finish() -// } - -} \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/zsw/huixiang/wxapi/WXPayEntryActivity.kt b/android/app/src/main/kotlin/com/zsw/huixiang/wxapi/WXPayEntryActivity.kt deleted file mode 100644 index babb53f4..00000000 --- a/android/app/src/main/kotlin/com/zsw/huixiang/wxapi/WXPayEntryActivity.kt +++ /dev/null @@ -1,86 +0,0 @@ -package com.zsw.huixiang.wxapi - -import android.content.Intent -import android.content.pm.PackageManager -import android.os.Bundle -import android.util.Log -import com.jarvan.fluwx.handlers.FluwxRequestHandler -import com.jarvan.fluwx.handlers.FluwxResponseHandler -import com.jarvan.fluwx.handlers.WXAPiHandler -import com.tencent.mm.opensdk.modelbase.BaseReq -import com.tencent.mm.opensdk.modelbase.BaseResp -import io.dcloud.feature.payment.weixin.AbsWXPayCallbackActivity - - -class WXPayEntryActivity : AbsWXPayCallbackActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - try { - if (!WXAPiHandler.wxApiRegistered) { - var appInfo = packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA) - val wechatAppId = appInfo.metaData.getString("weChatAppId") - if (wechatAppId != null ){ - WXAPiHandler.setupWxApi(wechatAppId, this) -// WXAPiHandler.setCoolBool(true) - io.flutter.Log.d("fluwx", "weChatAppId:$wechatAppId") - }else { - io.flutter.Log.e("fluwx", "can't load meta-data weChatAppId") - } - } - WXAPiHandler.wxApi?.handleIntent(intent, this) - } catch (e: Exception) { - e.printStackTrace() - startSpecifiedActivity(defaultFlutterActivityAction()) - finish() - } - Log.e("WXPayEntryActivity", "onCreate") - } - - override fun onNewIntent(intent: Intent) { - super.onNewIntent(intent) - - setIntent(intent) - - try { - WXAPiHandler.wxApi?.handleIntent(intent, this) - } catch (e: Exception) { - e.printStackTrace() - startSpecifiedActivity(defaultFlutterActivityAction()) - finish() - } - } - - override fun onReq(req: BaseReq) { - super.onReq(req) - FluwxRequestHandler.onReq(req, this) - Log.e("WXPayEntryActivity", "req: $req") - - } - - override fun onResp(resp: BaseResp) { - FluwxResponseHandler.handleResponse(resp) - super.onResp(resp) - Log.e("WXPayEntryActivity", "resp: $resp") - } - - - - private fun startSpecifiedActivity(action: String, bundle: Bundle? = null, bundleKey: String? = null) { - Intent(action).run { - bundleKey?.let { - putExtra(bundleKey, bundle) - } - addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) - packageManager?.let { - resolveActivity(packageManager)?.also { - startActivity(this) - finish() - } - } - } - } - - private fun defaultFlutterActivityAction(): String = "$packageName.FlutterActivity" - -} \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index a41d8a49..8cb04b60 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -62,6 +62,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/ios/.gitignore b/ios/.gitignore index 151026b9..7a7f9873 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -1,3 +1,4 @@ +**/dgph *.mode1v3 *.mode2v3 *.moved-aside diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 9625e105..7c569640 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/ios/Gemfile b/ios/Gemfile deleted file mode 100644 index 1afd2cce..00000000 --- a/ios/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } - -# gem "rails" diff --git a/ios/Podfile b/ios/Podfile index a6a40c03..e8e390ad 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,6 +1,5 @@ # Uncomment this line to define a global platform for your project - platform :ios, '11.0' - source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -29,23 +28,21 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup target 'Runner' do -# pod 'AFNetworking', '~> 4.0' - pod 'SSZipArchive', '~> 2.4.2' + use_frameworks! + use_modular_headers! + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end end -#post_install do |installer| -# installer.pods_project.targets.each do |target| -# flutter_additional_ios_build_settings(target) -# end -#end - post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' + config.build_settings['ENABLE_BITCODE'] = 'NO' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index c5e9bee5..7a06d33b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -14,168 +14,89 @@ PODS: - AFNetworking/Serialization (4.0.1) - AFNetworking/UIKit (4.0.1): - AFNetworking/NSURLSession - - BaiduMapKit/Base (6.5.1) - - BaiduMapKit/Map (6.5.1): + - BaiduMapKit/Base (6.6.0) + - BaiduMapKit/Map (6.6.0): - BaiduMapKit/Base - - BaiduMapKit/Search (6.5.1): + - BaiduMapKit/Search (6.6.0): - BaiduMapKit/Base - - BaiduMapKit/Utils (6.5.1): + - BaiduMapKit/Utils (6.6.0): - BaiduMapKit/Base - - BMKLocationKit (2.0.4) + - BMKLocationKit (2.1.0) + - device_info_plus (0.0.1): + - Flutter - emoji_picker_flutter (0.0.1): - Flutter - Flutter (1.0.0) - - flutter_baidu_mapapi_base (3.1.0): - - BaiduMapKit/Utils (= 6.5.1) + - flutter_baidu_mapapi_base (3.5.0): + - BaiduMapKit/Utils (= 6.6.0) - Flutter - - flutter_baidu_mapapi_map (3.1.0): - - BaiduMapKit/Map (= 6.5.1) + - flutter_baidu_mapapi_map (3.5.0): + - BaiduMapKit/Map (= 6.6.0) - Flutter - flutter_baidu_mapapi_base - - flutter_baidu_mapapi_search (3.1.0): - - BaiduMapKit/Search (= 6.5.1) + - flutter_baidu_mapapi_search (3.5.0): + - BaiduMapKit/Search (= 6.6.0) - Flutter - flutter_baidu_mapapi_base - - flutter_baidu_mapapi_utils (3.1.0): - - BaiduMapKit/Utils (= 6.5.1) + - flutter_baidu_mapapi_utils (3.5.0): + - BaiduMapKit/Utils (= 6.6.0) - Flutter - flutter_baidu_mapapi_base - - flutter_bmflocation (2.0.1): - - BMKLocationKit (~> 2.0.4) + - flutter_bmflocation (3.5.0): + - BMKLocationKit (~> 2.1.0) + - Flutter + - flutter_localization (0.0.1): - Flutter - fluwx (0.0.1): - Flutter - - mob_sharesdk/ShareSDKPlatforms/WeChatFull - - image_gallery_saver (1.5.0): + - fluwx/pay (= 0.0.1) + - fluwx/pay (0.0.1): + - Flutter + - WechatOpenSDK-XCFramework (~> 2.0.2) + - image_gallery_saver (2.0.2): - Flutter - image_pickers (0.0.1): - AFNetworking - Flutter - - ZLPhotoBrowser-objc (= 1.0.4) - - mob_sharesdk (4.4.15): - - mob_sharesdk/ShareSDK (= 4.4.15) - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDK (4.4.15): - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKExtension (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/DingTalk (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Douyin (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Dropbox (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Evernote (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Facebook (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Flickr (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/GooglePlus (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Instagram (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Instapaper (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Kakao (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/KuaiShou (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Line (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/LinkedIn (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Messenger (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/MingDao (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Oasis (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Pinterest (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Pocket (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/QQ (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Reddit (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/SinaWeibo (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/SMS (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/SnapChat (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Telegram (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/TikTok (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Twitter (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/VKontakte (4.4.15): - - mob_sharesdk/ShareSDK - - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/WatermelonVideo (4.4.15): - - mob_sharesdk/ShareSDK + - SDWebImage + - ZLPhotoBrowser (= 4.4.8.1) + - mob_sharesdk (4.4.23): + - mob_sharesdk/ShareSDK (= 4.4.23) - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/WeChatFull (4.4.15): - - mob_sharesdk/ShareSDK + - mob_sharesdk/ShareSDK (4.4.23): - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/WeWork (4.4.15): + - mob_sharesdk/ShareSDKExtension (4.4.23): - mob_sharesdk/ShareSDK - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/WhatsApp (4.4.15): + - mob_sharesdk/ShareSDKPlatforms/Facebook (4.4.23): - mob_sharesdk/ShareSDK - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/Yixin (4.4.15): + - mob_sharesdk/ShareSDKPlatforms/Line (4.4.23): - mob_sharesdk/ShareSDK - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKPlatforms/YouDaoNote (4.4.15): + - mob_sharesdk/ShareSDKPlatforms/WeChat_Lite (4.4.23): - mob_sharesdk/ShareSDK - MOBFoundation (>= 3.2.9) - - mob_sharesdk/ShareSDKUI (4.4.15): + - mob_sharesdk/ShareSDKUI (4.4.23): - mob_sharesdk/ShareSDK - MOBFoundation (>= 3.2.9) - - MOBFoundation (3.2.49) + - MOBFoundation (3.2.62) - number_precision (0.0.1): - Flutter - - package_info (0.0.1): + - package_info_plus (0.4.5): - Flutter - - path_provider (0.0.1): + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - permission_handler_apple (9.3.0): - Flutter - - "permission_handler (5.1.0+2)": + - rive_common (0.0.1): - Flutter - scan (0.0.1): - Flutter - - SDWebImage (5.13.4): - - SDWebImage/Core (= 5.13.4) - - SDWebImage/Core (5.13.4) + - SDWebImage (5.18.11): + - SDWebImage/Core (= 5.18.11) + - SDWebImage/Core (5.18.11) - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS @@ -183,68 +104,42 @@ PODS: - Flutter - mob_sharesdk - mob_sharesdk/ShareSDKExtension - - mob_sharesdk/ShareSDKPlatforms/DingTalk - - mob_sharesdk/ShareSDKPlatforms/Douyin - - mob_sharesdk/ShareSDKPlatforms/Dropbox - - mob_sharesdk/ShareSDKPlatforms/Evernote - mob_sharesdk/ShareSDKPlatforms/Facebook - - mob_sharesdk/ShareSDKPlatforms/Flickr - - mob_sharesdk/ShareSDKPlatforms/GooglePlus - - mob_sharesdk/ShareSDKPlatforms/Instagram - - mob_sharesdk/ShareSDKPlatforms/Instapaper - - mob_sharesdk/ShareSDKPlatforms/Kakao - - mob_sharesdk/ShareSDKPlatforms/KuaiShou - mob_sharesdk/ShareSDKPlatforms/Line - - mob_sharesdk/ShareSDKPlatforms/LinkedIn - - mob_sharesdk/ShareSDKPlatforms/Messenger - - mob_sharesdk/ShareSDKPlatforms/MingDao - - mob_sharesdk/ShareSDKPlatforms/Oasis - - mob_sharesdk/ShareSDKPlatforms/Pinterest - - mob_sharesdk/ShareSDKPlatforms/Pocket - - mob_sharesdk/ShareSDKPlatforms/QQ - - mob_sharesdk/ShareSDKPlatforms/Reddit - - mob_sharesdk/ShareSDKPlatforms/SinaWeibo - - mob_sharesdk/ShareSDKPlatforms/SMS - - mob_sharesdk/ShareSDKPlatforms/SnapChat - - mob_sharesdk/ShareSDKPlatforms/Telegram - - mob_sharesdk/ShareSDKPlatforms/TikTok - - mob_sharesdk/ShareSDKPlatforms/Twitter - - mob_sharesdk/ShareSDKPlatforms/VKontakte - - mob_sharesdk/ShareSDKPlatforms/WatermelonVideo - - mob_sharesdk/ShareSDKPlatforms/WeChatFull - - mob_sharesdk/ShareSDKPlatforms/WeWork - - mob_sharesdk/ShareSDKPlatforms/WhatsApp - - mob_sharesdk/ShareSDKPlatforms/Yixin - - mob_sharesdk/ShareSDKPlatforms/YouDaoNote + - mob_sharesdk/ShareSDKPlatforms/WeChat_Lite - mob_sharesdk/ShareSDKUI - - SSZipArchive (2.4.3) - - thumbnails (0.0.1): - - Flutter - tobias (0.0.1): - Flutter + - tobias/normal (= 0.0.1) + - tobias/normal (0.0.1): + - Flutter - TPNS-iOS (1.3.4.1) - tpns_flutter_plugin (1.1.6): - Flutter - TPNS-iOS (= 1.3.4.1) - - UMCommon (7.4.1): + - UMCommon (7.4.4): - UMDevice - - UMDevice (3.1.0) + - UMDevice (3.3.0) - umeng_common_sdk (0.0.1): - Flutter - UMCommon - UMDevice - - url_launcher (0.0.1): + - url_launcher_ios (0.0.1): - Flutter - video_player_avfoundation (0.0.1): - Flutter - - wakelock (0.0.1): + - FlutterMacOS + - wakelock_plus (0.0.1): - Flutter - - webview_flutter (0.0.1): + - webview_flutter_wkwebview (0.0.1): - Flutter - - ZLPhotoBrowser-objc (1.0.4): - - SDWebImage + - WechatOpenSDK-XCFramework (2.0.2) + - ZLPhotoBrowser (4.4.8.1): + - ZLPhotoBrowser/Core (= 4.4.8.1) + - ZLPhotoBrowser/Core (4.4.8.1) DEPENDENCIES: + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - emoji_picker_flutter (from `.symlinks/plugins/emoji_picker_flutter/ios`) - Flutter (from `Flutter`) - flutter_baidu_mapapi_base (from `.symlinks/plugins/flutter_baidu_mapapi_base/ios`) @@ -252,41 +147,43 @@ DEPENDENCIES: - flutter_baidu_mapapi_search (from `.symlinks/plugins/flutter_baidu_mapapi_search/ios`) - flutter_baidu_mapapi_utils (from `.symlinks/plugins/flutter_baidu_mapapi_utils/ios`) - flutter_bmflocation (from `.symlinks/plugins/flutter_bmflocation/ios`) + - flutter_localization (from `.symlinks/plugins/flutter_localization/ios`) - fluwx (from `.symlinks/plugins/fluwx/ios`) - image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`) - image_pickers (from `.symlinks/plugins/image_pickers/ios`) - number_precision (from `.symlinks/plugins/number_precision/ios`) - - package_info (from `.symlinks/plugins/package_info/ios`) - - path_provider (from `.symlinks/plugins/path_provider/ios`) - - permission_handler (from `.symlinks/plugins/permission_handler/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) + - rive_common (from `.symlinks/plugins/rive_common/ios`) - scan (from `.symlinks/plugins/scan/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - sharesdk_plugin (from `.symlinks/plugins/sharesdk_plugin/ios`) - - SSZipArchive (~> 2.4.2) - - thumbnails (from `.symlinks/plugins/thumbnails/ios`) - tobias (from `.symlinks/plugins/tobias/ios`) - tpns_flutter_plugin (from `.symlinks/plugins/tpns_flutter_plugin/ios`) - umeng_common_sdk (from `.symlinks/plugins/umeng_common_sdk/ios`) - - url_launcher (from `.symlinks/plugins/url_launcher/ios`) - - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`) - - wakelock (from `.symlinks/plugins/wakelock/ios`) - - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`) + - wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`) + - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) SPEC REPOS: - https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git: + trunk: - AFNetworking - BaiduMapKit - BMKLocationKit - mob_sharesdk - MOBFoundation - SDWebImage - - SSZipArchive - TPNS-iOS - UMCommon - UMDevice - - ZLPhotoBrowser-objc + - WechatOpenSDK-XCFramework + - ZLPhotoBrowser EXTERNAL SOURCES: + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" emoji_picker_flutter: :path: ".symlinks/plugins/emoji_picker_flutter/ios" Flutter: @@ -301,6 +198,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_baidu_mapapi_utils/ios" flutter_bmflocation: :path: ".symlinks/plugins/flutter_bmflocation/ios" + flutter_localization: + :path: ".symlinks/plugins/flutter_localization/ios" fluwx: :path: ".symlinks/plugins/fluwx/ios" image_gallery_saver: @@ -309,73 +208,75 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/image_pickers/ios" number_precision: :path: ".symlinks/plugins/number_precision/ios" - package_info: - :path: ".symlinks/plugins/package_info/ios" - path_provider: - :path: ".symlinks/plugins/path_provider/ios" - permission_handler: - :path: ".symlinks/plugins/permission_handler/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + permission_handler_apple: + :path: ".symlinks/plugins/permission_handler_apple/ios" + rive_common: + :path: ".symlinks/plugins/rive_common/ios" scan: :path: ".symlinks/plugins/scan/ios" shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/ios" + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" sharesdk_plugin: :path: ".symlinks/plugins/sharesdk_plugin/ios" - thumbnails: - :path: ".symlinks/plugins/thumbnails/ios" tobias: :path: ".symlinks/plugins/tobias/ios" tpns_flutter_plugin: :path: ".symlinks/plugins/tpns_flutter_plugin/ios" umeng_common_sdk: :path: ".symlinks/plugins/umeng_common_sdk/ios" - url_launcher: - :path: ".symlinks/plugins/url_launcher/ios" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" video_player_avfoundation: - :path: ".symlinks/plugins/video_player_avfoundation/ios" - wakelock: - :path: ".symlinks/plugins/wakelock/ios" - webview_flutter: - :path: ".symlinks/plugins/webview_flutter/ios" + :path: ".symlinks/plugins/video_player_avfoundation/darwin" + wakelock_plus: + :path: ".symlinks/plugins/wakelock_plus/ios" + webview_flutter_wkwebview: + :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" SPEC CHECKSUMS: AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58 - BaiduMapKit: f227cfb43581e91466fb4f1344f655eab5788777 - BMKLocationKit: 688d8e1194980b96fc9a6585c0eb42e62fbaf780 - emoji_picker_flutter: df19dac03a2b39ac667dc8d1da939ef3a9e21347 - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - flutter_baidu_mapapi_base: cb406be78c3a949fb58a45dc6627f139d580bd37 - flutter_baidu_mapapi_map: 81c4e6e93dc668e311d9b521421deaf292390434 - flutter_baidu_mapapi_search: 13a360334e91abea0bcf820546b2ef4548e42e08 - flutter_baidu_mapapi_utils: f6a5d23da26b0e58f1ae9908da7ba87fd48384b1 - flutter_bmflocation: 1bd73181196567fe1529f765aa4f8e2615a8a3cf - fluwx: a24006296e7ca601e8544e12bd6269497fae23e6 - image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2 - image_pickers: 25c8916d358bc9d2707cb470ba3d57497f105773 - mob_sharesdk: 0698d60b3c1549a5b0bcfdec6f407439dd2960c0 - MOBFoundation: 6df2684b4db4f0f5bd71b0623f82e11271bf7ac8 + BaiduMapKit: 155ba6a94b8155826c5ed0f843f18875df2b807b + BMKLocationKit: a93bc412af3a601f12d243f4fb83f77650103e56 + device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 + emoji_picker_flutter: fe2e6151c5b548e975d546e6eeb567daf0962a58 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_baidu_mapapi_base: f1b18c6ae9331354e2439875d7670b55d8309ae6 + flutter_baidu_mapapi_map: d54b33f6618bc9fcdbc3a76426255230b0d3271e + flutter_baidu_mapapi_search: 89b48a0c84dbddcffb74c1c68ddf118f76b491ea + flutter_baidu_mapapi_utils: a3f5dc1bd58c2517a064139a1ea100a5fc1241b1 + flutter_bmflocation: 2a478a9b70e1a5fd0857a39a47d06090dbc0a63a + flutter_localization: f43b18844a2b3d2c71fd64f04ffd6b1e64dd54d4 + fluwx: 3c7b6df42f83d444d4538f3eaeae079f12d30c37 + image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb + image_pickers: da92cbfcd65c0eabc7b37a349d9c3bd91bad7d00 + mob_sharesdk: 6081cd4584b581be65cdcb78ff82e8288f037f97 + MOBFoundation: dd70c13aa7ef50fa0514c0cccabea9b2455ddd1c number_precision: 26fa2be2212f9d1429f92d667d6b0aa4df0058d8 - package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 - path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c - permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 + package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 + path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c + permission_handler_apple: 036b856153a2b1f61f21030ff725f3e6fece2b78 + rive_common: c537b4eed761e903a9403d93c347b69bd7a4762f scan: aea35bb4aa59ccc8839c576a18cd57c7d492cc86 - SDWebImage: e5cc87bf736e60f49592f307bdf9e157189298a3 - shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 - sharesdk_plugin: b105d82bed39e1d229591999058ab1e12ff95001 - SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef - thumbnails: bb4f4e9bb4b51c8ae4e6ad9a2fa81373f9b634ad - tobias: 2aded9b83e3663b907360a800d8e3c13284f25c5 + SDWebImage: a3ba0b8faac7228c3c8eadd1a55c9c9fe5e16457 + shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 + sharesdk_plugin: f29a6f471ae1c253e96636d62106c3f8d793948c + tobias: 22f69183b14af82a2ac8ff698af084c352744e5f TPNS-iOS: 36c335eff80670de6ede780ab827f679d78f64ff tpns_flutter_plugin: ed7fae92efde473d5cb9fd33ac92caa2d64530a2 - UMCommon: 47e0b53f6a36568e958a5abd005ed7577fcac9ad - UMDevice: 9ef8045b59e0479cff7062915c879a1af46fa094 + UMCommon: f31de941d59c172708978ead53396f5b1c29820e + UMDevice: f67106f8f1a8bc465ba20d376d896e178be66ba7 umeng_common_sdk: a8abd7f86dfd013dbbeeae587ee143760c6582f2 - url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef - video_player_avfoundation: 6d971a232d72e6ee25368378d48a079dea01f1cf - wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f - webview_flutter: 5fb4def2bbd4339889ee14d045b605cefc5bc232 - ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736 + url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586 + video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579 + wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47 + webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36 + WechatOpenSDK-XCFramework: acdeeda129efbef9532bca8a10c24e1b4b8c7d69 + ZLPhotoBrowser: 379473d376e3bee6f30f84778b2d5f9be09842e5 -PODFILE CHECKSUM: f8bac8842dd5d4f36a3709c129ae7a2ccd5be619 +PODFILE CHECKSUM: 6d506ed1ce264c3d63e9148a3d91b3b3d747000f -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 76034449..251289aa 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -7,43 +7,27 @@ objects = { /* Begin PBXBuildFile section */ - 0558860326BD10CA00FB1CFE /* test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0558860226BD10CA00FB1CFE /* test.swift */; }; - 05C5426F26BBE8FE00D26AC2 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F373269581F600237A5E /* CoreLocation.framework */; }; - 05C5427126BBE93600D26AC2 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05C5427026BBE93600D26AC2 /* AdSupport.framework */; }; - 05C5427426BCE3AC00D26AC2 /* BMKLocationKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05C5427326BCE3AC00D26AC2 /* BMKLocationKit.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 6EE8F3582695818800237A5E /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F3572695818800237A5E /* JavaScriptCore.framework */; }; - 6EE8F35B2695819500237A5E /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F3592695819500237A5E /* MediaPlayer.framework */; }; - 6EE8F35C2695819500237A5E /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F35A2695819500237A5E /* CoreMedia.framework */; }; - 6EE8F35F269581A300237A5E /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F35D269581A300237A5E /* AVFoundation.framework */; }; - 6EE8F360269581A300237A5E /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F35E269581A300237A5E /* AVKit.framework */; }; - 6EE8F362269581AF00237A5E /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F361269581AF00237A5E /* GLKit.framework */; platformFilter = ios; }; - 6EE8F364269581B600237A5E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F363269581B600237A5E /* OpenGLES.framework */; platformFilter = ios; }; - 6EE8F366269581BC00237A5E /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F365269581BC00237A5E /* CoreText.framework */; }; - 6EE8F368269581C300237A5E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F367269581C300237A5E /* QuartzCore.framework */; }; - 6EE8F36A269581CC00237A5E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F369269581CC00237A5E /* CoreGraphics.framework */; }; - 6EE8F36C269581D500237A5E /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F36B269581D500237A5E /* libc++.tbd */; }; - 6EE8F36E269581E300237A5E /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F36D269581E300237A5E /* QuickLook.framework */; }; - 6EE8F370269581EC00237A5E /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F36F269581EC00237A5E /* CoreTelephony.framework */; }; - 6EE8F372269581F100237A5E /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F371269581F100237A5E /* AssetsLibrary.framework */; }; - 6EE8F376269581FB00237A5E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F375269581FB00237A5E /* AddressBook.framework */; }; - 6EE8F3782695820600237A5E /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE8F3772695820600237A5E /* libiconv.tbd */; }; - 899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 899C4C3E26A5179900B44087 /* InfoPlist.strings */; }; - 89A626A526A7F71A0004A8F0 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 89A626A426A7F71A0004A8F0 /* libsqlite3.0.tbd */; }; - 89AEFA4526A6802000DD2817 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89AEFA4426A6802000DD2817 /* MapKit.framework */; }; - 89AEFA8F26A699DE00DD2817 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 89AEFA8E26A699DE00DD2817 /* libz.tbd */; }; - 89AEFA9126A69A2200DD2817 /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89AEFA9026A69A2200DD2817 /* ExternalAccessory.framework */; }; - 89AEFA9326A69A3600DD2817 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89AEFA9226A69A3600DD2817 /* Security.framework */; }; - 89AEFA9526A69A4800DD2817 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89AEFA9426A69A4800DD2817 /* SystemConfiguration.framework */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.mm */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 784AA5A6F0F484A082379297 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DBFFACB57E219D46466EC2C /* Pods_RunnerTests.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - C9444B3318AB7FB815E97950 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D665249B561FBB8683B1ED10 /* libPods-Runner.a */; }; + C7C66722A6EB6237E8255906 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1F15AA48EC3F050E98F81DD /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -58,61 +42,30 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 0558860226BD10CA00FB1CFE /* test.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = test.swift; sourceTree = ""; }; - 05C5427026BBE93600D26AC2 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; - 05C5427326BCE3AC00D26AC2 /* BMKLocationKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = BMKLocationKit.framework; sourceTree = ""; }; - 05C5427526BCFA9000D26AC2 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - 05C5427726BCFCBB00D26AC2 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 03F5C03A2BABDCD300A5569A /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 1F4892E3FA92A413576C72FF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 2A35FC590178BE8F7F33F585 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 5EF160A708FC02BF05CE1076 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 6EE8F3572695818800237A5E /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; - 6EE8F3592695819500237A5E /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; - 6EE8F35A2695819500237A5E /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; - 6EE8F35D269581A300237A5E /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 6EE8F35E269581A300237A5E /* AVKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; }; - 6EE8F361269581AF00237A5E /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; - 6EE8F363269581B600237A5E /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 6EE8F365269581BC00237A5E /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; - 6EE8F367269581C300237A5E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 6EE8F369269581CC00237A5E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6EE8F36B269581D500237A5E /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; - 6EE8F36D269581E300237A5E /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = System/Library/Frameworks/QuickLook.framework; sourceTree = SDKROOT; }; - 6EE8F36F269581EC00237A5E /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; - 6EE8F371269581F100237A5E /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; - 6EE8F373269581F600237A5E /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; - 6EE8F375269581FB00237A5E /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; - 6EE8F3772695820600237A5E /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; }; + 5DBFFACB57E219D46466EC2C /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 65BBDD5B9C397BF9E99FF4A9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 6C49515321AD6697C507695F /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = ""; }; - 81880E8F5E90EA6E5E0D57EB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 89847A4826A14482008C8077 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - 899C4C3826A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = ""; }; - 899C4C3926A5171500B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = ""; }; - 899C4C3A26A5174A00B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Main.strings"; sourceTree = ""; }; - 899C4C3B26A5174A00B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = ""; }; - 899C4C3D26A5179900B44087 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 899C4C3F26A5179F00B44087 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; - 899C4C4026A517A000B44087 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; - 89A626A426A7F71A0004A8F0 /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; }; - 89AEFA4426A6802000DD2817 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; - 89AEFA8E26A699DE00DD2817 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; - 89AEFA9026A69A2200DD2817 /* ExternalAccessory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExternalAccessory.framework; path = System/Library/Frameworks/ExternalAccessory.framework; sourceTree = SDKROOT; }; - 89AEFA9226A69A3600DD2817 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - 89AEFA9426A69A4800DD2817 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - 89AEFA9626A69D8E00DD2817 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 7B719029A0AC6D791E21762B /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CAC043569353DC17A6C2E51D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - D665249B561FBB8683B1ED10 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A25955BA3C28E6A0BBBF971C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + B1F15AA48EC3F050E98F81DD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -120,167 +73,51 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 05C5427126BBE93600D26AC2 /* AdSupport.framework in Frameworks */, - 6EE8F36C269581D500237A5E /* libc++.tbd in Frameworks */, - 6EE8F370269581EC00237A5E /* CoreTelephony.framework in Frameworks */, - 89A626A526A7F71A0004A8F0 /* libsqlite3.0.tbd in Frameworks */, - 89AEFA9326A69A3600DD2817 /* Security.framework in Frameworks */, - 89AEFA9526A69A4800DD2817 /* SystemConfiguration.framework in Frameworks */, - 05C5426F26BBE8FE00D26AC2 /* CoreLocation.framework in Frameworks */, - 89AEFA8F26A699DE00DD2817 /* libz.tbd in Frameworks */, - 6EE8F362269581AF00237A5E /* GLKit.framework in Frameworks */, - 89AEFA9126A69A2200DD2817 /* ExternalAccessory.framework in Frameworks */, - 89AEFA4526A6802000DD2817 /* MapKit.framework in Frameworks */, - 6EE8F3782695820600237A5E /* libiconv.tbd in Frameworks */, - 6EE8F376269581FB00237A5E /* AddressBook.framework in Frameworks */, - 6EE8F372269581F100237A5E /* AssetsLibrary.framework in Frameworks */, - 6EE8F36E269581E300237A5E /* QuickLook.framework in Frameworks */, - 6EE8F36A269581CC00237A5E /* CoreGraphics.framework in Frameworks */, - 6EE8F368269581C300237A5E /* QuartzCore.framework in Frameworks */, - 6EE8F366269581BC00237A5E /* CoreText.framework in Frameworks */, - 6EE8F364269581B600237A5E /* OpenGLES.framework in Frameworks */, - 6EE8F35F269581A300237A5E /* AVFoundation.framework in Frameworks */, - 6EE8F360269581A300237A5E /* AVKit.framework in Frameworks */, - 6EE8F35B2695819500237A5E /* MediaPlayer.framework in Frameworks */, - 6EE8F35C2695819500237A5E /* CoreMedia.framework in Frameworks */, - 6EE8F3582695818800237A5E /* JavaScriptCore.framework in Frameworks */, - C9444B3318AB7FB815E97950 /* libPods-Runner.a in Frameworks */, - 05C5427426BCE3AC00D26AC2 /* BMKLocationKit.framework in Frameworks */, + C7C66722A6EB6237E8255906 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DC87F062E05606E866CFBC01 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 784AA5A6F0F484A082379297 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 05C5426126BBE82E00D26AC2 /* baidu */ = { + 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( - 05C5427326BCE3AC00D26AC2 /* BMKLocationKit.framework */, + 331C807B294A618700263BE5 /* RunnerTests.swift */, ); - path = baidu; + path = RunnerTests; sourceTree = ""; }; - 4ACDDAD1B437E297D1948602 /* Frameworks */ = { + 66EE8A7D33828B1395D646A8 /* Frameworks */ = { isa = PBXGroup; children = ( - 05C5427526BCFA9000D26AC2 /* SwiftUI.framework */, - 05C5427026BBE93600D26AC2 /* AdSupport.framework */, - 89A626A426A7F71A0004A8F0 /* libsqlite3.0.tbd */, - 89AEFA9626A69D8E00DD2817 /* Foundation.framework */, - 89AEFA9426A69A4800DD2817 /* SystemConfiguration.framework */, - 89AEFA9226A69A3600DD2817 /* Security.framework */, - 89AEFA9026A69A2200DD2817 /* ExternalAccessory.framework */, - 89AEFA8E26A699DE00DD2817 /* libz.tbd */, - 89AEFA4426A6802000DD2817 /* MapKit.framework */, - 6EE8F3772695820600237A5E /* libiconv.tbd */, - 6EE8F375269581FB00237A5E /* AddressBook.framework */, - 6EE8F373269581F600237A5E /* CoreLocation.framework */, - 6EE8F371269581F100237A5E /* AssetsLibrary.framework */, - 6EE8F36F269581EC00237A5E /* CoreTelephony.framework */, - 6EE8F36D269581E300237A5E /* QuickLook.framework */, - 6EE8F36B269581D500237A5E /* libc++.tbd */, - 6EE8F369269581CC00237A5E /* CoreGraphics.framework */, - 6EE8F367269581C300237A5E /* QuartzCore.framework */, - 6EE8F365269581BC00237A5E /* CoreText.framework */, - 6EE8F363269581B600237A5E /* OpenGLES.framework */, - 6EE8F361269581AF00237A5E /* GLKit.framework */, - 6EE8F35D269581A300237A5E /* AVFoundation.framework */, - 6EE8F35E269581A300237A5E /* AVKit.framework */, - 6EE8F35A2695819500237A5E /* CoreMedia.framework */, - 6EE8F3592695819500237A5E /* MediaPlayer.framework */, - 6EE8F3572695818800237A5E /* JavaScriptCore.framework */, - D665249B561FBB8683B1ED10 /* libPods-Runner.a */, + B1F15AA48EC3F050E98F81DD /* Pods_Runner.framework */, + 5DBFFACB57E219D46466EC2C /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; }; - 4C858108186A05549121D4FA /* Pods */ = { + 9334AEAA165F47A31F9FF52E /* Pods */ = { isa = PBXGroup; children = ( - 81880E8F5E90EA6E5E0D57EB /* Pods-Runner.debug.xcconfig */, - 5EF160A708FC02BF05CE1076 /* Pods-Runner.release.xcconfig */, - CAC043569353DC17A6C2E51D /* Pods-Runner.profile.xcconfig */, + 7B719029A0AC6D791E21762B /* Pods-Runner.debug.xcconfig */, + 65BBDD5B9C397BF9E99FF4A9 /* Pods-Runner.release.xcconfig */, + 1F4892E3FA92A413576C72FF /* Pods-Runner.profile.xcconfig */, + 2A35FC590178BE8F7F33F585 /* Pods-RunnerTests.debug.xcconfig */, + A25955BA3C28E6A0BBBF971C /* Pods-RunnerTests.release.xcconfig */, + 6C49515321AD6697C507695F /* Pods-RunnerTests.profile.xcconfig */, ); path = Pods; sourceTree = ""; }; - 6EE8F2E32695806400237A5E /* Class */ = { - isa = PBXGroup; - children = ( - ); - path = Class; - sourceTree = SOURCE_ROOT; - }; - 6EE8F2E42695813500237A5E /* UniMPSDK */ = { - isa = PBXGroup; - children = ( - 6EE8F2EC2695815C00237A5E /* Headers */, - 6EE8F3382695816000237A5E /* Libs */, - 6EE8F2E52695815A00237A5E /* Resources */, - ); - path = UniMPSDK; - sourceTree = SOURCE_ROOT; - }; - 6EE8F2E52695815A00237A5E /* Resources */ = { - isa = PBXGroup; - children = ( - 89319A6726E237A5001EFBD7 /* Resources */, - ); - path = Resources; - sourceTree = ""; - }; - 6EE8F2EC2695815C00237A5E /* Headers */ = { - isa = PBXGroup; - children = ( - 6EE8F2F12695815C00237A5E /* weexHeader */, - ); - path = Headers; - sourceTree = ""; - }; - 6EE8F2F12695815C00237A5E /* weexHeader */ = { - isa = PBXGroup; - children = ( - ); - path = weexHeader; - sourceTree = ""; - }; - 6EE8F3382695816000237A5E /* Libs */ = { - isa = PBXGroup; - children = ( - ); - path = Libs; - sourceTree = ""; - }; - 89319A6726E237A5001EFBD7 /* Resources */ = { - isa = PBXGroup; - children = ( - ); - name = Resources; - sourceTree = ""; - }; - 89A626A826A7FFF30004A8F0 /* wx */ = { - isa = PBXGroup; - children = ( - 89A626AA26A8000C0004A8F0 /* Headers */, - 89A626A926A800010004A8F0 /* Libs */, - ); - path = wx; - sourceTree = SOURCE_ROOT; - }; - 89A626A926A800010004A8F0 /* Libs */ = { - isa = PBXGroup; - children = ( - ); - path = Libs; - sourceTree = ""; - }; - 89A626AA26A8000C0004A8F0 /* Headers */ = { - isa = PBXGroup; - children = ( - ); - path = Headers; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -295,12 +132,12 @@ 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( - 899C4C3E26A5179900B44087 /* InfoPlist.strings */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 4C858108186A05549121D4FA /* Pods */, - 4ACDDAD1B437E297D1948602 /* Frameworks */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 9334AEAA165F47A31F9FF52E /* Pods */, + 66EE8A7D33828B1395D646A8 /* Frameworks */, ); sourceTree = ""; }; @@ -308,6 +145,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, ); name = Products; sourceTree = ""; @@ -315,50 +153,54 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( - 05C5426126BBE82E00D26AC2 /* baidu */, - 89A626A826A7FFF30004A8F0 /* wx */, - 89847A4826A14482008C8077 /* Runner.entitlements */, - 6EE8F2E42695813500237A5E /* UniMPSDK */, - 6EE8F2E32695806400237A5E /* Class */, - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.mm */, + 03F5C03A2BABDCD300A5569A /* Runner.entitlements */, 97C146FA1CF9000F007C117D /* Main.storyboard */, 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 05C5427726BCFCBB00D26AC2 /* Runner-Bridging-Header.h */, - 0558860226BD10CA00FB1CFE /* test.swift */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, ); path = Runner; sourceTree = ""; }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 124DE3F190D8D6855FD731F3 /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + DC87F062E05606E866CFBC01 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - B8122AB2E6A8A2B1AD0AB3F7 /* [CP] Check Pods Manifest.lock */, + F4A9982A15AB74D27F858927 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 120EAF7195D9AB3BB1E8FA2B /* [CP] Copy Pods Resources */, - 8C1FAACB8CAD66760F3893D3 /* [CP] Embed Pods Frameworks */, + E18CCA6DD340E347CB8C11AA /* [CP] Embed Pods Frameworks */, + D6E92B53E0F33BB4235B78D9 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -375,12 +217,17 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1250; + LastSwiftMigration = 1100; }; }; }; @@ -391,8 +238,6 @@ knownRegions = ( en, Base, - "zh-Hans", - "zh-Hant", ); mainGroup = 97C146E51CF9000F007C117D; productRefGroup = 97C146EF1CF9000F007C117D /* Products */; @@ -400,11 +245,19 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -413,28 +266,32 @@ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - 899C4C3C26A5179900B44087 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 120EAF7195D9AB3BB1E8FA2B /* [CP] Copy Pods Resources */ = { + 124DE3F190D8D6855FD731F3 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { @@ -444,47 +301,65 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 8C1FAACB8CAD66760F3893D3 /* [CP] Embed Pods Frameworks */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + D6E92B53E0F33BB4235B78D9 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + E18CCA6DD340E347CB8C11AA /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "Run Script"; - outputPaths = ( + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - B8122AB2E6A8A2B1AD0AB3F7 /* [CP] Check Pods Manifest.lock */ = { + F4A9982A15AB74D27F858927 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -509,36 +384,38 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.mm in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 0558860326BD10CA00FB1CFE /* test.swift in Sources */, + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - 899C4C3E26A5179900B44087 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 899C4C3D26A5179900B44087 /* en */, - 899C4C3F26A5179F00B44087 /* zh-Hans */, - 899C4C4026A517A000B44087 /* zh-Hant */, - ); - name = InfoPlist.strings; - sourceTree = ""; +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 97C146FB1CF9000F007C117D /* Base */, - 899C4C3826A5171500B44087 /* zh-Hans */, - 899C4C3A26A5174A00B44087 /* zh-Hant */, ); name = Main.storyboard; sourceTree = ""; @@ -547,8 +424,6 @@ isa = PBXVariantGroup; children = ( 97C147001CF9000F007C117D /* Base */, - 899C4C3926A5171500B44087 /* zh-Hans */, - 899C4C3B26A5174A00B44087 /* zh-Hant */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -560,7 +435,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -590,6 +465,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -598,9 +474,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; - ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -613,100 +488,89 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; - BUILD_LIBRARY_FOR_DISTRIBUTION = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/UniMPSDK/Libs", - ); - GCC_INPUT_FILETYPE = automatic; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - HAVE_INTTYPES_H, - HAVE_PKCRYPT, - HAVE_STDINT_H, - HAVE_WZAES, - HAVE_ZLIB, - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_ROOT}/Headers/Public\"", - "\"${PODS_ROOT}/Headers/Public/flutter_bmflocation\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_utils\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"", - "\"${PODS_ROOT}/Headers/Public/image_pickers\"", - "\"${PODS_ROOT}/Headers/Public/path_provider\"", - "\"${PODS_ROOT}/Headers/Public/permission_handler\"", - "\"${PODS_ROOT}/Headers/Public/shared_preferences\"", - "\"${PODS_ROOT}/Headers/Public/sqflite\"", - "\"${PODS_ROOT}/Headers/Public/video_player\"", - "\"${PODS_ROOT}/Headers/Public/wakelock\"", - "\"${PODS_ROOT}/Headers/Public/webview_flutter\"", - "$(PROJECT_DIR)/UniMPSDK/Headers", - "$(PROJECT_DIR)/wx/Headers", - "\"${PODS_ROOT}/Headers/Private/fluwx\"", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + INFOPLIST_KEY_CFBundleDisplayName = "海峡姐妹"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/UniMPSDK/Libs", - "$(PROJECT_DIR)/wx/Libs", - "$(PROJECT_DIR)/baidu", - "$(PROJECT_DIR)/Runner/baidu", - ); - MARKETING_VERSION = 3.2.28; - ONLY_ACTIVE_ARCH = YES; + MARKETING_VERSION = 3.2.22; OTHER_LDFLAGS = ( "$(inherited)", - "-ObjC", - "-l\"c++\"", - "-l\"image_pickers\"", - "-l\"path_provider\"", - "-l\"flutter_bmflocation\"", - "-l\"flutter_baidu_mapapi_utils\"", - "-l\"flutter_baidu_mapapi_search\"", - "-l\"flutter_baidu_mapapi_map\"", - "-l\"flutter_baidu_mapapi_base\"", - "-l\"permission_handler\"", - "-l\"sqlite3\"", - "-l\"wakelock\"", - "-l\"webview_flutter\"", - "-l\"z\"", - "-fcxx-modules", - "-fmodules", "-ld64", ); PRODUCT_BUNDLE_IDENTIFIER = com.zsw.hx; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2A35FC590178BE8F7F33F585 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.zsw.huixiangApp.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A25955BA3C28E6A0BBBF971C /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.zsw.huixiangApp.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6C49515321AD6697C507695F /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.zsw.huixiangApp.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -736,6 +600,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -750,9 +615,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; - "MTL_ENABLE_DEBUG_INFO[arch=*]" = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -763,7 +627,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -793,6 +657,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -801,11 +666,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; - ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -816,91 +682,31 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; - BUILD_LIBRARY_FOR_DISTRIBUTION = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/UniMPSDK/Libs", - ); - GCC_INPUT_FILETYPE = automatic; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - HAVE_INTTYPES_H, - HAVE_PKCRYPT, - HAVE_STDINT_H, - HAVE_WZAES, - HAVE_ZLIB, - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_ROOT}/Headers/Public\"", - "\"${PODS_ROOT}/Headers/Public/flutter_bmflocation\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_utils\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"", - "\"${PODS_ROOT}/Headers/Public/image_pickers\"", - "\"${PODS_ROOT}/Headers/Public/path_provider\"", - "\"${PODS_ROOT}/Headers/Public/permission_handler\"", - "\"${PODS_ROOT}/Headers/Public/shared_preferences\"", - "\"${PODS_ROOT}/Headers/Public/sqflite\"", - "\"${PODS_ROOT}/Headers/Public/video_player\"", - "\"${PODS_ROOT}/Headers/Public/wakelock\"", - "\"${PODS_ROOT}/Headers/Public/webview_flutter\"", - "$(PROJECT_DIR)/UniMPSDK/Headers", - "$(PROJECT_DIR)/wx/Headers", - "\"${PODS_ROOT}/Headers/Private/fluwx\"", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + INFOPLIST_KEY_CFBundleDisplayName = "海峡姐妹"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/UniMPSDK/Libs", - "$(PROJECT_DIR)/wx/Libs", - "$(PROJECT_DIR)/baidu", - "$(PROJECT_DIR)/Runner/baidu", - ); - MARKETING_VERSION = 3.2.28; - ONLY_ACTIVE_ARCH = YES; + MARKETING_VERSION = 3.2.22; OTHER_LDFLAGS = ( "$(inherited)", - "-ObjC", - "-l\"c++\"", - "-l\"image_pickers\"", - "-l\"path_provider\"", - "-l\"flutter_bmflocation\"", - "-l\"flutter_baidu_mapapi_utils\"", - "-l\"flutter_baidu_mapapi_search\"", - "-l\"flutter_baidu_mapapi_map\"", - "-l\"flutter_baidu_mapapi_base\"", - "-l\"permission_handler\"", - "-l\"sqlite3\"", - "-l\"wakelock\"", - "-l\"webview_flutter\"", - "-l\"z\"", - "-fcxx-modules", - "-fmodules", "-ld64", ); PRODUCT_BUNDLE_IDENTIFIER = com.zsw.hx; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -910,91 +716,30 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; - BUILD_LIBRARY_FOR_DISTRIBUTION = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/UniMPSDK/Libs", - ); - GCC_INPUT_FILETYPE = automatic; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - HAVE_INTTYPES_H, - HAVE_PKCRYPT, - HAVE_STDINT_H, - HAVE_WZAES, - HAVE_ZLIB, - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_ROOT}/Headers/Public\"", - "\"${PODS_ROOT}/Headers/Public/flutter_bmflocation\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_utils\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"", - "\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"", - "\"${PODS_ROOT}/Headers/Public/image_pickers\"", - "\"${PODS_ROOT}/Headers/Public/path_provider\"", - "\"${PODS_ROOT}/Headers/Public/permission_handler\"", - "\"${PODS_ROOT}/Headers/Public/shared_preferences\"", - "\"${PODS_ROOT}/Headers/Public/sqflite\"", - "\"${PODS_ROOT}/Headers/Public/video_player\"", - "\"${PODS_ROOT}/Headers/Public/wakelock\"", - "\"${PODS_ROOT}/Headers/Public/webview_flutter\"", - "$(PROJECT_DIR)/UniMPSDK/Headers", - "$(PROJECT_DIR)/wx/Headers", - "\"${PODS_ROOT}/Headers/Private/fluwx\"", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + INFOPLIST_KEY_CFBundleDisplayName = "海峡姐妹"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/UniMPSDK/Libs", - "$(PROJECT_DIR)/wx/Libs", - "$(PROJECT_DIR)/baidu", - "$(PROJECT_DIR)/Runner/baidu", - ); - MARKETING_VERSION = 3.2.28; - ONLY_ACTIVE_ARCH = YES; + MARKETING_VERSION = 3.2.22; OTHER_LDFLAGS = ( "$(inherited)", - "-ObjC", - "-l\"c++\"", - "-l\"image_pickers\"", - "-l\"path_provider\"", - "-l\"flutter_bmflocation\"", - "-l\"flutter_baidu_mapapi_utils\"", - "-l\"flutter_baidu_mapapi_search\"", - "-l\"flutter_baidu_mapapi_map\"", - "-l\"flutter_baidu_mapapi_base\"", - "-l\"permission_handler\"", - "-l\"sqlite3\"", - "-l\"wakelock\"", - "-l\"webview_flutter\"", - "-l\"z\"", - "-fcxx-modules", - "-fmodules", "-ld64", ); PRODUCT_BUNDLE_IDENTIFIER = com.zsw.hx; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; @@ -1002,6 +747,16 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a3..8e3ca5df 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + + + -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/ios/Runner/AppDelegate.mm b/ios/Runner/AppDelegate.mm deleted file mode 100644 index 7169e504..00000000 --- a/ios/Runner/AppDelegate.mm +++ /dev/null @@ -1,36 +0,0 @@ -#import "AppDelegate.h" -#import "GeneratedPluginRegistrant.h" - - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - -FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController; -__block NSDictionary *remoteNotification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; - - FlutterMethodChannel* bridgeAppChannel = [FlutterMethodChannel methodChannelWithName:@"bridge" binaryMessenger:(NSObject *)controller]; - [bridgeAppChannel setMethodCallHandler:^(FlutterMethodCall * _Nonnull call, FlutterResult _Nonnull result) { - NSString * method = call.method; - if ([method isEqual:@"action"]) { - if (remoteNotification != NULL) { - result(remoteNotification[@"custom"]); - remoteNotification = nil; - } - result(@""); - } - if ([method isEqual:@"toAppStore"]) { - NSString *appURL = @"https://itunes.apple.com/cn/app/1575124838?action=write-review"; - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:appURL]]; - result(@""); - } - //result(FlutterMethodNotImplemented); - }]; - - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end \ No newline at end of file diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..70693e4a --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Bridge.swift b/ios/Runner/Bridge.swift deleted file mode 100644 index dbad8889..00000000 --- a/ios/Runner/Bridge.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Bridge.swift -// Runner -// -// Created by 冯美坎 on 2021/8/9. -// -import Flutter -import UIKit - -class Bridge: NSObject, FlutterPlugin { - - -} diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 38b6173c..822881ae 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -95,9 +95,9 @@ lineauth line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER) alipay - iosamap - qqmap - baidumap + iosamap + qqmap + baidumap LSRequiresIPhoneOS @@ -136,20 +136,22 @@ 拍视频需要录音权限 NSMotionUsageDescription 是否允许访问运行 + NSPhotoLibraryAddUsageDescription + 请允许App保存图片到相册 NSPhotoLibraryUsageDescription 打开相册 NSSpeechRecognitionUsageDescription 是否允许语音识别 - NSPhotoLibraryAddUsageDescription - 请允许App保存图片到相册 UIApplicationSceneManifest UIApplicationSupportsMultipleScenes + UIApplicationSupportsIndirectInputEvents + UIBackgroundModes - remote-notification + location UILaunchStoryboardName LaunchScreen @@ -178,11 +180,5 @@ https://hx.lotus-wallet.com/app/ io.flutter.embedded_views_preview YES - UIBackgroundModes - - location - - UIApplicationSupportsIndirectInputEvents - diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h index 1b2cb5d6..308a2a56 100644 --- a/ios/Runner/Runner-Bridging-Header.h +++ b/ios/Runner/Runner-Bridging-Header.h @@ -1,4 +1 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// - +#import "GeneratedPluginRegistrant.h" diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements index b61074f5..903def2a 100644 --- a/ios/Runner/Runner.entitlements +++ b/ios/Runner/Runner.entitlements @@ -4,27 +4,5 @@ aps-environment development - com.apple.developer.associated-domains - - applinks:demo.dcloud.net.cn - applinks:hx.lotus-wallet.com - applinks:huixiang.lotus-wallet.com - - com.apple.security.app-sandbox - - com.apple.security.device.audio-input - - com.apple.security.device.camera - - com.apple.security.network.client - - com.apple.security.personal-information.addressbook - - com.apple.security.personal-information.calendars - - com.apple.security.personal-information.location - - com.apple.security.personal-information.photos-library - diff --git a/ios/Runner/baidu/BMKLocationKit b/ios/Runner/baidu/BMKLocationKit deleted file mode 100644 index 1c745780..00000000 Binary files a/ios/Runner/baidu/BMKLocationKit and /dev/null differ diff --git a/ios/Runner/baidu/BMKLocationKit.framework/BMKLocationKit b/ios/Runner/baidu/BMKLocationKit.framework/BMKLocationKit deleted file mode 100644 index 1c745780..00000000 Binary files a/ios/Runner/baidu/BMKLocationKit.framework/BMKLocationKit and /dev/null differ diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKGeoFenceManager.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKGeoFenceManager.h deleted file mode 100644 index ef834cd8..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKGeoFenceManager.h +++ /dev/null @@ -1,141 +0,0 @@ -// -// BMKGeoFenceManager.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - -#import "BMKGeoFenceRegion.h" - -@protocol BMKGeoFenceManagerDelegate; - -///地理围栏监听状态类型 -typedef NS_OPTIONS(NSUInteger, BMKGeoFenceActiveAction) -{ - BMKGeoFenceActiveActionNone = 0, ///< 不进行监听 - BMKGeoFenceActiveActionInside = 1 << 0, ///< 在范围内 - BMKGeoFenceActiveActionOutside = 1 << 1, ///< 在范围外 - BMKGeoFenceActiveActionStayed = 1 << 2, ///< 停留(在范围内超过10分钟) -}; - -///BMKGeoFence errorDomain -FOUNDATION_EXPORT NSErrorDomain const _Nonnull BMKGeoFenceErrorDomain; - -///地理围栏错误码 -typedef NS_ENUM(NSInteger, BMKGeoFenceErrorCode) { - BMKGeoFenceErrorUnknown = 1, ///< 未知错误 - BMKGeoFenceErrorInvalidParameter = 2, ///< 参数错误 - BMKGeoFenceErrorFailureConnection = 3, ///< 网络连接异常 - BMKGeoFenceErrorFailureAuth = 4, ///< 鉴权失败 - BMKGeoFenceErrorNoValidFence = 5, ///< 无可用围栏 - BMKGeoFenceErroFailureLocating = 6, ///< 定位错误 -}; - - -///地理围栏管理类 -@interface BMKGeoFenceManager : NSObject - - -///实现了 BMKGeoFenceManagerDelegate 协议的类指针。 -@property (nonatomic, weak, nullable) id delegate; - - -///需要进行通知的行为,默认为BMKGeoFenceActiveActionInside。 -@property (nonatomic, assign) BMKGeoFenceActiveAction activeAction; - - -///指定定位是否会被系统自动暂停。默认为NO。 -@property (nonatomic, assign) BOOL pausesLocationUpdatesAutomatically; - - -///是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。 -@property (nonatomic, assign) BOOL allowsBackgroundLocationUpdates; - - -/** - * @brief 添加一个圆形围栏 - * @param center 围栏的中心点经纬度坐标 - * @param radius 围栏的半径,单位:米,要求大于0 - * @param type 围栏的坐标系类型 - * @param customID 用户自定义ID,可选,SDK原值返回 - */ -- (void)addCircleRegionForMonitoringWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius coorType:(BMKLocationCoordinateType)type customID:(NSString * _Nullable)customID; - - -/** - * @brief 根据经纬度坐标数据添加一个闭合的多边形围栏,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 - * @param coordinates 经纬度坐标点数据,coordinates对应的内存会拷贝,调用者负责该内存的释放 - * @param count 经纬度坐标点的个数,不可小于3个 - * @param type 围栏的坐标系类型 - * @param customID 用户自定义ID,可选,SDK原值返回 - */ -- (void)addPolygonRegionForMonitoringWithCoordinates:(CLLocationCoordinate2D * _Nonnull)coordinates count:(NSInteger)count coorType:(BMKLocationCoordinateType)type customID:(NSString * _Nullable)customID; - - -/** - * @brief 根据customID获得指定的围栏,如果customID传nil,则返回全部围栏 - * @param customID 用户执行添加围栏函数时传入的customID - * @return 获得的围栏构成的数组,如果没有结果,返回nil - */ -- (NSArray * _Nullable)geoFenceRegionsWithCustomID:(NSString * _Nullable)customID; - - -/** - * @brief 移除指定围栏 - * @param region 要停止监控的围栏 - */ -- (void)removeTheGeoFenceRegion:(BMKGeoFenceRegion * _Nonnull)region; - - -/** - * @brief 移除指定customID的围栏 - * @param customID 用户执行添加围栏函数时传入的customID - */ -- (void)removeGeoFenceRegionsWithCustomID:(NSString * _Nullable)customID; - - -/** - * @brief 移除所有围栏 - */ -- (void)removeAllGeoFenceRegions; - - -@end - - - -///地理围栏代理协议,该协议定义了获取地理围栏相关回调方法,包括添加、状态改变等。 -@protocol BMKGeoFenceManagerDelegate - -@optional - -/** - * @brief 为了适配app store关于新的后台定位的审核机制(app store要求如果开发者只配置了使用期间定位,则代码中不能出现申请后台定位的逻辑),当开发者在plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription时,需要在该delegate中调用后台定位api:[locationManager requestAlwaysAuthorization]。开发者如果只配置了NSLocationWhenInUseUsageDescription,且只有使用期间的定位需求,则无需在delegate中实现逻辑。 - * @param manager 定位 BMKGeoFenceManager 类。 - * @param locationManager 系统 CLLocationManager 类 。 - * @since 1.7.0 - */ -- (void)BMKGeoFenceManager:(BMKGeoFenceManager * _Nonnull)manager doRequestAlwaysAuthorization:(CLLocationManager * _Nonnull)locationManager; - -/** - * @brief 添加地理围栏完成后的回调,成功与失败都会调用 - * @param manager 地理围栏管理类 - * @param regions 成功添加的一个或多个地理围栏构成的数组 - * @param customID 用户执行添加围栏函数时传入的customID - * @param error 添加失败的错误信息 - */ -- (void)BMKGeoFenceManager:(BMKGeoFenceManager * _Nonnull)manager didAddRegionForMonitoringFinished:(NSArray * _Nullable)regions customID:(NSString * _Nullable)customID error:(NSError * _Nullable)error; - - -/** - * @brief 地理围栏状态改变时回调,当围栏状态的值发生改变,定位失败都会调用 - * @param manager 地理围栏管理类 - * @param region 状态改变的地理围栏 - * @param customID 用户执行添加围栏函数时传入的customID - * @param error 错误信息,如定位相关的错误 - */ -- (void)BMKGeoFenceManager:(BMKGeoFenceManager * _Nonnull)manager didGeoFencesStatusChangedForRegion:(BMKGeoFenceRegion * _Nullable)region customID:(NSString * _Nullable)customID error:(NSError * _Nullable)error; - -@end - diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKGeoFenceRegion.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKGeoFenceRegion.h deleted file mode 100644 index 119358f5..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKGeoFenceRegion.h +++ /dev/null @@ -1,114 +0,0 @@ -// -// BMKGeoFenceRegion.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - -#import -#import -#import "BMKLocationManager.h" - -///BMKGeoFence Region State -typedef NS_ENUM(NSInteger, BMKGeoFenceRegionStatus) -{ - BMKGeoFenceRegionStatusUnknown = 0, ///< 未知 - BMKGeoFenceRegionStatusInside = 1, ///< 在范围内 - BMKGeoFenceRegionStatusOutside = 1 << 1, ///< 在范围外 - BMKGeoFenceRegionStatusStayed = 1 << 2, ///< 停留(在范围内超过10分钟) -}; - -#pragma mark - BMKGeoFenceRegion - - -///地理围栏基类,不可直接使用 -@interface BMKGeoFenceRegion : NSObject - - -///BMKGeoFenceRegion的唯一标识符 -@property (nonatomic, copy, readonly) NSString *identifier; - - -///用户自定义ID,可为nil。 -@property (nonatomic, copy, readonly) NSString *customID; - - -///坐标点和围栏的关系,比如用户的位置和围栏的关系 -@property (nonatomic, assign) BMKGeoFenceRegionStatus fenceStatus; - -///设定围栏坐标系类型。默认为 BMKLocationCoordinateTypeGCJ02。 -@property(nonatomic, readonly) BMKLocationCoordinateType coordinateType; - -///上次发生状态变化的时间 -@property(nonatomic, assign)NSTimeInterval lastEventTime; - - -/** - * @brief 判断位置与围栏状态 - * @param CLLocationCoordinate2D 坐标值 - * @return 返回BMKGeoFenceRegionStatus状态 - */ --(BMKGeoFenceRegionStatus)judgeStatusWithCoor:(CLLocationCoordinate2D)coor; - -@end - - -#pragma mark - BMKLocationCircleRegion - - -///圆形地理围栏 -@interface BMKGeoFenceCircleRegion : BMKGeoFenceRegion - - -///中心点的经纬度坐标 -@property (nonatomic, readonly) CLLocationCoordinate2D center; - - -///半径,单位:米 -@property (nonatomic, readonly) CLLocationDistance radius; - -/** - * @brief 构造圆形围栏 - * @param customid 用户自定义ID - * @param identityid 识别id - * @param center 中心坐标 - * @param radius 围栏半径 - * @param type 坐标系类型 - * @return BMKGeoFenceCircleRegion id - */ -- (id)initWithCustomID:(NSString *)customid identityID:(NSString *)identityid center:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius coor:(BMKLocationCoordinateType)type; - - - -@end - - -#pragma mark -BMKGeoFencePolygonRegion - - -///多边形地理围栏 -@interface BMKGeoFencePolygonRegion : BMKGeoFenceRegion - - -///经纬度坐标点数据 -@property (nonatomic, readonly) CLLocationCoordinate2D *coordinates; - - -///经纬度坐标点的个数 -@property (nonatomic, readonly) NSInteger count; - - -/** - * @brief 构造多边形围栏 - * @param customid 用户自定义ID - * @param identityid 识别id - * @param coor 多边形顶点 - * @param count 顶点个数 - * @param type 坐标系类型 - * @return BMKGeoFencePolygonRegion id - */ -- (id)initWithCustomID:(NSString *)customid identityID:(NSString *)identityid coor:(CLLocationCoordinate2D *)coor count:(NSInteger)count coor:(BMKLocationCoordinateType)type; - -@end - diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocation.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocation.h deleted file mode 100644 index eae633c2..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocation.h +++ /dev/null @@ -1,97 +0,0 @@ -// -// BMKLocation.h -// LocationComponent -// -// Created by baidu on 2017/8/16. -// Copyright © 2017年 baidu. All rights reserved. -// - -#ifndef BMKLocation_h -#define BMKLocation_h - -#import -#import "BMKLocationReGeocode.h" - -/** - * BMKLocationProvider 位置数据来源,分iOS系统定位和其他定位服务结果两种,目前仅支持iOS系统定位服务 - * - */ -typedef NS_ENUM(int, BMKLocationProvider) { - - BMKLocationProviderIOS = 0, //!<位置来源于iOS本身定位 - BMKLocationProviderOther //!<位置来源于其他定位服务 - -}; - -///描述百度iOS 定位数据 -@interface BMKLocation : NSObject - -///BMKLocation 位置数据 -@property(nonatomic, copy, readonly) CLLocation * _Nullable location; - -///BMKLocation 地址数据 -@property(nonatomic, copy) BMKLocationReGeocode * _Nullable rgcData; - -///BMKLocation 位置来源 -@property(nonatomic, assign) BMKLocationProvider provider; - -///BMKLocation 位置ID -@property(nonatomic, retain) NSString * _Nullable locationID; - -/* - * floorString - * - * Discussion: - * 室内定位成功时返回的楼层信息,ex:f1 - */ -@property(readonly, nonatomic, copy, nullable) NSString *floorString; - -/* - * buildingID - * - * Discussion: - * 室内定位成功时返回的百度建筑物ID - */ -@property(readonly, nonatomic, copy, nullable) NSString *buildingID; - -/* - * buildingName - * - * Discussion: - * 室内定位成功时返回的百度建筑物名称 - */ -@property(readonly, nonatomic, copy, nullable) NSString *buildingName; - - -/* - * extraInfo - * - * Discussion: - * 定位附加信息,如停车位code识别结果、停车位code示例、vdr推算结果置信度等 - */ -@property(readonly, nonatomic, copy, nullable) NSDictionary * extraInfo; - -/** - * @brief 初始化BMKLocation实例 - * @param loc CLLocation对象 - * @param rgc BMKLocationReGeocode对象 - * @return BMKLocation id - */ -- (id _Nonnull)initWithLocation:(CLLocation * _Nullable)loc withRgcData:(BMKLocationReGeocode * _Nullable)rgc; - -/** - * @brief 构造BMKLocation - * @param location CLLocation - * @param floorString 楼层字符串 - * @param buildingID 建筑物ID - * @param buildingName 建筑物名称 - * @param info 位置附加信息 - * @return BMKLocation id - */ --(id _Nonnull)initWithLocation:(CLLocation * _Nullable)location floorString:(NSString * _Nullable)floorString buildingID:(NSString * _Nullable)buildingID - buildingName:(NSString * _Nullable)buildingName extraInfo:(NSDictionary * _Nullable)info withRgcData:(BMKLocationReGeocode * _Nullable)rgc; - - -@end - -#endif /* BMKLocation_h */ diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationAuth.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationAuth.h deleted file mode 100644 index 90494645..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationAuth.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// BMKLocationAuth.h -// LocationComponent -// -// Created by baidu on 2017/4/10. -// Copyright © 2017年 baidu. All rights reserved. -// - -#ifndef BMKLocationAuth_h -#define BMKLocationAuth_h - -///定位鉴权错误码 -typedef NS_ENUM(NSInteger, BMKLocationAuthErrorCode) { - BMKLocationAuthErrorUnknown = -1, ///< 未知错误 - BMKLocationAuthErrorSuccess = 0, ///< 鉴权成功 - BMKLocationAuthErrorNetworkFailed = 1, ///< 因网络鉴权失败 - BMKLocationAuthErrorFailed = 2, ///< KEY非法鉴权失败 - -}; -///通知Delegate -@protocol BMKLocationAuthDelegate -@optional - -/** - *@brief 返回授权验证错误 - *@param iError 错误号 : 为0时验证通过,具体参加BMKLocationAuthErrorCode - */ -- (void)onCheckPermissionState:(BMKLocationAuthErrorCode)iError; -@end - - -///BMKLocationAuth类。用于鉴权 -@interface BMKLocationAuth : NSObject - -///鉴权状态0:成功; 1:网络错误; 2:授权失败 -@property(nonatomic, readonly, assign) BMKLocationAuthErrorCode permisionState; - -/** - * @brief 得到BMKLocationAuth的单例 - */ -+ (BMKLocationAuth*)sharedInstance; - - -/** - *@brief 启动引擎 - *@param key 申请的有效key - *@param delegate 回调是否鉴权成功 - */ --(void)checkPermisionWithKey:(NSString*)key authDelegate:(id)delegate; - - -@end - - - -#endif /* BMKLocationAuth_h */ diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationComponent.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationComponent.h deleted file mode 100644 index 0b6310fe..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationComponent.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// BMKLocationComponent.h -// LocationComponent -// -// Created by Baidu on 3/31/14. -// Copyright (c) 2014 baidu. All rights reserved. -// - -#import "BMKLocationManager.h" -#import "BMKLocationKitVersion.h" -#import "BMKLocationPoi.h" -#import "BMKLocation.h" -#import "BMKGeoFenceRegion.h" -#import "BMKGeoFenceManager.h" -#import "BMKLocationReGeocode.h" -#import "BMKLocationAuth.h" diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationKitVersion.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationKitVersion.h deleted file mode 100644 index 0426c5e4..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationKitVersion.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// BMKLocationKitVersion.h -// BMKLocationKit -// -// Created by baidu on 17/9/9. -// Copyright © 2017年 baidu. All rights reserved. -// - -#ifndef BMKLocationKitVersion_h -#define BMKLocationKitVersion_h - -#import - -/** - *获取当前定位sdk 的版本号 - *当前定位sdk版本 : 2.0.0 - *@return 返回当前定位sdk 的版本号 - */ -UIKIT_EXTERN NSString* BMKLocationKitVersion(); - -/** - *获取当前定位sdk 的float版本号 - *当前定位sdk版本 : 2.0 - *@return 返回当前定位sdk 的float版本号 - */ -UIKIT_EXTERN float BMKLocationKitFloatVersion(); - - - -#endif /* BMKLocationKitVersion_h */ diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationManager.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationManager.h deleted file mode 100644 index d6e3ab8a..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationManager.h +++ /dev/null @@ -1,296 +0,0 @@ -// -// BMKLocationManager.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - -#import -#import -#import -#import "BMKLocationReGeocode.h" -#import "BMKLocation.h" - -/** BMKLocationCoordinateType 枚举坐标系类型 - * - */ -typedef NS_ENUM(NSUInteger, BMKLocationCoordinateType) -{ - BMKLocationCoordinateTypeBMK09LL = 0, /// delegate; - -///设定定位的最小更新距离。默认为 kCLDistanceFilterNone。 -@property(nonatomic, assign) CLLocationDistance distanceFilter; - -///设定定位精度。默认为 kCLLocationAccuracyBest。 -@property(nonatomic, assign) CLLocationAccuracy desiredAccuracy; - -///设定定位类型。默认为 CLActivityTypeAutomotiveNavigation。 -@property(nonatomic, assign) CLActivityType activityType; - -///设定定位坐标系类型。默认为 BMKLocationCoordinateTypeGCJ02。 -@property(nonatomic, assign) BMKLocationCoordinateType coordinateType; - -///指定定位是否会被系统自动暂停。默认为NO。 -@property(nonatomic, assign) BOOL pausesLocationUpdatesAutomatically; - - -///是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。由于iOS系统限制,需要在定位未开始之前或定位停止之后,修改该属性的值才会有效果。 -@property(nonatomic, assign) BOOL allowsBackgroundLocationUpdates; - -///指定单次定位超时时间,默认为10s。最小值是2s。注意单次定位请求前设置。注意: 单次定位超时时间从确定了定位权限(非kCLAuthorizationStatusNotDetermined状态)后开始计算。 -@property(nonatomic, assign) NSInteger locationTimeout; - -///指定单次定位逆地理超时时间,默认为10s。最小值是2s。注意单次定位请求前设置。 -@property(nonatomic, assign) NSInteger reGeocodeTimeout; - -///连续定位是否返回逆地理信息,默认YES。 -@property (nonatomic, assign) BOOL locatingWithReGeocode; - -///定位sdk-v1.3之后,开发者可以选择是否需要最新版本rgc数据,1.9之后默认是需要YES;YES的情况下,定位sdk会实时返回最新的rgc数据,如城市变更等数据都会实时更新 -@property (nonatomic, assign) BOOL isNeedNewVersionReGeocode; - - -///开发者可以指定该用户的id,用于后续统一识别用户,便于查找问题 -@property(nonatomic, copy, nullable) NSString * userID; - -///返回定位精度等级,IOS14之后用户可以直接控制返回定位的精度等级,开发者可以通过这个值适配不同定位等级下的产品逻辑 -@property (nonatomic, readonly) BMKLAccuracyAuthorization accuracyAuthorization; - - -/** - * @brief 单次定位。如果当前正在连续定位,调用此方法将会失败,返回NO。\n该方法将会根据设定的 desiredAccuracy 去获取定位信息。如果获取的定位信息精确度低于 desiredAccuracy ,将会持续的等待定位信息,直到超时后通过completionBlock返回精度最高的定位信息。\n可以通过 stopUpdatingLocation 方法去取消正在进行的单次定位请求。 - * @param withReGeocode 是否带有逆地理信息(获取逆地理信息需要联网) - * @param withNetWorkState 是否带有移动热点识别状态(需要联网) - * @param completionBlock 单次定位完成后的Block - * @return 是否成功添加单次定位Request - */ -- (BOOL)requestLocationWithReGeocode:(BOOL)withReGeocode withNetworkState:(BOOL)withNetWorkState completionBlock:(BMKLocatingCompletionBlock _Nonnull)completionBlock; - -/** - * @brief 开始连续定位。调用此方法会cancel掉所有的单次定位请求。 - */ -- (void)startUpdatingLocation; - -/** - * @brief 停止连续定位。调用此方法会cancel掉所有的单次定位请求,可以用来取消单次定位。 - */ -- (void)stopUpdatingLocation; - -/** - * @brief 请求网络状态结果回调。 - */ -- (void)requestNetworkState; - - -/** - * @brief 该方法返回设备是否支持设备朝向事件回调。 - * @return 是否支持设备朝向事件回调 - */ -+ (BOOL)headingAvailable; - -/** - * @brief 该方法为BMKLocationManager开始设备朝向事件回调。 - */ -- (void)startUpdatingHeading; - -/** - * @brief 该方法为BMKLocationManager停止设备朝向事件回调。 - */ -- (void)stopUpdatingHeading; - -/** - * @brief 该方法为BMKLocationManager尝试使用高精度室内定位。在特定的室内场景下会有更高精度的定位回调,只在室内定位版本生效。 - */ -- (void)tryIndoorLocation; - -/** - * @brief 该方法为BMKLocationManager会关闭高精度室内定位,只在室内定位版本生效。 - */ -- (void)stopIndoorLocation; - - -/** - * @brief 转换为百度经纬度的坐标 - * @param coordinate 待转换的经纬度 - * @param srctype 待转换坐标系类型 - * @param destype 目标百度坐标系类型(bd09ll,bd09mc) - * @return 目标百度坐标系经纬度 - */ -+ (CLLocationCoordinate2D) BMKLocationCoordinateConvert:(CLLocationCoordinate2D) coordinate SrcType:(BMKLocationCoordinateType)srctype DesType:(BMKLocationCoordinateType)destype; - -/** - * @brief 判断目标经纬度是否在大陆以及港、澳地区。 - * @param coordinate 待判断的目标经纬度 - * @param coortype 待判断经纬度的坐标系类型 - * @return 是否在大陆以及港、澳地区 - */ -+ (BOOL) BMKLocationDataAvailableForCoordinate:(CLLocationCoordinate2D)coordinate withCoorType:(BMKLocationCoordinateType)coortype; - - - -/** - * @brief 返回当前定位权限 - * @return CLAuthorizationStatus 定位权限枚举类型 - */ -- (CLAuthorizationStatus)authorizationStatus; - - -/** - * @brief 如果你没有全量定位等级精度权限,利用该接口可以临时请求一次全量定位精度等级,系统会抛出弹框让用户确认是否授权app授予相应权限 - * @param purposeKey info.plist中NSLocationTemporaryUsageDescriptionDictionary定义的key,对应相应的value可以详细描述申请全量定位精度等级的原因 - * @param completion 回调是否 - * @return - */ -- (void)requestTemporaryFullAccuracyAuthorizationWithPurposeKey:(NSString * _Nonnull)purposeKey completion:(void(^ _Nullable)(NSError * _Nullable))completion API_AVAILABLE(ios(14.0)); - -/** - * @brief 请求一次全量定位精度等级 - * @param purposeKey info.plist中NSLocationTemporaryUsageDescriptionDictionary定义的key - * @return - */ -- (void)requestTemporaryFullAccuracyAuthorizationWithPurposeKey:(NSString * _Nonnull)purposeKey API_AVAILABLE(ios(14.0)); - - -@end - -#pragma mark - BMKLocationManagerDelegate - - -///BMKLocationManagerDelegate 协议定义了发生错误时的错误回调方法,连续定位的回调方法等。 -@protocol BMKLocationManagerDelegate - -@optional - -/** - * @brief 为了适配app store关于新的后台定位的审核机制(app store要求如果开发者只配置了使用期间定位,则代码中不能出现申请后台定位的逻辑),当开发者在plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription时,需要在该delegate中调用后台定位api:[locationManager requestAlwaysAuthorization]。开发者如果只配置了NSLocationWhenInUseUsageDescription,且只有使用期间的定位需求,则无需在delegate中实现逻辑。 - * @param manager 定位 BMKLocationManager 类。 - * @param locationManager 系统 CLLocationManager 类 。 - * @since 1.6.0 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager doRequestAlwaysAuthorization:(CLLocationManager * _Nonnull)locationManager; - -/** - * @brief 当定位发生错误时,会调用代理的此方法。 - * @param manager 定位 BMKLocationManager 类。 - * @param error 返回的错误,参考 CLError 。 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager didFailWithError:(NSError * _Nullable)error; - - -/** - * @brief 连续定位回调函数。 - * @param manager 定位 BMKLocationManager 类。 - * @param location 定位结果,参考BMKLocation。 - * @param error 错误信息。 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager didUpdateLocation:(BMKLocation * _Nullable)location orError:(NSError * _Nullable)error; - -/** - * @brief 定位权限状态改变时回调函数 - * @param manager 定位 BMKLocationManager 类。 - * @param status 定位权限状态。 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status API_DEPRECATED_WITH_REPLACEMENT("-BMKLocationManagerDidChangeAuthorization", ios(4.2, 14.0)); - - -/** - * @brief authorizationStatus或者accuracyAuthorization有变化时回调函数 - * @param manager 定位 BMKLocationManager 类。 - */ -- (void)BMKLocationManagerDidChangeAuthorization:(BMKLocationManager * _Nonnull)manager; - - -/** - * @brief 该方法为BMKLocationManager提示需要设备校正回调方法。 - * @param manager 提供该定位结果的BMKLocationManager类的实例。 - */ -- (BOOL)BMKLocationManagerShouldDisplayHeadingCalibration:(BMKLocationManager * _Nonnull)manager; - -/** - * @brief 该方法为BMKLocationManager提供设备朝向的回调方法。 - * @param manager 提供该定位结果的BMKLocationManager类的实例 - * @param heading 设备的朝向结果 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager - didUpdateHeading:(CLHeading * _Nullable)heading; - -/** - * @brief 该方法为BMKLocationManager所在App系统网络状态改变的回调事件。 - * @param manager 提供该定位结果的BMKLocationManager类的实例 - * @param state 当前网络状态 - * @param error 错误信息 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager - didUpdateNetworkState:(BMKLocationNetworkState)state orError:(NSError * _Nullable)error; - - -@end - - diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationPoi.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationPoi.h deleted file mode 100644 index 246316bf..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationPoi.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// BMKLocationPoi.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - - -///描述Poi各属性 -@interface BMKLocationPoi : NSObject - -///BMKLocationPoi的id属性 -@property(nonatomic, copy, readonly) NSString *uid; - -///BMKLocationPoi的名字属性 -@property(nonatomic, copy, readonly) NSString *name; - -///BMKLocationPoi的标签属性 -@property(nonatomic, copy, readonly) NSString *tags; - -///BMKLocationPoi的地址属性 -@property(nonatomic, copy, readonly) NSString *addr; - -///BMKLocationPoi的可信度 -@property(nonatomic, assign, readonly) float relaiability; - - -/** - * @brief 通过NSDictionary初始化方法一 - */ -- (id)initWithDictionary:(NSDictionary *)dictionary; - - -/** - * @brief 通过NSDictionary初始化方法二 - */ -- (id)initWithTwoDictionary:(NSDictionary *)dictionary; - -@end - - diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationPoiRegion.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationPoiRegion.h deleted file mode 100644 index f6edaf3c..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationPoiRegion.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// BMKLocationPoiRegion.h -// LocationComponent -// -// Created by Jiang,Fangsheng on 2019/9/4. -// Copyright © 2019 baidu. All rights reserved. -// - -#ifndef BMKLocationPoiRegion_h -#define BMKLocationPoiRegion_h - - -///描述PoiRegion各属性 -@interface BMKLocationPoiRegion : NSObject - -///BMKLocationPoiRegion的方向属性,如『内』、『外』 -@property(nonatomic, copy, readonly) NSString *directionDesc; - -///BMKLocationPoiRegion的名字属性 -@property(nonatomic, copy, readonly) NSString *name; - -///BMKLocationPoiRegion的标签属性 -@property(nonatomic, copy, readonly) NSString *tags; - - - -/** - * @brief 通过NSDictionary初始化方法一 - */ -- (id)initWithDictionary:(NSDictionary *)dictionary; - - -@end - -#endif /* BMKLocationPoiRegion_h */ diff --git a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationReGeocode.h b/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationReGeocode.h deleted file mode 100644 index 2c51c204..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/Headers/BMKLocationReGeocode.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// BMKLocationReGeocode.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// -#import -#import "BMKLocationPoi.h" -#import "BMKLocationPoiRegion.h" - -///BMKLocationReGeocode类。描述跟地址有关的信息. -@interface BMKLocationReGeocode : NSObject - -///国家名字属性 -@property(nonatomic, copy, readonly) NSString *country; - -///国家编码属性 -@property(nonatomic, copy, readonly) NSString *countryCode; - -///省份名字属性 -@property(nonatomic, copy, readonly) NSString *province; - -///城市名字属性 -@property(nonatomic, copy, readonly) NSString *city; - -///区名字属性 -@property(nonatomic, copy, readonly) NSString *district; - -///乡镇名字属性 -@property(nonatomic, copy, readonly) NSString *town; - -///街道名字属性 -@property(nonatomic, copy, readonly) NSString *street; - -///街道号码属性 -@property(nonatomic, copy, readonly) NSString *streetNumber; - -///城市编码属性 -@property(nonatomic, copy, readonly) NSString *cityCode; - -///行政区划编码属性 -@property(nonatomic, copy, readonly) NSString *adCode; - - -///位置语义化结果的定位点在什么地方周围的描述信息 -@property(nonatomic, copy, readonly) NSString *locationDescribe; - - -///位置语义化结果的属性,该定位点周围的poi列表信息 -@property(nonatomic, retain, readonly) NSArray *poiList; - -///位置语义化结果的定位点在什么地方周围的描述信息 -@property(nonatomic, strong, readonly) BMKLocationPoiRegion *poiRegion; - -/** - * @brief 通过NSData初始化方法 - */ -- (id)initWithReGeocodeString:(NSData *)reGeocodeString; - - -/** - * @brief 通过JSON初始化方法 - */ -- (id)initWithJsonString:(NSData *)jsonString withHighAccuracy:(BOOL)highAcc; - -@end diff --git a/ios/Runner/baidu/BMKLocationKit.framework/readme.txt b/ios/Runner/baidu/BMKLocationKit.framework/readme.txt deleted file mode 100644 index d8636363..00000000 --- a/ios/Runner/baidu/BMKLocationKit.framework/readme.txt +++ /dev/null @@ -1,11 +0,0 @@ -1、版本: - 百度地图iOS定位SDK v2.0.0 - -2、是否带IDFA: - 无 - -3、是否为Bitcode: - 是 - -4、集成方法: - http://lbsyun.baidu.com/index.php?title=ios-locsdk diff --git a/ios/Runner/baidu/Headers/BMKGeoFenceManager.h b/ios/Runner/baidu/Headers/BMKGeoFenceManager.h deleted file mode 100644 index ef834cd8..00000000 --- a/ios/Runner/baidu/Headers/BMKGeoFenceManager.h +++ /dev/null @@ -1,141 +0,0 @@ -// -// BMKGeoFenceManager.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - -#import "BMKGeoFenceRegion.h" - -@protocol BMKGeoFenceManagerDelegate; - -///地理围栏监听状态类型 -typedef NS_OPTIONS(NSUInteger, BMKGeoFenceActiveAction) -{ - BMKGeoFenceActiveActionNone = 0, ///< 不进行监听 - BMKGeoFenceActiveActionInside = 1 << 0, ///< 在范围内 - BMKGeoFenceActiveActionOutside = 1 << 1, ///< 在范围外 - BMKGeoFenceActiveActionStayed = 1 << 2, ///< 停留(在范围内超过10分钟) -}; - -///BMKGeoFence errorDomain -FOUNDATION_EXPORT NSErrorDomain const _Nonnull BMKGeoFenceErrorDomain; - -///地理围栏错误码 -typedef NS_ENUM(NSInteger, BMKGeoFenceErrorCode) { - BMKGeoFenceErrorUnknown = 1, ///< 未知错误 - BMKGeoFenceErrorInvalidParameter = 2, ///< 参数错误 - BMKGeoFenceErrorFailureConnection = 3, ///< 网络连接异常 - BMKGeoFenceErrorFailureAuth = 4, ///< 鉴权失败 - BMKGeoFenceErrorNoValidFence = 5, ///< 无可用围栏 - BMKGeoFenceErroFailureLocating = 6, ///< 定位错误 -}; - - -///地理围栏管理类 -@interface BMKGeoFenceManager : NSObject - - -///实现了 BMKGeoFenceManagerDelegate 协议的类指针。 -@property (nonatomic, weak, nullable) id delegate; - - -///需要进行通知的行为,默认为BMKGeoFenceActiveActionInside。 -@property (nonatomic, assign) BMKGeoFenceActiveAction activeAction; - - -///指定定位是否会被系统自动暂停。默认为NO。 -@property (nonatomic, assign) BOOL pausesLocationUpdatesAutomatically; - - -///是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。 -@property (nonatomic, assign) BOOL allowsBackgroundLocationUpdates; - - -/** - * @brief 添加一个圆形围栏 - * @param center 围栏的中心点经纬度坐标 - * @param radius 围栏的半径,单位:米,要求大于0 - * @param type 围栏的坐标系类型 - * @param customID 用户自定义ID,可选,SDK原值返回 - */ -- (void)addCircleRegionForMonitoringWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius coorType:(BMKLocationCoordinateType)type customID:(NSString * _Nullable)customID; - - -/** - * @brief 根据经纬度坐标数据添加一个闭合的多边形围栏,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 - * @param coordinates 经纬度坐标点数据,coordinates对应的内存会拷贝,调用者负责该内存的释放 - * @param count 经纬度坐标点的个数,不可小于3个 - * @param type 围栏的坐标系类型 - * @param customID 用户自定义ID,可选,SDK原值返回 - */ -- (void)addPolygonRegionForMonitoringWithCoordinates:(CLLocationCoordinate2D * _Nonnull)coordinates count:(NSInteger)count coorType:(BMKLocationCoordinateType)type customID:(NSString * _Nullable)customID; - - -/** - * @brief 根据customID获得指定的围栏,如果customID传nil,则返回全部围栏 - * @param customID 用户执行添加围栏函数时传入的customID - * @return 获得的围栏构成的数组,如果没有结果,返回nil - */ -- (NSArray * _Nullable)geoFenceRegionsWithCustomID:(NSString * _Nullable)customID; - - -/** - * @brief 移除指定围栏 - * @param region 要停止监控的围栏 - */ -- (void)removeTheGeoFenceRegion:(BMKGeoFenceRegion * _Nonnull)region; - - -/** - * @brief 移除指定customID的围栏 - * @param customID 用户执行添加围栏函数时传入的customID - */ -- (void)removeGeoFenceRegionsWithCustomID:(NSString * _Nullable)customID; - - -/** - * @brief 移除所有围栏 - */ -- (void)removeAllGeoFenceRegions; - - -@end - - - -///地理围栏代理协议,该协议定义了获取地理围栏相关回调方法,包括添加、状态改变等。 -@protocol BMKGeoFenceManagerDelegate - -@optional - -/** - * @brief 为了适配app store关于新的后台定位的审核机制(app store要求如果开发者只配置了使用期间定位,则代码中不能出现申请后台定位的逻辑),当开发者在plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription时,需要在该delegate中调用后台定位api:[locationManager requestAlwaysAuthorization]。开发者如果只配置了NSLocationWhenInUseUsageDescription,且只有使用期间的定位需求,则无需在delegate中实现逻辑。 - * @param manager 定位 BMKGeoFenceManager 类。 - * @param locationManager 系统 CLLocationManager 类 。 - * @since 1.7.0 - */ -- (void)BMKGeoFenceManager:(BMKGeoFenceManager * _Nonnull)manager doRequestAlwaysAuthorization:(CLLocationManager * _Nonnull)locationManager; - -/** - * @brief 添加地理围栏完成后的回调,成功与失败都会调用 - * @param manager 地理围栏管理类 - * @param regions 成功添加的一个或多个地理围栏构成的数组 - * @param customID 用户执行添加围栏函数时传入的customID - * @param error 添加失败的错误信息 - */ -- (void)BMKGeoFenceManager:(BMKGeoFenceManager * _Nonnull)manager didAddRegionForMonitoringFinished:(NSArray * _Nullable)regions customID:(NSString * _Nullable)customID error:(NSError * _Nullable)error; - - -/** - * @brief 地理围栏状态改变时回调,当围栏状态的值发生改变,定位失败都会调用 - * @param manager 地理围栏管理类 - * @param region 状态改变的地理围栏 - * @param customID 用户执行添加围栏函数时传入的customID - * @param error 错误信息,如定位相关的错误 - */ -- (void)BMKGeoFenceManager:(BMKGeoFenceManager * _Nonnull)manager didGeoFencesStatusChangedForRegion:(BMKGeoFenceRegion * _Nullable)region customID:(NSString * _Nullable)customID error:(NSError * _Nullable)error; - -@end - diff --git a/ios/Runner/baidu/Headers/BMKGeoFenceRegion.h b/ios/Runner/baidu/Headers/BMKGeoFenceRegion.h deleted file mode 100644 index 119358f5..00000000 --- a/ios/Runner/baidu/Headers/BMKGeoFenceRegion.h +++ /dev/null @@ -1,114 +0,0 @@ -// -// BMKGeoFenceRegion.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - -#import -#import -#import "BMKLocationManager.h" - -///BMKGeoFence Region State -typedef NS_ENUM(NSInteger, BMKGeoFenceRegionStatus) -{ - BMKGeoFenceRegionStatusUnknown = 0, ///< 未知 - BMKGeoFenceRegionStatusInside = 1, ///< 在范围内 - BMKGeoFenceRegionStatusOutside = 1 << 1, ///< 在范围外 - BMKGeoFenceRegionStatusStayed = 1 << 2, ///< 停留(在范围内超过10分钟) -}; - -#pragma mark - BMKGeoFenceRegion - - -///地理围栏基类,不可直接使用 -@interface BMKGeoFenceRegion : NSObject - - -///BMKGeoFenceRegion的唯一标识符 -@property (nonatomic, copy, readonly) NSString *identifier; - - -///用户自定义ID,可为nil。 -@property (nonatomic, copy, readonly) NSString *customID; - - -///坐标点和围栏的关系,比如用户的位置和围栏的关系 -@property (nonatomic, assign) BMKGeoFenceRegionStatus fenceStatus; - -///设定围栏坐标系类型。默认为 BMKLocationCoordinateTypeGCJ02。 -@property(nonatomic, readonly) BMKLocationCoordinateType coordinateType; - -///上次发生状态变化的时间 -@property(nonatomic, assign)NSTimeInterval lastEventTime; - - -/** - * @brief 判断位置与围栏状态 - * @param CLLocationCoordinate2D 坐标值 - * @return 返回BMKGeoFenceRegionStatus状态 - */ --(BMKGeoFenceRegionStatus)judgeStatusWithCoor:(CLLocationCoordinate2D)coor; - -@end - - -#pragma mark - BMKLocationCircleRegion - - -///圆形地理围栏 -@interface BMKGeoFenceCircleRegion : BMKGeoFenceRegion - - -///中心点的经纬度坐标 -@property (nonatomic, readonly) CLLocationCoordinate2D center; - - -///半径,单位:米 -@property (nonatomic, readonly) CLLocationDistance radius; - -/** - * @brief 构造圆形围栏 - * @param customid 用户自定义ID - * @param identityid 识别id - * @param center 中心坐标 - * @param radius 围栏半径 - * @param type 坐标系类型 - * @return BMKGeoFenceCircleRegion id - */ -- (id)initWithCustomID:(NSString *)customid identityID:(NSString *)identityid center:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius coor:(BMKLocationCoordinateType)type; - - - -@end - - -#pragma mark -BMKGeoFencePolygonRegion - - -///多边形地理围栏 -@interface BMKGeoFencePolygonRegion : BMKGeoFenceRegion - - -///经纬度坐标点数据 -@property (nonatomic, readonly) CLLocationCoordinate2D *coordinates; - - -///经纬度坐标点的个数 -@property (nonatomic, readonly) NSInteger count; - - -/** - * @brief 构造多边形围栏 - * @param customid 用户自定义ID - * @param identityid 识别id - * @param coor 多边形顶点 - * @param count 顶点个数 - * @param type 坐标系类型 - * @return BMKGeoFencePolygonRegion id - */ -- (id)initWithCustomID:(NSString *)customid identityID:(NSString *)identityid coor:(CLLocationCoordinate2D *)coor count:(NSInteger)count coor:(BMKLocationCoordinateType)type; - -@end - diff --git a/ios/Runner/baidu/Headers/BMKLocation.h b/ios/Runner/baidu/Headers/BMKLocation.h deleted file mode 100644 index eae633c2..00000000 --- a/ios/Runner/baidu/Headers/BMKLocation.h +++ /dev/null @@ -1,97 +0,0 @@ -// -// BMKLocation.h -// LocationComponent -// -// Created by baidu on 2017/8/16. -// Copyright © 2017年 baidu. All rights reserved. -// - -#ifndef BMKLocation_h -#define BMKLocation_h - -#import -#import "BMKLocationReGeocode.h" - -/** - * BMKLocationProvider 位置数据来源,分iOS系统定位和其他定位服务结果两种,目前仅支持iOS系统定位服务 - * - */ -typedef NS_ENUM(int, BMKLocationProvider) { - - BMKLocationProviderIOS = 0, //!<位置来源于iOS本身定位 - BMKLocationProviderOther //!<位置来源于其他定位服务 - -}; - -///描述百度iOS 定位数据 -@interface BMKLocation : NSObject - -///BMKLocation 位置数据 -@property(nonatomic, copy, readonly) CLLocation * _Nullable location; - -///BMKLocation 地址数据 -@property(nonatomic, copy) BMKLocationReGeocode * _Nullable rgcData; - -///BMKLocation 位置来源 -@property(nonatomic, assign) BMKLocationProvider provider; - -///BMKLocation 位置ID -@property(nonatomic, retain) NSString * _Nullable locationID; - -/* - * floorString - * - * Discussion: - * 室内定位成功时返回的楼层信息,ex:f1 - */ -@property(readonly, nonatomic, copy, nullable) NSString *floorString; - -/* - * buildingID - * - * Discussion: - * 室内定位成功时返回的百度建筑物ID - */ -@property(readonly, nonatomic, copy, nullable) NSString *buildingID; - -/* - * buildingName - * - * Discussion: - * 室内定位成功时返回的百度建筑物名称 - */ -@property(readonly, nonatomic, copy, nullable) NSString *buildingName; - - -/* - * extraInfo - * - * Discussion: - * 定位附加信息,如停车位code识别结果、停车位code示例、vdr推算结果置信度等 - */ -@property(readonly, nonatomic, copy, nullable) NSDictionary * extraInfo; - -/** - * @brief 初始化BMKLocation实例 - * @param loc CLLocation对象 - * @param rgc BMKLocationReGeocode对象 - * @return BMKLocation id - */ -- (id _Nonnull)initWithLocation:(CLLocation * _Nullable)loc withRgcData:(BMKLocationReGeocode * _Nullable)rgc; - -/** - * @brief 构造BMKLocation - * @param location CLLocation - * @param floorString 楼层字符串 - * @param buildingID 建筑物ID - * @param buildingName 建筑物名称 - * @param info 位置附加信息 - * @return BMKLocation id - */ --(id _Nonnull)initWithLocation:(CLLocation * _Nullable)location floorString:(NSString * _Nullable)floorString buildingID:(NSString * _Nullable)buildingID - buildingName:(NSString * _Nullable)buildingName extraInfo:(NSDictionary * _Nullable)info withRgcData:(BMKLocationReGeocode * _Nullable)rgc; - - -@end - -#endif /* BMKLocation_h */ diff --git a/ios/Runner/baidu/Headers/BMKLocationAuth.h b/ios/Runner/baidu/Headers/BMKLocationAuth.h deleted file mode 100644 index 90494645..00000000 --- a/ios/Runner/baidu/Headers/BMKLocationAuth.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// BMKLocationAuth.h -// LocationComponent -// -// Created by baidu on 2017/4/10. -// Copyright © 2017年 baidu. All rights reserved. -// - -#ifndef BMKLocationAuth_h -#define BMKLocationAuth_h - -///定位鉴权错误码 -typedef NS_ENUM(NSInteger, BMKLocationAuthErrorCode) { - BMKLocationAuthErrorUnknown = -1, ///< 未知错误 - BMKLocationAuthErrorSuccess = 0, ///< 鉴权成功 - BMKLocationAuthErrorNetworkFailed = 1, ///< 因网络鉴权失败 - BMKLocationAuthErrorFailed = 2, ///< KEY非法鉴权失败 - -}; -///通知Delegate -@protocol BMKLocationAuthDelegate -@optional - -/** - *@brief 返回授权验证错误 - *@param iError 错误号 : 为0时验证通过,具体参加BMKLocationAuthErrorCode - */ -- (void)onCheckPermissionState:(BMKLocationAuthErrorCode)iError; -@end - - -///BMKLocationAuth类。用于鉴权 -@interface BMKLocationAuth : NSObject - -///鉴权状态0:成功; 1:网络错误; 2:授权失败 -@property(nonatomic, readonly, assign) BMKLocationAuthErrorCode permisionState; - -/** - * @brief 得到BMKLocationAuth的单例 - */ -+ (BMKLocationAuth*)sharedInstance; - - -/** - *@brief 启动引擎 - *@param key 申请的有效key - *@param delegate 回调是否鉴权成功 - */ --(void)checkPermisionWithKey:(NSString*)key authDelegate:(id)delegate; - - -@end - - - -#endif /* BMKLocationAuth_h */ diff --git a/ios/Runner/baidu/Headers/BMKLocationComponent.h b/ios/Runner/baidu/Headers/BMKLocationComponent.h deleted file mode 100644 index 0b6310fe..00000000 --- a/ios/Runner/baidu/Headers/BMKLocationComponent.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// BMKLocationComponent.h -// LocationComponent -// -// Created by Baidu on 3/31/14. -// Copyright (c) 2014 baidu. All rights reserved. -// - -#import "BMKLocationManager.h" -#import "BMKLocationKitVersion.h" -#import "BMKLocationPoi.h" -#import "BMKLocation.h" -#import "BMKGeoFenceRegion.h" -#import "BMKGeoFenceManager.h" -#import "BMKLocationReGeocode.h" -#import "BMKLocationAuth.h" diff --git a/ios/Runner/baidu/Headers/BMKLocationKitVersion.h b/ios/Runner/baidu/Headers/BMKLocationKitVersion.h deleted file mode 100644 index 0426c5e4..00000000 --- a/ios/Runner/baidu/Headers/BMKLocationKitVersion.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// BMKLocationKitVersion.h -// BMKLocationKit -// -// Created by baidu on 17/9/9. -// Copyright © 2017年 baidu. All rights reserved. -// - -#ifndef BMKLocationKitVersion_h -#define BMKLocationKitVersion_h - -#import - -/** - *获取当前定位sdk 的版本号 - *当前定位sdk版本 : 2.0.0 - *@return 返回当前定位sdk 的版本号 - */ -UIKIT_EXTERN NSString* BMKLocationKitVersion(); - -/** - *获取当前定位sdk 的float版本号 - *当前定位sdk版本 : 2.0 - *@return 返回当前定位sdk 的float版本号 - */ -UIKIT_EXTERN float BMKLocationKitFloatVersion(); - - - -#endif /* BMKLocationKitVersion_h */ diff --git a/ios/Runner/baidu/Headers/BMKLocationManager.h b/ios/Runner/baidu/Headers/BMKLocationManager.h deleted file mode 100644 index d6e3ab8a..00000000 --- a/ios/Runner/baidu/Headers/BMKLocationManager.h +++ /dev/null @@ -1,296 +0,0 @@ -// -// BMKLocationManager.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - -#import -#import -#import -#import "BMKLocationReGeocode.h" -#import "BMKLocation.h" - -/** BMKLocationCoordinateType 枚举坐标系类型 - * - */ -typedef NS_ENUM(NSUInteger, BMKLocationCoordinateType) -{ - BMKLocationCoordinateTypeBMK09LL = 0, /// delegate; - -///设定定位的最小更新距离。默认为 kCLDistanceFilterNone。 -@property(nonatomic, assign) CLLocationDistance distanceFilter; - -///设定定位精度。默认为 kCLLocationAccuracyBest。 -@property(nonatomic, assign) CLLocationAccuracy desiredAccuracy; - -///设定定位类型。默认为 CLActivityTypeAutomotiveNavigation。 -@property(nonatomic, assign) CLActivityType activityType; - -///设定定位坐标系类型。默认为 BMKLocationCoordinateTypeGCJ02。 -@property(nonatomic, assign) BMKLocationCoordinateType coordinateType; - -///指定定位是否会被系统自动暂停。默认为NO。 -@property(nonatomic, assign) BOOL pausesLocationUpdatesAutomatically; - - -///是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。由于iOS系统限制,需要在定位未开始之前或定位停止之后,修改该属性的值才会有效果。 -@property(nonatomic, assign) BOOL allowsBackgroundLocationUpdates; - -///指定单次定位超时时间,默认为10s。最小值是2s。注意单次定位请求前设置。注意: 单次定位超时时间从确定了定位权限(非kCLAuthorizationStatusNotDetermined状态)后开始计算。 -@property(nonatomic, assign) NSInteger locationTimeout; - -///指定单次定位逆地理超时时间,默认为10s。最小值是2s。注意单次定位请求前设置。 -@property(nonatomic, assign) NSInteger reGeocodeTimeout; - -///连续定位是否返回逆地理信息,默认YES。 -@property (nonatomic, assign) BOOL locatingWithReGeocode; - -///定位sdk-v1.3之后,开发者可以选择是否需要最新版本rgc数据,1.9之后默认是需要YES;YES的情况下,定位sdk会实时返回最新的rgc数据,如城市变更等数据都会实时更新 -@property (nonatomic, assign) BOOL isNeedNewVersionReGeocode; - - -///开发者可以指定该用户的id,用于后续统一识别用户,便于查找问题 -@property(nonatomic, copy, nullable) NSString * userID; - -///返回定位精度等级,IOS14之后用户可以直接控制返回定位的精度等级,开发者可以通过这个值适配不同定位等级下的产品逻辑 -@property (nonatomic, readonly) BMKLAccuracyAuthorization accuracyAuthorization; - - -/** - * @brief 单次定位。如果当前正在连续定位,调用此方法将会失败,返回NO。\n该方法将会根据设定的 desiredAccuracy 去获取定位信息。如果获取的定位信息精确度低于 desiredAccuracy ,将会持续的等待定位信息,直到超时后通过completionBlock返回精度最高的定位信息。\n可以通过 stopUpdatingLocation 方法去取消正在进行的单次定位请求。 - * @param withReGeocode 是否带有逆地理信息(获取逆地理信息需要联网) - * @param withNetWorkState 是否带有移动热点识别状态(需要联网) - * @param completionBlock 单次定位完成后的Block - * @return 是否成功添加单次定位Request - */ -- (BOOL)requestLocationWithReGeocode:(BOOL)withReGeocode withNetworkState:(BOOL)withNetWorkState completionBlock:(BMKLocatingCompletionBlock _Nonnull)completionBlock; - -/** - * @brief 开始连续定位。调用此方法会cancel掉所有的单次定位请求。 - */ -- (void)startUpdatingLocation; - -/** - * @brief 停止连续定位。调用此方法会cancel掉所有的单次定位请求,可以用来取消单次定位。 - */ -- (void)stopUpdatingLocation; - -/** - * @brief 请求网络状态结果回调。 - */ -- (void)requestNetworkState; - - -/** - * @brief 该方法返回设备是否支持设备朝向事件回调。 - * @return 是否支持设备朝向事件回调 - */ -+ (BOOL)headingAvailable; - -/** - * @brief 该方法为BMKLocationManager开始设备朝向事件回调。 - */ -- (void)startUpdatingHeading; - -/** - * @brief 该方法为BMKLocationManager停止设备朝向事件回调。 - */ -- (void)stopUpdatingHeading; - -/** - * @brief 该方法为BMKLocationManager尝试使用高精度室内定位。在特定的室内场景下会有更高精度的定位回调,只在室内定位版本生效。 - */ -- (void)tryIndoorLocation; - -/** - * @brief 该方法为BMKLocationManager会关闭高精度室内定位,只在室内定位版本生效。 - */ -- (void)stopIndoorLocation; - - -/** - * @brief 转换为百度经纬度的坐标 - * @param coordinate 待转换的经纬度 - * @param srctype 待转换坐标系类型 - * @param destype 目标百度坐标系类型(bd09ll,bd09mc) - * @return 目标百度坐标系经纬度 - */ -+ (CLLocationCoordinate2D) BMKLocationCoordinateConvert:(CLLocationCoordinate2D) coordinate SrcType:(BMKLocationCoordinateType)srctype DesType:(BMKLocationCoordinateType)destype; - -/** - * @brief 判断目标经纬度是否在大陆以及港、澳地区。 - * @param coordinate 待判断的目标经纬度 - * @param coortype 待判断经纬度的坐标系类型 - * @return 是否在大陆以及港、澳地区 - */ -+ (BOOL) BMKLocationDataAvailableForCoordinate:(CLLocationCoordinate2D)coordinate withCoorType:(BMKLocationCoordinateType)coortype; - - - -/** - * @brief 返回当前定位权限 - * @return CLAuthorizationStatus 定位权限枚举类型 - */ -- (CLAuthorizationStatus)authorizationStatus; - - -/** - * @brief 如果你没有全量定位等级精度权限,利用该接口可以临时请求一次全量定位精度等级,系统会抛出弹框让用户确认是否授权app授予相应权限 - * @param purposeKey info.plist中NSLocationTemporaryUsageDescriptionDictionary定义的key,对应相应的value可以详细描述申请全量定位精度等级的原因 - * @param completion 回调是否 - * @return - */ -- (void)requestTemporaryFullAccuracyAuthorizationWithPurposeKey:(NSString * _Nonnull)purposeKey completion:(void(^ _Nullable)(NSError * _Nullable))completion API_AVAILABLE(ios(14.0)); - -/** - * @brief 请求一次全量定位精度等级 - * @param purposeKey info.plist中NSLocationTemporaryUsageDescriptionDictionary定义的key - * @return - */ -- (void)requestTemporaryFullAccuracyAuthorizationWithPurposeKey:(NSString * _Nonnull)purposeKey API_AVAILABLE(ios(14.0)); - - -@end - -#pragma mark - BMKLocationManagerDelegate - - -///BMKLocationManagerDelegate 协议定义了发生错误时的错误回调方法,连续定位的回调方法等。 -@protocol BMKLocationManagerDelegate - -@optional - -/** - * @brief 为了适配app store关于新的后台定位的审核机制(app store要求如果开发者只配置了使用期间定位,则代码中不能出现申请后台定位的逻辑),当开发者在plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription时,需要在该delegate中调用后台定位api:[locationManager requestAlwaysAuthorization]。开发者如果只配置了NSLocationWhenInUseUsageDescription,且只有使用期间的定位需求,则无需在delegate中实现逻辑。 - * @param manager 定位 BMKLocationManager 类。 - * @param locationManager 系统 CLLocationManager 类 。 - * @since 1.6.0 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager doRequestAlwaysAuthorization:(CLLocationManager * _Nonnull)locationManager; - -/** - * @brief 当定位发生错误时,会调用代理的此方法。 - * @param manager 定位 BMKLocationManager 类。 - * @param error 返回的错误,参考 CLError 。 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager didFailWithError:(NSError * _Nullable)error; - - -/** - * @brief 连续定位回调函数。 - * @param manager 定位 BMKLocationManager 类。 - * @param location 定位结果,参考BMKLocation。 - * @param error 错误信息。 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager didUpdateLocation:(BMKLocation * _Nullable)location orError:(NSError * _Nullable)error; - -/** - * @brief 定位权限状态改变时回调函数 - * @param manager 定位 BMKLocationManager 类。 - * @param status 定位权限状态。 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status API_DEPRECATED_WITH_REPLACEMENT("-BMKLocationManagerDidChangeAuthorization", ios(4.2, 14.0)); - - -/** - * @brief authorizationStatus或者accuracyAuthorization有变化时回调函数 - * @param manager 定位 BMKLocationManager 类。 - */ -- (void)BMKLocationManagerDidChangeAuthorization:(BMKLocationManager * _Nonnull)manager; - - -/** - * @brief 该方法为BMKLocationManager提示需要设备校正回调方法。 - * @param manager 提供该定位结果的BMKLocationManager类的实例。 - */ -- (BOOL)BMKLocationManagerShouldDisplayHeadingCalibration:(BMKLocationManager * _Nonnull)manager; - -/** - * @brief 该方法为BMKLocationManager提供设备朝向的回调方法。 - * @param manager 提供该定位结果的BMKLocationManager类的实例 - * @param heading 设备的朝向结果 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager - didUpdateHeading:(CLHeading * _Nullable)heading; - -/** - * @brief 该方法为BMKLocationManager所在App系统网络状态改变的回调事件。 - * @param manager 提供该定位结果的BMKLocationManager类的实例 - * @param state 当前网络状态 - * @param error 错误信息 - */ -- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager - didUpdateNetworkState:(BMKLocationNetworkState)state orError:(NSError * _Nullable)error; - - -@end - - diff --git a/ios/Runner/baidu/Headers/BMKLocationPoi.h b/ios/Runner/baidu/Headers/BMKLocationPoi.h deleted file mode 100644 index 246316bf..00000000 --- a/ios/Runner/baidu/Headers/BMKLocationPoi.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// BMKLocationPoi.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// - - -///描述Poi各属性 -@interface BMKLocationPoi : NSObject - -///BMKLocationPoi的id属性 -@property(nonatomic, copy, readonly) NSString *uid; - -///BMKLocationPoi的名字属性 -@property(nonatomic, copy, readonly) NSString *name; - -///BMKLocationPoi的标签属性 -@property(nonatomic, copy, readonly) NSString *tags; - -///BMKLocationPoi的地址属性 -@property(nonatomic, copy, readonly) NSString *addr; - -///BMKLocationPoi的可信度 -@property(nonatomic, assign, readonly) float relaiability; - - -/** - * @brief 通过NSDictionary初始化方法一 - */ -- (id)initWithDictionary:(NSDictionary *)dictionary; - - -/** - * @brief 通过NSDictionary初始化方法二 - */ -- (id)initWithTwoDictionary:(NSDictionary *)dictionary; - -@end - - diff --git a/ios/Runner/baidu/Headers/BMKLocationPoiRegion.h b/ios/Runner/baidu/Headers/BMKLocationPoiRegion.h deleted file mode 100644 index f6edaf3c..00000000 --- a/ios/Runner/baidu/Headers/BMKLocationPoiRegion.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// BMKLocationPoiRegion.h -// LocationComponent -// -// Created by Jiang,Fangsheng on 2019/9/4. -// Copyright © 2019 baidu. All rights reserved. -// - -#ifndef BMKLocationPoiRegion_h -#define BMKLocationPoiRegion_h - - -///描述PoiRegion各属性 -@interface BMKLocationPoiRegion : NSObject - -///BMKLocationPoiRegion的方向属性,如『内』、『外』 -@property(nonatomic, copy, readonly) NSString *directionDesc; - -///BMKLocationPoiRegion的名字属性 -@property(nonatomic, copy, readonly) NSString *name; - -///BMKLocationPoiRegion的标签属性 -@property(nonatomic, copy, readonly) NSString *tags; - - - -/** - * @brief 通过NSDictionary初始化方法一 - */ -- (id)initWithDictionary:(NSDictionary *)dictionary; - - -@end - -#endif /* BMKLocationPoiRegion_h */ diff --git a/ios/Runner/baidu/Headers/BMKLocationReGeocode.h b/ios/Runner/baidu/Headers/BMKLocationReGeocode.h deleted file mode 100644 index 2c51c204..00000000 --- a/ios/Runner/baidu/Headers/BMKLocationReGeocode.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// BMKLocationReGeocode.h -// BMKLocationKit -// -// Created by baidu on 2017/3/2. -// Copyright © 2017年 baidu. All rights reserved. -// -#import -#import "BMKLocationPoi.h" -#import "BMKLocationPoiRegion.h" - -///BMKLocationReGeocode类。描述跟地址有关的信息. -@interface BMKLocationReGeocode : NSObject - -///国家名字属性 -@property(nonatomic, copy, readonly) NSString *country; - -///国家编码属性 -@property(nonatomic, copy, readonly) NSString *countryCode; - -///省份名字属性 -@property(nonatomic, copy, readonly) NSString *province; - -///城市名字属性 -@property(nonatomic, copy, readonly) NSString *city; - -///区名字属性 -@property(nonatomic, copy, readonly) NSString *district; - -///乡镇名字属性 -@property(nonatomic, copy, readonly) NSString *town; - -///街道名字属性 -@property(nonatomic, copy, readonly) NSString *street; - -///街道号码属性 -@property(nonatomic, copy, readonly) NSString *streetNumber; - -///城市编码属性 -@property(nonatomic, copy, readonly) NSString *cityCode; - -///行政区划编码属性 -@property(nonatomic, copy, readonly) NSString *adCode; - - -///位置语义化结果的定位点在什么地方周围的描述信息 -@property(nonatomic, copy, readonly) NSString *locationDescribe; - - -///位置语义化结果的属性,该定位点周围的poi列表信息 -@property(nonatomic, retain, readonly) NSArray *poiList; - -///位置语义化结果的定位点在什么地方周围的描述信息 -@property(nonatomic, strong, readonly) BMKLocationPoiRegion *poiRegion; - -/** - * @brief 通过NSData初始化方法 - */ -- (id)initWithReGeocodeString:(NSData *)reGeocodeString; - - -/** - * @brief 通过JSON初始化方法 - */ -- (id)initWithJsonString:(NSData *)jsonString withHighAccuracy:(BOOL)highAcc; - -@end diff --git a/ios/Runner/main.m b/ios/Runner/main.m deleted file mode 100644 index dff6597e..00000000 --- a/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/ios/Runner/test.swift b/ios/Runner/test.swift deleted file mode 100644 index bd164721..00000000 --- a/ios/Runner/test.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// test.swift -// Runner -// -// Created by f on 2021/8/6. -// - -import UIKit - -class test: NSObject { - -} diff --git a/ios/Runner/zh-Hans.lproj/LaunchScreen.strings b/ios/Runner/zh-Hans.lproj/LaunchScreen.strings deleted file mode 100644 index 8b137891..00000000 --- a/ios/Runner/zh-Hans.lproj/LaunchScreen.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ios/Runner/zh-Hans.lproj/Main.strings b/ios/Runner/zh-Hans.lproj/Main.strings deleted file mode 100644 index 8b137891..00000000 --- a/ios/Runner/zh-Hans.lproj/Main.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ios/Runner/zh-Hant.lproj/LaunchScreen.strings b/ios/Runner/zh-Hant.lproj/LaunchScreen.strings deleted file mode 100644 index 8b137891..00000000 --- a/ios/Runner/zh-Hant.lproj/LaunchScreen.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ios/Runner/zh-Hant.lproj/Main.strings b/ios/Runner/zh-Hant.lproj/Main.strings deleted file mode 100644 index 8b137891..00000000 --- a/ios/Runner/zh-Hant.lproj/Main.strings +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..86a7c3b1 --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/ios/en.lproj/InfoPlist.strings b/ios/en.lproj/InfoPlist.strings deleted file mode 100644 index da6d0ece..00000000 --- a/ios/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,15 +0,0 @@ -/* - InfoPlist.strings - Runner - - Created by 冯美坎 on 2021/7/19. - -*/ - -CFBundleName="huixiang"; -CFBundleDisplayName="huixiang"; -NSCameraUsageDescription="您的相机权限将用于更新头像使用"; -NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用"; -NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; -NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; -NSLocationTemporaryUsageDescriptionDictionary="您的定位位置信息将用于查看周围的门店"; diff --git a/ios/zh-Hans.lproj/InfoPlist.strings b/ios/zh-Hans.lproj/InfoPlist.strings deleted file mode 100644 index e45c6e2b..00000000 --- a/ios/zh-Hans.lproj/InfoPlist.strings +++ /dev/null @@ -1,16 +0,0 @@ -/* - InfoPlist.strings - Runner - - Created by 冯美坎 on 2021/7/19. - -*/ - - -CFBundleName="海峡姐妹"; -CFBundleDisplayName="海峡姐妹"; -NSCameraUsageDescription="您的相机权限将用于更新头像使用"; -NSPhotoLibraryUsageDescription="您的照片信息将用于更新头像使用"; -NSLocationWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; -NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息将用于查看周围的门店"; -NSLocationTemporaryUsageDescriptionDictionary="您的定位位置信息将用于查看周围的门店"; diff --git a/ios/zh-Hant.lproj/InfoPlist.strings b/ios/zh-Hant.lproj/InfoPlist.strings deleted file mode 100644 index 01469ffa..00000000 --- a/ios/zh-Hant.lproj/InfoPlist.strings +++ /dev/null @@ -1,15 +0,0 @@ -/* - InfoPlist.strings - Runner - - Created by 冯美坎 on 2021/7/19. - -*/ - -CFBundleName="迴響"; -CFBundleDisplayName="迴響"; -NSCameraUsageDescription="您的相機權限將用於投降更新使用"; -NSPhotoLibraryUsageDescription="您的照片信息將用於投降更新使用"; -NSLocationWhenInUseUsageDescription="您的定位位置信息將用於查看周圍的門店"; -NSLocationAlwaysAndWhenInUseUsageDescription="您的定位位置信息將用於查看周圍的門店"; -NSLocationTemporaryUsageDescriptionDictionary="您的定位位置信息將用於查看周圍的門店"; diff --git a/lib/address/address_map_page.dart b/lib/address/address_map_page.dart index 1324b146..c369d302 100644 --- a/lib/address/address_map_page.dart +++ b/lib/address/address_map_page.dart @@ -1,20 +1,17 @@ -import 'dart:convert'; import 'dart:io'; import 'dart:ui'; import 'package:android_intent_plus/android_intent.dart'; import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart'; import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/address.dart'; +import 'package:huixiang/data/address.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/request_permission.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -32,21 +29,21 @@ class _AddressMapPage extends State { //加载自定义地图样式 void _loadCustomData() async { setState(() { - _mapController.setCustomMapStyle('assets/map_style/chatian.sty', 0); + _mapController?.setCustomMapStyle('assets/map_style/chatian.sty', 0); }); } - LocationFlutterPlugin aMapFlutterLocation; + LocationFlutterPlugin? aMapFlutterLocation; String city = "武汉市"; String keyWord = ""; @override void dispose() { super.dispose(); - aMapFlutterLocation.stopLocation(); + aMapFlutterLocation?.stopLocation(); } - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -56,36 +53,29 @@ class _AddressMapPage extends State { apiService = ApiService(Dio(), context: context, token: value.getString('token')), }); - - if (aMapFlutterLocation == null) { - aMapFlutterLocation = LocationFlutterPlugin(); - } - aMapFlutterLocation.singleLocationCallback(callback: (BaiduLocation result){ + aMapFlutterLocation?.singleLocationCallback(callback: (BaiduLocation result){ print("event: $result"); - if (result != null && - result.latitude != null && + if (result.latitude != null && result.longitude != null) { - city = result.city; - BMFCoordinate latLng = BMFCoordinate(result.latitude, result.longitude); + city = "${result.city}"; + BMFCoordinate latLng = BMFCoordinate(result.latitude!, result.longitude!); BMFCalculateUtils.coordConvert( coordinate: latLng, fromType: BMF_COORD_TYPE.COMMON, toType: BMF_COORD_TYPE.BD09LL) .then((value) { saveLatLng(value); - if (_mapController != null) { - this.latLng = Platform.isIOS ? value : latLng; - addMarker(); - _mapController.updateMapOptions( - BMFMapOptions( - center: latLng, - zoomLevel: 15, - showZoomControl: false, - showMapScaleBar: false, - rotateEnabled: false, - ), - ); - } + this.latLng = Platform.isIOS ? value : latLng; + addMarker(); + _mapController?.updateMapOptions( + BMFMapOptions( + center: latLng, + zoomLevel: 15, + showZoomControl: false, + showMapScaleBar: false, + rotateEnabled: false, + ), + ); searchPoi(latLng); }); } @@ -99,7 +89,7 @@ class _AddressMapPage extends State { /// 设置android端和ios端定位参数 void _setLocOption() { /// android 端设置定位参数 - BaiduLocationAndroidOption androidOption = new BaiduLocationAndroidOption(); + BaiduLocationAndroidOption androidOption = BaiduLocationAndroidOption(coordType: BMFLocationCoordType.gcj02); androidOption.setCoorType("GCJ02"); // 设置返回的位置坐标系类型 androidOption.setIsNeedAltitude(true); // 设置是否需要返回海拔高度信息 androidOption.setIsNeedAddress(true); // 设置是否需要返回地址信息 @@ -114,7 +104,7 @@ class _AddressMapPage extends State { Map androidMap = androidOption.getMap(); /// ios 端设置定位参数 - BaiduLocationIOSOption iosOption = new BaiduLocationIOSOption(); + BaiduLocationIOSOption iosOption = BaiduLocationIOSOption(coordType: BMFLocationCoordType.gcj02); iosOption.setIsNeedNewVersionRgc(true); // 设置是否需要返回最新版本rgc信息 iosOption.setBMKLocationCoordinateType( "BMKLocationCoordinateTypeGCJ02"); // 设置返回的位置坐标系类型 @@ -129,16 +119,16 @@ class _AddressMapPage extends State { Map iosMap = iosOption.getMap(); - aMapFlutterLocation.prepareLoc(androidMap, iosMap); + aMapFlutterLocation?.prepareLoc(androidMap, iosMap); } - List
poiList; + List
? poiList; - searchPoi(BMFCoordinate latLng) async { + searchPoi(BMFCoordinate? latLng) async { keyWord = textEditingController.text; print("keyWord: ${keyWord}"); - var addressPoi = await apiService.searchPoi( - "${latLng.latitude}", "${latLng.longitude}", keyWord, 20, 1); + var addressPoi = await apiService?.searchPoi( + "${latLng?.latitude}", "${latLng?.longitude}", keyWord, 20, 1); //如果定位列表无法显示,可以考虑数据是否不在当前字段里面;例:原数据放在['pois']里面,后改成了数据放在['entrances']里面 List poi = addressPoi['pois']??addressPoi['entrances']; poiList = poi @@ -195,12 +185,10 @@ class _AddressMapPage extends State { requestDialog(); } else if (await Permission.location.isGranted) { // EasyLoading.show(status: S.of(context).zhengzaijiazai); - aMapFlutterLocation.startLocation(); + aMapFlutterLocation?.startLocation(); Future.delayed(Duration(seconds: 6), () { EasyLoading.dismiss(); }); - } else if (await Permission.location.isUndetermined) { - await Permission.location.request(); } else { if (Platform.isIOS) { //去设置中心 @@ -257,16 +245,15 @@ class _AddressMapPage extends State { }); } - BMFMapController _mapController; - BMFCoordinate bmfCoordinate; + BMFMapController? _mapController; + BMFCoordinate? bmfCoordinate; void onMapCreated(BMFMapController controller) { controller.setMapRegionDidChangeCallback(callback: (status) { BMFMapStatus bmfMapStatus = status; print("status: ${bmfMapStatus.toMap()}"); - if (bmfCoordinate != null && - bmfCoordinate.longitude == status.targetGeoPt.longitude && - bmfCoordinate.latitude == status.targetGeoPt.latitude) { + if (bmfCoordinate?.longitude == status.targetGeoPt?.longitude && + bmfCoordinate?.latitude == status.targetGeoPt?.latitude) { if ((DateTime.now().millisecondsSinceEpoch - time) > 1000) { center = status.targetGeoPt; searchPoi(center); @@ -279,40 +266,17 @@ class _AddressMapPage extends State { setState(() { _mapController = controller; - _mapController.showUserLocation(true); + _mapController?.showUserLocation(true); _loadCustomData(); addMarker(); }); } - BMFCoordinate latLng; - BMFMarker bmfMarker; + BMFCoordinate? latLng; + BMFMarker? bmfMarker; addMarker() { - if (latLng == null) return; - if (bmfMarker == null && _mapController != null) { - print("map_wid: ${MediaQuery.of(context).size.width}"); - print("map_hei: ${MediaQuery.of(context).size.height}"); - - bmfMarker = BMFMarker( - position: latLng, - screenPointToLock: BMFPoint( - (Platform.isIOS - ? MediaQuery.of(context).size.width - : window.physicalSize.width) / - 2, - Platform.isIOS - ? MediaQuery.of(context).size.height - : window.physicalSize.height / 4), - isLockedToScreen: true, - centerOffset: BMFPoint(0.5, 0.7), - enabled: false, - icon: "assets/image/icon_address_location.webp", - draggable: false, - ); - _mapController.addMarker(bmfMarker); - } - bmfMarker.updateIsLockedToScreen( + bmfMarker?.updateIsLockedToScreen( true, BMFPoint( (Platform.isIOS @@ -325,35 +289,33 @@ class _AddressMapPage extends State { 4)); } - saveLatLng(BMFCoordinate latLng) async { + saveLatLng(BMFCoordinate? latLng) async { SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setString("latitude", "${latLng.latitude}"); - await prefs.setString("longitude", "${latLng.longitude}"); + await prefs.setString("latitude", "${latLng?.latitude}"); + await prefs.setString("longitude", "${latLng?.longitude}"); } getLatLng() async { SharedPreferences.getInstance().then((value) => { setState(() { - if (_mapController != null) { - _mapController.updateMapOptions( - BMFMapOptions( - center: BMFCoordinate( - double.tryParse(value.getString("latitude")), - double.tryParse(value.getString("longitude")), - ), - zoomLevel: 15, - showZoomControl: false, - showMapScaleBar: false, - rotateEnabled: false, + _mapController?.updateMapOptions( + BMFMapOptions( + center: BMFCoordinate( + double.tryParse("${value.getString("latitude")}") ?? 0, + double.tryParse("${value.getString("longitude")}") ?? 0, ), - ); - } + zoomLevel: 15, + showZoomControl: false, + showMapScaleBar: false, + rotateEnabled: false, + ), + ); }) }); } - BMFMapWidget map; - BMFCoordinate center = BMFCoordinate(30.553111, 114.342366); + BMFMapWidget? map; + BMFCoordinate? center = BMFCoordinate(30.553111, 114.342366); @override Widget build(BuildContext context) { @@ -435,16 +397,16 @@ class _AddressMapPage extends State { child: Container( child: ListView.separated( padding: EdgeInsets.symmetric(vertical: 0), - itemCount: poiList != null ? poiList.length : 0, + itemCount: poiList?.length ?? 0, itemBuilder: (context, position) { return InkWell( onTap: () { - Navigator.of(context).pop(poiList[position].toJson()); + Navigator.of(context).pop(poiList![position].toJson()); }, - child: addressItem(poiList[position]), + child: addressItem(poiList![position]), ); }, - separatorBuilder: (contetx, position) { + separatorBuilder: (context, position) { return Container( height: 1, margin: EdgeInsets.symmetric(horizontal: 16.w), @@ -480,7 +442,7 @@ class _AddressMapPage extends State { height: 4.h, ), Text( - "${address.province}${address.city}${address.area}${address.address}", + "${address.province}${address.city}${address.area}${address.addressStr}", overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF4C4C4C), diff --git a/lib/address/edit_address_page.dart b/lib/address/edit_address_page.dart index 5f456674..857512f4 100644 --- a/lib/address/edit_address_page.dart +++ b/lib/address/edit_address_page.dart @@ -2,8 +2,8 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/address.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/address.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -12,7 +12,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class EditAddressPage extends StatefulWidget { final Map arguments; - EditAddressPage({this.arguments}); + EditAddressPage({required this.arguments}); @override State createState() { @@ -26,7 +26,7 @@ class _EditAddressPage extends State { TextEditingController addressController = TextEditingController(); TextEditingController houseNumberController = TextEditingController(); - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -39,16 +39,15 @@ class _EditAddressPage extends State { }); } - Address preAddress; + Address? preAddress; queryAddress() async { - if (widget.arguments == null) return; preAddress = Address.fromJson(widget.arguments); - nameController.text = preAddress.username; - mobileController.text = preAddress.phone; + nameController.text = "${preAddress?.username}"; + mobileController.text = "${preAddress?.phone}"; addressController.text = - "${preAddress.province}${preAddress.city}${preAddress.area}"; - houseNumberController.text = preAddress.address; + "${preAddress?.province}${preAddress?.city}${preAddress?.area}"; + houseNumberController.text = "${preAddress?.addressStr}"; setState(() {}); } @@ -90,13 +89,13 @@ class _EditAddressPage extends State { children: [ editItem( S.of(context).xingming, - preAddress != null ? preAddress.username : "", + preAddress?.username ?? "", S.of(context).qingtianxiexingming, nameController, false), editItem( S.of(context).dianhua, - preAddress != null ? preAddress.phone : "", + preAddress?.phone ?? "", S.of(context).qingtianxieshoujihao, mobileController, false), @@ -106,14 +105,14 @@ class _EditAddressPage extends State { }, child: editItem( S.of(context).dizhi, - preAddress != null ? preAddress.address : "", + preAddress?.addressStr ?? "", S.of(context).shouhuodizhi, addressController, true), ), editItem( S.of(context).xiangxidizhi, - preAddress != null ? preAddress.address : "", + preAddress?.addressStr ?? "", S.of(context).menpaihao, houseNumberController, false), @@ -148,23 +147,22 @@ class _EditAddressPage extends State { ); } - Map addressMap; + Map? addressMap; toMap() async { Navigator.of(context).pushNamed('/router/address_map_page').then( (value) => { if (value != null) { - addressMap = value, + addressMap = value as Map, addressController.text = - "${(value as Map)['province']}${(value as Map)['city']}${(value as Map)['area']}", - if (preAddress != null) - { - preAddress.province = addressMap['province'], - preAddress.city = addressMap['city'], - preAddress.area = addressMap['area'], - }, - houseNumberController.text = "${(value as Map)['address']}", + "${(addressMap)?['province']}${(value)['city']}${(value)['area']}", + { + preAddress?.province = addressMap?['province'], + preAddress?.city = addressMap?['city'], + preAddress?.area = addressMap?['area'], + }, + houseNumberController.text = "${(value)['address']}", } // setState(() {}) }, @@ -176,55 +174,38 @@ class _EditAddressPage extends State { String mobile = mobileController.text; String city = addressController.text; String address = houseNumberController.text; - if (name == null || name == "") { + if (name.isEmpty) { SmartDialog.showToast(S.of(context).shouhuorenxingming, alignment: Alignment.center); return; } - if (mobile == null || mobile == "") { + if (mobile.isEmpty) { SmartDialog.showToast(S.of(context).shouhuorenshoujihao, alignment: Alignment.center); return; } - if (city == null || city == "") { + if (city.isEmpty) { SmartDialog.showToast(S.of(context).shurushouhuorendizhi, alignment: Alignment.center); return; } - if (address == null || address == "") { + if (address.isEmpty) { SmartDialog.showToast(S.of(context).shouhuorenxiangxidizhi, alignment: Alignment.center); return; } - BaseData baseData; - if (preAddress == null) { - baseData = await apiService.addAddress({ - "address": address, - "area": addressMap != null ? addressMap['area'] : "", - "city": addressMap != null ? addressMap['city'] : "", - "cityInfo": "", - "isDefault": true, - "latitude": addressMap != null ? addressMap['latitude'] : 0, - "longitude": addressMap != null ? addressMap['longitude'] : 0, - "phone": mobile, - "province": addressMap != null ? addressMap['province'] : "", - "tag": "", - "username": name - }); - } else { - baseData = await apiService.updateAddress({ - "address": address, - "area": preAddress != null ? preAddress.area : "", - "city": preAddress != null ? preAddress.city : "", - "province": preAddress != null ? preAddress.province : "", - "cityInfo": "", - "isDefault": true, - "latitude": preAddress != null ? preAddress.latitude : 0, - "longitude": preAddress != null ? preAddress.longitude : 0, - "phone": mobile, - "tag": "", - "id": preAddress != null ? preAddress.id : 0, - "username": name - }); - } - - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.updateAddress({ + "address": address, + "area": preAddress?.area ?? "", + "city": preAddress?.city ?? "", + "province": preAddress?.province ?? "", + "cityInfo": "", + "isDefault": true, + "latitude": preAddress?.latitude ?? 0, + "longitude": preAddress?.longitude ?? 0, + "phone": mobile, + "tag": "", + "id": preAddress?.id ?? 0, + "username": name + }); + + if (baseData?.isSuccess ?? false) { SmartDialog.showToast(preAddress == null ? S.of(context).baocunchenggong : S.of(context).xiugaichenggong, alignment: Alignment.center); diff --git a/lib/base_state.dart b/lib/base_state.dart index 421b4014..2d7c6b66 100644 --- a/lib/base_state.dart +++ b/lib/base_state.dart @@ -44,75 +44,73 @@ abstract class BaseState extends State SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); print("intent:$startIntent"); String pushData = ""; - if (startIntent != null && startIntent != "") { + if (startIntent != "") { pushData = startIntent; } else { - pushData = sharedPreferences.getString("pushData"); + pushData = sharedPreferences.getString("pushData") ?? ""; } - if (pushData == null || pushData == "") return; + if (pushData == "") return; Map pushMap = jsonDecode(pushData); - if (pushMap != null) { - String routeName = ""; - Map params = {}; - switch (pushMap["typed"].toString()) { - case "1": - case "ARTICLE": - routeName = "/router/web_page"; - params["articleId"] = pushMap["info"]; - break; - case "2": - case "ACTIVITY": - routeName = "/router/web_page"; - params["activityId"] = pushMap["info"]; - break; - case "3": - case "SHOP": - routeName = "/router/store_order"; - params["id"] = pushMap["info"]; - params["tenant"] = pushMap["tenant"]; - params["storeName"] = pushMap["storeName"]; - break; - case "4": - case "CREDIT_GOODS": - routeName = "/router/integral_store_page"; - params["goodsId"] = pushMap["info"]; - break; - case "5": - case "ORDER": - routeName = "/router/order_details"; - params["id"] = pushMap["info"]; - break; - case "6": - case "MEMBER": - routeName = "/router/community_details"; - params["businessId"] = pushMap["info"]; - break; - case "8": - case "WALLET": - routeName = "/router/mine_wallet"; - params["id"] = pushMap["info"]; - break; - case "9": - case "WELFARE": - routeName = "/router/welfare_page"; - params["id"] = pushMap["info"]; - break; - case "12": - case "COUPON": - routeName = "/router/coupon_page"; - params["id"] = pushMap["info"]; - break; - case "13": - case "CATE_BEAN": - routeName = "/router/trading_card_page"; - params["id"] = pushMap["info"]; - break; - } - sharedPreferences.setString("pushData", ""); - print("xgPushClickAction: routeName: $routeName"); - if (routeName != "") { - Navigator.of(context).pushNamed(routeName, arguments: params); - } + String routeName = ""; + Map params = {}; + switch (pushMap["typed"].toString()) { + case "1": + case "ARTICLE": + routeName = "/router/web_page"; + params["articleId"] = pushMap["info"]; + break; + case "2": + case "ACTIVITY": + routeName = "/router/web_page"; + params["activityId"] = pushMap["info"]; + break; + case "3": + case "SHOP": + routeName = "/router/store_order"; + params["id"] = pushMap["info"]; + params["tenant"] = pushMap["tenant"]; + params["storeName"] = pushMap["storeName"]; + break; + case "4": + case "CREDIT_GOODS": + routeName = "/router/integral_store_page"; + params["goodsId"] = pushMap["info"]; + break; + case "5": + case "ORDER": + routeName = "/router/order_details"; + params["id"] = pushMap["info"]; + break; + case "6": + case "MEMBER": + routeName = "/router/community_details"; + params["businessId"] = pushMap["info"]; + break; + case "8": + case "WALLET": + routeName = "/router/mine_wallet"; + params["id"] = pushMap["info"]; + break; + case "9": + case "WELFARE": + routeName = "/router/welfare_page"; + params["id"] = pushMap["info"]; + break; + case "12": + case "COUPON": + routeName = "/router/coupon_page"; + params["id"] = pushMap["info"]; + break; + case "13": + case "CATE_BEAN": + routeName = "/router/trading_card_page"; + params["id"] = pushMap["info"]; + break; + } + sharedPreferences.setString("pushData", ""); + print("xgPushClickAction: routeName: $routeName"); + if (routeName != "") { + Navigator.of(context).pushNamed(routeName, arguments: params); + } } - } } diff --git a/lib/business_system/business_page.dart b/lib/business_system/business_page.dart deleted file mode 100644 index 41241254..00000000 --- a/lib/business_system/business_page.dart +++ /dev/null @@ -1,250 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:huixiang/business_system/goods/business_goods_page.dart'; -import 'package:huixiang/business_system/mine/business_mine_page.dart'; -import 'package:huixiang/business_system/order/business_order_page.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../retrofit/data/business_login_info.dart'; -import 'home/business_home_page.dart'; -import 'home/home_view/home_sideslip_dialog.dart'; - -class BusinessPage extends StatefulWidget { - final arguments; - - BusinessPage({this.arguments}); - - @override - State createState() { - return _BusinessPage(); - } -} - -class _BusinessPage extends State - with AutomaticKeepAliveClientMixin { - int choiceIndex = 0; - BusinessLoginInfo businessLoginInfo; - int selectStoreIndex = 0; - int switchStore = 0; - GlobalKey homePageKey = GlobalKey(); - GlobalKey orderPageKey = GlobalKey(); - GlobalKey goodsPageKey = GlobalKey(); - GlobalKey minePageKey = GlobalKey(); - var clickIndex = 0; - final PageController pageController = PageController(); - - @override - void initState() { - super.initState(); - businessLoginInfo = widget?.arguments["businessLoginInfo"]; - selectStoreIndex = widget.arguments["selectStoreIndex"] ?? 0; - } - - @override - Widget build(BuildContext context) { - super.build(context); - return Scaffold( - resizeToAvoidBottomInset: false, - body: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - child: PageView( - controller: pageController, - children: [ - BusinessHomePage( - homePageKey, businessLoginInfo, selectStoreIndex, showAlertDialog, - (index) { - setState(() { - pageController.jumpToPage(2); - }); - }), - BusinessOrderPage(orderPageKey, - businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0"), - BusinessGoodsPage(goodsPageKey, - businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0"), - BusinessMinePage(minePageKey, businessLoginInfo, - businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0"), - ], - physics: NeverScrollableScrollPhysics(), - onPageChanged: (index) { - clickIndex = index; - setState(() {}); - }, - ), - ), - if (switchStore == 0) - GestureDetector( - onTap: () { - setState(() { - switchStore = 1; - showAlertDialog(); - }); - }, - child: Container( - width: 97.w, - decoration: BoxDecoration( - color: Color(0xFFEBEFF6), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(111), - bottomLeft: Radius.circular(111), - ), - ), - padding: EdgeInsets.only(left: 12.w, top: 10.h, bottom: 10.h), - margin: EdgeInsets.only(bottom: 170.h), - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(right: 4.w), - child: Image.asset( - "assets/image/bs_switch.webp", - width: 12.w, - height: 15.h, - )), - Text( - "切换门店", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 12.sp, - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], - ), - ), - ), - ], - ), - extendBody: true, - bottomNavigationBar: Container( - alignment: Platform.isAndroid ? Alignment.center : Alignment.topCenter, - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.vertical( - top: Radius.circular(4), - ), - ), - height: 82.h, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - bottomNavigationItem("首页", 0, "assets/image/business_home.webp", - "assets/image/business_ home_h.webp"), - bottomNavigationItem("订单", 1, "assets/image/business_order.webp", - "assets/image/business_order_h.webp"), - // bottomNavigationItem("", 2,"assets/image/business_scan_code.webp","assets/image/business_scan_code.webp"), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/scan_code_page', arguments: { - "storeId": - businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0" - }); - }, - child: Container( - padding: EdgeInsets.only(top: 10.h), - child: Image.asset( - "assets/image/business_scan_code.webp", - width: 52.h, - height: 52.h, - ), - ), - ), - bottomNavigationItem("商品", 2, "assets/image/business_goods.webp", - "assets/image/business_goods_h.webp"), - bottomNavigationItem("我的", 3, "assets/image/business_mine.webp", - "assets/image/business_mine_h.webp"), - ], - ), - ), - ); - } - - Widget bottomNavigationItem(text, index, image, unImage) { - var isSelected = index == clickIndex; - return Expanded( - child: InkWell( - onTap: () { - setState(() { - clickIndex = index; - pageController.jumpToPage(clickIndex); - }); - }, - child: Container( - width: 45.w, - child: Column( - mainAxisAlignment: Platform.isAndroid - ? MainAxisAlignment.center - : MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - if (Platform.isIOS) - SizedBox( - height: 4.h, - ), - Image.asset( - isSelected ? image : unImage, - width: 30.h, - height: 30.h, - ), - Text( - text, - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.semi_bold, - color: isSelected ? Color(0xFF4C4C4C) : Color(0xFFACACAC), - ), - ), - ], - ), - ), - ), - flex: 1, - ); - } - - ///侧面弹窗 - showAlertDialog() async { - try { - int index = await showCupertinoModalPopup( - builder: (context) { - return HomeSideslipDialog(selectStoreIndex, businessLoginInfo); - }, - context: context); - if (index != null) { - if (index == -1) { - Navigator.of(context).pop(); - return; - } - setState(() { - selectStoreIndex = index; - homePageKey = GlobalKey(); - orderPageKey = GlobalKey(); - goodsPageKey = GlobalKey(); - minePageKey = GlobalKey(); - }); - } - } finally { - setState(() { - switchStore = 0; - }); - } - } - - @override - bool get wantKeepAlive => true; -} diff --git a/lib/business_system/date_select/custom_page.dart b/lib/business_system/date_select/custom_page.dart deleted file mode 100644 index 5594b12e..00000000 --- a/lib/business_system/date_select/custom_page.dart +++ /dev/null @@ -1,90 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_datepicker/datepicker.dart'; - -import '../../view_widget/my_appbar.dart'; - -class CustomPage extends StatefulWidget { - final Map arguments; - - CustomPage({this.arguments}); - - @override - State createState() { - return _CustomPage(); - } -} - -class _CustomPage extends State{ - String customDate = ''; - String endCustomDate = ''; - - void _onSelectionChanged(DateRangePickerSelectionChangedArgs args) { - setState(() { - if (args.value is PickerDateRange) { - customDate = - DateFormat('yyyy年MM月dd日 HH:mm:ss').format(args.value.startDate).toString() + - ' 至 ' + - DateFormat('yyyy年MM月dd日 23:59:59') - .format(args.value.endDate ?? args.value.startDate) - .toString(); - } - }); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "时间选择", - titleColor: Colors.black, - leadingColor: Colors.black, - background: Colors.white, - actions: [ - TextButton( - onPressed: () { - Navigator.pop(context, customDate,); - }, - child: Text( - "确定", - style: TextStyle( - color: Colors.black, - fontSize: 16, - ), - ), - ), - ], - ), - body: Stack( - children: [ - Positioned( - left: 0, - top: 0, - right: 0, - bottom: 0, - child: (widget.arguments["beyondDateRange"]) == "1"?SfDateRangePicker( - onSelectionChanged: _onSelectionChanged, - selectionMode: DateRangePickerSelectionMode.range, - initialSelectedRange: PickerDateRange( - DateTime.now().subtract(const Duration(days: 4)), - DateTime.now().add(const Duration(days: 3)),), - startRangeSelectionColor: Color(0xFF30415B), - endRangeSelectionColor: Color(0xFF30415B), - todayHighlightColor: Color(0xFF30415B), - ):SfDateRangePicker( - onSelectionChanged: _onSelectionChanged, - maxDate: DateTime.now(), - selectionMode: DateRangePickerSelectionMode.range, - initialSelectedRange: PickerDateRange( - DateTime.now().subtract(const Duration(days: 4)), - DateTime.now().add(const Duration(days: 3)),), - startRangeSelectionColor: Color(0xFF30415B), - endRangeSelectionColor: Color(0xFF30415B), - todayHighlightColor: Color(0xFF30415B), - ), - ) - ], - )); - } -} diff --git a/lib/business_system/date_select/date_picker.dart b/lib/business_system/date_select/date_picker.dart deleted file mode 100644 index 5934b5aa..00000000 --- a/lib/business_system/date_select/date_picker.dart +++ /dev/null @@ -1,121 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:widgetpicker/widgetpicker.dart'; - -import '../../generated/l10n.dart'; -import '../../utils/font_weight.dart'; - -class DatePickerWidget extends StatelessWidget { - final _years = List.generate((DateTime.now().year - 2019 +1), (i) => "${i + 2019}年"); - final _months = List.generate(12, (i) => "${i + 1}月"); - final showChange; - - DatePickerWidget({this.showChange = true}); - - @override - Widget build(BuildContext context) { - bool monOn = true; - String _currentYear = "${DateTime.now().year.toString()}年"; - String _currentMonth = "${DateTime.now().month.toString()}月"; - String _currentTimeStr = - "${_currentYear.replaceAll("年", "")}-${_currentMonth.length == 2 ? "0${_currentMonth.replaceAll("月", "")}" : _currentMonth.replaceAll("月", "")}"; - return StatefulBuilder(builder: (context1, state) { - return Container( - height: 260.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - children: [ - Container( - height: 50.h, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - InkWell( - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - child: Text( - S.of(context).quxiao, - style: TextStyle( - fontSize: 16, - fontWeight: MyFontWeight.semi_bold, - color: Colors.black), - ), - margin: EdgeInsets.only(left: 6), - padding: EdgeInsets.all(10), - ), - ), - InkWell( - onTap: () { - Navigator.of(context).pop(_currentTimeStr); - }, - child: Container( - child: Text( - S.of(context).queren, - style: TextStyle( - fontSize: 16, - fontWeight: MyFontWeight.semi_bold, - color:Color(0xFF30415B)), - ), - margin: EdgeInsets.only(left: 6), - padding: EdgeInsets.all(10), - ), - ), - ], - ), - ), - Container( - height: 2.h, - color: Color(0xFFF4F4F4), - ), - Expanded(child: Container( - child: - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - WidgetPicker( - value: _currentYear, - options: _years, - textStyle: TextStyle( - fontSize: 16.sp, color: Color(0xFFDDDDDD),), - selectedTextStyle: - TextStyle(fontSize: 16.sp, color: Colors.black,fontWeight: MyFontWeight.medium), - onChanged: (value) => state(() => { - _currentYear = value, - _currentTimeStr = monOn - ? "${_currentYear.replaceAll("年", "")}-${_currentMonth.length == 2 ? "0${_currentMonth.replaceAll("月", "")}" : _currentMonth.replaceAll("月", "")}" - : "${_currentYear.replaceAll("年", "")}" - }), - ), - if (monOn) - WidgetPicker( - value: _currentMonth, - options: _months, - textStyle: TextStyle( - fontSize: 16.sp, color: Color(0xFFDDDDDD)), - selectedTextStyle: - TextStyle(fontSize: 16.sp, color: Colors.black,fontWeight: MyFontWeight.medium), - onChanged: (value) => state(() => { - _currentMonth = value, - _currentTimeStr = monOn - ? "${_currentYear.replaceAll("年", "")}-${_currentMonth.length == 2 ? "0${_currentMonth.replaceAll("月", "")}" : _currentMonth.replaceAll("月", "")}" - : "${_currentYear.replaceAll("年", "")}" - }), - ), - ], - ), - )), - ], - ), - ); - }); - } -} diff --git a/lib/business_system/date_select/day_report_page.dart b/lib/business_system/date_select/day_report_page.dart deleted file mode 100644 index 81d59a5f..00000000 --- a/lib/business_system/date_select/day_report_page.dart +++ /dev/null @@ -1,83 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_datepicker/datepicker.dart'; - -import '../../view_widget/my_appbar.dart'; - -class DayReportPage extends StatefulWidget { - - @override - State createState() { - return _DayReportPage(); - } -} - -class _DayReportPage extends State{ - String _selectedDate = ''; - String _range = ''; - - @override - void initState() { - super.initState(); - } - - void _onSelectionChanged(DateRangePickerSelectionChangedArgs args) { - setState(() { - if (args.value is PickerDateRange) { - _range = - DateFormat('dd/MM/yyyy').format(args.value.startDate).toString() + - ' - ' + - DateFormat('dd/MM/yyyy') - .format(args.value.endDate ?? args.value.startDate) - .toString(); - } else if (args.value is DateTime) { - _selectedDate = args.value.toString().substring(0,10); - } - }); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "时间选择", - titleColor: Colors.black, - leadingColor: Colors.black, - background: Colors.white, - actions: [ - TextButton( - onPressed: () { - Navigator.pop(context, _selectedDate); - }, - child: Text( - "确定", - style: TextStyle( - color: Colors.black, - fontSize: 16, - ), - ), - ), - ], - ), - body: Stack( - children: [ - Positioned( - left: 0, - top: 0, - right: 0, - bottom: 0, - child: SfDateRangePicker( - onSelectionChanged: _onSelectionChanged, - maxDate: DateTime.now(), - selectionMode: DateRangePickerSelectionMode.single, - selectionColor: Color(0xFF30415B), - initialSelectedRange: PickerDateRange( - DateTime.now().subtract(const Duration(days: 4)), - DateTime.now().add(const Duration(days: 3))), - ), - ) - ], - )); - } -} diff --git a/lib/business_system/date_select/monthly_report_page.dart b/lib/business_system/date_select/monthly_report_page.dart deleted file mode 100644 index 568633bc..00000000 --- a/lib/business_system/date_select/monthly_report_page.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datepicker/datepicker.dart'; - -import '../../view_widget/my_appbar.dart'; - -class MonthlyReportPage extends StatefulWidget { - - @override - State createState() { - return _MonthlyReportPage(); - } -} - -class _MonthlyReportPage extends State{ - String _monthlyDate = ''; - final DateRangePickerController _controller = DateRangePickerController(); - - void _onSelectionChanged(DateRangePickerSelectionChangedArgs args) { - setState(() { - if (args.value is DateTime) { - _monthlyDate = args.value.toString().substring(0,10); - } - }); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "时间选择", - titleColor: Colors.black, - leadingColor: Colors.black, - background: Colors.white, - actions: [ - TextButton( - onPressed: () { - Navigator.pop(context, _monthlyDate); - }, - child: Text( - "确定", - style: TextStyle( - color: Colors.black, - fontSize: 16, - ), - ), - ), - ], - ), - body: Stack( - children: [ - Positioned( - left: 0, - top: 0, - right: 0, - bottom: 0, - child: SfDateRangePicker( - onSelectionChanged: _onSelectionChanged, - maxDate: DateTime.now(), - selectionMode: DateRangePickerSelectionMode.single, - view: DateRangePickerView.year, - controller: _controller, - selectionColor: Color(0xFF30415B), - allowViewNavigation: false, - ), - ) - ], - )); - } -} diff --git a/lib/business_system/date_select/week_report_page.dart b/lib/business_system/date_select/week_report_page.dart deleted file mode 100644 index a3659f07..00000000 --- a/lib/business_system/date_select/week_report_page.dart +++ /dev/null @@ -1,92 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_datepicker/datepicker.dart'; - -import '../../view_widget/my_appbar.dart'; - -class WeekReportPage extends StatefulWidget { - - @override - State createState() { - return _WeekReportPage(); - } -} - -class _WeekReportPage extends State{ - String _range = ''; - String _endRange = ''; - final DateRangePickerController _controller = DateRangePickerController(); - - void _onSelectionChanged(DateRangePickerSelectionChangedArgs args) { - setState(() { - if (args.value is PickerDateRange) { - final startDate = args.value.startDate; - final endDate = args.value.endDate; - if (endDate.difference(startDate).inDays > 6) { - _controller.selectedRange = PickerDateRange( - startDate.add(Duration(days: 6)), - endDate, - ); - } else { - _range = DateFormat('yyyy年MM月dd日').format(args.value.startDate).toString() + - ' 至 ' + - DateFormat('yyyy年MM月dd日') - .format(args.value.endDate ?? args.value.startDate) - .toString(); - _endRange = DateFormat('yyyy年MM月dd日').format(args.value.startDate).toString() + - ' 至 ' + - DateFormat('yyyy年MM月dd日') - .format(args.value.endDate ?? args.value.startDate) - .toString(); - } - } - }); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "时间选择", - titleColor: Colors.black, - leadingColor: Colors.black, - background: Colors.white, - actions: [ - TextButton( - onPressed: () { - Navigator.pop(context, _range,); - }, - child: Text( - "确定", - style: TextStyle( - color: Colors.black, - fontSize: 16, - ), - ), - ), - ], - ), - body: Stack( - children: [ - Positioned( - left: 0, - top: 0, - right: 0, - bottom: 0, - child: SfDateRangePicker( - onSelectionChanged: _onSelectionChanged, - minDate: DateTime.now().subtract(const Duration(days: 361)), - controller: _controller, // 添加控制器 - // maxDate: DateTime.now().add(Duration(days: 365)), - maxDate: DateTime.now(), - selectionMode: DateRangePickerSelectionMode.range, - startRangeSelectionColor: Color(0xFF30415B), - endRangeSelectionColor: Color(0xFF30415B), - todayHighlightColor: Color(0xFF30415B), - ), - ) - ], - )); - } -} diff --git a/lib/business_system/goods/add_goods/add_goods_page.dart b/lib/business_system/goods/add_goods/add_goods_page.dart deleted file mode 100644 index ec005024..00000000 --- a/lib/business_system/goods/add_goods/add_goods_page.dart +++ /dev/null @@ -1,1401 +0,0 @@ -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; -import 'package:huixiang/retrofit/data/upload_result.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:image_pickers/image_pickers.dart'; -import 'package:permission_handler/permission_handler.dart'; -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/goods_category_list.dart'; -import '../../../retrofit/data/product_group_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; -import 'data/product_sku.dart'; - -class AddGoodsPage extends StatefulWidget { - final Map arguments; - - AddGoodsPage({this.arguments}); - - @override - State createState() { - return _AddGoodsPage(); - } -} - -class _AddGoodsPage extends State { - TextEditingController goodsNameController = TextEditingController(); - TextEditingController profileController = TextEditingController(); - TextEditingController skuController = TextEditingController(); - TextEditingController heftController = TextEditingController(); - TextEditingController priceController = TextEditingController(); - TextEditingController originalPriceController = TextEditingController(); - TextEditingController packingChargeController = TextEditingController(); - TextEditingController stockController = TextEditingController(); - BusinessApiService businessService; - ProductGroupList productGroupList; - List goodsCategoryList = []; - String networkError = ""; - int networkStatus = 0; - String categoryName = ""; - int categoryIndex = 0; - String categoryId = ""; - String groupName = ""; - int groupIndex = 0; - String groupId = ""; - bool isLogistics = false; - bool isGround = true; - bool isOversold = true; - bool isSetMeal = false; - bool isAttrStyle = false; - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - List> mealDetails = []; - List skuAttrList = []; - List skuList = []; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - _onRefresh(); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - _onRefresh() async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - await queryProductGroupList(); - await queryCategorize(); - EasyLoading.dismiss(); - if (mounted) setState(() {}); - } - - ///分组列表 - queryProductGroupList() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.productGroup({ - "current": 1, - "map": {}, - "model": {"groupImg": "", "groupName": "", "isDelete": 0}, - "order": "ascending", - "size": 100, - "sort": "sort" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - }); - if (baseData != null && baseData.isSuccess) { - productGroupList = baseData.data; - networkStatus = 1; - } - } - - ///分类列表 - queryCategorize() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData> baseData = - await businessService.findCategoryListByDepth().catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - goodsCategoryList = baseData.data; - } - } - - ///新建商品 - addGoods() async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - - if (productImgUrl == null || productImgUrl.isEmpty) { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "必须传商品图片", - color: Color(0xFF30415B), - )); - return; - } - - var map = { - "storeId": widget.arguments["storeId"], - "attrStyle": isAttrStyle ? 1 : 0, //款式类型:1-多款式 0-单款式 - "categoryId": categoryId, //分类id - "oversold": isOversold == true ? 1 : 0, //允许超卖:1-允许 0-不允许 - "setMeal": isSetMeal == true ? 0 : 1, //套餐专属商品 0是 1不是 - "groupId": groupId, //分组id - "imgs": [ - { - "imgPath": productImgUrl - } - ], //商品图片 - "needLogistics": isLogistics == true ? 1 : 0, //需要物流:1-需要 0-不需要 - "productName": goodsNameController.text.trim(), //商品名字 - "productType": 0, //商品类型(0:普通类型;1:拼盘类型)app新增商品用不到,默认传0 - "shortName": profileController.text.trim(), //商品简介 - "skuAttrList": isAttrStyle ? skuAttrList.map((e) => e.toJson()).toList() : - [ - { - "attrCode": "attr_code_0", //规格的数据编码,app新增商品用不到,但必须传"" - "attrName": skuController.text.trim(), //属性名称,app新增商品用不到,但必须传"" - "needImg": 0, //是否需要图片,app新增商品用不到,但必须传0 - "attrValueList": [ - { - "attrValue": skuController.text.trim(), //商品规格 - "attrValueCode": "attr_code_0_value_0", //规格值的数据编码,app新增商品用不到,但必须传"" - } - ] //规格对应的规格值 - } - ], //规格列表 - "skuList": isAttrStyle ? - skuList.map((e) => e.toJson()).toList() : - [ - { - "applyPrice": originalPriceController.text.trim(), - ///商品原价 - "skuAttrCodeDTOList": [ - {"attrCode": "attr_code_0", "attrValueCode": "attr_code_0_value_0"} - ], - ///sku对应的规格编码,app新增商品用不到,但必须传该段 - "skuPrice": priceController.text.trim(), - ///商品售价 - "packagingFee": packingChargeController.text.trim(), - ///打包费 - "skuStock": stockController.text.trim(), - ///库存 - "weight": heftController.text.trim(), - ///重量 - "productSetMeals": mealDetails - /// 商品套餐 - } - ], //商品sku列表 - "status": isGround == true ? 1 : 0 //状态:1-上架 0-下架 - }; - print("mapmapmap: $map"); - BaseData baseData = await businessService.productSave(map).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "新建商品成功", - color: Color(0xFF30415B), - )); - networkStatus = 1; - setState(() {}); - Navigator.of(context).pop(); - } else { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally {} - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: "新建商品", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(top: 15.h, bottom: 15.h, left: 16.w), - child: Text( - "基本信息", - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - basicInformation(), - Container( - color: Colors.white, - margin: EdgeInsets.symmetric(vertical: 12.h), - padding: EdgeInsets.only(top: 16.h), - child: Column( - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - officialCategory(); - }, - child: textSelectItem( - "官方分类", categoryName == "" ? "请选择" : categoryName), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - goodsGroup(); - }, - child: textSelectItem( - "商品分组", groupName == "" ? "请选择" : groupName)), - ], - ), - ), - buttonSelect(), - Container( - color: Colors.white, - margin: EdgeInsets.only(top: 12.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(top: 18.h, left: 16.w, right: 16.w), - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(right: 20.h), - child: Text( - "多规格", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isAttrStyle = !isAttrStyle; - }); - }, - child: Image.asset( - isAttrStyle - ? "assets/image/reservation_switch.webp" - : "assets/image/reservation_unswitch.webp", - width: 44.w, - height: 24.h, - ), - ), - ], - )), - Container( - width: double.infinity, - height: 1.w, - color: Color(0x14000000), - margin: - EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w), - ), - isAttrStyle == true - ? GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed( - '/router/set_goods_specs', - arguments: { - "skuAttrList": skuAttrList, - "skuList": skuList - }).then((value) { - print("value:$value"); - if (value != null && value is Map) { - if (value["skuAttrList"] is List) { - List goodsSpecsDetail = value["skuAttrList"]; - skuAttrList = goodsSpecsDetail; - } - if (value["skuList"] is List) { - List specsValue = value["skuList"]; - skuList = specsValue; - } - setState(() {}); - } - }); - }, - child: Container( - padding: EdgeInsets.only( - left: 16.w, right: 16.w, top: 16.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: - CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: Text( - "商品规格", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - Text( - (skuList != null && skuList.isNotEmpty) ? "商品规格已设置" : "请设置商品规格", - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - Image.asset( - "assets/image/bs_right.webp", - width: 16.h, - height: 16.h, - ), - ], - ), - Container( - margin: EdgeInsets.only(top: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, - ), - ], - ), - ), - ) - : textItem("商品规格", skuController, "请输入商品规格"), - if (isAttrStyle == false) - textItem("商品重量", heftController, "请输入商品重量"), - if (isAttrStyle == false) - textItem("商品售价", priceController, "请输入商品售卖价格"), - if (isAttrStyle == false) - textItem("商品原价", originalPriceController, "请输入商品划线价格"), - if (isAttrStyle == false) - textItem("打包费", packingChargeController, "请输入商品打包费用"), - if (isAttrStyle == false) - textItem("商品库存", stockController, "请输入商品库存"), - if (isAttrStyle == false) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed('/router/set_meal', - arguments: { - "mealDetails": mealDetails - }).then((value) { - if (value != null && value is List) { - mealDetails.clear(); - mealDetails.addAll(value.map((e) => e as Map).toList()); - setState(() {}); - } - }); - }, - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: 16.w, vertical: 16.h), - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "设置套餐", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - Text( - (mealDetails != null && mealDetails.isNotEmpty) ? "已设置套餐" : "套餐选择", - style: TextStyle( - color: (mealDetails != null && mealDetails.isNotEmpty) ? Color(0xA9000000) : Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - Image.asset( - "assets/image/bs_right.webp", - width: 16.h, - height: 16.h, - ), - ], - ), - Container( - margin: EdgeInsets.only(top: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, - ), - ], - ), - ), - ), - GestureDetector( - onTap: () { - addGoods(); - }, - child: Container( - width: double.infinity, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only( - top: 111.h, bottom: 34.h, left: 16.w, right: 16.w), - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27), - ), - alignment: Alignment.center, - child: Text( - S.of(context).baocun, - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ), - ], - ), - ) - ], - ), - ), - ), - ); - } - - ///基础信息1 - Widget basicInformation() { - return Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), - color: Colors.white, - child: Column( - children: [ - mustTextItem("商品名称", goodsNameController, "请输入商品名称"), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "商品图片", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ], - ), - ), - ), - InkWell( - onTap: () { - showImagePicker() { - showCupertinoModalPopup( - context: context, - builder: (contetx) { - return CupertinoActionSheet( - title: Text(S.of(context).genghuantouxiang), - actions: [ - CupertinoActionSheetAction( - child: Text(S.of(context).paizhao), - onPressed: () { - openCamera(); - Navigator.of(context).pop(); - }, - isDefaultAction: true, - isDestructiveAction: false, - ), - CupertinoActionSheetAction( - child: Text(S.of(context).xiangce), - onPressed: () { - openStorage(); - Navigator.of(context).pop(); - }, - isDefaultAction: true, - isDestructiveAction: false, - ), - ], - cancelButton: CupertinoActionSheetAction( - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text(S.of(context).quxiao), - isDestructiveAction: true, - ), - ); - }); - } - }, - child: Container( - padding: EdgeInsets.all(15), - margin: EdgeInsets.only(right: 4.w), - decoration: BoxDecoration( - color: Color(0xFFF0F0F0), - borderRadius: BorderRadius.circular(4), - ), - child: Icon( - Icons.add, - size: 24, - color: Color(0xFFD8D8D8), - ), - ), - ), - ], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, - ), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "商品简介", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ], - ), - ), - Expanded( - child: Container( - padding: EdgeInsets.only(left: 8.w), - margin: EdgeInsets.only(left: 22.w, bottom: 16.h), - decoration: BoxDecoration( - color: Color(0xFFFCFCFC), - border: Border.all( - color: Color(0xFFEBEBEB), - width: 1, - ), - borderRadius: BorderRadius.circular(2), - ), - alignment: Alignment.topLeft, - child: TextField( - maxLines: 5, - controller: profileController, - onChanged: (value) { - setState(() { - // textLength = value.length; - }); - }, - decoration: InputDecoration( - border: InputBorder.none, - hintText: "请输入商品商品简介", - hintStyle: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF7A797F), - ), - ), - ), - )) - ], - ), - ], - ), - ); - } - - ///按钮选择板块 - Widget buttonSelect() { - return Container( - padding: EdgeInsets.only(left: 17.w, top: 16.h), - color: Colors.white, - child: Column( - children: [ - Row( - children: [ - Expanded( - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(right: 20.h), - child: Text( - "需要物流", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isLogistics = !isLogistics; - }); - }, - child: Image.asset( - isLogistics == true - ? "assets/image/reservation_switch.webp" - : "assets/image/reservation_unswitch.webp", - width: 44.w, - height: 24.h, - ), - ), - ], - ), - ), - Expanded( - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(right: 20.h), - child: Text( - "上架状态", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isGround = !isGround; - }); - }, - child: Image.asset( - isGround == true - ? "assets/image/reservation_switch.webp" - : "assets/image/reservation_unswitch.webp", - width: 44.w, - height: 24.h, - ), - ), - ], - ), - ), - ], - ), - Container( - width: double.infinity, - height: 1.w, - color: Color(0x14000000), - margin: EdgeInsets.symmetric(vertical: 16.h), - ), - Row( - children: [ - Expanded( - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(right: 20.h), - child: Text( - "允许超卖", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isOversold = !isOversold; - }); - }, - child: Image.asset( - isOversold == true - ? "assets/image/reservation_switch.webp" - : "assets/image/reservation_unswitch.webp", - width: 44.w, - height: 24.h, - ), - ), - ], - ), - ), - Expanded( - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(right: 20.h), - child: Text( - "套餐商品", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isSetMeal = !isSetMeal; - }); - }, - child: Image.asset( - isSetMeal == true - ? "assets/image/reservation_switch.webp" - : "assets/image/reservation_unswitch.webp", - width: 44.w, - height: 24.h, - ), - ), - ], - ), - ) - ], - ), - Container( - width: double.infinity, - height: 1.w, - color: Color(0x14000000), - margin: EdgeInsets.symmetric(vertical: 16.h), - ), - ], - ), - ); - } - - Widget textSelectItem(left, selectName) { - return Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: left, - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ], - ), - ), - ), - Text( - selectName, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - Image.asset( - "assets/image/bs_right.webp", - width: 16.h, - height: 16.h, - ), - ], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, - ), - ], - )); - } - - Widget mustTextItem(left, rightController, right) { - return Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: left, - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ], - ), - ), - ), - Expanded( - child: TextField( - controller: rightController, - decoration: InputDecoration( - hintText: right ?? "", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold), - ), - flex: 2, - ), - ], - ), - Container( - margin: EdgeInsets.only(bottom: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, - ), - ], - )); - } - - Widget textItem(left, rightController, right) { - return Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - left, - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Expanded( - child: TextField( - controller: rightController, - decoration: InputDecoration( - hintText: right ?? "", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xA9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold), - ), - flex: 2, - ), - ], - ), - Container( - color: Color(0x14000000), - height: 1.h, - width: double.infinity, - ), - ], - )); - } - - ///官方分类弹窗选择 - officialCategory() { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return StatefulBuilder(builder: ( - context, - state, - ) { - return Container( - width: double.infinity, - height: 365.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - "选择官方分类", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), - GestureDetector( - onTap: () { - state(() { - Navigator.of(context).pop(); - }); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w), - child: Image.asset( - "assets/image/cancel.webp", - width: 25.h, - height: 25.h, - ), - ), - ), - ], - ), - Expanded( - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: goodsCategoryList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - state(() { - categoryIndex = position; - }); - }, - child: - categoryItem(goodsCategoryList[position], position), - ); - }, - )), - GestureDetector( - onTap: () { - setState(() { - categoryName = goodsCategoryList[categoryIndex].categoryName; - categoryId = goodsCategoryList[categoryIndex].id; - Navigator.of(context).pop(); - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.symmetric( - vertical: 25.h, horizontal: 16.w), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).queding, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ); - }); - }); - } - - Widget categoryItem(GoodsCategoryList goodsCategoryList, index) { - return Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12, left: 16.w, right: 16.w), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: categoryIndex == index - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: - categoryIndex == index ? Color(0xFF30415B) : Colors.white, - width: categoryIndex == index ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), - child: Text( - goodsCategoryList?.categoryName ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: categoryIndex == index - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (categoryIndex == index) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - ); - } - - ///商品分组弹窗选择 - goodsGroup() { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return StatefulBuilder(builder: ( - context, - state, - ) { - return Container( - width: double.infinity, - height: 365.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - "选择官方分类", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), - GestureDetector( - onTap: () { - state(() { - Navigator.of(context).pop(); - }); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w), - child: Image.asset( - "assets/image/cancel.webp", - width: 25.h, - height: 25.h, - ), - ), - ), - ], - ), - Expanded( - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: productGroupList?.records?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - state(() { - groupIndex = position; - }); - }, - child: groupItem( - productGroupList.records[position], position), - ); - }, - )), - GestureDetector( - onTap: () { - setState(() { - groupName = productGroupList?.records[groupIndex]?.groupName ?? ""; - groupId = productGroupList?.records[groupIndex]?.id ?? ""; - Navigator.of(context).pop(); - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.symmetric( - vertical: 25.h, horizontal: 16.w), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).queding, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ); - }); - }); - } - - Widget groupItem(Records records, index) { - return Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12, left: 16.w, right: 16.w), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: - groupIndex == index ? Color(0xFFEFF5FF) : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: groupIndex == index ? Color(0xFF30415B) : Colors.white, - width: groupIndex == index ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), - child: Text( - records?.groupName ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: categoryIndex == index - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (groupIndex == index) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - ); - } - - ///拍照 - openCamera() async { - if (await Permission.camera.isGranted) { - Media medias = await ImagePickers.openCamera( - cameraMimeType: CameraMimeType.photo, - cropConfig: CropConfig( - enableCrop: true, - width: 200, - height: 200, - ), - compressSize: 500, - ); - if (medias == null) return; - filePath = medias.path; - fileUpload(); - } else { - await Permission.camera.request(); - openCamera(); - } - } - - String filePath; - String productImgUrl = ""; - - ///打开相册 - openStorage() async { - if (await Permission.storage.isGranted) { - List medias = await ImagePickers.pickerPaths( - galleryMode: GalleryMode.image, - selectCount: 1, - showGif: true, - showCamera: false, - compressSize: 500, - uiConfig: UIConfig( - uiThemeColor: Color(0xFFFFFFFF), - ), - cropConfig: CropConfig( - enableCrop: true, - width: 200, - height: 200, - ), - ); - if (medias == null || medias.length == 0) return; - filePath = medias[0].path; - setState(() {}); - fileUpload(); - } else { - await Permission.storage.request(); - openStorage(); - } - } - - ///文件上传 - fileUpload() async { - if (filePath != null && filePath != "" && await File(filePath).exists()) { - BaseData baseData = await businessService - .upload(File(filePath), 123123123) - .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - UploadResult uploadResult = baseData.data; - productImgUrl = uploadResult.url; - } - } - } - -} diff --git a/lib/business_system/goods/add_goods/data/product_sku.dart b/lib/business_system/goods/add_goods/data/product_sku.dart deleted file mode 100644 index 9effac91..00000000 --- a/lib/business_system/goods/add_goods/data/product_sku.dart +++ /dev/null @@ -1,837 +0,0 @@ - - -class Sku { - Sku({ - String applyPrice, - String autoRenewSkuStock, - String deliveries, - String id, - String isDelete, - List material, - String packagingFee, - String productId, - List productSetMeals, - String setMeal, - List setMealDTOList, - List skuAttrCodeDTOList, - List skuAttrList, - String skuCode, - String skuImg, - String skuNameStr, - String skuPrice, - String skuStock, - List skuTickets, - String sort, - String storeId, - List takeType, - String ticketDays, - TicketExpireTime ticketExpireTime, - String ticketStyle, - String ticketType, - String ticketWipedTimeTemplateId, - String version, - String vipPrice, - String volume, - String weight,}){ - _applyPrice = applyPrice; - _autoRenewSkuStock = autoRenewSkuStock; - _deliveries = deliveries; - _id = id; - _isDelete = isDelete; - _material = material; - _packagingFee = packagingFee; - _productId = productId; - _productSetMeals = productSetMeals; - _setMeal = setMeal; - _setMealDTOList = setMealDTOList; - _skuAttrCodeDTOList = skuAttrCodeDTOList; - _skuAttrList = skuAttrList; - _skuCode = skuCode; - _skuImg = skuImg; - _skuNameStr = skuNameStr; - _skuPrice = skuPrice; - _skuStock = skuStock; - _skuTickets = skuTickets; - _sort = sort; - _storeId = storeId; - _takeType = takeType; - _ticketDays = ticketDays; - _ticketExpireTime = ticketExpireTime; - _ticketStyle = ticketStyle; - _ticketType = ticketType; - _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; - _version = version; - _vipPrice = vipPrice; - _volume = volume; - _weight = weight; -} - - Sku.fromJson(dynamic json) { - _applyPrice = json['applyPrice']; - _autoRenewSkuStock = json['autoRenewSkuStock']; - _deliveries = json['deliveries']; - _id = json['id']; - _isDelete = json['isDelete']; - if (json['material'] != null) { - _material = []; - json['material'].forEach((v) { - _material.add(v); - }); - } - _packagingFee = json['packagingFee']; - _productId = json['productId']; - if (json['productSetMeals'] != null) { - _productSetMeals = []; - json['productSetMeals'].forEach((v) { - _productSetMeals.add(ProductSetMeals.fromJson(v)); - }); - } - _setMeal = json['setMeal']; - if (json['setMealDTOList'] != null) { - _setMealDTOList = []; - json['setMealDTOList'].forEach((v) { - _setMealDTOList.add(SetMealDtoList.fromJson(v)); - }); - } - if (json['skuAttrCodeDTOList'] != null) { - _skuAttrCodeDTOList = []; - json['skuAttrCodeDTOList'].forEach((v) { - _skuAttrCodeDTOList.add(SkuAttrCodeDtoList.fromJson(v)); - }); - } - if (json['skuAttrList'] != null) { - _skuAttrList = []; - json['skuAttrList'].forEach((v) { - _skuAttrList.add(SkuAttrList.fromJson(v)); - }); - } - _skuCode = json['skuCode']; - _skuImg = json['skuImg']; - _skuNameStr = json['skuNameStr']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - if (json['skuTickets'] != null) { - _skuTickets = []; - json['skuTickets'].forEach((v) { - _skuTickets.add(v); - }); - } - _sort = json['sort']; - _storeId = json['storeId']; - if (json['takeType'] != null) { - _takeType = []; - json['takeType'].forEach((v) { - _takeType.add(v); - }); - } - _ticketDays = json['ticketDays']; - _ticketExpireTime = json['ticketExpireTime'] != null ? TicketExpireTime.fromJson(json['ticketExpireTime']) : null; - _ticketStyle = json['ticketStyle']; - _ticketType = json['ticketType']; - _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; - _version = json['version']; - _vipPrice = json['vipPrice']; - _volume = json['volume']; - _weight = json['weight']; - } - String _applyPrice; - String _autoRenewSkuStock; - String _deliveries; - String _id; - String _isDelete; - List _material; - String _packagingFee; - String _productId; - List _productSetMeals; - String _setMeal; - List _setMealDTOList; - List _skuAttrCodeDTOList; - List _skuAttrList; - String _skuCode; - String _skuImg; - String _skuNameStr; - String _skuPrice; - String _skuStock; - List _skuTickets; - String _sort; - String _storeId; - List _takeType; - String _ticketDays; - TicketExpireTime _ticketExpireTime; - String _ticketStyle; - String _ticketType; - String _ticketWipedTimeTemplateId; - String _version; - String _vipPrice; - String _volume; - String _weight; - - String get applyPrice => _applyPrice; - String get autoRenewSkuStock => _autoRenewSkuStock; - String get deliveries => _deliveries; - String get id => _id; - String get isDelete => _isDelete; - List get material => _material; - String get packagingFee => _packagingFee; - String get productId => _productId; - List get productSetMeals => _productSetMeals; - String get setMeal => _setMeal; - List get setMealDTOList => _setMealDTOList; - List get skuAttrCodeDTOList => _skuAttrCodeDTOList; - List get skuAttrList => _skuAttrList; - String get skuCode => _skuCode; - String get skuImg => _skuImg; - String get skuNameStr => _skuNameStr; - String get skuPrice => _skuPrice; - String get skuStock => _skuStock; - List get skuTickets => _skuTickets; - String get sort => _sort; - String get storeId => _storeId; - List get takeType => _takeType; - String get ticketDays => _ticketDays; - TicketExpireTime get ticketExpireTime => _ticketExpireTime; - String get ticketStyle => _ticketStyle; - String get ticketType => _ticketType; - String get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; - String get version => _version; - String get vipPrice => _vipPrice; - String get volume => _volume; - String get weight => _weight; - - Map toJson() { - final map = {}; - map['applyPrice'] = _applyPrice; - map['autoRenewSkuStock'] = _autoRenewSkuStock; - map['deliveries'] = _deliveries; - map['id'] = _id; - map['isDelete'] = _isDelete; - if (_material != null) { - map['material'] = _material.map((v) => v.toJson()).toList(); - } - map['packagingFee'] = _packagingFee; - map['productId'] = _productId; - if (_productSetMeals != null) { - map['productSetMeals'] = _productSetMeals.map((v) => v.toJson()).toList(); - } - map['setMeal'] = _setMeal; - if (_setMealDTOList != null) { - map['setMealDTOList'] = _setMealDTOList.map((v) => v.toJson()).toList(); - } - if (_skuAttrCodeDTOList != null) { - map['skuAttrCodeDTOList'] = _skuAttrCodeDTOList.map((v) => v.toJson()).toList(); - } - if (_skuAttrList != null) { - map['skuAttrList'] = _skuAttrList.map((v) => v.toJson()).toList(); - } - map['skuCode'] = _skuCode; - map['skuImg'] = _skuImg; - map['skuNameStr'] = _skuNameStr; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - if (_skuTickets != null) { - map['skuTickets'] = _skuTickets.map((v) => v.toJson()).toList(); - } - map['sort'] = _sort; - map['storeId'] = _storeId; - if (_takeType != null) { - map['takeType'] = _takeType.map((v) => v.toJson()).toList(); - } - map['ticketDays'] = _ticketDays; - if (_ticketExpireTime != null) { - map['ticketExpireTime'] = _ticketExpireTime.toJson(); - } - map['ticketStyle'] = _ticketStyle; - map['ticketType'] = _ticketType; - map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; - map['version'] = _version; - map['vipPrice'] = _vipPrice; - map['volume'] = _volume; - map['weight'] = _weight; - return map; - } - -} - -class TicketExpireTime { - TicketExpireTime({ - String hour, - String minute, - String nano, - String second,}){ - _hour = hour; - _minute = minute; - _nano = nano; - _second = second; -} - - TicketExpireTime.fromJson(dynamic json) { - _hour = json['hour']; - _minute = json['minute']; - _nano = json['nano']; - _second = json['second']; - } - String _hour; - String _minute; - String _nano; - String _second; -TicketExpireTime copyWith({ String hour, - String minute, - String nano, - String second, -}) => TicketExpireTime( hour: hour ?? _hour, - minute: minute ?? _minute, - nano: nano ?? _nano, - second: second ?? _second, -); - String get hour => _hour; - String get minute => _minute; - String get nano => _nano; - String get second => _second; - - Map toJson() { - final map = {}; - map['hour'] = _hour; - map['minute'] = _minute; - map['nano'] = _nano; - map['second'] = _second; - return map; - } - -} - -class SkuAttrList { - SkuAttrList({ - String attrId, - String attrValueId, - String id, - String isDelete, - String skuId, - String sortOrder,}){ - _attrId = attrId; - _attrValueId = attrValueId; - _id = id; - _isDelete = isDelete; - _skuId = skuId; - _sortOrder = sortOrder; -} - - SkuAttrList.fromJson(dynamic json) { - _attrId = json['attrId']; - _attrValueId = json['attrValueId']; - _id = json['id']; - _isDelete = json['isDelete']; - _skuId = json['skuId']; - _sortOrder = json['sortOrder']; - } - String _attrId; - String _attrValueId; - String _id; - String _isDelete; - String _skuId; - String _sortOrder; -SkuAttrList copyWith({ String attrId, - String attrValueId, - String id, - String isDelete, - String skuId, - String sortOrder, -}) => SkuAttrList( attrId: attrId ?? _attrId, - attrValueId: attrValueId ?? _attrValueId, - id: id ?? _id, - isDelete: isDelete ?? _isDelete, - skuId: skuId ?? _skuId, - sortOrder: sortOrder ?? _sortOrder, -); - String get attrId => _attrId; - String get attrValueId => _attrValueId; - String get id => _id; - String get isDelete => _isDelete; - String get skuId => _skuId; - String get sortOrder => _sortOrder; - - Map toJson() { - final map = {}; - map['attrId'] = _attrId; - map['attrValueId'] = _attrValueId; - map['id'] = _id; - map['isDelete'] = _isDelete; - map['skuId'] = _skuId; - map['sortOrder'] = _sortOrder; - return map; - } - -} - -class SkuAttrCodeDtoList { - SkuAttrCodeDtoList({ - String attrCode, - String attrValueCode,}){ - _attrCode = attrCode; - _attrValueCode = attrValueCode; -} - - SkuAttrCodeDtoList.fromJson(dynamic json) { - _attrCode = json['attrCode']; - _attrValueCode = json['attrValueCode']; - } - String _attrCode; - String _attrValueCode; -SkuAttrCodeDtoList copyWith({ String attrCode, - String attrValueCode, -}) => SkuAttrCodeDtoList( attrCode: attrCode ?? _attrCode, - attrValueCode: attrValueCode ?? _attrValueCode, -); - String get attrCode => _attrCode; - String get attrValueCode => _attrValueCode; - - Map toJson() { - final map = {}; - map['attrCode'] = _attrCode; - map['attrValueCode'] = _attrValueCode; - return map; - } - -} - -class SetMealDtoList { - SetMealDtoList({ - String buyNum, - String groupId, - String productId, - String productName, - String sellPrice, - String skuId, - String storeId,}){ - _buyNum = buyNum; - _groupId = groupId; - _productId = productId; - _productName = productName; - _sellPrice = sellPrice; - _skuId = skuId; - _storeId = storeId; -} - - SetMealDtoList.fromJson(dynamic json) { - _buyNum = json['buyNum']; - _groupId = json['groupId']; - _productId = json['productId']; - _productName = json['productName']; - _sellPrice = json['sellPrice']; - _skuId = json['skuId']; - _storeId = json['storeId']; - } - String _buyNum; - String _groupId; - String _productId; - String _productName; - String _sellPrice; - String _skuId; - String _storeId; -SetMealDtoList copyWith({ String buyNum, - String groupId, - String productId, - String productName, - String sellPrice, - String skuId, - String storeId, -}) => SetMealDtoList( buyNum: buyNum ?? _buyNum, - groupId: groupId ?? _groupId, - productId: productId ?? _productId, - productName: productName ?? _productName, - sellPrice: sellPrice ?? _sellPrice, - skuId: skuId ?? _skuId, - storeId: storeId ?? _storeId, -); - String get buyNum => _buyNum; - String get groupId => _groupId; - String get productId => _productId; - String get productName => _productName; - String get sellPrice => _sellPrice; - String get skuId => _skuId; - String get storeId => _storeId; - - Map toJson() { - final map = {}; - map['buyNum'] = _buyNum; - map['groupId'] = _groupId; - map['productId'] = _productId; - map['productName'] = _productName; - map['sellPrice'] = _sellPrice; - map['skuId'] = _skuId; - map['storeId'] = _storeId; - return map; - } - -} - -class ProductSetMeals { - ProductSetMeals({ - String groupName, - String optionalNumber, - List productInfoList, - String totalNumber,}){ - _groupName = groupName; - _optionalNumber = optionalNumber; - _productInfoList = productInfoList; - _totalNumber = totalNumber; -} - - ProductSetMeals.fromJson(dynamic json) { - _groupName = json['groupName']; - _optionalNumber = json['optionalNumber']; - if (json['productInfoList'] != null) { - _productInfoList = []; - json['productInfoList'].forEach((v) { - _productInfoList.add(ProductInfoList.fromJson(v)); - }); - } - _totalNumber = json['totalNumber']; - } - String _groupName; - String _optionalNumber; - List _productInfoList; - String _totalNumber; -ProductSetMeals copyWith({ String groupName, - String optionalNumber, - List productInfoList, - String totalNumber, -}) => ProductSetMeals( groupName: groupName ?? _groupName, - optionalNumber: optionalNumber ?? _optionalNumber, - productInfoList: productInfoList ?? _productInfoList, - totalNumber: totalNumber ?? _totalNumber, -); - String get groupName => _groupName; - String get optionalNumber => _optionalNumber; - List get productInfoList => _productInfoList; - String get totalNumber => _totalNumber; - - Map toJson() { - final map = {}; - map['groupName'] = _groupName; - map['optionalNumber'] = _optionalNumber; - if (_productInfoList != null) { - map['productInfoList'] = _productInfoList.map((v) => v.toJson()).toList(); - } - map['totalNumber'] = _totalNumber; - return map; - } - -} - -class ProductInfoList { - ProductInfoList({ - bool allSku, - bool markProductNone, - String number, - List productAttrInfoList, - String productId, - String productImg, - String productName, - List skuInfoList, - String storeId,}){ - _allSku = allSku; - _markProductNone = markProductNone; - _number = number; - _productAttrInfoList = productAttrInfoList; - _productId = productId; - _productImg = productImg; - _productName = productName; - _skuInfoList = skuInfoList; - _storeId = storeId; -} - - ProductInfoList.fromJson(dynamic json) { - _allSku = json['allSku']; - _markProductNone = json['markProductNone']; - _number = json['number']; - if (json['productAttrInfoList'] != null) { - _productAttrInfoList = []; - json['productAttrInfoList'].forEach((v) { - _productAttrInfoList.add(ProductAttrInfoList.fromJson(v)); - }); - } - _productId = json['productId']; - _productImg = json['productImg']; - _productName = json['productName']; - if (json['skuInfoList'] != null) { - _skuInfoList = []; - json['skuInfoList'].forEach((v) { - _skuInfoList.add(SkuInfoList.fromJson(v)); - }); - } - _storeId = json['storeId']; - } - bool _allSku; - bool _markProductNone; - String _number; - List _productAttrInfoList; - String _productId; - String _productImg; - String _productName; - List _skuInfoList; - String _storeId; -ProductInfoList copyWith({ bool allSku, - bool markProductNone, - String number, - List productAttrInfoList, - String productId, - String productImg, - String productName, - List skuInfoList, - String storeId, -}) => ProductInfoList( allSku: allSku ?? _allSku, - markProductNone: markProductNone ?? _markProductNone, - number: number ?? _number, - productAttrInfoList: productAttrInfoList ?? _productAttrInfoList, - productId: productId ?? _productId, - productImg: productImg ?? _productImg, - productName: productName ?? _productName, - skuInfoList: skuInfoList ?? _skuInfoList, - storeId: storeId ?? _storeId, -); - bool get allSku => _allSku; - bool get markProductNone => _markProductNone; - String get number => _number; - List get productAttrInfoList => _productAttrInfoList; - String get productId => _productId; - String get productImg => _productImg; - String get productName => _productName; - List get skuInfoList => _skuInfoList; - String get storeId => _storeId; - - Map toJson() { - final map = {}; - map['allSku'] = _allSku; - map['markProductNone'] = _markProductNone; - map['number'] = _number; - if (_productAttrInfoList != null) { - map['productAttrInfoList'] = _productAttrInfoList.map((v) => v.toJson()).toList(); - } - map['productId'] = _productId; - map['productImg'] = _productImg; - map['productName'] = _productName; - if (_skuInfoList != null) { - map['skuInfoList'] = _skuInfoList.map((v) => v.toJson()).toList(); - } - map['storeId'] = _storeId; - return map; - } - -} - - -class SkuInfoList { - SkuInfoList({ - String id, - List productSkuAttrList, - String skuName,}){ - _id = id; - _productSkuAttrList = productSkuAttrList; - _skuName = skuName; -} - - SkuInfoList.fromJson(dynamic json) { - _id = json['id']; - if (json['productSkuAttrList'] != null) { - _productSkuAttrList = []; - json['productSkuAttrList'].forEach((v) { - _productSkuAttrList.add(ProductSkuAttrList.fromJson(v)); - }); - } - _skuName = json['skuName']; - } - String _id; - List _productSkuAttrList; - String _skuName; -SkuInfoList copyWith({ String id, - List productSkuAttrList, - String skuName, -}) => SkuInfoList( id: id ?? _id, - productSkuAttrList: productSkuAttrList ?? _productSkuAttrList, - skuName: skuName ?? _skuName, -); - String get id => _id; - List get productSkuAttrList => _productSkuAttrList; - String get skuName => _skuName; - - Map toJson() { - final map = {}; - map['id'] = _id; - if (_productSkuAttrList != null) { - map['productSkuAttrList'] = _productSkuAttrList.map((v) => v.toJson()).toList(); - } - map['skuName'] = _skuName; - return map; - } - -} - -/// attrId : 0 -/// attrValueId : 0 -/// id : 0 -/// isDelete : 0 -/// skuId : 0 -/// sortOrder : 0 - -class ProductSkuAttrList { - ProductSkuAttrList({ - String attrId, - String attrValueId, - String id, - String isDelete, - String skuId, - String sortOrder,}){ - _attrId = attrId; - _attrValueId = attrValueId; - _id = id; - _isDelete = isDelete; - _skuId = skuId; - _sortOrder = sortOrder; -} - - ProductSkuAttrList.fromJson(dynamic json) { - _attrId = json['attrId']; - _attrValueId = json['attrValueId']; - _id = json['id']; - _isDelete = json['isDelete']; - _skuId = json['skuId']; - _sortOrder = json['sortOrder']; - } - String _attrId; - String _attrValueId; - String _id; - String _isDelete; - String _skuId; - String _sortOrder; -ProductSkuAttrList copyWith({ String attrId, - String attrValueId, - String id, - String isDelete, - String skuId, - String sortOrder, -}) => ProductSkuAttrList( attrId: attrId ?? _attrId, - attrValueId: attrValueId ?? _attrValueId, - id: id ?? _id, - isDelete: isDelete ?? _isDelete, - skuId: skuId ?? _skuId, - sortOrder: sortOrder ?? _sortOrder, -); - String get attrId => _attrId; - String get attrValueId => _attrValueId; - String get id => _id; - String get isDelete => _isDelete; - String get skuId => _skuId; - String get sortOrder => _sortOrder; - - Map toJson() { - final map = {}; - map['attrId'] = _attrId; - map['attrValueId'] = _attrValueId; - map['id'] = _id; - map['isDelete'] = _isDelete; - map['skuId'] = _skuId; - map['sortOrder'] = _sortOrder; - return map; - } - -} - -/// attrId : 0 -/// attrName : "" -/// attrValueList : [{"attrId":0,"attrName":"","attrValueList":[{}]}] - -class ProductAttrInfoList { - ProductAttrInfoList({ - String attrId, - String attrName, - List attrValueList,}){ - _attrId = attrId; - _attrName = attrName; - _attrValueList = attrValueList; -} - - ProductAttrInfoList.fromJson(dynamic json) { - _attrId = json['attrId']; - _attrName = json['attrName']; - if (json['attrValueList'] != null) { - _attrValueList = []; - json['attrValueList'].forEach((v) { - _attrValueList.add(AttrValueList.fromJson(v)); - }); - } - } - String _attrId; - String _attrName; - List _attrValueList; -ProductAttrInfoList copyWith({ String attrId, - String attrName, - List attrValueList, -}) => ProductAttrInfoList( attrId: attrId ?? _attrId, - attrName: attrName ?? _attrName, - attrValueList: attrValueList ?? _attrValueList, -); - String get attrId => _attrId; - String get attrName => _attrName; - List get attrValueList => _attrValueList; - - Map toJson() { - final map = {}; - map['attrId'] = _attrId; - map['attrName'] = _attrName; - if (_attrValueList != null) { - map['attrValueList'] = _attrValueList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// attrId : 0 -/// attrName : "" -/// attrValueList : [{}] - -class AttrValueList { - AttrValueList({ - String attrId, - String attrName, - List attrValueList,}){ - _attrId = attrId; - _attrName = attrName; - _attrValueList = attrValueList; -} - - AttrValueList.fromJson(dynamic json) { - _attrId = json['attrId']; - _attrName = json['attrName']; - if (json['attrValueList'] != null) { - _attrValueList = []; - json['attrValueList'].forEach((v) { - _attrValueList.add(v); - }); - } - } - String _attrId; - String _attrName; - List _attrValueList; -AttrValueList copyWith({ String attrId, - String attrName, - List attrValueList, -}) => AttrValueList( attrId: attrId ?? _attrId, - attrName: attrName ?? _attrName, - attrValueList: attrValueList ?? _attrValueList, -); - String get attrId => _attrId; - String get attrName => _attrName; - List get attrValueList => _attrValueList; - - Map toJson() { - final map = {}; - map['attrId'] = _attrId; - map['attrName'] = _attrName; - if (_attrValueList != null) { - map['attrValueList'] = _attrValueList.map((v) => v.toJson()).toList(); - } - return map; - } - -} \ No newline at end of file diff --git a/lib/business_system/goods/add_goods/data/product_sku_attr.dart b/lib/business_system/goods/add_goods/data/product_sku_attr.dart deleted file mode 100644 index e1fec457..00000000 --- a/lib/business_system/goods/add_goods/data/product_sku_attr.dart +++ /dev/null @@ -1,70 +0,0 @@ - - -import 'package:flutter/cupertino.dart'; - - -class ProductSkuAttr { - - TextEditingController _specsNameController; - - String attrCode; - String needImg; - - TextEditingController get specsNameController => _specsNameController; - - String get attrName => _attrName = specsNameController.text; - - String _attrName; - - List attrValueList = []; - - ProductSkuAttr(){ - _specsNameController = TextEditingController(); - } - - Map toJson() { - final map = {}; - map['attrCode'] = attrCode; - map['needImg'] = needImg ?? false; - map['attrName'] = attrName; - if (attrValueList != null && attrValueList.isNotEmpty) { - map['attrValueList'] = attrValueList.map((e) => e.toJson()).toList(); - } - return map; - } - - @override - String toString() { - return 'ProductSkuAttr{attrCode: $attrCode, attrName: $attrName, needimg: $needImg, attrValueList: $attrValueList}'; - } - -} - - -class ProductSkuAttrValue { - - String attrValue; - String attrValueCode; - String attrValueImage; - - TextEditingController _specsValueNameController; - - TextEditingController get specsValueNameController => _specsValueNameController; - - ProductSkuAttrValue(){ - _specsValueNameController = TextEditingController(); - } - - Map toJson() { - final map = {}; - map['attrValue'] = attrValue; - map['attrValueCode'] = attrValueCode; - map['attrValueImage'] = attrValueImage; - return map; - } - - @override - String toString() { - return 'ProductSkuAttrValue{attrValue: $attrValue, attrValueCode: $attrValueCode, attrValueImage: $attrValueImage}'; - } -} diff --git a/lib/business_system/goods/add_goods/edit_specs_detail.dart b/lib/business_system/goods/add_goods/edit_specs_detail.dart deleted file mode 100644 index 6699e367..00000000 --- a/lib/business_system/goods/add_goods/edit_specs_detail.dart +++ /dev/null @@ -1,515 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/edit_specs_detail_list.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; -import 'data/product_sku.dart'; -import 'data/product_sku_attr.dart'; - -class EditSpecsDetail extends StatefulWidget { - final Map arguments; - - EditSpecsDetail({this.arguments}); - - @override - State createState() { - return _EditSpecsDetail(); - } -} - -class _EditSpecsDetail extends State { - List editSpecsDetailList = []; - Map> codeMap = {}; - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - BusinessApiService businessService; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - List skus = widget?.arguments["skus"] ?? []; - - List skiStr = mergeAttrCode(skus); - - List skuList = widget.arguments["skuList"] ?? []; - print("skuList: ${skuList.map((e) => e.toJson()).toList()}"); - - print("skiStr: $skiStr"); - skiStr.forEach((element) { - var edit = EditSpecsDetailList(element); - for (var e1 in skuList) { - if (e1.skuNameStr == element) { - edit.goodPriceController.text = "${e1.skuPrice}"; - edit.originalPriceController.text = "${e1.applyPrice}"; - edit.packagingFeeController.text = "${e1.packagingFee}"; - edit.specsWeightController.text = "${e1.weight}"; - edit.skuStockController.text = "${e1.skuStock}"; - break; - } - } - editSpecsDetailList.add(edit); - }); - } - - ///sku计算 - List mergeArr(List> arr) { - var result = arr.removeAt(0); - while (arr.isNotEmpty) { - var curArr = arr.removeAt(0); - var lastArr = result; - result = []; - for (var lastVal in lastArr) { - for (var curVal in curArr) { - result.add("$lastVal $curVal"); - } - } - } - return result; - } - - ///sku计算 - List mergeAttrCode(List arr) { - List attrValue = []; - - for (ProductSkuAttr skuAttr in arr) { - attrValue = mergeName(attrValue, skuAttr.attrValueList); - } - - codeMap = mergeCodeMap(codeMap, attrValue, arr); - - print("attrValue: $attrValue"); - print("codeMap: $codeMap"); - return attrValue; - } - - Map> mergeCodeMap(Map> resultMap, List attrValue, List skuAttr) { - for (String attrName in attrValue) { - for (ProductSkuAttr skuAttrValue in skuAttr) { - for (ProductSkuAttrValue skuAttrValue in skuAttrValue.attrValueList) { - if (attrName.contains("${skuAttrValue.attrValue}")) { - if (resultMap.containsKey(attrName)) { - resultMap[attrName].add(skuAttrValue.attrValueCode); - } else { - resultMap[attrName] = [skuAttrValue.attrValueCode]; - } - } - } - } - } - return resultMap; - } - - List mergeName(List attrValues, List values) { - if (attrValues.isEmpty) { - return values.map((e) => e.attrValue).toList(); - } - List resultValue = []; - for (String rValue in attrValues) { - for (ProductSkuAttrValue iValue in values) { - resultValue.add("$rValue ${iValue.attrValue}"); - } - } - return resultValue; - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "编辑规格明细", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Stack( - children: [ - Container( - margin: EdgeInsets.only(bottom: 120.h), - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: editSpecsDetailList.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - FocusScope.of(context).unfocus(); - }); - }, - child: editSpecsItem(position)); - }, - ), - ), - - ///确认 - Align( - alignment: Alignment.bottomCenter, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - bool flag = false; - String editType = ""; - List skuList = []; - editSpecsDetailList.forEach((element) { - if (element.goodPriceController.text.trim() == "") { - flag = true; - editType = "请输入商品售价"; - return; - } else if (element.originalPriceController.text.trim() == "") { - flag = true; - editType = "请输入商品原价"; - return; - } - var productSku = Sku( - skuNameStr: element.specsDetailName, - skuPrice: element.goodPriceController.text.toString(), - applyPrice: element.originalPriceController.text == "" ? "0" : element.originalPriceController.text, - packagingFee: element.packagingFeeController.text == "" ? "0" : element.packagingFeeController.text, - weight: element.specsWeightController.text == "" ? "0" : element.specsWeightController.text, - skuStock: element.skuStockController.text == "" ? "0" : element.skuStockController.text, - skuAttrCodeDTOList: codeMap[element.specsDetailName].map((e) { - return SkuAttrCodeDtoList( - attrCode: e.substring(0, e.lastIndexOf("_value")), - attrValueCode: e, - ); - }).toList(), - ); - skuList.add(productSku); - }); - if (flag) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: editType, - color: Color(0xFF30415B), - )); - } else { - Navigator.of(context).pop(skuList); - } - }, - child: Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only( - top: 10.h, left: 16.w, right: 16.w, bottom: 34.h), - child: Container( - alignment: Alignment.center, - height: 54.h, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27), - ), - child: Text( - S.of(context).baocun, - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ), - )) - ], - ), - ); - } - - ///编辑规格list - Widget editSpecsItem(index) { - return Container( - color: Colors.white, - margin: EdgeInsets.symmetric(vertical: 12.h), - padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - editSpecsDetailList[index].specsDetailName ?? "", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - Container( - width: double.infinity, - height: 1.h, - margin: EdgeInsets.only(top: 20.h), - color: Color(0x14000000), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "商品售价", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), - ), - ), - Expanded( - child: TextField( - controller: editSpecsDetailList[index].goodPriceController, - decoration: InputDecoration( - hintText: "请输入商品售卖价格", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "商品原价", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), - ), - ), - Expanded( - child: TextField( - controller: - editSpecsDetailList[index].originalPriceController, - decoration: InputDecoration( - hintText: "请输入商品划线价格", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "商品打包费", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - Expanded( - child: TextField( - controller: editSpecsDetailList[index].packagingFeeController, - decoration: InputDecoration( - hintText: "请输入商品打包费", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "商品重量", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - Expanded( - child: TextField( - controller: editSpecsDetailList[index].specsWeightController, - decoration: InputDecoration( - hintText: "请输入商品重量(单位kg)", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "商品库存", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - Expanded( - child: TextField( - controller: editSpecsDetailList[index].skuStockController, - decoration: InputDecoration( - hintText: "请输入商品库存", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - ], - ), - ); - } -} diff --git a/lib/business_system/goods/add_goods/set_goods_specs.dart b/lib/business_system/goods/add_goods/set_goods_specs.dart deleted file mode 100644 index c8214322..00000000 --- a/lib/business_system/goods/add_goods/set_goods_specs.dart +++ /dev/null @@ -1,495 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/set_specs_list.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; -import 'data/product_sku.dart'; - -class SetGoodsSpecs extends StatefulWidget { - final Map arguments; - - SetGoodsSpecs({this.arguments}); - - @override - State createState() { - return _SetGoodsSpecs(); - } -} - -class _SetGoodsSpecs extends State { - List skuAttrList = []; - List skuList = []; - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - BusinessApiService businessService; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - skuAttrList = widget?.arguments["skuAttrList"] ?? []; - skuList = widget?.arguments["skuList"] ?? []; - skuAttrList.forEach((element) { - element.specsNameController.text = element.attrName; - }); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "设置商品规格", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Stack( - children: [ - SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - margin: EdgeInsets.only(bottom: 150.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ListView.builder( - padding: EdgeInsets.zero, - itemCount: skuAttrList.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: specsText(position)); - }, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ProductSkuAttr product = ProductSkuAttr(); - product.attrCode = "attr_code_${skuAttrList.length}"; - skuAttrList.add(product); - }); - }, - child: Container( - color: Colors.white, - padding: EdgeInsets.symmetric(vertical: 20.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.add_circle, - color: Color(0xFF30415B), - size: 20, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "添加规格", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ], - ), - ), - ), - if (skuAttrList.length > 0) - Padding( - padding: EdgeInsets.all(16), - child: Text( - "设置库存/价格等规格明细", - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 12.sp, - fontWeight: MyFontWeight.bold, - ), - )), - if (skuAttrList.length > 0) - Container( - color: Colors.white, - padding: EdgeInsets.only( - top: 20.h, - bottom: 20.h, - left: 16.w, - right: 20.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "规格明细", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - bool flag = false; - String tipText = ""; - skuAttrList.forEach((element) { - if (element.specsNameController.text - .trim() == - "") { - flag = true; - tipText = "规格名称未输入,请先输入规格名称"; - return; - } else if (element.attrValueList.length == - 0) { - flag = true; - tipText = "未添加规格值,请先添加规格值"; - return; - } - }); - - for (var value1 in skuAttrList) { - int index = skuAttrList.indexOf(value1); - value1.attrCode = "attr_code_$index"; - } - - if (flag) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: tipText, - color: Color(0xFF30415B), - )); - } else { - Navigator.of(context).pushNamed( - '/router/edit_specs_detail', - arguments: { - "skus": skuAttrList, - "skuList": skuList - }).then((value) { - if (value != null && value is List) { - skuList.clear(); - skuList.addAll(value.map((e) => e as Sku).toList()); - setState(() {}); - } - }); - } - }, - child: Row( - mainAxisAlignment: - MainAxisAlignment.end, - children: [ - Padding( - padding: - EdgeInsets.only(right: 5.w), - child: Text( - (skuList != null && - skuList.isNotEmpty) - ? "已设置" - : "去设置", - style: TextStyle( - color: - (skuList != null && - skuList - .isNotEmpty) - ? Color(0xA9000000) - : Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Image.asset( - "assets/image/bs_right.webp", - width: 16.h, - height: 16.h, - ), - ], - ))) - ], - ), - ), - ], - ), - )), - - ///确认 - Align( - alignment: Alignment.bottomCenter, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - bool flag = false; - String tipText = ""; - List skuAttrs = []; - skuAttrList.forEach((element) { - if (element.specsNameController.text.trim() == "") { - flag = true; - tipText = "规格名称未输入,请先输入规格名称"; - return; - } else if (element.attrValueList.length == 0) { - flag = true; - tipText = "未添加规格值,请先添加规格值"; - return; - } else if (skuList.length == 0) { - flag = true; - tipText = "请设置规格明细"; - return; - } - skuAttrs.add(element); - }); - if (flag) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: tipText, - color: Color(0xFF30415B), - )); - } else { - print("skuAttrs:$skuAttrs"); - skuList.forEach((element) { - print("skuList: ${element.toJson()}"); - }); - Navigator.of(context).pop({ - "skuAttrList": skuAttrs, - "skuList": skuList, - }); - } - }, - child: Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only( - top: 10.h, left: 16.w, right: 16.w, bottom: 34.h), - child: Container( - alignment: Alignment.center, - height: 54.h, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27), - ), - child: Text( - "确认", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ), - )) - ], - ), - )); - } - - ///添加规格样式 - Widget specsText(index) { - return Container( - color: Colors.white, - margin: EdgeInsets.symmetric(vertical: 12.h), - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "添加规格", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Expanded( - child: TextField( - controller: skuAttrList[index].specsNameController, - decoration: InputDecoration( - hintText: "请输入规格名称", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold), - ), - flex: 2, - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 16.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - "规格植", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed( - '/router/set_goods_specs_value', - arguments: { - "storeId": "", - "attrCode": skuAttrList[index].attrCode, - "attrValues": skuAttrList[index].attrValueList - }).then((value) { - if (value != null && value is Map && value["attrValues"] is List) { - String code = value["attrCode"]; - List attrValues = value["attrValues"]; - print("value: $value"); - setState(() { - skuAttrList[index].attrValueList = attrValues.map((e) { - int index = attrValues.indexOf(e); - var product = ProductSkuAttrValue(); - product.attrValue = e; - product.attrValueCode = "${code}_value_$index"; - return product; - }).toList(); - }); - } - }); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Text( - skuAttrList[index].attrValueList.length != 0 - ? skuAttrList[index] - .attrValueList - .map((e) => e.attrValue) - .toString() - .replaceAll("(", "") - .replaceAll(")", "") - : "请添加规格值", - overflow: TextOverflow.ellipsis, - maxLines: 1, - textAlign: TextAlign.end, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Image.asset( - "assets/image/bs_right.webp", - width: 16.h, - height: 16.h, - ), - ], - ), - ), - flex: 2, - ), - ], - )), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - margin: EdgeInsets.only(bottom: 18.h), - ), - GestureDetector( - onTap: () { - setState(() { - skuAttrList.removeAt(index); - }); - }, - child: Padding( - padding: EdgeInsets.only(bottom: 20.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Icon( - Icons.remove_circle, - color: Color(0xFFFA5151), - size: 24, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "删除", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ], - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/add_goods/set_goods_specs_value.dart b/lib/business_system/goods/add_goods/set_goods_specs_value.dart deleted file mode 100644 index 3c0b03dc..00000000 --- a/lib/business_system/goods/add_goods/set_goods_specs_value.dart +++ /dev/null @@ -1,252 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/set_specs_list.dart'; -import '../../../retrofit/data/set_specs_value_list.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -/// 设置商品规格明细 -class SetGoodsSpecsValue extends StatefulWidget { - final Map arguments; - - SetGoodsSpecsValue({this.arguments}); - - @override - State createState() { - return _SetGoodsSpecsValue(); - } -} - -class _SetGoodsSpecsValue extends State { - List attrValues = []; - String attrCode; - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - BusinessApiService businessService; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - attrValues = widget.arguments["attrValues"] ?? []; - attrCode = widget.arguments["attrCode"] ?? ""; - print("arguments: ${widget.arguments}"); - attrValues.forEach((element) { - element.specsValueNameController.text = element.attrValue; - }); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "设置商品规格值", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Stack( - children: [ - SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - margin: EdgeInsets.only(bottom: 150.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - color: Colors.white, - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: attrValues.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() {}); - }, - child: specsValueText(position)); - }, - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - attrValues.add(ProductSkuAttrValue()); - FocusScope.of(context).unfocus(); - }); - }, - child: Container( - color: Colors.white, - padding: EdgeInsets.symmetric(vertical: 20.h), - margin: EdgeInsets.only(top: 12.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.add_circle, - color: Color(0xFF30415B), - size: 20, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "添加规格值", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ], - ), - ), - ), - ], - ), - )), - - ///确认 - Align( - alignment: Alignment.bottomCenter, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (attrValues.any((element) => element.specsValueNameController.text == "")) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: "还有规格未输入值,请输入完整", - color: Color(0xFF30415B), - )); - return; - } - List values = attrValues.map((element) { - return element.specsValueNameController.text; - }).toList(); - Navigator.of(context).pop({ - "attrCode": attrCode, - "attrValues": values, - }); - }, - child: Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only( - top: 10.h, left: 16.w, right: 16.w, bottom: 34.h), - child: Container( - alignment: Alignment.center, - height: 54.h, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27), - ), - child: Text( - "确认", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ), - )) - ], - ), - )); - } - - ///添加规格样式 - Widget specsValueText(index) { - return Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - onTap: () { - setState(() { - attrValues.removeAt(index); - }); - }, - child: Container( - padding: EdgeInsets.only(right: 12.w), - child: Icon( - Icons.remove_circle, - color: Color(0xFFFA5151), - size: 24, - ), - ), - ), - Expanded( - child: TextField( - controller: attrValues[index].specsValueNameController, - decoration: InputDecoration( - hintText: "请输入规格值名称", - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - ), - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold), - ), - flex: 2, - ), - ], - ), - if (attrValues.length - 1 > index) - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - ], - ), - ); - } -} diff --git a/lib/business_system/goods/add_goods/set_meal.dart b/lib/business_system/goods/add_goods/set_meal.dart deleted file mode 100644 index cfa55ecc..00000000 --- a/lib/business_system/goods/add_goods/set_meal.dart +++ /dev/null @@ -1,636 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/set_specs_meal_list.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/round_button.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -class SetMeal extends StatefulWidget { - final Map arguments; - - SetMeal({this.arguments}); - - @override - State createState() { - return _SetMeal(); - } -} - -class _SetMeal extends State { - List specsMeal = []; - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - BusinessApiService businessService; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - List mealDetails = widget?.arguments["mealDetails"] ??[]; - mealDetails.forEach((element) { - var tempValue = SetSpecsMealList(); - tempValue.groupsNameController.text = element["groupName"]; - tempValue.groupsTotal = element["totalNumber"]; - tempValue.optionalNum = element["optionalNumber"]; - tempValue.goodsMeal = element["productInfoList"]; - specsMeal.add(tempValue); - }); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "套餐选择", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - action: GestureDetector( - onTap: () { - bool flag = false; - String tipText = ""; - int index = 0; - List mealDetail = []; - if (specsMeal.length != 0) { - specsMeal.forEach((element) { - index += 1; - if (element.groupsNameController.text.trim() == "") { - flag = true; - tipText = "分组$index未填写分组名"; - return; - } else if (element.goodsMeal.length == 0 || - element.goodsMeal.length != element.groupsTotal) { - flag = true; - tipText = - "分组${element.groupsNameController.text}已选商品数量与设定分组总数不符,请修改"; - return; - } else if (element.optionalNum > element.groupsTotal) { - flag = true; - tipText = - "分组${element.groupsNameController.text}可选数量不可大于分组总数"; - return; - } - mealDetail.add({ - "groupName": element.groupsNameController.text, - "totalNumber":element.groupsTotal, - "optionalNumber":element.optionalNum, - "productInfoList":element.goodsMeal - }); - }); - if (flag) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: tipText, - color: Color(0xFF30415B), - )); - } else { - Navigator.of(context).pop(mealDetail); - } - } else { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: "请添加设置分组后再点击确实按钮", - color: Color(0xFF30415B), - )); - } - }, - child: Text( - "确定", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ), - body: Stack( - children: [ - SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - margin: EdgeInsets.only(bottom: 150.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ListView.builder( - padding: EdgeInsets.zero, - itemCount: specsMeal.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: mealText(position)); - }, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - specsMeal.add(SetSpecsMealList()); - }); - }, - child: Container( - color: Colors.white, - padding: EdgeInsets.symmetric(vertical: 20.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.add_circle, - color: Color(0xFF30415B), - size: 20, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "添加分组", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ], - ), - ), - ), - ], - ), - )), - ], - ), - )); - } - - ///添加套餐分组样式 - Widget mealText(index) { - return Column( - children: [ - Container( - color: Colors.white, - margin: EdgeInsets.symmetric(vertical: 12.h), - padding: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "分组${index + 1}", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Expanded( - child: TextField( - controller: specsMeal[index].groupsNameController, - decoration: InputDecoration( - hintText: "请输入分组名称", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold), - ), - flex: 2, - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 14.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "分组总数", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - if (specsMeal[index].groupsTotal <= 1) return; - specsMeal[index].groupsTotal = - specsMeal[index].groupsTotal - 1; - }); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 20.w), - child: Icon( - Icons.remove_circle_outline, - color: Color(0xFF30415B), - size: 24, - ))), - Text( - specsMeal[index].groupsTotal.toString(), - style: TextStyle( - color: Color(0xD9000000), - fontSize: 20.sp, - fontWeight: MyFontWeight.regular, - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - specsMeal[index].groupsTotal = - specsMeal[index].groupsTotal + 1; - }); - }, - child: Container( - padding: EdgeInsets.only(left: 20.w), - child: Icon( - Icons.add_circle, - color: Color(0xFF30415B), - size: 24, - )), - ), - ], - )), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - margin: EdgeInsets.only(bottom: 18.h), - ), - Padding( - padding: EdgeInsets.only(bottom: 14.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "可选数量", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - if (specsMeal[index].optionalNum <= 1) return; - specsMeal[index].optionalNum = - specsMeal[index].optionalNum - 1; - }); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 20.w), - child: Icon( - Icons.remove_circle_outline, - color: Color(0xFF30415B), - size: 24, - ))), - Text( - specsMeal[index].optionalNum.toString(), - style: TextStyle( - color: Color(0xD9000000), - fontSize: 20.sp, - fontWeight: MyFontWeight.regular, - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - specsMeal[index].optionalNum = - specsMeal[index].optionalNum + 1; - }); - }, - child: Container( - padding: EdgeInsets.only(left: 20.w), - child: Icon( - Icons.add_circle, - color: Color(0xFF30415B), - size: 24, - )), - ), - ], - )), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - margin: EdgeInsets.only(bottom: 18.h), - ), - Padding( - padding: EdgeInsets.only(bottom: 12.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed('/router/batch_shelf', - arguments: { - "storeId": widget.arguments["storeId"], - "titleName": "选择商品", - "groupNum": specsMeal[index].groupsTotal - }).then((value) { - if (value != null && value is List) { - if (specsMeal[index].goodsMeal == null) { - specsMeal[index].goodsMeal = []; - } - specsMeal[index].goodsMeal.clear(); - specsMeal[index].goodsMeal.addAll(value.map((e) => e as Map).toList()); - setState(() {}); - } - }); - }, - child: Container( - alignment: Alignment.center, - padding: EdgeInsets.only( - left: 8.w, right: 8.w, bottom: 3.h), - decoration: BoxDecoration( - color: Colors.white, - border: Border.all( - color: Color(0xFF2E3552), - width: 1, - ), - borderRadius: BorderRadius.circular(100), - ), - child: Text( - "+增加商品", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - )), - Spacer(), - GestureDetector( - onTap: () { - deleteGroupsDialog(index); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Icon( - Icons.remove_circle, - color: Color(0xFFFA5151), - size: 24, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "删除分组", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ], - ), - ) - ], - ), - ), - Text( - "*请添加或减少商品,直到达到分组总数", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), - ), - ListView.builder( - itemCount: specsMeal[index]?.goodsMeal?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: addGoodsItem(index, position), - ); - }, - ) - ], - ); - } - - ///删除分组弹窗提示 - deleteGroupsDialog(index) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 139.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "此操作将直接删除当前分组, 是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - setState((){ - Navigator.of(context).pop(); - specsMeal.removeAt(index); - }); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - ///增加商品Item - Widget addGoodsItem(specsIndex, index) { - return Container( - color: Colors.white, - margin: EdgeInsets.symmetric(vertical: 8), - padding: EdgeInsets.only( - left: 16.w, - top: 20.h, - bottom: 20.h, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - specsMeal[specsIndex]?.goodsMeal[index]["productName"] ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - flex: 2, - ), - Expanded( - child: Text( - "所有规格", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - Expanded( - child: Text( - specsMeal[specsIndex]?.goodsMeal[index]["number"] ?? "", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - specsMeal[specsIndex].goodsMeal.removeAt(index); - }); - }, - child: Container( - padding: EdgeInsets.only(right: 31.h), - child: Icon( - Icons.remove_circle, - color: Color(0xFFFA5151), - size: 20, - ), - ), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/business_goods_page.dart b/lib/business_system/goods/business_goods_page.dart deleted file mode 100644 index 4016e689..00000000 --- a/lib/business_system/goods/business_goods_page.dart +++ /dev/null @@ -1,131 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../utils/font_weight.dart'; -import '../../view_widget/my_appbar.dart'; -import '../../view_widget/my_tab.dart'; -import '../order/ticket/ticket_tab.dart'; -import 'off_shelf/off_shelf_page.dart'; -import 'on_sale/on_sale_page.dart'; - -class BusinessGoodsPage extends StatefulWidget { - final String storeId; - - BusinessGoodsPage(Key key,this.storeId): super(key: key); - - @override - State createState() { - return _BusinessGoodsPage(); - } -} - -class _BusinessGoodsPage extends State { - final RefreshController refreshController = RefreshController(); - String offShelfTotal; - String onSaleTotal; - int goodsIndex = 0; - - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Expanded( - child: - DefaultTabController( - length: 3, - child: Scaffold( - appBar: MyAppBar( - title:"", - leading: false, - background: Colors.white, - toolbarHeight: MediaQuery.of(context).size.height >= 750 ? (kToolbarHeight + 15.h) : kToolbarHeight, - bottom: TabBar( - // isScrollable: true, //可滚动 - //去掉按钮阴影 - overlayColor: MaterialStateProperty.all(Colors.white), - indicatorColor: Color(0xFF30415B), - labelColor: Colors.black, - labelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.bold, - ), - unselectedLabelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.normal, - color: Color(0xFF666666) - ), - indicator: const TicketTab( - width: 33, - borderSide: BorderSide( - width: 2.0, color: Color(0xFF30415B))), - // controller: tabController, - //未选中文字颜色 - unselectedLabelColor: Color(0xffA29E9E), - indicatorSize: TabBarIndicatorSize.label, - //指示器与文字等宽 - tabs: [ - MyTab(text:"在售中(${onSaleTotal ?? "0"})"), - MyTab(text: "已下架(${offShelfTotal ?? "0"})"), - GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed( - '/router/add_goods_page', - arguments: { - "storeId":widget.storeId ?? "", - }); - }, - child:Row(children: [Padding( - padding: EdgeInsets.only(right: 5.w), - child: Text( - "新增商品", - textAlign: TextAlign.center, - style: TextStyle( - height: 1.5, - color: Color(0xFF2E3552), - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - )), Image.asset( - "assets/image/bus_goods_add.webp", - width: 14.w, - height: 15.h, - ), - ]), - ), - ], - ), - ), - body: TabBarView( - physics: NeverScrollableScrollPhysics(), - children: [ - OnSalePage(widget.storeId,(value){ - setState((){ - onSaleTotal = value; - }); - }), - OffShelfPage(widget.storeId,(value){ - setState((){ - offShelfTotal = value; - }); - }), - Container() - ], - ), - ), - ), - ), - SizedBox( - height: 76.h, - ), - ], - ); - } - -} diff --git a/lib/business_system/goods/goods_search_page.dart b/lib/business_system/goods/goods_search_page.dart deleted file mode 100644 index cb1c14eb..00000000 --- a/lib/business_system/goods/goods_search_page.dart +++ /dev/null @@ -1,680 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shimmer/shimmer.dart'; -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_goods.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../view_widget/border_text.dart'; -import '../../view_widget/custom_image.dart'; -import '../../view_widget/my_appbar.dart'; -import '../../view_widget/my_footer.dart'; -import '../../view_widget/no_data_view.dart'; -import '../../view_widget/round_button.dart'; - -class GoodsSearchPage extends StatefulWidget { - final Map arguments; - - GoodsSearchPage({this.arguments}); - - @override - State createState() { - return _GoodsSearchPage(); - } -} - -class _GoodsSearchPage extends State - with WidgetsBindingObserver { - final TextEditingController editingController = TextEditingController(); - final RefreshController refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - int optionIndex = 0; - bool isKeyBoardShow = false; - List productListBeans = []; - List hotSearch = []; - List historySearch = []; - FocusNode _focusNode = FocusNode(); - bool hasFocus = true; - int priceOrder = 0; - int _pageIndex = 1; - BusinessApiService businessService; - List adminProductVoList = []; - String networkError = ""; - int networkStatus = 0; - - @override - void didChangeMetrics() { - super.didChangeMetrics(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - @override - void initState() { - super.initState(); - _focusNode.addListener(() { - setState(() { - hasFocus = _focusNode.hasFocus; - }); - }); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryGoodsList(); - EasyLoading.dismiss(); - if (!mounted) return; - if (refreshController.isRefresh) refreshController.refreshCompleted(); - setState(() {}); - } - - ///商品列表 - queryGoodsList() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = - await businessService.findAdminProductLis({ - "groupId": "", - "hasStock": "", - "keyword": editingController?.text ?? "", - "pageIndex": _pageIndex, - "pageSize": 10, - "status": widget.arguments["onSaleStatus"], - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - adminProductVoList.addAll(baseData?.data?.adminProductVOList ?? []); - if ((baseData?.data?.adminProductVOList ?? []).isEmpty || - adminProductVoList.length == baseData.data.total) - refreshController.loadNoData(); - else - refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - ///商品下架 - queryGoodsUpdate(productId) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.goodsUpdate({ - "productId": productId, - "sell": widget.arguments["onSaleStatus"] == "1" ? false : true, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - _pageIndex = 1; - adminProductVoList.clear(); - await _onRefresh(isShowLoad: false); - SmartDialog.showToast( - widget.arguments["onSaleStatus"] == "1" ? "商品下架成功" : "商品上架成功", - alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Scaffold( - appBar: MyAppBar( - title: "搜索", - titleColor: Colors.black, - leadingColor: Colors.black, - background: Colors.white, - ), - body: Column( - children: [ - Container( - color: Colors.white, - margin: EdgeInsets.only(bottom: 16.h), - child: Container( - height: 40.h, - margin: EdgeInsets.fromLTRB(18.w, 17.h, 18.w, 10.h), - alignment: Alignment.center, - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - textInputAction: TextInputAction.search, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - _pageIndex = 1; - adminProductVoList.clear(); - _onRefresh(); - }, - controller: editingController, - style: TextStyle( - fontSize: 14.sp, - ), - decoration: InputDecoration( - hintText: "请输入搜索内容", - hintStyle: TextStyle( - fontSize: 15.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.regular), - isCollapsed: true, - prefixIcon: Padding( - padding: EdgeInsets.only(left: 5.w, right: 5.w), - child: Image.asset( - "assets/image/icon_search.webp", - width: 20.h, - height: 20.h, - ), - ), - prefixIconConstraints: BoxConstraints(), - border: InputBorder.none, - ), - ), - ), - ), - Expanded( - child: networkStatus == -1 - ? noNetwork() - : Container( - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: true, - physics: BouncingScrollPhysics(), - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _pageIndex = 1; - adminProductVoList.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _pageIndex++; - _onRefresh(isShowLoad: false); - }, - child: networkStatus == 0 - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return searchGoodsItemSm(); - }, - ) - : ((adminProductVoList == null || - adminProductVoList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "未搜索到相关数据", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : Container( - margin: EdgeInsets.only(bottom: 20.h), - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: - adminProductVoList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return searchGoodsItem( - adminProductVoList[position]); - }, - ), - )), - ), - ), - ) - ], - ), - ), - ); - } - - Widget searchGoodsItem(AdminProductVoList adminProductVoList) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - margin: EdgeInsets.only(bottom: 12.h, left: 16.w, right: 16.w), - padding: - EdgeInsets.only(left: 12.w, top: 12.h, bottom: 12.h, right: 24.w), - child: Row( - children: [ - MImage( - adminProductVoList?.productImg ?? "", - width: 70.h, - height: 70.h, - fit: BoxFit.cover, - radius: BorderRadius.circular(4), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Text( - adminProductVoList?.productName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ), - Row( - children: [ - Text( - "库存${adminProductVoList?.stock ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFA29E9E), - ), - ), - SizedBox( - width: 8.w, - ), - Text( - "销量${adminProductVoList?.sellCount ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF999999), - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Row( - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - TextSpan( - text: adminProductVoList?.price ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - ], - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showGoodsStateDialog(adminProductVoList.id ?? ""); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(33), - border: Border.all( - color: Color(0xFF30415B), - width: 1, - ), - ), - padding: EdgeInsets.symmetric( - vertical: 2.h, horizontal: 12.w), - child: Text( - widget.arguments["onSaleStatus"] == "1" ? "下架" : "上架", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF30415B), - ), - ), - )) - ], - ) - ], - )), - ], - ), - ); - } - - ///商品上下架状态提示弹窗 - showGoodsStateDialog(productIds) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 139.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "选中数据将被${widget.arguments["onSaleStatus"] == "1" ? "下架" : "上架"}, 是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - queryGoodsUpdate(productIds ?? ""); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - - Widget searchGoodsItemSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - margin: EdgeInsets.only(bottom: 12.h, left: 16.w, right: 16.w), - padding: - EdgeInsets.only(left: 12.w, top: 12.h, bottom: 12.h, right: 24.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(4), - ), - width: 70.h, - height: 70.h, - ), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 124.w, - height: 20.h, - ), - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - SizedBox( - width: 8.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 24.w, - height: 18.h, - ), - ), - ], - ) - ], - )), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/off_shelf/off_shelf_page.dart b/lib/business_system/goods/off_shelf/off_shelf_page.dart deleted file mode 100644 index 55134bca..00000000 --- a/lib/business_system/goods/off_shelf/off_shelf_page.dart +++ /dev/null @@ -1,736 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/business_goods.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/custom_image.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/round_button.dart'; - -class OffShelfPage extends StatefulWidget { - final String storeId; - final Function(String total) total; - - OffShelfPage(this.storeId, this.total); - - @override - State createState() { - return _OffShelfPage(); - } -} - -class _OffShelfPage extends State { - final RefreshController _refreshController = RefreshController(); - var checkStatus = false; - int _pageIndex = 1; - BusinessApiService businessService; - List adminProductVoList = []; - String networkError = ""; - int networkStatus = 0; - int dialogIndex = 0; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryGoodsList(); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - ///下架商品列表 - queryGoodsList() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = - await businessService.findAdminProductLis({ - "groupId": "", - "hasStock": "", - "keyword": "", - "pageIndex": _pageIndex, - "pageSize": 10, - "status": "0" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - adminProductVoList.addAll(baseData?.data?.adminProductVOList ?? []); - widget.total(baseData.data.total.toString()); - if ((baseData?.data?.adminProductVOList ?? []).isEmpty || - adminProductVoList.length == baseData.data.total) - _refreshController.loadNoData(); - else - _refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - ///批量上架 - queryGoodsUpdate(productIds) async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.goodsUpdate({ - "productId": 0, - "productIds": productIds ?? [], - "sell": true, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - _pageIndex = 1; - adminProductVoList.clear(); - await _onRefresh(isShowLoad: false); - EasyLoading.dismiss(); - checkStatus = false; - SmartDialog.showToast("商品上架成功", alignment: Alignment.center); - } else { - EasyLoading.dismiss(); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - ///批量删除 - queryDelProduct(productIds) async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.delProduct({ - "ids": productIds ?? [], - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - _pageIndex = 1; - adminProductVoList.clear(); - await _onRefresh(isShowLoad: false); - EasyLoading.dismiss(); - SmartDialog.showToast("商品删除成功", alignment: Alignment.center); - } else { - EasyLoading.dismiss(); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - body: Stack( - alignment: Alignment.bottomCenter, - children: [ - Column( - children: [ - goodsSearch(), - if (adminProductVoList.length != 0) - Padding( - padding: EdgeInsets.only(left: 5.w), - child: Row( - children: [ - Checkbox( - value: checkStatus, - onChanged: (bool isAllCheck) { - adminProductVoList.forEach((element) { - element.isSelect = isAllCheck; - }); - checkStatus = isAllCheck; - setState(() {}); - }, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(2.0), - ), - checkColor: Color(0xFFFFFFFF), - fillColor: MaterialStateProperty.all(Color(0xFF30415B)), - ), - Text( - "全选", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF000000), - ), - ), - ], - ), - ), - Expanded( - child: networkStatus == -1 - ? noNetwork() - : Container( - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: true, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _pageIndex = 1; - adminProductVoList.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _pageIndex++; - _onRefresh(isShowLoad: false); - }, - child: Container( - color: Colors.white, - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: shelfGoodsItemSm(), - ); - }, - ) - : ((adminProductVoList == null || - adminProductVoList.length == 0) - ? NoDataView( - src: - "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无下架商品", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - itemCount: - adminProductVoList?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: shelfGoodsItem( - adminProductVoList[ - position]), - ); - }, - )))), - ), - ), - SizedBox( - height: 60.h, - ) - ], - ), - Row( - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - List productIds = []; - adminProductVoList.forEach((element) { - if (element.isSelect) productIds.add(element.id); - }); - if (productIds.length == 0) { - SmartDialog.showToast("请选择要上架的商品", - alignment: Alignment.center); - return; - } else { - showDelGoodsDialog(productIds, 1); - } - }, - child: Container( - color: Color(0xFFEDEDED), - padding: EdgeInsets.only( - top: 21.h, - bottom: 24.h, - left: 44.w, - ), - child: Text( - "批量上架", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF30415B), - ), - ), - ), - ), - ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - List productIds = []; - adminProductVoList.forEach((element) { - if (element.isSelect) productIds.add(element.id); - }); - if (productIds.length == 0) { - SmartDialog.showToast("请选择要删除的商品", - alignment: Alignment.center); - return; - } else { - showDelGoodsDialog(productIds, 2); - } - }, - child: Container( - color: Color(0xFFEDEDED), - padding: EdgeInsets.only( - top: 21.h, - bottom: 24.h, - right: 44.w, - ), - child: Text( - "批量删除", - textAlign: TextAlign.right, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF30415B), - ), - )))) - ], - ), - ], - ), - ); - } - - /// 搜索框 - Widget goodsSearch() { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/goods_search_page', arguments: { - "storeId": widget.storeId, - "onSaleStatus": "0", - }).then((value) => { - _pageIndex = 1, - adminProductVoList.clear(), - _onRefresh(isShowLoad: false), - }); - }, - child: Container( - height: 40.h, - margin: EdgeInsets.fromLTRB(18.w, 16.h, 18.w, 10.h), - padding: EdgeInsets.fromLTRB(12.w, 6.h, 0, 6.h), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: Row( - children: [ - Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - SizedBox( - width: 3.w, - ), - Text( - "请输入搜索内容", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - ), - ], - ), - ), - ); - } - - ///删除商品/批量上架提示弹窗 - showDelGoodsDialog(productIds, index) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 139.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "选中数据将被${index == 1 ? "上架" : "永久删除"}, 是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - if (index == 1) - queryGoodsUpdate(productIds); - else - queryDelProduct(productIds); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - ///商品列表 - Widget shelfGoodsItem(AdminProductVoList adminProductVoList) { - return Container( - margin: EdgeInsets.only(bottom: 22.h), - padding: EdgeInsets.only( - left: 5.w, - ), - child: Row( - children: [ - Checkbox( - value: adminProductVoList.isSelect, - onChanged: (a) { - setState(() { - adminProductVoList.isSelect = !adminProductVoList.isSelect; - }); - }, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(2.0), - ), - checkColor: Color(0xFFFFFFFF), - fillColor: MaterialStateProperty.all(Color(0xFF30415B)), - ), - MImage( - adminProductVoList?.productImg ?? "", - width: 70.h, - height: 70.h, - fit: BoxFit.cover, - radius: BorderRadius.circular(4), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Text( - adminProductVoList?.productName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ), - Row( - children: [ - Text( - "库存${adminProductVoList?.stock ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFA29E9E), - ), - ), - SizedBox( - width: 8.w, - ), - Text( - "销量${adminProductVoList?.sellCount ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF999999), - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - TextSpan( - text: adminProductVoList?.price ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - ], - ), - ) - ], - )), - ], - ), - ); - } - - Widget shelfGoodsItemSm() { - return Container( - margin: EdgeInsets.only(bottom: 22.h), - padding: EdgeInsets.only( - left: 5.w, - ), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 16.h, - height: 16.h, - ), - ), - SizedBox( - width: 18.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(4), - ), - width: 70.h, - height: 70.h, - ), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 112.w, - height: 20.h, - ), - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - SizedBox( - width: 8.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - ], - )), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/on_sale/add_assort.dart b/lib/business_system/goods/on_sale/add_assort.dart deleted file mode 100644 index 8f50ded2..00000000 --- a/lib/business_system/goods/on_sale/add_assort.dart +++ /dev/null @@ -1,310 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../utils/business_instance.dart'; -import '../../../view_widget/round_button.dart'; - -class AddAssort extends StatefulWidget { - final Map arguments; - - AddAssort({this.arguments}); - - @override - State createState() { - return _AddAssort(); - } -} - -class _AddAssort extends State { - final TextEditingController editingSortController = TextEditingController(); - final TextEditingController editingNameController = TextEditingController(); - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - BusinessApiService businessService; - String name = ""; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - name = widget.arguments["statusName"]; - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - ///商品分类-新增分类/编辑分类 - querySaveProductGroup() async { - try{ - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.saveProductGroup({ - "groupName": editingNameController.text == "" - ? widget.arguments["groupName"] - : editingNameController.text, - "storeId": widget.arguments["storeId"], - "id": name == "添加分类" ? "" : widget.arguments["id"], - "sort": - editingSortController.text == "" ? "1" : editingSortController.text, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(); - if (name == "添加分类") - showProductTipDialog(); - else - SmartDialog.showToast(name == "添加分类" ? "分类添加成功" : "分类编辑成功", - alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - }}finally{ - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Colors.white, - appBar: MyAppBar( - title: name, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - Row( - children: [ - Expanded( - child: Text( - "分组排序", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - ), - Expanded( - child: TextField( - controller: editingSortController, - decoration: InputDecoration( - hintText: widget?.arguments["sort"] ?? "数字越大排名越靠前", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - ), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBEBEB), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "分类名称", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - Expanded( - child: TextField( - controller: editingNameController, - decoration: InputDecoration( - hintText: widget?.arguments["groupName"] ?? "请输入分类名称", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBEBEB), - margin: EdgeInsets.only(bottom: 16.h), - ), - Spacer(), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (name == "添加分类" && editingNameController.text == "") { - SmartDialog.showToast("请输入分类名称", - alignment: Alignment.center); - return; - } else { - querySaveProductGroup(); - } - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B), - ), - width: double.infinity, - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only(bottom: 34.h), - child: Text( - S.of(context).baocun, - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ], - ), - ), - ), - ); - } - - ///新增分组提示 - showProductTipDialog() { - showDialog( - context: context, - barrierDismissible: false, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84.w, - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "提示", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 15.h, - ), - Text( - "注意:新增分组完成后,请配置打印机,否则无法打印票单!", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - SmartDialog.showToast("分类添加成功", - alignment: Alignment.center); - }, - ), - ], - ), - ), - ); - }, - ); - } -} diff --git a/lib/business_system/goods/on_sale/batch_shelf.dart b/lib/business_system/goods/on_sale/batch_shelf.dart deleted file mode 100644 index 882a58ff..00000000 --- a/lib/business_system/goods/on_sale/batch_shelf.dart +++ /dev/null @@ -1,801 +0,0 @@ -import 'dart:ffi'; - -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/business_goods.dart'; -import '../../../retrofit/data/product_group_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/custom_image.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/round_button.dart'; - -class BatchShelf extends StatefulWidget { - final Map arguments; - - BatchShelf({this.arguments}); - - @override - State createState() { - return _BatchShelf(); - } -} - -class _BatchShelf extends State { - final RefreshController _refreshController = RefreshController(); - final ScrollController controller = ScrollController(); - BusinessApiService businessService; - ProductGroupList productGroupList; - List adminProductVoList = []; - List selectedProductVoList = []; - List productIds = []; - int _loadCount = 0; - int _pageIndex = 1; - int groupIndex = -1; - String networkError = ""; - int networkStatus = 0; - int groupNum = 1; - String titleName; - - @override - void initState() { - super.initState(); - _onRefresh(); - titleName = widget?.arguments["titleName"] ?? ""; - groupNum = widget?.arguments["groupNum"] ?? 1; - } - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - _onRefresh({isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService( - Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"], - ); - queryProductGroupList(); - queryGoodsList( - groupIndex != -1 ? productGroupList.records[groupIndex].id : "", - isSing: false); - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 2) { - _loadCount = 0; - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - } - - ///分组列表 - queryProductGroupList() async { - try { - BaseData baseData = await businessService.productGroup({ - "current": 1, - "map": {}, - "model": {"groupImg": "", "groupName": "", "isDelete": 0}, - "order": "ascending", - "size": 100, - "sort": "sort" - }).catchError((error) {}); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - productGroupList = baseData.data; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - addLoadCount(); - } - } - - ///商品列表 - queryGoodsList(groupId, {isSing = true}) async { - try { - BaseData baseData = - await businessService.findAdminProductLis({ - "groupId": groupId, - "hasStock": "", - "keyword": "", - "pageIndex": _pageIndex, - "pageSize": 10, - "status": "1" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - adminProductVoList.addAll(baseData?.data?.adminProductVOList ?? []); - - // 判断新列表中是否又选中过的商品 - if (selectedProductVoList.isNotEmpty) { - adminProductVoList.forEach((element) { - element.isSelect = selectedProductVoList.any((e) => e.id == element.id); - }); - } - - if ((baseData?.data?.adminProductVOList ?? []).isEmpty || - adminProductVoList.length == baseData.data.total) { - _refreshController.loadNoData(); - } else { - _refreshController.loadComplete(); - } - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isSing) { - setState(() {}); - } else { - addLoadCount(); - } - } - } - - queryGoodsUpdate() async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.goodsUpdate({ - "productId": 0, - "productIds": productIds ?? [], - "sell": false, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - _pageIndex = 1; - adminProductVoList.clear(); - await queryGoodsList( - groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex]?.id ?? "", - isSing: false); - setState(() {}); - SmartDialog.showToast("商品下架成功", alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - appBar: MyAppBar( - title: titleName, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - action: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - List> goodsMeal = []; - if (titleName == "批量下架") { - if (productIds.length != 0) productIds.clear(); - adminProductVoList.forEach((element) { - if (element.isSelect) productIds.add(element.id); - }); - if (productIds.length == 0) { - SmartDialog.showToast("请选择要下架的商品", alignment: Alignment.center); - return; - } else { - showGoodsStateDialog(); - } - } else { - if (goodsMeal.length != 0) goodsMeal.clear(); - if (groupNum != selectedProductVoList.length) { - SmartDialog.showToast("选择的商品与分组总数不一致", alignment: Alignment.center); - return; - } - goodsMeal = selectedProductVoList.map((e) => { - "productId": e.id, - "storeId": e.storeId, - "skuInfoList": e.productSkuVOList, - "productAttrInfoList": e.attrList, - "productName": e.productName, - "number": e.goodsNumber.toString() - }).toList(); - if (goodsMeal.length == 0) { - SmartDialog.showToast("请选择要增加的商品", alignment: Alignment.center); - return; - } - Navigator.of(context).pop(goodsMeal); - } - }, - child: Container( - alignment: Alignment.center, - child: Text( - "${S.of(context).queren}(${selectedProductVoList.length}/${groupNum})", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - ), - ), - ), - ), - ), - body: networkStatus == -1 - ? noNetwork() - : Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 100.w, - height: double.infinity, - padding: EdgeInsets.only(bottom: 70.h), - color: Color(0xFFFAFAFA), - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return shelfLeftItemSm(); - }, - ) - : ListView.builder( - itemCount: productGroupList?.records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - groupIndex = position; - _pageIndex = 1; - adminProductVoList.clear(); - queryGoodsList( - productGroupList?.records[position].id, - ); - }, - child: shelfLeftItem( - productGroupList.records[position], position), - ); - }, - ), - ), - Container( - width: MediaQuery.of(context).size.width - 100.w, - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: - adminProductVoList.length != 0 ? true : false, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onLoading: () { - _pageIndex++; - queryGoodsList(groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex].id); - }, - onRefresh: () { - _pageIndex = 1; - adminProductVoList.clear(); - _onRefresh(isShowLoad: false); - }, - child: Container( - color: Colors.white, - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return shelfGoodsItemSm(); - }, - ) - : ((adminProductVoList == null || - adminProductVoList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "该分组暂无添加商品", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - itemCount: - adminProductVoList?.length ?? 0, - controller: controller, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return shelfGoodsItem( - adminProductVoList[position]); - }, - )))), - ), - ], - ), - ); - } - - ///商品确认下架提示弹窗 - showGoodsStateDialog() { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 139.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "选中数据将被下架, 是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - queryGoodsUpdate(); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - ///左边list - Widget shelfLeftItem(Records records, index) { - return Container( - color: groupIndex == index ? Colors.white : Color(0xFFFAFAFA), - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Text( - records?.groupName ?? "", - textAlign: TextAlign.center, - style: TextStyle( - color: - groupIndex == index ? Color(0xFF30415B) : Color(0xFF626264), - fontSize: 12.sp, - fontWeight: groupIndex == index - ? MyFontWeight.semi_bold - : MyFontWeight.regular, - ), - )), - ], - ), - ); - } - - Widget shelfGoodsItem(AdminProductVoList adminProductVo) { - return Container( - margin: EdgeInsets.only(bottom: 21.h, left: 16.w), - child: Row( - children: [ - MImage( - adminProductVo?.productImg ?? "", - width: 77.h, - height: 77.h, - fit: BoxFit.cover, - radius: BorderRadius.circular(4), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(top: 2.h), - child: Text( - adminProductVo?.productName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - )), - Row( - children: [ - Text( - "库存${adminProductVo?.stock ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFA29E9E), - ), - ), - SizedBox( - width: 8.w, - ), - Expanded( - child: Text( - "销量${adminProductVo?.sellCount ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF999999), - ), - )), - Checkbox( - value: adminProductVo.isSelect, - onChanged: (a) { - if (!adminProductVo.isSelect) { - if (selectedProductVoList.length >= groupNum) { - SmartDialog.showToast("商品分组总数只有${groupNum}个,无法添加更多", alignment: Alignment.center); - return; - } - } - setState(() { - adminProductVo.isSelect = !adminProductVo.isSelect; - if (adminProductVo.isSelect) { - selectedProductVoList.add(adminProductVo); - } else { - selectedProductVoList.remove(adminProductVo); - } - }); - }, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(2.0), - ), - checkColor: Color(0xFFFFFFFF), - fillColor: MaterialStateProperty.all(Color(0xFF30415B)), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Row( - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - TextSpan( - text: adminProductVo?.price ?? "", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - ], - ), - )), - if (titleName == "选择商品") - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - if (adminProductVo.goodsNumber <= 1) return; - adminProductVo?.goodsNumber = - adminProductVo.goodsNumber - 1; - }); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 10.w), - child: Icon( - Icons.remove_circle_outline, - color: Color(0xFF30415B), - size: 24, - ))), - if (titleName == "选择商品") - Text( - adminProductVo?.goodsNumber?.toString() ?? "", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 20.sp, - fontWeight: MyFontWeight.regular, - ), - ), - if (titleName == "选择商品") - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - adminProductVo.goodsNumber = - adminProductVo.goodsNumber + 1; - }); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 10.w), - child: Icon( - Icons.add_circle, - color: Color(0xFF30415B), - size: 24, - )), - ), - ], - ), - ], - )), - ], - ), - ); - } - - Widget shelfLeftItemSm() { - return Container( - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 30.h, - ), - ), - ); - } - - Widget shelfGoodsItemSm() { - return Container( - margin: EdgeInsets.only(bottom: 21.h, left: 16.w, right: 16.w, top: 10.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(4), - ), - width: 70.h, - height: 70.h, - ), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 124.w, - height: 20.h, - ), - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - SizedBox( - width: 8.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 16.h, - height: 16.h, - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - ], - )), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/on_sale/goods_assort.dart b/lib/business_system/goods/on_sale/goods_assort.dart deleted file mode 100644 index 239261ef..00000000 --- a/lib/business_system/goods/on_sale/goods_assort.dart +++ /dev/null @@ -1,488 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/product_group_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/round_button.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -class GoodsAssort extends StatefulWidget { - final Map arguments; - - GoodsAssort({this.arguments}); - - @override - State createState() { - return _GoodsAssort(); - } -} - -class _GoodsAssort extends State { - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - ProductGroupList productGroupList; - String networkError = ""; - int networkStatus = 0; - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryProductGroupList(); - EasyLoading.dismiss(); - if (refreshController.isRefresh) refreshController.refreshCompleted(); - if (mounted) - setState(() {}); - } - - ///分组列表 - queryProductGroupList() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.productGroup({ - "current": 1, - "map": {}, - "model": {"groupImg": "", "groupName": "", "isDelete": 0}, - "order": "ascending", - "size": 100, - "sort": "sort" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (baseData != null && baseData.isSuccess) { - productGroupList = baseData.data; - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - ///删除分组分类 - queryDelGroup(id) async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.delProductCategory({ - "id":id, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - await _onRefresh(); - SmartDialog.showToast("分组删除成功", alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - appBar: MyAppBar( - title: "商品分类", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1?noNetwork():Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - Expanded( - child: Container( - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _onRefresh(isShowLoad: false); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Container( - child: networkStatus == 0 ?ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: assortItemSm(), - ); - }, - ): - ((productGroupList == null || - productGroupList.records.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无商品分类", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - itemCount: productGroupList?.records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: assortItem(productGroupList.records[position]), - ); - }, - )), - ), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if(widget.arguments["storeId"] == "0"){ - SmartDialog.show( - widget: SettlementTips( - () { - }, - text: "当前为所有门店状态,新增分组时,请将门店切换至要新增的门店!", - color: Color(0xFF30415B), - )); - }else{ - Navigator.of(context).pushNamed('/router/add_assort', - arguments: {"storeId": widget.arguments["storeId"], - "statusName":"添加分类"}).then((value) => { - _onRefresh(isShowLoad: false), - }); - } - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B), - ), - width: double.infinity, - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only(bottom: 34.h), - child: Text( - "添加分类", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - ), - )), - ], - ), - )); - } - - ///分组列表 - Widget assortItem(Records records) { - return Container( - child: Column( - children: [ - Row( - children: [ - Expanded( - child: Text( - records?.groupName ?? "", - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if(widget.arguments["storeId"] == "0"){ - SmartDialog.show( - widget: SettlementTips( - () { - }, - text: "当前为所有门店状态,新增分组时,请将门店切换至要新增的门店!", - color: Color(0xFF30415B), - )); - }else{ - Navigator.of(context).pushNamed('/router/add_assort', - arguments: {"storeId": widget.arguments["storeId"], - "statusName":"编辑分类", - "groupName":records?.groupName ?? "", - "sort":records.sort.toString(), - "id":records?.id ?? ""}).then((value) => { - _onRefresh(isShowLoad: false), - }); - } - }, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 17.w), - child: Text( - "编辑", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showDelGroupDialog(records?.id ?? ""); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w, left: 17.w), - child: Text( - S.of(context).shanchu, - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - ) - ], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 16.h), - color: Color(0xFFEBEBEB), - height: 1.h, - width: double.infinity, - ) - ], - ), - ); - } - - Widget assortItemSm() { - return Container( - child: Column( - children: [ - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 112.w, - height: 20.h, - ), - ), - Spacer(), - Padding( - padding: EdgeInsets.symmetric(horizontal: 17.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(right: 16.w, left: 17.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - ), - ], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 16.h), - color: Color(0xFFEBEBEB), - height: 1.h, - width: double.infinity, - ) - ], - ), - ); - } - - ///删除分组提示弹窗 - showDelGroupDialog(id) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 139.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "选中数据将被永久删除, 是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - queryDelGroup(id); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/on_sale/goods_sort.dart b/lib/business_system/goods/on_sale/goods_sort.dart deleted file mode 100644 index 4dd8dcf8..00000000 --- a/lib/business_system/goods/on_sale/goods_sort.dart +++ /dev/null @@ -1,625 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/business_goods.dart'; -import '../../../retrofit/data/product_group_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/custom_image.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -class GoodsSort extends StatefulWidget { - final Map arguments; - - GoodsSort({this.arguments}); - - @override - State createState() { - return _GoodsSort(); - } -} - -class _GoodsSort extends State { - final RefreshController _refreshController = RefreshController(); - final ScrollController controller = ScrollController(); - BusinessApiService businessService; - ProductGroupList productGroupList; - List adminProductVoList = []; - int _loadCount = 0; - int _pageIndex = 1; - int groupIndex = -1; - String networkError = ""; - int networkStatus = 0; - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - _onRefresh({isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService( - Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"], - ); - queryProductGroupList(); - queryGoodsList( - groupIndex != -1 ? productGroupList.records[groupIndex].id : "", - isSing: false); - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 2) { - _loadCount = 0; - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - } - - ///分组列表 - queryProductGroupList() async { - try { - BaseData baseData = await businessService.productGroup({ - "current": 1, - "map": {}, - "model": {"groupImg": "", "groupName": "", "isDelete": 0}, - "order": "ascending", - "size": 100, - "sort": "sort" - }).catchError((error) { - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - productGroupList = baseData.data; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - addLoadCount(); - } - } - - ///商品列表 - queryGoodsList(groupId, {isSing = true}) async { - try { - BaseData baseData = - await businessService.findAdminProductLis({ - "groupId": groupId, - "hasStock": "", - "keyword": "", - "pageIndex": _pageIndex, - "pageSize": 10, - "status": "1" - }).catchError((error) { - networkStatus = -1; - networkError = AppUtils.dioErrorTypeToString(error.type); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - adminProductVoList.addAll(baseData?.data?.adminProductVOList ?? []); - if ((baseData?.data?.adminProductVOList ?? []).isEmpty || - adminProductVoList.length == baseData.data.total) { - _refreshController.loadNoData(); - } else { - _refreshController.loadComplete(); - } - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isSing) { - setState(() {}); - } else { - addLoadCount(); - } - } - } - - ///商品排序/一键置顶 - goodsSortTop(id) async { - try{ - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.productSortTop({ - "id": id, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - _pageIndex = 1; - adminProductVoList.clear(); - await queryGoodsList(groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex]?.id ?? "",isSing: false); - SmartDialog.showToast("商品置顶成功", alignment: Alignment.center); - setState(() {}); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - }finally{ - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - appBar: MyAppBar( - title: "商品排序", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1 ? noNetwork() : Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 100.w, - height: double.infinity, - padding: EdgeInsets.only(bottom: 70.h), - color: Color(0xFFFAFAFA), - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return sortLeftItemSm(); - }, - ) - : ListView.builder( - itemCount: productGroupList?.records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - groupIndex = position; - _pageIndex = 1; - adminProductVoList.clear(); - queryGoodsList( - productGroupList?.records[position].id, - ); - }, - child: sortLeftItem( - productGroupList.records[position], position), - ); - }, - ), - ), - Container( - width: MediaQuery.of(context).size.width - 100.w, - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: adminProductVoList.length != 0 ? true : false, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onLoading: () { - _pageIndex++; - queryGoodsList(groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex].id); - }, - onRefresh: () { - _pageIndex = 1; - adminProductVoList.clear(); - _onRefresh(isShowLoad: false); - }, - child: Container( - color: Colors.white, - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return sortGoodsItemSm(); - }, - ) - : ((adminProductVoList == null || - adminProductVoList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "该分组暂无添加商品", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - itemCount: adminProductVoList?.length ?? 0, - controller: controller, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return sortGoodsItem( - adminProductVoList[position]); - }, - )))), - ), - ], - ), - ); - } - - ///左边list - Widget sortLeftItem(Records records, index) { - return Container( - color: groupIndex == index ? Colors.white : Color(0xFFFAFAFA), - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Text( - records?.groupName ?? "", - textAlign: TextAlign.center, - style: TextStyle( - color: - groupIndex == index ? Color(0xFF30415B) : Color(0xFF626264), - fontSize: 12.sp, - fontWeight: groupIndex == index - ? MyFontWeight.semi_bold - : MyFontWeight.regular, - ), - )), - ], - ), - ); - } - - ///右边List - Widget sortGoodsItem(AdminProductVoList adminProductVoList) { - return Container( - margin: EdgeInsets.only(bottom: 21.h), - padding: EdgeInsets.only(left: 16.w, right: 14.w), - child: Row( - children: [ - MImage( - adminProductVoList?.productImg ?? "", - width: 77.h, - height: 77.h, - fit: BoxFit.cover, - radius: BorderRadius.circular(4), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Row( - children: [ - Expanded( - child: Text( - adminProductVoList?.productName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (widget.arguments["storeId"] == "0") { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "当前为所有门店状态,置顶商品时,请将门店切换至对应门店操作!", - color: Color(0xFF30415B), - )); - } else { - goodsSortTop(adminProductVoList.id); - } - }, - child: Padding( - padding: EdgeInsets.only(left:10.w,top: 2.h,bottom: 2.h), - child: Text( - "置顶", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - )) - ], - ), - ), - Row( - children: [ - Text( - "库存${adminProductVoList?.stock ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFA29E9E), - ), - ), - SizedBox( - width: 8.w, - ), - Text( - "销量${adminProductVoList?.sellCount ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF999999), - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - TextSpan( - text: adminProductVoList?.price ?? "", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - ], - ), - ) - ], - )), - ], - ), - ); - } - - Widget sortLeftItemSm() { - return Container( - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 30.h, - ), - ), - ); - } - - Widget sortGoodsItemSm() { - return Container( - margin: EdgeInsets.only(bottom: 21.h, left: 16.w, right: 16.w, top: 10.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(4), - ), - width: 70.h, - height: 70.h, - ), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 120.w, - height: 20.h, - ), - ), - SizedBox( - width: 10.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 24.w, - height: 20.h, - ), - ), - ], - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - SizedBox( - width: 8.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - Spacer(), - ], - ) - ], - )), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/on_sale/on_sale_page.dart b/lib/business_system/goods/on_sale/on_sale_page.dart deleted file mode 100644 index 1cdf9ebb..00000000 --- a/lib/business_system/goods/on_sale/on_sale_page.dart +++ /dev/null @@ -1,942 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/business_goods.dart'; -import '../../../retrofit/data/product_group_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/custom_image.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/round_button.dart'; - -class OnSalePage extends StatefulWidget { - final String storeId; - final Function(String total) total; - - OnSalePage(this.storeId, this.total); - - @override - State createState() { - return _OnSalePage(); - } -} - -class _OnSalePage extends State { - final RefreshController _refreshController = RefreshController(); - final ScrollController controller = ScrollController(); - BusinessApiService businessService; - ProductGroupList productGroupList; - List adminProductVoList = []; - int _loadCount = 0; - int _pageIndex = 1; - int groupIndex = -1; - String networkError = ""; - int networkStatus = 0; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - queryProductGroupList(); - queryGoodsList( - groupIndex != -1 ? productGroupList.records[groupIndex].id : "", - isSing: false); - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 2) { - _loadCount = 0; - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - } - - ///分组列表 - queryProductGroupList() async { - try { - BaseData baseData = await businessService.productGroup({ - "current": 1, - "map": {}, - "model": {"groupImg": "", "groupName": "", "isDelete": 0}, - "order": "ascending", - "size": 100, - "sort": "sort" - }).catchError((error) {}); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - productGroupList = baseData.data; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - addLoadCount(); - } - } - - ///商品列表 - queryGoodsList(groupId, {isSing = true}) async { - try { - BaseData baseData = - await businessService.findAdminProductLis({ - "groupId": groupId, - "hasStock": "", - "keyword": "", - "pageIndex": _pageIndex, - "pageSize": 10, - "status": "1" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - adminProductVoList.addAll(baseData?.data?.adminProductVOList ?? []); - widget.total(baseData.data.total.toString()); - if ((baseData?.data?.adminProductVOList ?? []).isEmpty || - adminProductVoList.length == baseData.data.total) { - _refreshController.loadNoData(); - } else { - _refreshController.loadComplete(); - } - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isSing) { - setState(() {}); - } else { - addLoadCount(); - } - } - } - - ///商品下架 - queryGoodsUpdate(productId) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.goodsUpdate({ - "productId": productId, - "sell": false, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - _pageIndex = 1; - adminProductVoList.clear(); - await queryGoodsList( - groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex]?.id ?? "", - isSing: false); - SmartDialog.showToast("商品下架成功", alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - body: Stack( - alignment: Alignment.bottomCenter, - children: [ - Column( - children: [ - goodsSearch(), - Container( - color: Color(0xFFEBEBEB), - height: 1.h, - width: double.infinity, - ), - Expanded( - child: networkStatus == -1 - ? noNetwork() - : Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 100.w, - height: double.infinity, - padding: EdgeInsets.only(bottom: 70.h), - color: Color(0xFFFAFAFA), - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return leftItemSm(); - }, - ) - : ListView.builder( - itemCount: - productGroupList?.records?.length ?? - 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - groupIndex = position; - _pageIndex = 1; - adminProductVoList.clear(); - queryGoodsList(productGroupList - ?.records[position].id); - }, - child: leftItem( - productGroupList - .records[position], - position), - ); - }, - ), - ), - Container( - width: MediaQuery.of(context).size.width - 100.w, - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: adminProductVoList.length != 0 - ? true - : false, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onLoading: () { - _pageIndex++; - queryGoodsList(groupIndex == -1 - ? "" - : productGroupList - ?.records[groupIndex].id); - }, - onRefresh: () { - _pageIndex = 1; - adminProductVoList.clear(); - _onRefresh(isShowLoad: false); - }, - child: Container( - color: Colors.white, - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return rightGoodsSm(); - }, - ) - : ((adminProductVoList == null || - adminProductVoList.length == - 0) - ? NoDataView( - src: - "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "该分组暂无添加商品", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - itemCount: adminProductVoList - ?.length ?? - 0, - controller: controller, - physics: - BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: - (context, position) { - return rightGoodsItem( - adminProductVoList[ - position]); - }, - )))), - ), - ], - ))), - ], - ), - Row( - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed('/router/goods_assort', - arguments: {"storeId": widget.storeId}).then((value) { - adminProductVoList.clear(); - _onRefresh(); - }); - }, - child: Container( - color: Color(0xFFEDEDED), - padding: EdgeInsets.only( - left: 16.w, - right: 16.w, - top: 21.h, - bottom: 24.h, - ), - child: Row( - children: [ - Text( - "分类管理", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF30415B), - ), - ), - SizedBox( - width: 2.w, - ), - Image.asset( - "assets/image/business.webp", - width: 18.h, - height: 18.h, - ), - ], - )), - ), - ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed('/router/goods_sort', - arguments: {"storeId": widget.storeId}).then((value) { - adminProductVoList.clear(); - _onRefresh(); - }); - }, - child: Container( - color: Color(0xFFEDEDED), - padding: EdgeInsets.only( - left: 16.w, - right: 16.w, - top: 21.h, - bottom: 24.h, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "商品排序", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF30415B), - ), - ), - SizedBox( - width: 2.w, - ), - Image.asset( - "assets/image/bs_px.webp", - width: 18.h, - height: 18.h, - ), - ], - ))), - ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed('/router/batch_shelf', - arguments: {"storeId": widget.storeId,"titleName":"批量下架"}).then((value) { - adminProductVoList.clear(); - _onRefresh(); - }); - }, - child: Container( - color: Color(0xFFEDEDED), - padding: EdgeInsets.only( - left: 16.w, - right: 16.w, - top: 21.h, - bottom: 24.h, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Text( - "批量下架", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF30415B), - ), - ), - SizedBox( - width: 2.w, - ), - Image.asset( - "assets/image/bs_xj.webp", - width: 18, - height: 18, - ), - ], - ))), - ), - ], - ), - ], - ), - ); - } - - /// 搜索框 - Widget goodsSearch() { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/goods_search_page', arguments: { - "storeId": widget.storeId, - "onSaleStatus": "1", - }).then((value) => { - _pageIndex = 1, - adminProductVoList.clear(), - queryGoodsList(groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex]?.id ?? "") - }); - }, - child: Container( - height: 40.h, - margin: EdgeInsets.fromLTRB(18.w, 16.h, 18.w, 10.h), - padding: EdgeInsets.fromLTRB(12.w, 6.h, 0, 6.h), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: Row( - children: [ - Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - SizedBox( - width: 3.w, - ), - Text( - "请输入搜索内容", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - ), - ], - ), - ), - ); - } - - ///左边list - Widget leftItem(Records records, index) { - return Container( - color: groupIndex == index ? Colors.white : Color(0xFFFAFAFA), - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Text( - records?.groupName ?? "", - textAlign: TextAlign.center, - style: TextStyle( - color: - groupIndex == index ? Color(0xFF30415B) : Color(0xFF626264), - fontSize: 12.sp, - fontWeight: groupIndex == index - ? MyFontWeight.semi_bold - : MyFontWeight.regular, - ), - )), - ], - ), - ); - } - - ///确收扣款刷新 - suclear() { - _pageIndex = 1; - adminProductVoList.clear(); - queryGoodsList(groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex]?.id ?? ""); - } - - Widget rightGoodsItem(AdminProductVoList adminProductVoList) { - return Container( - margin: EdgeInsets.only(bottom: 21.h, left: 16.w, right: 16.w, top: 10.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - MImage( - adminProductVoList?.productImg ?? "", - width: 70.h, - height: 70.h, - fit: BoxFit.cover, - radius: BorderRadius.circular(4), - ), - SizedBox( - width: 12.w, - ), - Expanded( - flex: 2, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Text( - adminProductVoList?.productName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ), - Row( - children: [ - Text( - "库存${adminProductVoList?.stock ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFA29E9E), - ), - ), - SizedBox( - width: 8.w, - ), - Text( - "销量${adminProductVoList?.sellCount ?? 0}", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF999999), - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Row( - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - TextSpan( - text: adminProductVoList?.price ?? "", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFF4524D), - ), - ), - ], - ), - )), - ], - ) - ], - )), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - GestureDetector( - onTap: () { - Navigator.of(context) - .pushNamed('/router/reservation_page', arguments: { - "storeId": widget.storeId, - "shopId": adminProductVoList.productSkuVOList[0].storeId, - "productId": adminProductVoList.id, - "subscribeParam": adminProductVoList.subscribeParam - }).then((value) { - if (value == 1) - suclear(); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(33), - border: Border.all( - color: Color(0x29000000), - width: 1, - ), - ), - margin: EdgeInsets.only(bottom: 12.h), - padding: - EdgeInsets.symmetric(vertical: 2.h, horizontal: 12.w), - child: Text( - "预售", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0x99000000), - ), - ), - ), - ), - GestureDetector( - onTap: () { - showOffShelfDialog(adminProductVoList.id ?? ""); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(33), - border: Border.all( - color: Color(0xFF30415B), - width: 1, - ), - ), - padding: - EdgeInsets.symmetric(vertical: 2.h, horizontal: 12.w), - child: Text( - "下架", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF30415B), - ), - ), - ), - ) - ], - ) - ], - ), - ); - } - - showOffShelfDialog(productIds) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 139.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "选中数据将被下架, 是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - queryGoodsUpdate(productIds ?? ""); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - Widget leftItemSm() { - return Container( - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 30.h, - ), - ), - ); - } - - Widget rightGoodsSm() { - return Container( - margin: EdgeInsets.only(bottom: 21.h, left: 16.w, right: 16.w, top: 10.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(4), - ), - width: 70.h, - height: 70.h, - ), - ), - SizedBox( - width: 12.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 124.w, - height: 20.h, - ), - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - SizedBox( - width: 8.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - ], - ), - SizedBox( - height: 7.h, - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 24.w, - height: 18.h, - ), - ), - ], - ) - ], - )), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/goods/reservation_ page.dart b/lib/business_system/goods/reservation_ page.dart deleted file mode 100644 index 14b64e29..00000000 --- a/lib/business_system/goods/reservation_ page.dart +++ /dev/null @@ -1,818 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../utils/font_weight.dart'; -import '../../generated/l10n.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_goods.dart'; -import '../../retrofit/data/store_time_info_list.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../view_widget/my_appbar.dart'; - -class ReservationPage extends StatefulWidget { - final Map arguments; - - ReservationPage({this.arguments}); - - @override - State createState() { - return _ReservationPage(); - } -} - -class _ReservationPage extends State { - final RefreshController _refreshController = RefreshController(); - BusinessApiService businessService; - String networkError = ""; - int networkStatus = 0; - final TextEditingController editingController = TextEditingController(); - final TextEditingController daysAfterController = TextEditingController(); - final TextEditingController daysWithinController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - bool _subscribeSwitch = false; - bool _paySubscribeSwitch = false; - StoreTimeInfoList storeTimeInfoList; - List timeSlots = []; - SubscribeParam subscribeParam; - String selectTimeDate = ""; - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - _focusNode.unfocus(); - } - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - subscribeParam = widget.arguments["subscribeParam"]; - queryReservationDetails(widget.arguments["shopId"]); - } - - ///预约时间详情 - queryReservationDetails(shopId) async { - try { - if (subscribeParam != null) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = - await businessService.storeOpenTime(shopId).catchError((error) { - networkStatus = -1; - networkError = AppUtils.dioErrorTypeToString(error.type); - }); - if (baseData != null && baseData.isSuccess) { - storeTimeInfoList = baseData.data; - if (subscribeParam != null) { - timeSlots = subscribeParam.subscribeTimes; - _subscribeSwitch = subscribeParam.isEnableSubscribe; - _paySubscribeSwitch = subscribeParam.isEnableSubscribePay; - universalTypeSelect = subscribeParam.dayOrDate; - - setState(() {}); - } - networkStatus = 1; - } - } finally { - EasyLoading.dismiss(); - } - } - - ///设置间隔的时间段list - List getTimeSlots(String st, String et, int n) { - List tempTimes = []; - try { - DateTime start = DateTime.parse(st); - DateTime end = DateTime.parse(et); - Duration interval = Duration(minutes: n); - - while (start.isBefore(end)) { - DateTime current = start.add(interval); - if (current.isBefore(end)) { - String startTime = start.toString().substring(11, 16); - String endTime = current.toString().substring(11, 16); - tempTimes.add('$startTime-$endTime'); - } else { - String startTime = start.toString().substring(11, 16); - String endTime = end.toString().substring(11, 16); - tempTimes.add('$startTime-$endTime'); - } - start = current; - } - } catch (ex) { - EasyLoading.dismiss(); - } - return tempTimes; - } - - ///预约信息保存 - updateSubscribeInfo() async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.updateSubscribe({ - "productId": widget.arguments["productId"], - "subscribe": { - "isEnableSubscribe": _subscribeSwitch, - "isEnableSubscribePay": _paySubscribeSwitch, - "timePeriod": editingController.text != "" - ? editingController.text - : subscribeParam?.timePeriod ?? "", - "subscribeTimes": timeSlots, - "dayOrDate": (storeTimeInfoList?.posType ?? "") == "FAST_SERVICE" - ? 0 - : universalTypeSelect, - "startAfterDays": daysAfterController?.text ?? "", - "daysValidate": daysWithinController?.text ?? "", - "subscribeStartTime": selectTimeDate == "" - ? "" - : selectTimeDate - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 19), - "subscribeEndTime": selectTimeDate == "" - ? "" - : selectTimeDate - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(23, 41), - "stores": [] - } - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(1); - SmartDialog.showToast("预约信息编辑成功", alignment: Alignment.center); - setState(() {}); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap:(){ - FocusScope.of(context).requestFocus(FocusNode());}, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "预约", - titleColor: Colors.black, - leadingColor: Colors.black, - background: Colors.white, - ), - body: networkStatus == -1 - ? noNetwork() - : Container( - color: Colors.white, - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (networkStatus == 1) - Row( - children: [ - Text( - "预约开关", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - SizedBox( - width: 24.w, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - _subscribeSwitch = !_subscribeSwitch; - }); - }, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 24.w), - child: _subscribeSwitch - ? Image.asset( - "assets/image/reservation_switch.webp", - width: 44.w, - height: 24.h, - fit: BoxFit.fill, - ) - : Image.asset( - "assets/image/reservation_unswitch.webp", - width: 44.w, - height: 24.h, - fit: BoxFit.fill, - ), - ), - ), - ], - ), - if (networkStatus == 1) - Expanded( - child: - (storeTimeInfoList?.posType ?? "") == "FAST_SERVICE" - ? timeIntervalType() - : universalType()), - if (networkStatus == 1) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - updateSubscribeInfo(); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.only(bottom: 55.h, top: 15.h), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).baocun, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ), - ), - ); - } - - ///时间间隔预约类型 - Widget timeIntervalType() { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - margin: EdgeInsets.symmetric(vertical: 24.h), - ), - Row( - children: [ - Text( - "付费预约开关", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - SizedBox( - width: 24.w, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - _paySubscribeSwitch = !_paySubscribeSwitch; - }); - }, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 24.w), - child: _paySubscribeSwitch - ? Image.asset( - "assets/image/reservation_switch.webp", - width: 44.w, - height: 24.h, - fit: BoxFit.fill, - ) - : Image.asset( - "assets/image/reservation_unswitch.webp", - width: 44.w, - height: 24.h, - fit: BoxFit.fill, - ), - ), - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0x14000000), - margin: EdgeInsets.only(top: 24.h, bottom: 10.h), - ), - Row( - children: [ - Expanded( - child: Text( - "预约间隔时(分钟)", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - Expanded( - child: TextField( - controller: editingController, - keyboardType: TextInputType.phone, - onChanged: (value) { - timeSlots = getTimeSlots( - "2023-11-14 ${storeTimeInfoList?.openStartTime ?? ""}", - "2023-11-14 ${storeTimeInfoList?.openEndTime ?? ""}", - int.tryParse(editingController.text) ?? 30); - }, - decoration: InputDecoration( - hintText: subscribeParam != null - ? (subscribeParam?.timePeriod ?? 0).toString() - : "分钟", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - ), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.only(bottom: 16.h, top: 38.h), - child: Text( - "选择预约时间段", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - Expanded( - child: GridView.builder( - itemCount: timeSlots.length, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - //一行的Widget数量 - crossAxisCount: 3, - //水平子Widget之间间距 - crossAxisSpacing:10.w, - //垂直子Widget之间间距 - mainAxisSpacing: 20.h, - //子Widget宽高比例 - childAspectRatio: 3, - ), - itemBuilder: (context, index) { - return reservationTimeList(index); - }, - )), - ], - ); - } - - ///通用预约类型 - Widget universalType() { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(top: 34.h, bottom: 16.h), - child: Text( - "增加有效期", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - Row( - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - universalTypeSelect = 1; - }); - }, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - checkView(1), - Text( - "任意时间", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - ))), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - universalTypeSelect = 3; - }); - }, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - checkView(3), - Text( - "日期范围", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - ))), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - universalTypeSelect = 2; - }); - }, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - checkView(2), - Text( - "可预定的期限", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - ))), - ], - ), - if ((universalTypeSelect != 0 && universalTypeSelect != 1)) - Expanded( - child: - universalTypeSelect == 2 ? expectedDeadline() : dateRange()), - ], - ); - } - - ///可预订的期限UI - Widget expectedDeadline() { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(top: 34.h, bottom: 16.h), - child: Text( - "预约多少天以后", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - Container( - width: 164.w, - margin: EdgeInsets.only(bottom: 8.h), - padding: EdgeInsets.symmetric(vertical: 5.h), - decoration: BoxDecoration( - color: Color(0xFFF8F9FA), - borderRadius: BorderRadius.circular(4), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: TextField( - controller: daysAfterController, - keyboardType: TextInputType.phone, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - decoration: InputDecoration( - border: InputBorder.none, - isCollapsed: true, - hintText: subscribeParam != null - ? (subscribeParam?.startAfterDays ?? "").toString() - : "", - hintStyle: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - contentPadding: EdgeInsets.only(left: 16.w), - ), - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - Padding( - padding: EdgeInsets.only(right: 13.w), - child: Text( - "天", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF7B8CA7), - fontWeight: MyFontWeight.medium), - ), - ) - ], - ), - ), - Text( - "*设定预定后整数天后才有效", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFFFA5151), - fontWeight: MyFontWeight.regular), - ), - Padding( - padding: EdgeInsets.only(top: 25.h, bottom: 16.h), - child: Text( - "预约多少天以内", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - Container( - width: 164.w, - margin: EdgeInsets.only(bottom: 8.h), - padding: EdgeInsets.symmetric(vertical: 5.h), - decoration: BoxDecoration( - color: Color(0xFFF8F9FA), - borderRadius: BorderRadius.circular(4), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: TextField( - controller: daysWithinController, - keyboardType: TextInputType.phone, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - decoration: InputDecoration( - isCollapsed: true, - border: InputBorder.none, - hintText: subscribeParam != null - ? (subscribeParam?.daysValidate ?? "").toString() - : "", - hintStyle: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - contentPadding: EdgeInsets.only(left: 16.w), - ), - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 13.w), - child: Text( - "天", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF7B8CA7), - fontWeight: MyFontWeight.medium), - ), - ) - ], - ), - ), - Text( - "*设定预定后整数天内有效", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFFFA5151), - fontWeight: MyFontWeight.regular), - ) - ], - ); - } - - ///日期范围UI - Widget dateRange() { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(top: 34.h, bottom: 16.h), - child: Text( - "日期范围", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - timeSelect(), - ], - ); - } - - ///时间选择 - Widget timeSelect() { - return Container( - color: Colors.white, - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/custom_page', - arguments: {"beyondDateRange": "1"}).then((value) { - setState(() { - selectTimeDate = value; - }); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 12.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - (selectTimeDate == "" || selectTimeDate == null) - ? (((subscribeParam?.subscribeEndTime ?? "") != "" && - (subscribeParam?.subscribeStartTime ?? "") != "") - ? "${subscribeParam?.subscribeStartTime ?? ""} 至 ${subscribeParam?.subscribeEndTime ?? ""}" - : "选择开始时间 至 结束时间") - : "${selectTimeDate.replaceAll("年", "-").replaceAll("月", "-").replaceAll("日", "").substring(0, 19)} " - "${selectTimeDate.replaceAll("年", "-").replaceAll("月", "-").replaceAll("日", "").substring(20, 41)}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ], - ), - ), - ), - ); - } - - var universalTypeSelect = 0; - - Widget checkView(var index) { - return Container( - padding: EdgeInsets.only( - right: 6.w, - ), - alignment: Alignment.center, - child: Image.asset( - universalTypeSelect != index - ? "assets/image/bus_time_unSelect.webp" - : "assets/image/bus_time_select.webp", - width: 20.w, - height: 20.h, - ), - ); - } - - Widget reservationTimeList(int index) { - return Container( - decoration: new BoxDecoration( - color: Color(0xFFEFF5FF), - borderRadius: BorderRadius.circular(2), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - timeSlots[index], - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - color: Color(0xFF30415B), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - timeSlots.removeAt(index); - setState(() {}); - }, - child: Container( - padding: EdgeInsets.all(2), - child: Image.asset( - "assets/image/bus_close_circle.webp", - width: 16.h, - height: 16.h, - fit: BoxFit.fill, - ), - ), - ), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - queryReservationDetails(widget.arguments["shopId"]); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/business_home_page.dart b/lib/business_system/home/business_home_page.dart deleted file mode 100644 index 9057cd76..00000000 --- a/lib/business_system/home/business_home_page.dart +++ /dev/null @@ -1,937 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/business_instance.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_login_info.dart'; -import '../../retrofit/data/day_count.dart'; -import '../../utils/flutter_utils.dart'; -import '../../utils/font_weight.dart'; -import '../../view_widget/settlement_tips_dialog.dart'; - -class BusinessHomePage extends StatefulWidget { - final BusinessLoginInfo businessLoginInfo; - final int selectStoreIndex; - final Function changeIndex; - final Function changeTab; - - BusinessHomePage(Key key,this.businessLoginInfo, this.selectStoreIndex, - this.changeIndex, this.changeTab): super(key: key); - - @override - State createState() { - return _BusinessHomePage(); - } -} - -class _BusinessHomePage extends State { - final RefreshController refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - BusinessApiService businessService; - DayCount dayCount; - int _loadCount = 0; - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - @override - void dispose() { - super.dispose(); - refreshController.dispose(); - } - - _onRefresh({int index, isLoading = true}) async { - if (isLoading) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - if (!mounted) return; - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.businessLoginInfo - .storeList[index ?? widget.selectStoreIndex].name == - "所有门店" - ? "0" - : widget.businessLoginInfo - .storeList[index ?? widget.selectStoreIndex].id); - queryDayAmount(); - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 1) { - _loadCount = 0; - EasyLoading.dismiss(); - if (refreshController.isRefresh) refreshController.refreshCompleted(); - if (mounted) setState(() {}); - } - } - - ///每日营业额/交易笔数/退款金额/退款笔数 - queryDayAmount() async { - try { - BaseData baseData = await businessService.getDayCounts({ - "summaryDate": "${DateFormat("yyyy-MM-dd").format(DateTime.now())}" - }).catchError((error) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: AppUtils.dioErrorTypeToString(error.type), - color: Color(0xFF30415B), - )); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (baseData != null && baseData.isSuccess) { - dayCount = baseData.data; - } - } finally { - addLoadCount(); - } - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Expanded( - child: Container( - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - scrollController: scrollController, - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _onRefresh(isLoading: false); - }, - child: SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Column( - children: [ - homeTop(), - commonFunctions(), - homeStatistics(), - ], - )), - ), - ), - ), - if(BusinessInstance.instance.serviceStatus == "试用") - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/service_subscription_page', arguments: { - "storeId": widget.businessLoginInfo - .storeList[widget.selectStoreIndex].name == - "所有门店" - ? "0" - : widget - .businessLoginInfo.storeList[widget.selectStoreIndex].id - }).then((value){ - if(value == 1){ - setState((){}); - } - }); - }, - child: Container( - alignment: Alignment.center, - padding: EdgeInsets.only( - top: 20.h, bottom: 28.h, left: 20.w, right: 23.w), - color: Color(0xFFDCE8FC), - child: Row( - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "试用期到期时间:", - style: TextStyle( - color: Color(0xFF252626), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - TextSpan( - text: "${(widget?.businessLoginInfo?.expirationTime ?? "").length > 9 ? (widget?.businessLoginInfo?.expirationTime ?? "").substring(0, 10) : ""}", - style: TextStyle( - color: Color(0xFFFF8F1F), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - Padding( - padding: EdgeInsets.only(right: 2.w), - child: Text( - "去购买服务", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - )), - Image.asset( - "assets/image/icon_right_z.webp", - width: 14.h, - height: 14.h, - color: Color(0xFF30415B), - ), - ], - )), - ), - SizedBox( - height: 76.h, - ), - ], - ); - } - - ///首页头部 - Widget homeTop() { - return Container( - color: Color(0xFF30415B), - width: double.infinity, - padding: EdgeInsets.only( - top: MediaQuery.of(context).padding.top + 23.h, - bottom: 16.h, - left: 16.w, - right: 16.w), - child: Column( - children: [ - Row( - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - widget.changeIndex(); - //改变导航栏状态栏颜色 - // SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle(statusBarColor: Colors.white), ); - // Navigator.of(context).pushNamed('/router/select_shop'); - }, - child: Row( - children: [ - Image.asset( - "assets/image/bs_more.webp", - width: 16.w, - height: 13.h, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - widget?.businessLoginInfo - ?.storeList[widget.selectStoreIndex].name ?? - "", - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, - color: Colors.white, - ), - ), - ), - ], - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showIdentitySwitchDialog(); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 10.w), - child: Image.asset( - "assets/image/bs_user_switch.webp", - width: 25.h, - height: 25.h, - color: Colors.white, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/scan_code_page', arguments: { - "storeId": widget.businessLoginInfo - .storeList[widget.selectStoreIndex].name == - "所有门店" - ? "0" - : widget.businessLoginInfo - .storeList[widget.selectStoreIndex].id - }); - }, - child: Image.asset( - "assets/image/icon_scan_qr_code.webp", - width: 28.h, - height: 28.h, - ), - ) - ], - ), - Container( - margin: EdgeInsets.only(top: 14.h), - padding: EdgeInsets.symmetric(vertical: 12.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(4), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 23.w), - child: Row( - children: [ - Image.asset( - "assets/image/bs_home_bill.webp", - width: 14, - height: 14, - ), - Padding( - padding: EdgeInsets.only(left: 3.w), - child: Text( - "营业额(元)", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF30415B), - ), - ), - ), - ], - )), - Padding( - padding: EdgeInsets.only( - top: 6.h, bottom: 17.h, left: 23.w, right: 23.w), - child: Text( - dayCount?.paySum ?? "0", - style: TextStyle( - fontSize: 24.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ), - ), - Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bs_trade_num.webp", - width: 16, - height: 16, - ), - Padding( - padding: EdgeInsets.only(left: 3.w), - child: Text( - "交易笔数", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.only( - top: 5.h, left: 20.w, right: 20.w), - child: Text( - (dayCount?.orderNum ?? 0).toString(), - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ), - ), - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bs_refund.webp", - width: 14, - height: 14, - ), - Padding( - padding: EdgeInsets.only(left: 3.w), - child: Text( - "退款金额(元)", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.only( - top: 5.h, left: 20.w, right: 20.w), - child: Text( - (dayCount?.refundMoney ?? "0.00") == "0" - ? "0.00" - : (dayCount?.refundMoney ?? "0.00"), - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ), - ), - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bs_refund_num.webp", - width: 14, - height: 14, - ), - Padding( - padding: EdgeInsets.only(left: 3.w), - child: Text( - "退款笔数", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.only( - top: 5.h, left: 20.w, right: 20.w), - child: Text( - (dayCount?.refundOrderNum ?? 0).toString(), - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ), - ), - ], - )) - ], - ), - ], - ), - ) - ], - ), - ); - } - - ///用户身份切换 - showIdentitySwitchDialog() async { - SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - sharedPreferences.setString('identitySwitch', "2"); - Navigator.of(context).pushNamedAndRemoveUntil( - '/router/main_page', - (route) => false, - ); - }, - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bs_user_switch_bg.webp", - width: 144.h, - height: 97.h, - ), - Padding( - padding: EdgeInsets.only(top: 10.h, bottom: 10.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bs_switch.webp", - width: 12.h, - height: 12.h, - ), - SizedBox( - width: 10.w, - ), - Text( - "切换成用户端", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 15.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ], - ), - ) - ], - ), - )); - }, - ); - } - - ///常用功能 - Widget commonFunctions() { - return Container( - color: Colors.white, - margin: EdgeInsets.only(bottom: 16.h), - padding: - EdgeInsets.only(left: 16.w, right: 15.w, top: 12.h, bottom: 16.h), - child: Column( - children: [ - Row( - children: [ - Container(width: 4.w, height: 16.h, color: Color(0xFF30415B)), - Padding( - padding: EdgeInsets.only( - left: 12.w, - ), - child: Text( - "常用功能", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - ), - ], - ), - GridView.builder( - itemCount: commonFunctionsList.length ?? 0, - padding: EdgeInsets.only(top: 24.h), - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 4, - crossAxisSpacing: 15.w, - mainAxisSpacing: 12.w, - ), - itemBuilder: (context, index) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - commonFunctionsIndex(index); - }, - child: commonFunctionsItem(index)); - }, - ), - ], - ), - ); - } - - ///常用功能跳转 - commonFunctionsIndex(index) async { - switch (index) { - case 0: - if ((widget.businessLoginInfo.storeList[widget.selectStoreIndex].name == - "所有门店" - ? "0" - : widget - .businessLoginInfo.storeList[widget.selectStoreIndex].id) == - "0") { - widget.changeIndex(); - } else { - Navigator.of(context).pushNamed('/router/cashier_page', arguments: { - "storeId": widget.businessLoginInfo - .storeList[widget.selectStoreIndex].name == - "所有门店" - ? "0" - : widget - .businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - } - break; - case 1: - Navigator.of(context) - .pushNamed('/router/vip_recharge_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - break; - case 2: - Navigator.of(context).pushNamed('/router/add_vip', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - break; - case 3: - Navigator.of(context) - .pushNamed('/router/trade_overview_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - break; - case 4: - Navigator.of(context) - .pushNamed('/router/business_vip_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - break; - case 5: - Navigator.of(context).pushNamed('/router/hot_selling_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - break; - case 6: - Navigator.of(context).pushNamed('/router/flow_page', arguments: { - "storeName": widget?.businessLoginInfo - ?.storeList[widget.selectStoreIndex].name ?? - "", - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - break; - case 7: - widget.changeTab(3); - break; - } - } - - ///常用功能板块 - List> commonFunctionsList = [ - { - "image": "assets/image/bus_home_syt.webp", - "commonName": "收银台", - "imageWidth": "26", - "imageHeight": "23" - }, - { - "image": "assets/image/bus_home_cz.webp", - "commonName": "充值", - "imageWidth": "22", - "imageHeight": "19" - }, - { - "image": "assets/image/bus_home_bhy.webp", - "commonName": "办会员", - "imageWidth": "24", - "imageHeight": "21" - }, - { - "image": "assets/image/bus_home_syzl.webp", - "commonName": "生意总览", - "imageWidth": "22", - "imageHeight": "23" - }, - { - "image": "assets/image/bus_home_hygl.webp", - "commonName": "会员管理", - "imageWidth": "23", - "imageHeight": "25" - }, - { - "image": "assets/image/bus_home_rxbd.webp", - "commonName": "热销榜单", - "imageWidth": "20", - "imageHeight": "26" - }, - { - "image": "assets/image/bus_home_jrls.webp", - "commonName": "今日流水", - "imageWidth": "22", - "imageHeight": "23" - }, - { - "image": "assets/image/bus_home_goods.webp", - "commonName": "商品", - "imageWidth": "21", - "imageHeight": "23" - }, - ]; - - ///常用功能Item - Widget commonFunctionsItem(index) { - return Column( - children: [ - Image.asset( - commonFunctionsList[index]["image"], - width: double.tryParse(commonFunctionsList[index]["imageWidth"]).w, - height: double.tryParse(commonFunctionsList[index]["imageHeight"]).h, - fit: BoxFit.fill, - ), - Padding( - padding: EdgeInsets.only(top: 12.h), - child: Text( - commonFunctionsList[index]["commonName"], - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF252626), - ), - )), - ], - ); - } - - ///统计 - Widget homeStatistics() { - return Container( - color: Colors.white, - margin: EdgeInsets.only(bottom: 16.h), - padding: - EdgeInsets.only(left: 16.w, right: 15.w, top: 12.h, bottom: 16.h), - child: Column( - children: [ - Row( - children: [ - Container(width: 4.w, height: 16.h, color: Color(0xFF30415B)), - Padding( - padding: EdgeInsets.only( - left: 12.w, - ), - child: Text( - "统计", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - ), - ], - ), - GridView.builder( - itemCount: homeStatisticsList.length ?? 0, - padding: EdgeInsets.only(top: 24.h), - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 4, - crossAxisSpacing: 15.w, - mainAxisSpacing: 12.w, - ), - itemBuilder: (context, index) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - homeStatisticsIndex(index); - }, - child: homeStatisticsItem(index)); - }, - ), - ], - ), - ); - } - - ///统计跳转 - homeStatisticsIndex(index) async { - switch (index) { - case 0: - Navigator.of(context) - .pushNamed('/router/trade_overview_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - }); - break; - case 1: - Navigator.of(context) - .pushNamed('/router/business_vip_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - "index": 2 - }); - break; - case 2: - Navigator.of(context) - .pushNamed('/router/business_vip_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - "index": 1 - }); - break; - case 3: - Navigator.of(context) - .pushNamed('/router/consumer_ranking_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - "titleName": "会员余额统计" - }); - break; - case 4: - Navigator.of(context) - .pushNamed('/router/consumer_ranking_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - "titleName": "消费排名" - }); - break; - case 5: - Navigator.of(context) - .pushNamed('/router/trade_overview_page', arguments: { - "storeId": widget.businessLoginInfo.storeList[widget.selectStoreIndex] - .name == - "所有门店" - ? "0" - : widget.businessLoginInfo.storeList[widget.selectStoreIndex].id, - "index": 2 - }); - break; - } - } - - ///统计板块 - List> homeStatisticsList = [ - { - "image": "assets/image/bus_home_yytj.webp", - "commonName": "营业统计", - "imageWidth": "21", - "imageHeight": "20" - }, - { - "image": "assets/image/bus_home_xfjl.webp", - "commonName": "消费记录", - "imageWidth": "22", - "imageHeight": "21" - }, - { - "image": "assets/image/bus_home_czjl.webp", - "commonName": "充值记录", - "imageWidth": "19", - "imageHeight": "22" - }, - { - "image": "assets/image/bus_home_hyyetj.webp", - "commonName": "会员余额统计", - "imageWidth": "23", - "imageHeight": "23" - }, - { - "image": "assets/image/bus_home_xfpm.webp", - "commonName": "消费排名", - "imageWidth": "26", - "imageHeight": "22" - }, - { - "image": "assets/image/bus_home_goods_ssfx.webp", - "commonName": "商品销售分析", - "imageWidth": "26", - "imageHeight": "23" - }, - ]; - - ///统计Item - Widget homeStatisticsItem(index) { - return Column( - children: [ - Image.asset( - homeStatisticsList[index]["image"], - width: double.tryParse(homeStatisticsList[index]["imageWidth"]).w, - height: double.tryParse(homeStatisticsList[index]["imageHeight"]).h, - fit: BoxFit.fill, - ), - Padding( - padding: EdgeInsets.only(top: 12.h), - child: Text( - homeStatisticsList[index]["commonName"], - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF252626), - ), - )), - ], - ); - } -} diff --git a/lib/business_system/home/cashier/cashier_page.dart b/lib/business_system/home/cashier/cashier_page.dart deleted file mode 100644 index aa6ae250..00000000 --- a/lib/business_system/home/cashier/cashier_page.dart +++ /dev/null @@ -1,1429 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/phone_query_member_info.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/custom_image.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/round_button.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -class CashierPage extends StatefulWidget { - final Map arguments; - - CashierPage({this.arguments}); - - @override - State createState() { - return _CashierPage(); - } -} - -class _CashierPage extends State { - final TextEditingController editingController = TextEditingController(); - final RefreshController refreshController = RefreshController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - BusinessApiService businessService; - String networkError = ""; - int networkStatus = 0; - PhoneQueryMemberInfo phoneQueryMemberInfo; - String cashierOrderId; - String _display = ""; - double _displayTotal = 0; - List manualQueryInfo; - bool isDisplayVipInfo = false; - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - refreshController.dispose(); - _focusNode.unfocus(); - } - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - if((widget?.arguments["phone"] ?? "")!= "") - queryMemberPhoneInfo(widget?.arguments["phone"] ?? ""); - } - - ///根据手机号搜索用户信息 - queryMemberPhoneInfo(phoneNum, {isShow = true}) async { - try { - if (isShow) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService - .queryMemberInfo( - {"phoneNum": phoneNum, "isNewUser": false}).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - phoneQueryMemberInfo = baseData.data; - isDisplayVipInfo = true; - refreshController.loadComplete(); - refreshController.refreshCompleted(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - refreshController.refreshFailed(); - refreshController.loadFailed(); - } - } finally { - if (isShow) EasyLoading.dismiss(); - setState(() {}); - } - } - - ///收银台创建直付订单 - cashierCreateOrder(payChannel) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.createOrder({ - "createOrderType": "DIRECT", // 创建订单类型 DIRECT 直接下单 ASSIGN 指定商品下单 - "orderAmount": _displayTotal.toStringAsFixed(2), - "virtualProductId": -2, - "mid": phoneQueryMemberInfo?.sid ?? "" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - cashierOrderId = baseData.data; - if (payChannel == 1 || payChannel == 2) { - Navigator.of(context).pushNamed('/router/scan_code_page', arguments: { - "storeId": widget.arguments["storeId"], - "scanCodeType": "收银台支付", - "mid": phoneQueryMemberInfo?.sid ?? "", - "orderId": cashierOrderId, - "payChannel": payChannel - }).then((value) { - if (value == 1) { - _display = ""; - _displayTotal = 0; - } else { - manualQueryInfo = value; - showPayQueryDialog(manualQueryInfo[0], manualQueryInfo[1]); - } - }); - } else { - await cashierPayOrder( - cashierOrderId, payChannel, phoneQueryMemberInfo?.sid ?? ""); - } - networkStatus = 1; - setState(() {}); - } - } finally { - EasyLoading.dismiss(); - } - } - - ///支付接口 - cashierPayOrder(orderId, payChannel, mid) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.prePayOrder({ - "orderId": orderId, - "payChannel": payChannel, - "mid": mid, - "authCode": (payChannel == 1 || payChannel == 2) ? "" : null, - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - _display = ""; - _displayTotal = 0; - if (phoneQueryMemberInfo != null) - await queryMemberPhoneInfo(editingController?.text ?? "", - isShow: false); - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.data ?? "", - color: Color(0xFF30415B), - )); - networkStatus = 1; - setState(() {}); - } else { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally {} - } - - ///手动查询充值订单状态 - manualQueryCashierOrder(orderId) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService - .queryCashierOrder(cashierOrderId, true) - .catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - _display = ""; - _displayTotal = 0; - Navigator.of(context).pop(); - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.data ?? "", - color: Color(0xFF30415B), - )); - } else { - if (baseData.msg != "需要用户输入支付密码") Navigator.of(context).pop(); - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Scaffold( - appBar: MyAppBar( - title: "收银", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body:networkStatus == -1 - ? noNetwork() :SmartRefresher( - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - controller: refreshController, - onRefresh: () { - if (editingController.text != "") - queryMemberPhoneInfo(editingController.text ?? "", isShow: false); - else { - refreshController.loadComplete(); - refreshController.refreshCompleted(); - } - }, - physics: BouncingScrollPhysics(), - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (isDisplayVipInfo == false) - Container( - width: double.infinity, - padding: EdgeInsets.only(top: 19.h, bottom: 13.h), - decoration: BoxDecoration( - color: Colors.white, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(left: 16.w), - child: Text( - "快速收银", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF0D0D0D), - ), - ), - ), - Stack( - children: [ - Container( - width: double.infinity, - height: 2.h, - margin: EdgeInsets.only(top: 5.h), - color: Color(0xFFD8D8D8), - ), - Container( - width: 44.w, - height: 1.5.h, - margin: EdgeInsets.only(top: 5.h, left: 24.w), - color: Color(0xFF30415B), - ), - ], - ), - SizedBox( - height: 13.h, - ), - vipUserSearch(), - ], - ), - ), - (phoneQueryMemberInfo != null && isDisplayVipInfo == true) - ? GestureDetector( - onTap:(){ - Navigator.of(context).pushNamed( - '/router/member_details_page', - arguments: { - "storeId": widget?.arguments["storeId"] ?? "", - "phoneNum":editingController?.text ?? "" - }); - }, - child: vipPlate(), - ) - : SizedBox(height: 103.h), - calculator() - ], - ), - ), - ), - ), - ); - } - - /// 搜索框 - Widget vipUserSearch() { - return Container( - color: Colors.white, - child: Container( - height: 40.h, - margin: EdgeInsets.only(left: 18.w, right: 18.w), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - queryMemberPhoneInfo(editingController.text ?? ""); - }, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - controller: editingController, - decoration: InputDecoration( - hintText: "请输入会员手机号", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.symmetric( - vertical: 12.h, - ), - prefixIcon: Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - border: InputBorder.none, - ), - ), - ), - ); - } - - ///会员信息板块 - Widget vipPlate() { - return Container( - width: double.infinity, - margin: EdgeInsets.only(top: 12.h, left: 19.w, right: 13.w), - padding: EdgeInsets.only(bottom: 15.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - Container( - width: double.infinity, - padding: EdgeInsets.only(left: 16.w, bottom: 33.h), - margin: EdgeInsets.only(bottom: 10.h), - decoration: BoxDecoration( - color: Colors.white, - gradient: LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, - colors: [Color(0xFF30415B), Color(0xFF5171A4)]), - borderRadius: BorderRadius.vertical( - top: Radius.circular(8), - ), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 52.h, - height: 52.h, - margin: EdgeInsets.only(right: 15.w, top: 13.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - ), - child:MImage( - (phoneQueryMemberInfo?.headimg ?? - ""), - width: double.infinity, - height: double.infinity, - fit: BoxFit.cover, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ), - ), - Expanded( - child: Container( - padding: EdgeInsets.only(top: 13.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 8.h), - child: Text( - "会员名称:${phoneQueryMemberInfo?.nickName ?? ""}", - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - )), - Text( - "手机号:${phoneQueryMemberInfo?.phoneNum ?? ""}", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ) - ], - ), - ), - ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isDisplayVipInfo = false; - editingController.text = ""; - }); - }, - child: Container( - padding: - EdgeInsets.only(right: 19.w, top: 13.h, bottom: 13.h), - child: Column( - children: [ - Image.asset( - "assets/image/bus_cashier_switch.webp", - width: 17.w, - height: 15.h, - color: Colors.white, - fit: BoxFit.fill, - ), - Padding( - padding: EdgeInsets.only(top: 5.h), - child: Text( - "切换会员", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - )) - ], - )), - )) - ], - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 7.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bus_vip_balance.webp", - width: 24.h, - height: 24.h, - fit: BoxFit.fill, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "会员余额", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF252626), - ), - )) - ], - )), - Text( - "${double.tryParse(phoneQueryMemberInfo?.balance ?? 0)}", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ) - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 7.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bus_coupon.webp", - width: 20.w, - height: 18.h, - fit: BoxFit.fill, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "优惠券", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF252626), - ), - )) - ], - )), - Text( - (phoneQueryMemberInfo?.useableConponList?.length ?? 0) - .toString(), - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ) - ], - )), - ], - ) - ], - ), - ); - } - - ///计算器ui - Widget calculator() { - return Container( - color: Colors.white, - margin: EdgeInsets.only(top: isDisplayVipInfo == false ? 15.h : 45.h), - alignment: Alignment.bottomCenter, - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Container( - padding: EdgeInsets.symmetric( - vertical: 6.h, - ), - margin: EdgeInsets.only(right: 32.w), - child: Text( - _display, - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.bold, - color: Color(0x4D000000), - ), - ), - ), - Container( - margin: EdgeInsets.only(right: 30.w), - child: Text( - _displayTotal.toStringAsFixed(2), - style: TextStyle( - fontSize: 36.sp, - fontWeight: MyFontWeight.bold, - color: Colors.black, - ), - ), - ), - Container( - color: Color(0xFFD8D8D8), - width: double.infinity, - height: 1.h, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - buildButton('7'), - buildButton('8'), - buildButton('9'), - Expanded( - flex: 2, - child: GestureDetector( - onTap: () { - setState(() { - _display = ""; - _displayTotal = 0; - }); - }, - child: Container( - alignment: Alignment.center, - padding: EdgeInsets.only(top: 23.h, bottom: 18.h), - decoration: BoxDecoration( - border: Border( - right: BorderSide( - color: Color(0xFFD8D8D8), - width: 1.w, - ), - ), - ), - child: Text( - "C", - style: TextStyle( - fontSize: 32.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF30415B), - ), - ), - ), - )) - ], - ), - Container( - color: Color(0xFFD8D8D8), - width: double.infinity, - height: 1.h, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - buildButton('4'), - buildButton('5'), - buildButton('6'), - Expanded( - flex: 2, - child: GestureDetector( - onTap: () => _onPressed("back"), - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - border: Border( - right: BorderSide( - color: Color(0xFFD8D8D8), - width: 1.w, - ), - ), - ), - child: Image.asset( - "assets/image/bus_calculator_enter.webp", - width: 24.w, - height: 16.h, - fit: BoxFit.fill, - ), - ), - )) - ], - ), - Container( - color: Color(0xFFD8D8D8), - width: double.infinity, - height: 1.h, - ), - Row( - children: [ - Expanded( - child: Column( - children: [ - Row( - children: [ - buildButton('1'), - buildButton('2'), - buildButton('3'), - ], - ), - Container( - color: Color(0xFFD8D8D8), - width: double.infinity, - height: 1.h, - ), - Row( - children: [ - buildButton('0', flex: 2), - buildButton('.'), - ], - ), - ], - ), - flex: 3, - ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () => _onPressed("+"), - child: Container( - alignment: Alignment.center, - padding: EdgeInsets.only(top: 23.h, bottom: 18.h), - decoration: BoxDecoration(), - child: Text( - "+", - style: TextStyle( - fontSize: 32.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF30415B), - ), - ), - ), - ), - flex: 2, - ), - ], - ), - Container( - height: 100.h, - child: Row( - children: [ - Expanded( - flex: 2, - child: Container( - alignment: Alignment.center, - color: Color(0xFF5A7092), - padding: EdgeInsets.only(top: 10.h, bottom: 10.h), - child: Text( - "¥${_displayTotal.toStringAsFixed(2)}", - style: TextStyle( - fontSize: 24.sp, - fontWeight: MyFontWeight.bold, - color: Colors.white, - ), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (_displayTotal.toStringAsFixed(2) == "0.00") { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "订单支付金额小于或等于0,无法进行支付操作", - color: Color(0xFF30415B), - )); - } else { - showPaySelectDialog(); - } - }, - child: Container( - alignment: Alignment.center, - color: Color(0xFF30415B), - padding: EdgeInsets.only( - top: 10.h, bottom: 10.h, left: 45.w, right: 33.w), - child: Text( - "结账", - style: TextStyle( - fontSize: 36.sp, - fontWeight: MyFontWeight.bold, - color: Colors.white, - ), - ), - )), - ], - ), - ) - ], - ), - ); - } - - ///计算器文本 - Widget buildButton(String text, {int flex = 1}) { - return Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - child: Container( - alignment: Alignment.center, - padding: EdgeInsets.only(top: 23.h, bottom: 18.h), - decoration: BoxDecoration( - border: Border( - right: BorderSide( - color: Color(0xFFD8D8D8), - width: 1.w, - ), - ), - ), - child: Text( - text, - style: TextStyle( - fontSize: 32.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xD9000000), - ), - ), - ), - onTap: () => _onPressed(text), - ), - flex: flex, - ); - } - - ///计算器点击事件的处理 - void _onPressed(String button) { - setState(() { - FocusScope.of(context).requestFocus(FocusNode()); - int addIndex = _display.lastIndexOf("+") + 1; - String rStr = _display.substring(addIndex); - if (button == "+" || button == ".") { - if (_display.isEmpty || - _display.endsWith(".") || - _display.endsWith("+")) { - return; - } - if (button == ".") { - if (rStr.contains(".")) return; - } - } else if (button == "0") { - if (rStr == "0") return; - } else { - if (rStr == "0") { - _display = _display.substring(0, _display.length - 1); - } - } - if (button == "back") { - // 回删一个数值 - if (_display.length > 0) - _display = _display.substring(0, _display.length - 1); - } else { - _display += button; - } - _displayTotal = 0; - var tempNumArr = _display.split("+"); - tempNumArr.forEach((element) { - _displayTotal += double.parse(element); - }); - }); - } - - ///支付选项 - showPaySelectDialog() { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return Container( - width: double.infinity, - height: phoneQueryMemberInfo != null ? 280.h : 220.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: - EdgeInsets.only(top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - S.of(context).zhifufangshi, - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 17.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), - GestureDetector( - onTap: () { - setState(() { - Navigator.of(context).pop(); - }); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w), - child: Image.asset( - "assets/image/cancel.webp", - width: 25.h, - height: 25.h, - ), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.only(left: 23.w, right: 9.w), - child: Column( - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - showPayAmountDialog(0, "现金"); - }, - child: Padding( - padding: EdgeInsets.only(left: 5.w), - child: Row( - children: [ - Image.asset( - "assets/image/bus_cashier_xj.webp", - width: 31.w, - height: 22.h, - ), - Padding( - padding: EdgeInsets.only(left: 14.w), - child: Text( - "现金支付", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )) - ], - ), - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBEBEB), - margin: EdgeInsets.symmetric(vertical: 13.h), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - showPayAmountDialog(1, "微信"); - }, - child: Padding( - padding: EdgeInsets.only(left: 5.w), - child: Row( - children: [ - Image.asset( - "assets/image/bus_vip_wx.webp", - width: 29.w, - height: 26.h, - ), - Padding( - padding: EdgeInsets.only(left: 14.w), - child: Text( - "微信", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )) - ], - ), - )), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBEBEB), - margin: EdgeInsets.symmetric(vertical: 13.h), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - showPayAmountDialog(2, "支付宝"); - }, - child: Padding( - padding: EdgeInsets.only(left: 5.w), - child: Row( - children: [ - Image.asset( - "assets/image/bus_vip_alipay.webp", - width: 29.h, - height: 29.h, - ), - Padding( - padding: EdgeInsets.only(left: 14.w), - child: Text( - "支付宝", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )) - ], - ), - )), - if (phoneQueryMemberInfo != null) - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBEBEB), - margin: EdgeInsets.symmetric(vertical: 13.h), - ), - if (phoneQueryMemberInfo != null) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - showPayAmountDialog(3, "商户余额"); - }, - child: Padding( - padding: EdgeInsets.only(left: 5.w), - child: Row( - children: [ - Image.asset( - "assets/image/bus_cashier_balance.webp", - width: 27.h, - height: 27.h, - ), - Padding( - padding: EdgeInsets.only(left: 14.w), - child: Text( - "商户余额", - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )) - ], - ), - )), - // Container( - // width: double.infinity, - // height: 1.h, - // color: Color(0xFFEBEBEB), - // margin: EdgeInsets.symmetric(vertical:13.h), - // ), - // GestureDetector( - // behavior: HitTestBehavior.opaque, - // onTap:(){ - // Navigator.of(context).pop(); - // showPayAmountDialog(4,"平台余额");}, - // child: Padding(padding:EdgeInsets.only(left: 5.w), - // child: Row( - // children: [ - // Image.asset( - // "assets/image/bus_cashier_pt.webp", - // width: 27.h, - // height: 27.h, - // ), - // Padding( - // padding: EdgeInsets.only(left: 14.w), - // child: Text( - // "平台余额", - // textAlign: TextAlign.center, - // style: TextStyle( - // color: Color(0xFF1A1A1A), - // fontSize: 14.sp, - // fontWeight: MyFontWeight.regular, - // ), - // )) - // ], - // ),)), - ], - ), - ) - ], - ), - ); - }); - } - - ///确认支付金额提示 - showPayAmountDialog(index, payText) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84.w, - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "此操作将进行金额支付,请确认支付金额及支付方式是否正确?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 15.h, - ), - Text( - "支付方式: ${payText}", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 10.h, - ), - Text( - "支付金额: ${_displayTotal.toStringAsFixed(2)}元", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - setState(() { - Navigator.of(context).pop(); - cashierCreateOrder(index); - }); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - ///手动查询弹窗 - showPayQueryDialog(String queryDialog, String orderId) { - showDialog( - context: context, - barrierDismissible: false, - builder: (context) { - return AlertDialog( - contentPadding: EdgeInsets.all(0), - content: Container( - width: MediaQuery.of(context).size.width - 80, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - alignment: Alignment.topRight, - padding: - EdgeInsets.symmetric(horizontal: 5.w, vertical: 10.h), - child: Image.asset( - "assets/image/cancel.webp", - width: 24.h, - height: 24.h, - )), - ), - Padding( - padding: - EdgeInsets.only(bottom: 20.h, left: 14.w, right: 14.w), - child: Text( - queryDialog, - style: TextStyle( - color: Colors.black, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Padding( - padding: - EdgeInsets.only(bottom: 20.h, left: 14.w, right: 14.w), - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "请确认用户支付成功后再点击手动查询", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "\n*", - style: TextStyle( - color: Colors.blue, - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "订单查询成功后可关闭当前弹窗", - style: TextStyle( - color: Colors.blue, - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - TextSpan( - text: "*", - style: TextStyle( - color: Colors.blue, - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - manualQueryCashierOrder(orderId); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - padding: EdgeInsets.symmetric( - horizontal: 26.w, vertical: 10.h), - margin: EdgeInsets.only(right: 8.w, bottom: 20.h), - child: Text( - "手动查询", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ), - )), - ], - ), - ), - ); - }, - ); - } - - ///网络错误 - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - queryMemberPhoneInfo(widget?.arguments["phoneNum"] ?? ""); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/consumer_ranking_page.dart b/lib/business_system/home/consumer_ranking_page.dart deleted file mode 100644 index 761ef4c6..00000000 --- a/lib/business_system/home/consumer_ranking_page.dart +++ /dev/null @@ -1,642 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/balance_consumption_ranking_list.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/store_total_money_info.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; -import '../../view_widget/no_data_view.dart'; - -class ConsumerRankingPage extends StatefulWidget { - final Map arguments; - - ConsumerRankingPage({this.arguments}); - - @override - State createState() { - return _ConsumerRankingPage(); - } -} - -class _ConsumerRankingPage extends State { - String titleName; - String selectTimeDate = ""; - String selectTimeDateNum = - "${DateFormat("yyyy-MM-dd HH:mm:ss").format(DateTime.now().subtract(Duration(days: 2)))} 至 " - "${DateFormat("yyyy-MM-dd HH:mm:ss").format(DateTime.now())}"; - final TextEditingController editingController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - String networkError = ""; - int networkStatus = 0; - List records = []; - StoreTotalMoneyInfo storeTotalMoneyInfo; - int _pageNum = 1; - String total = "0"; - int _loadCount = 0; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - titleName = widget?.arguments["titleName"] ?? ""; - _onRefresh(); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - refreshController.dispose(); - _focusNode.unfocus(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - queryStoreMoney(isRefresh:false); - queryStoreTotalMoney(); - } - - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 2) { - _loadCount = 0; - EasyLoading.dismiss(); - if (refreshController.isRefresh) refreshController.refreshCompleted(); - if (mounted) setState(() {}); - } - } - - ///查询会员余额统计/消费排名 - queryStoreMoney({keyword,isRefresh = true}) async { - try { - if (isRefresh) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.storeMoney({ - "startTime": titleName == "消费排名" ? (selectTimeDate != ""?selectTimeDate.replaceAll("年", "-").replaceAll("月", "-").replaceAll("日", "").substring(0,19):selectTimeDateNum.substring(0,19)):"", - "endTime": titleName == "消费排名" ? (selectTimeDate!=""?selectTimeDate.replaceAll("年", "-").replaceAll("月", "-").replaceAll("日", "").substring(22,41):selectTimeDateNum.substring(24,43)):"", - "keyword": titleName == "消费排名" ? "" : (keyword ?? ""), - "type":titleName == "消费排名" ? 1:0, - "pageNum": _pageNum, - "pageSize": 10, - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll(baseData?.data?.records ?? []); - if ((baseData?.data?.records ?? []).isEmpty || - records.length.toString() == baseData.data.pages) - refreshController.loadNoData(); - else - refreshController.loadComplete(); - networkStatus = 1; - } - } finally { - if(isRefresh){ - setState(() {}); - EasyLoading.dismiss(); - }else - addLoadCount(); - } - } - - ///会员余额统计(总会员数,总余额数)查询/消费排名(消费会员数量,销售金额)查询 - queryStoreTotalMoney({keyword}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.storeTotalMoney({ - "startTime": titleName == "消费排名" ? selectTimeDateNum.substring(0,19):"", - "endTime": titleName == "消费排名" ? selectTimeDateNum.substring(24,43):"", - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - storeTotalMoneyInfo = baseData.data; - networkStatus = 1; - } - } finally { - addLoadCount(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: titleName, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1 - ? noNetwork() - : Container( - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: records.length == 0 ? false : true, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _pageNum = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _pageNum++; - queryStoreMoney(); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Column( - children: [ - Container( - width: double.infinity, - padding: EdgeInsets.only(bottom: 16.h), - decoration: BoxDecoration( - color: Colors.white, - ), - child: Column( - children: [ - titleName == "消费排名" - ? timeSelect() - : vipBalanceStatisticsSearch(), - titleName == "消费排名" - ? Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15.h), - child: Text( - "消费会员数量", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF0D0D0D), - ), - ), - ), - Text( - (storeTotalMoneyInfo?.paySumCount ?? 0).toString(), - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF0D0D0D), - ), - ), - ], - )), - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15.h), - child: Text( - "销售金额", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF0D0D0D), - ), - ), - ), - Text( - storeTotalMoneyInfo?.storeTotalMoney ?? "0", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF0D0D0D), - ), - ), - ], - )), - ], - ) - : Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15.h), - child: Text( - "总会员数", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF0D0D0D), - ), - ), - ), - Text( - (storeTotalMoneyInfo?.memberCount ?? 0).toString(), - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF0D0D0D), - ), - ), - ], - )), - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15.h), - child: Text( - "总余额数", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF0D0D0D), - ), - ), - ), - Text( - storeTotalMoneyInfo?.memberTotalBalance ?? "0", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF0D0D0D), - ), - ), - ], - )), - ], - ) - ], - ), - ), - Expanded(child: networkStatus == 0 - ? Container( - margin: EdgeInsets.only(bottom: 35.h,top:6.h), - child: ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: consumerRankingItemSm(), - ); - }, - )) - : ((records == null || records.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无相关数据", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : Container( - margin: EdgeInsets.only(bottom: 35.h,top:6.h), - child: ListView.builder( - itemCount: records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: consumerRankingItem( - records[position]), - ); - }, - ), - )),) - ], - ), - ), - ), - ); - } - - ///时间选择 - Widget timeSelect() { - return Container( - color: Colors.white, - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/custom_page', - arguments: {"beyondDateRange": "0"}).then((value) { - selectTimeDate = value; - queryStoreMoney(); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - margin: - EdgeInsets.only(left: 18.w, right: 18.w, top: 11.h, bottom: 17.h), - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 12.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - (selectTimeDate == "" || selectTimeDate == null) - ? "${selectTimeDateNum.substring(0,16)} 至 ${selectTimeDateNum.substring(24,40)}" - : "${selectTimeDate.replaceAll("年", "-").replaceAll("月", "-").replaceAll("日", "").substring(0,16)} 至" - " ${selectTimeDate.replaceAll("年", "-").replaceAll("月", "-").replaceAll("日", "").substring(22,38)} ", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ], - ), - ), - ), - ); - } - - /// 搜索框 - Widget vipBalanceStatisticsSearch() { - return Container( - color: Colors.white, - child: Container( - height: 40.h, - margin: - EdgeInsets.only(left: 18.w, right: 18.w, top: 12.h, bottom: 12.h), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - records.clear(); - queryStoreMoney(keyword: editingController?.text ?? ""); - }, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - controller: editingController, - decoration: InputDecoration( - hintText: "会员手机号或姓名", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.symmetric( - vertical: 12.h, - ), - prefixIcon: Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - border: InputBorder.none, - ), - ), - ), - ); - } - - ///消费排行list - Widget consumerRankingItem(Records records) { - return Container( - padding: EdgeInsets.only(top: 12.h, bottom: 12.h, left: 16.w), - margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 16.h), - child: Text( - "${records?.name ?? ""}(${records?.phone})", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF0D0D0D), - ), - ), - ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "消费:", - style: TextStyle( - color: Color(0xFF666666), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - TextSpan( - text: "¥${records?.money ?? ""}", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - ], - ), - ), - ], - ), - ); - } - - Widget consumerRankingItemSm() { - return Container( - padding: EdgeInsets.only(top: 12.h, bottom: 12.h, left: 16.w), - margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(bottom: 16.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 149.w, - height: 20.h, - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 42.w, - height: 20.h, - ), - ), Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 60.w, - height: 20.h, - ), - ), - ], - ) - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/flow_page.dart b/lib/business_system/home/flow_page.dart deleted file mode 100644 index 3e0f9726..00000000 --- a/lib/business_system/home/flow_page.dart +++ /dev/null @@ -1,488 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/day_flow_list.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; -import '../../view_widget/no_data_view.dart'; -import '../date_select/date_picker.dart'; - -class FlowPage extends StatefulWidget { - final arguments; - - FlowPage({this.arguments}); - - @override - State createState() { - return _FlowPage(); - } -} - -class _FlowPage extends State { - final RefreshController refreshController = RefreshController(); - String storeId; - BusinessApiService businessService; - List dayFlowList = []; - int _loadCount = 0; - String _datetime; - String networkError = ""; - int networkStatus = 0; - - @override - void initState() { - super.initState(); - storeId = widget.arguments["storeId"]; - _onRefresh(); - } - - _onRefresh() async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: storeId); - queryDayFlow( - _datetime == null - ? DateFormat("yyyy-MM-dd").format(DateTime.now()) - : (_datetime + "-01"), - "0", - isSing: false); - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 1) { - _loadCount = 0; - EasyLoading.dismiss(); - if (refreshController.isRefresh) refreshController.refreshCompleted(); - if (mounted) setState(() {}); - } - } - - ///今日流水/isMonth=0(当月数据),isMonth=1(当日数据) - queryDayFlow(yearMonth, isMonth, {isSing = true}) async { - if (isSing) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - try { - BaseData> baseData = - await businessService.dayFlow(yearMonth, isMonth).catchError((error) { - networkStatus = -1; - networkError = AppUtils.dioErrorTypeToString(error.type); - }); - if (baseData != null && baseData.isSuccess) { - if (isMonth == "0") { - dayFlowList = baseData.data; - } else { - dayFlowList - .firstWhere((element) => element.localDate == yearMonth) - .detailList = baseData.data; - } - networkStatus = 1; - } - } finally { - if (isSing) { - setState(() {}); - EasyLoading.dismiss(); - } else { - addLoadCount(); - } - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: widget.arguments["storeName"], - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1 ? noNetwork():SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: _onRefresh, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showDateSelector(); - }, - child: Row( - children: [ - Text( - _datetime == null - ? DateFormat("yyyy年MM月").format(DateTime.now()) - : "${_datetime.replaceAll("-", "年")}月", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - Icon( - Icons.keyboard_arrow_down, - color: Color(0xFF0D0D0D), - size: 24, - ), - ], - ), - ), - SizedBox( - height: 16.h, - ), - if(networkStatus == 1) - (dayFlowList == null || dayFlowList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - padding: EdgeInsets.zero, - itemCount: dayFlowList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: billItem(dayFlowList[position]), - ); - }, - ), - if(networkStatus == 0) - ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return billItemSm(); - }, - ) - ], - ), - ), - ), - ), - ); - } - - ///月份账单大概 - Widget billItem(DayFlowList dayFlowList) { - return Container( - padding: EdgeInsets.all(12.h), - margin: EdgeInsets.only(bottom: 12.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - ), - child: Column( - children: [ - GestureDetector( - onTap: () { - if (dayFlowList.detailList != null) { - setState(() { - dayFlowList.detailList = null; - }); - } else { - queryDayFlow(dayFlowList?.localDate ?? "", "1"); - } - }, - child: Row( - children: [ - Expanded( - child: Text( - dayFlowList?.localDate ?? "", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF0D0D0D), - ), - )), - Icon( - dayFlowList.detailList == null - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, - color: Color(0xFF0D0D0D), - size: 24, - ), - ], - ), - ), - SizedBox( - height: 15.h, - ), - Row( - children: [ - Expanded( - child: Text( - "交易金额 ${dayFlowList?.amount ?? ""}元", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF1A1A1A), - ), - )), - Text( - "共${(dayFlowList?.count ?? 0).toString()}笔", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF1A1A1A), - ), - ) - ], - ), - SizedBox( - height: 20.h, - ), - if (dayFlowList.detailList != null) - Column( - children: dayFlowList.detailList.map((e) { - return billIDetailsItem(e); - }).toList(), - ) - ], - ), - ); - } - - Widget billItemSm() { - return Container( - margin: EdgeInsets.only(bottom: 12.h), - padding: EdgeInsets.all(12), - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(6), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 50.w, - height: 20.h, - ), - ), - Spacer(), - Icon( - Icons.keyboard_arrow_down, - color: Color(0xFF0D0D0D), - size: 24, - ), - ], - ), - Padding( - padding: EdgeInsets.only( - top: 16.h, - ), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 114.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 38.w, - height: 20.h, - ), - ), - ], - )) - ], - ), - ); - } - - ///月份账单明细 - Widget billIDetailsItem(DayFlowList detailList) { - return Container( - margin: EdgeInsets.only(bottom: 20.h), - child: Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15.h), - child: Text( - detailList?.localDateTime ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF1A1A1A), - ), - ), - ), - Text( - detailList?.nickname ?? - AppUtils.phoneEncode(detailList?.phone) ?? - detailList?.storeName ?? - "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF1A1A1A), - ), - ), - ], - ), - ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: (detailList?.amount != "0.00") ? "+" : "-", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF0D0D0D), - ), - ), - TextSpan( - text: (detailList?.amount != "0.00") - ? (detailList?.amount ?? "") - : (detailList?.refundAmount ?? ""), - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF0D0D0D), - ), - ), - ], - ), - ), - ], - )); - } - - showDateSelector() async { - String dateTime = await showModalBottomSheet( - backgroundColor: Colors.transparent, - context: context, - builder: (_) { - return DatePickerWidget(); - }); - if (dateTime != null) { - _datetime = dateTime; - queryDayFlow(_datetime + "-01", "0"); - } - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/home_view/donut_auto_label_chart.dart b/lib/business_system/home/home_view/donut_auto_label_chart.dart deleted file mode 100644 index b32327df..00000000 --- a/lib/business_system/home/home_view/donut_auto_label_chart.dart +++ /dev/null @@ -1,37 +0,0 @@ -/// Donut chart with labels example. This is a simple pie chart with a hole in -/// the middle. -import 'package:charts_common/src/common/color.dart' show Color; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:charts_flutter/flutter.dart'; -import 'package:flutter/material.dart'; - -import 'my_arc_label_decorator.dart'; - -class DonutAutoLabelChart extends StatelessWidget { - final List seriesList; - final bool animate; - final List defaultLabelText; - - DonutAutoLabelChart(this.seriesList,this.defaultLabelText, {this.animate = false}); - - @override - Widget build(BuildContext context) { - return new charts.PieChart(seriesList, - animate: animate, - defaultRenderer: new charts.ArcRendererConfig( - arcWidth: 15, - strokeWidthPx: 0, - arcRendererDecorators: [ - new MyArcLabelDecorator(MediaQuery.of(context).size.width,defaultLabelText) - ])); - } -} - -/// Sample linear data type. -class LinearSales { - final int year; - final int sales; - final Color color; - - LinearSales(this.year, this.sales, this.color); -} diff --git a/lib/business_system/home/home_view/home_sideslip_dialog.dart b/lib/business_system/home/home_view/home_sideslip_dialog.dart deleted file mode 100644 index dc827438..00000000 --- a/lib/business_system/home/home_view/home_sideslip_dialog.dart +++ /dev/null @@ -1,255 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/data/business_login_info.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../view_widget/custom_image.dart'; - -class HomeSideslipDialog extends StatefulWidget { - final int selectStoreIndex; - final BusinessLoginInfo businessLoginInfo; - - HomeSideslipDialog( - this.selectStoreIndex, - this.businessLoginInfo, - ); - - @override - State createState() { - return _HomeSideslipDialog(); - } -} - -class _HomeSideslipDialog extends State - with SingleTickerProviderStateMixin { - AnimationController _animationController; - Animation _animation; - int selectIndex = 0; - final ScrollController scrollController = ScrollController(); - - @override - void initState() { - super.initState(); - _animationController = AnimationController( - duration: Duration(milliseconds: 500), - vsync: this, - ); - _animation = Tween( - begin: Offset(-1, 0), - end: Offset(0, 0), - ).animate(CurvedAnimation( - parent: _animationController, - curve: Curves.fastOutSlowIn, - )); - _animationController.forward(); - selectIndex = widget.selectStoreIndex; - if (selectIndex != 0) - Future.delayed(Duration(milliseconds: 100), () { - scrollController.jumpTo((scrollController.position.maxScrollExtent / - widget.businessLoginInfo.storeList.length) * - selectIndex); - }); - } - - @override - void dispose() { - _animationController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return SlideTransition( - position: _animation, - child: WillPopScope( - ///点击背景不收起弹窗; - onWillPop: () async { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle(statusBarColor: Colors.transparent)); - return true; - }, - child: Container( - width: double.infinity, - margin: EdgeInsets.only(right: 61.w), - height: double.infinity, - padding: EdgeInsets.only(top: 55.h), - decoration: new BoxDecoration( - color: Colors.white, - ), - child: Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.only(left: 14.w, bottom: 33.h), - child: Row( - children: [ - MImage( - widget?.businessLoginInfo?.avatar ?? "", - fit: BoxFit.cover, - width: 57.h, - height: 57.h, - radius: BorderRadius.circular(100), - errorSrc: "assets/image/default_2_1.webp", - fadeSrc: "assets/image/default_2_1.webp", - ), - SizedBox( - width: 10.w, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - widget?.businessLoginInfo - ?.storeList[widget.selectStoreIndex].name ?? - "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF1A1A1A)), - ), - SizedBox( - height: 5.h, - ), - Text( - AppUtils.phoneEncode( - widget?.businessLoginInfo?.account ?? ""), - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D)), - ), - ], - )) - ], - ), - ), - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 22.h), - child: Row( - children: [ - Image.asset( - "assets/image/bs_switch_shop.webp", - width: 24, - height: 24, - ), - SizedBox( - width: 4.w, - ), - Text( - "门店切换", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF1A1A1A)), - ), - ], - ), - ), - Expanded( - child: ListView.builder( - padding: EdgeInsets.zero, - controller: scrollController, - itemCount: widget?.businessLoginInfo?.storeList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - setState(() { - selectIndex = position; - Navigator.of(context).pop(selectIndex); - }); - }, - child: shopItem( - widget.businessLoginInfo.storeList[position], - position), - ); - }, - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - // SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( - // statusBarColor: Colors.transparent)); - SharedPreferences.getInstance().then((value) { - value.setString("account", ""); - value.setString("password", ""); - // Navigator.of(context).pop(-1); - Navigator.of(context) - .pushNamedAndRemoveUntil('/router/main_page',(route) => false,); - }); - }, - child: Container( - alignment: Alignment.center, - width: double.infinity, - padding: EdgeInsets.symmetric(vertical: 9.h), - margin: EdgeInsets.only( - left: 16.w, - right: 16.w, - bottom: (widget.businessLoginInfo.storeList.length > 20) - ? 20.h - : 103.h, - top: 20.h), - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4.w), - ), - child: Text( - S.of(context).tuichudenglu, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Colors.white), - ), - ), - ), - ], - ), - ), - ), - ), - ); - } - - ///门店选择 - Widget shopItem(StoreList storeList, index) { - return Container( - decoration: BoxDecoration( - color: selectIndex == index ? Color(0xFFF8F9FA) : Colors.transparent, - borderRadius: BorderRadius.circular(4.w), - ), - margin: EdgeInsets.only(bottom: 11.h), - padding: EdgeInsets.only(top: 5.h, bottom: 8.h, left: 16.w, right: 17.w), - child: Row( - children: [ - Expanded( - child: Text( - storeList?.name ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: selectIndex == index - ? Color(0xFF30415B) - : Color(0xFF4D4D4D)), - )), - if (selectIndex == index) - Icon( - Icons.check, - size: 20, - color: Color(0xFF4D4D4D), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/home_view/my_arc_label_decorator.dart b/lib/business_system/home/home_view/my_arc_label_decorator.dart deleted file mode 100644 index 73e43d87..00000000 --- a/lib/business_system/home/home_view/my_arc_label_decorator.dart +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright 2018 the Charts project authors. Please see the AUTHORS file -// for details. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import 'dart:math' show cos, min, sin, pi, Point, Rectangle; - -import 'package:charts_common/src/chart/cartesian/axis/spec/axis_spec.dart' - show TextStyleSpec; -import 'package:charts_common/src/chart/common/chart_canvas.dart' - show ChartCanvas; -import 'package:charts_common/src/chart/pie/arc_renderer_decorator.dart' - show ArcRendererDecorator; -import 'package:charts_common/src/chart/pie/arc_renderer_element.dart' - show ArcRendererElement, ArcRendererElementList; -import 'package:charts_common/src/common/color.dart' show Color; -import 'package:charts_common/src/common/graphics_factory.dart' - show GraphicsFactory; -import 'package:charts_common/src/common/style/style_factory.dart' - show StyleFactory; -import 'package:charts_common/src/common/text_element.dart' - show MaxWidthStrategy, TextDirection, TextElement; -import 'package:charts_common/src/common/text_style.dart' show TextStyle; -import 'package:charts_common/src/data/series.dart' show AccessorFn; -import 'package:meta/meta.dart' show immutable, protected; - -/// Renders labels for arc renderers. -/// -/// This decorator performs very basic label collision detection. If the y -/// position of a label positioned outside collides with the previously drawn -/// label (on the same side of the chart), then that label will be skipped. -class MyArcLabelDecorator extends ArcRendererDecorator { - // Default configuration - static const _defaultLabelPosition = ArcLabelPosition.auto; - static const _defaultLabelPadding = 5; - static final _defaultInsideLabelStyle = - TextStyleSpec(fontSize: 12, color: Color.white); - static final _defaultLineColors = [ - Color.fromHex(code: "#21CCFF"), - Color.fromHex(code: "#313CA9") - ]; - // static final _defaultLabelText = ["收款(0.00%)", "退款(0.00%)"]; - static final _defaultOutsideLabelStyle = - TextStyleSpec(fontSize: 14, color: Color.fromHex(code: "#333333"),); - static final _defaultTextLabelStyle = - TextStyleSpec(fontSize: 10, color: Color.fromHex(code: "#999999")); - static final _defaultLeaderLineStyle = ArcLabelLeaderLineStyleSpec( - length: 15.0, - thickness: 1.0, - color: StyleFactory.style.arcLabelOutsideLeaderLine); - static const _defaultShowLeaderLines = true; - - /// Configures [TextStyleSpec] for labels placed inside the arcs. - final TextStyleSpec insideLabelStyleSpec; - - /// Configures [TextStyleSpec] for labels placed outside the arcs. - final TextStyleSpec outsideLabelStyleSpec; - - /// Configures [ArcLabelLeaderLineStyleSpec] for leader lines for labels - /// placed outside the arcs. - final ArcLabelLeaderLineStyleSpec leaderLineStyleSpec; - - /// Configures where to place the label relative to the arcs. - final ArcLabelPosition labelPosition; - - /// Space before and after the label text. - final int labelPadding; - - /// Whether or not to draw leader lines for labels placed outside the arcs. - final bool showLeaderLines; - - /// Render the labels on top of series data. - @override - final bool renderAbove = true; - - /// fields for collision detection. - num _previousOutsideLabelY; - bool _previousLabelLeftOfChart; - - final double mediaQueryWidth; - - final List defaultLabelText; - - MyArcLabelDecorator(this.mediaQueryWidth, - this.defaultLabelText, - {TextStyleSpec insideLabelStyleSpec, - TextStyleSpec outsideLabelStyleSpec, - ArcLabelLeaderLineStyleSpec leaderLineStyleSpec, - this.labelPosition = _defaultLabelPosition, - this.labelPadding = _defaultLabelPadding, - this.showLeaderLines = _defaultShowLeaderLines, - Color leaderLineColor}) - : insideLabelStyleSpec = insideLabelStyleSpec ?? _defaultInsideLabelStyle, - outsideLabelStyleSpec = - outsideLabelStyleSpec ?? _defaultOutsideLabelStyle, - leaderLineStyleSpec = leaderLineStyleSpec ?? _defaultLeaderLineStyle; - - @override - void decorate(List> arcElementsList, - ChartCanvas canvas, GraphicsFactory graphicsFactory, - {Rectangle drawBounds, - double animationPercent, - bool rtl = false}) { - // Only decorate the arcs when animation is at 100%. - if (animationPercent != 1.0) { - return; - } - - // Create [TextStyle] from [TextStyleSpec] to be used by all the elements. - // The [GraphicsFactory] is needed so it can't be created earlier. - final insideLabelStyle = - _getTextStyle(graphicsFactory, insideLabelStyleSpec); - final outsideLabelStyle = - _getTextStyle(graphicsFactory, outsideLabelStyleSpec); - final textLabelStyle = - _getTextStyle(graphicsFactory, _defaultTextLabelStyle); - - // Track the Y position of the previous outside label for collision - // detection purposes. - int i = 0; - for (var arcElements in arcElementsList) { - _previousOutsideLabelY = null; - _previousLabelLeftOfChart = null; - - for (var element in arcElements.arcs) { - final labelFn = element.series.labelAccessorFn; - final datumIndex = element.index; - final label = (labelFn != null) ? labelFn(datumIndex) : null; - - // If there are custom styles, use that instead of the default or the - // style defined for the entire decorator. - final datumInsideLabelStyle = _getDatumStyle( - element.series.insideLabelStyleAccessorFn, - datumIndex, - graphicsFactory, - defaultStyle: insideLabelStyle); - final datumOutsideLabelStyle = _getDatumStyle( - element.series.outsideLabelStyleAccessorFn, - datumIndex, - graphicsFactory, - defaultStyle: outsideLabelStyle); - final datumTextLabelStyle = _getDatumStyle( - element.series.outsideLabelStyleAccessorFn, - datumIndex, - graphicsFactory, - defaultStyle: textLabelStyle); - - // Skip calculation and drawing for this element if no label. - if (label == null || label.isEmpty) { - continue; - } - - final arcAngle = element.endAngle - element.startAngle; - - final centerAngle = element.startAngle + (arcAngle / 2); - - final centerRadius = arcElements.innerRadius + - ((arcElements.radius - arcElements.innerRadius) / 2); - - final outerPoint = Point( - arcElements.center.x + arcElements.radius * cos(centerAngle), - arcElements.center.y + arcElements.radius * sin(centerAngle)); - - final bounds = - Rectangle.fromPoints(arcElements.center, outerPoint); - - // Get space available inside and outside the arc. - final totalPadding = labelPadding * 2; - final insideArcWidth = min( - (((arcAngle * 180 / pi) / 360) * (2 * pi * centerRadius)) - .round(), - (arcElements.radius - arcElements.innerRadius) - labelPadding) - .round(); - - final leaderLineLength = - showLeaderLines ? leaderLineStyleSpec.length : 0; - - final outsideArcWidth = ((mediaQueryWidth / 2) - - bounds.width - - totalPadding - - // Half of the leader line is drawn inside the arc - leaderLineLength / 2) - .round(); - - final labelElement = graphicsFactory.createTextElement(label) - ..maxWidthStrategy = MaxWidthStrategy.ellipsize; - - final labelTextElement = graphicsFactory - .createTextElement(defaultLabelText[i]) - ..maxWidthStrategy = MaxWidthStrategy.ellipsize; - - var calculatedLabelPosition = calculateLabelPosition( - labelElement, - datumInsideLabelStyle, - insideArcWidth, - outsideArcWidth, - element, - labelPosition); - - // Set the max width and text style. - if (calculatedLabelPosition == ArcLabelPosition.inside) { - labelElement.textStyle = datumInsideLabelStyle; - labelElement.maxWidth = insideArcWidth; - } else { - // calculatedLabelPosition == LabelPosition.outside - labelElement.textStyle = datumOutsideLabelStyle; - labelElement.maxWidth = outsideArcWidth; - labelTextElement.maxWidth = outsideArcWidth; - } - labelTextElement.textStyle = datumTextLabelStyle; - - // Only calculate and draw label if there's actually space for the - // label. - if (labelElement.maxWidth > 0) { - // Calculate the start position of label based on [labelAnchor]. - if (calculatedLabelPosition == ArcLabelPosition.inside) { - _drawInsideLabel(canvas, arcElements, labelElement, centerAngle); - } else { - final l = _drawOutsideLabel( - canvas, - drawBounds, - arcElements, - labelElement, - labelTextElement, - centerAngle, - _defaultLineColors[i]); - i += 1; - - if (l != null) { - updateCollisionDetectionParams(l); - } - } - } - } - } - } - - @protected - ArcLabelPosition calculateLabelPosition( - TextElement labelElement, - TextStyle labelStyle, - int insideArcWidth, - int outsideArcWidth, - ArcRendererElement arcRendererelement, - ArcLabelPosition labelPosition) { - if (labelPosition == ArcLabelPosition.auto) { - // For auto, first try to fit the text inside the arc. - labelElement.textStyle = labelStyle; - - // A label fits if the space inside the arc is >= outside arc or if the - // length of the text fits and the space. This is because if the arc has - // more space than the outside, it makes more sense to place the label - // inside the arc, even if the entire label does not fit. - return (insideArcWidth >= outsideArcWidth || - labelElement.measurement.horizontalSliceWidth < insideArcWidth) - ? ArcLabelPosition.inside - : ArcLabelPosition.outside; - } else { - return labelPosition; - } - } - - /// Helper function that converts [TextStyleSpec] to [TextStyle]. - TextStyle _getTextStyle( - GraphicsFactory graphicsFactory, TextStyleSpec labelSpec) { - return graphicsFactory.createTextPaint() - ..color = labelSpec.color ?? Color.black - ..fontFamily = labelSpec.fontFamily - ..fontSize = labelSpec.fontSize ?? 12 - ..lineHeight = labelSpec.lineHeight; - } - - /// Helper function to get datum specific style - TextStyle _getDatumStyle(AccessorFn labelFn, int datumIndex, - GraphicsFactory graphicsFactory, - {TextStyle defaultStyle}) { - final styleSpec = (labelFn != null) ? labelFn(datumIndex) : null; - return (styleSpec != null) - ? _getTextStyle(graphicsFactory, styleSpec) - : defaultStyle; - } - - /// Draws a label inside of an arc. - void _drawInsideLabel( - ChartCanvas canvas, - ArcRendererElementList arcElements, - TextElement labelElement, - double centerAngle) { - // Center the label inside the arc. - final labelRadius = arcElements.innerRadius + - (arcElements.radius - arcElements.innerRadius) / 2; - - final labelX = - (arcElements.center.x + labelRadius * cos(centerAngle)).round(); - - final labelY = (arcElements.center.y + - labelRadius * sin(centerAngle) - - insideLabelStyleSpec.fontSize / 2) - .round(); - - labelElement.textDirection = TextDirection.center; - - canvas.drawText(labelElement, labelX, labelY); - } - - @protected - void updateCollisionDetectionParams(List params) { - // List destructuring. - _previousLabelLeftOfChart = params[0] as bool; - _previousOutsideLabelY = params[1] as int; - } - - double getLabelRadius(ArcRendererElementList arcElements) => - arcElements.radius + leaderLineStyleSpec.length / 2; - - /// Draws a label outside of an arc. - List _drawOutsideLabel( - ChartCanvas canvas, - Rectangle drawBounds, - ArcRendererElementList arcElements, - TextElement labelElement, - TextElement labelTextElement, - double centerAngle, - Color color) { - final labelRadius = getLabelRadius(arcElements); - - final labelPoint = Point( - arcElements.center.x + labelRadius * cos(centerAngle), - arcElements.center.y + labelRadius * sin(centerAngle)); - - // Use the label's chart quandrant to determine whether it's rendered to the - // right or left. - final centerAbs = centerAngle.abs() % (2 * pi); - final labelLeftOfChart = pi / 2 < centerAbs && centerAbs < pi * 3 / 2; - - // Shift the label horizontally away from the center of the chart. - var labelX = labelLeftOfChart - ? (labelPoint.x - labelPadding).round() - : (labelPoint.x + labelPadding).round(); - - // Shift the label up by the size of the font. - final labelY = (labelPoint.y - outsideLabelStyleSpec.fontSize / 2).round(); - - // Outside labels should flow away from the center of the chart - labelElement.textDirection = - labelLeftOfChart ? TextDirection.rtl : TextDirection.ltr; - labelTextElement.textDirection = labelElement.textDirection; - - // Skip this label if it collides with the previously drawn label. - if (detectOutsideLabelCollision(labelY, labelLeftOfChart, - _previousOutsideLabelY, _previousLabelLeftOfChart)) { - return null; - } - - if (showLeaderLines) { - final tailX = _drawLeaderLine(canvas, labelLeftOfChart, labelPoint, - arcElements.radius, arcElements.center, centerAngle, color); - - // Shift the label horizontally by the length of the leader line. - labelX = (labelX + tailX).round(); - - labelElement.maxWidth = (labelElement.maxWidth - tailX.abs()).round(); - } - - canvas.drawText(labelElement, labelX, labelY); - - canvas.drawText(labelTextElement, labelX, labelY + 18); - - // Return a structured list of values. - return [labelLeftOfChart, labelY]; - } - - /// Detects whether the current outside label collides with the previous label. - @protected - bool detectOutsideLabelCollision(num labelY, bool labelLeftOfChart, - num previousOutsideLabelY, bool previousLabelLeftOfChart) { - var collides = false; - - // Given that labels are vertically centered, we can assume they will - // collide if the current label's Y coordinate +/- the font size - // crosses past the Y coordinate of the previous label drawn on the - // same side of the chart. - if (previousOutsideLabelY != null && - labelLeftOfChart == previousLabelLeftOfChart) { - if (labelY > previousOutsideLabelY) { - if (labelY - outsideLabelStyleSpec.fontSize <= previousOutsideLabelY) { - collides = true; - } - } else { - if (labelY + outsideLabelStyleSpec.fontSize >= previousOutsideLabelY) { - collides = true; - } - } - } - - return collides; - } - - /// Draws a leader line for the current arc. - double _drawLeaderLine( - ChartCanvas canvas, - bool labelLeftOfChart, - Point labelPoint, - double radius, - Point arcCenterPoint, - double centerAngle, - Color color) { - final tailX = (labelLeftOfChart ? -1 : 1) * leaderLineStyleSpec.length; - - final leaderLineTailPoint = - Point(labelPoint.x + tailX, labelPoint.y); - - final centerRadius = radius - leaderLineStyleSpec.length / 2; - final leaderLineStartPoint = Point( - arcCenterPoint.x + centerRadius * cos(centerAngle), - arcCenterPoint.y + centerRadius * sin(centerAngle)); - - canvas.drawLine(points: [ - leaderLineStartPoint, - labelPoint, - leaderLineTailPoint, - ], stroke: color, strokeWidthPx: leaderLineStyleSpec.thickness); - - return tailX; - } -} - -/// Configures where to place the label relative to the arcs. -enum ArcLabelPosition { - /// Automatically try to place the label inside the arc first and place it on - /// the outside of the space available outside the arc is greater than space - /// available inside the arc. - auto, - - /// Always place label on the outside. - outside, - - /// Always place label on the inside. - inside -} - -/// Style configuration for leader lines. -@immutable -class ArcLabelLeaderLineStyleSpec { - final Color color; - final double length; - final double thickness; - - ArcLabelLeaderLineStyleSpec({ - this.color, - this.length, - this.thickness, - }); - - @override - bool operator ==(Object other) { - return other is ArcLabelLeaderLineStyleSpec && - color == other.color && - thickness == other.thickness && - length == other.length; - } - - @override - int get hashCode { - var hashcode = color.hashCode; - hashcode = (hashcode * 37) + thickness.hashCode; - hashcode = (hashcode * 37) + length.hashCode; - return hashcode; - } -} diff --git a/lib/business_system/home/home_view/my_line_chart.dart b/lib/business_system/home/home_view/my_line_chart.dart deleted file mode 100644 index a44eebcf..00000000 --- a/lib/business_system/home/home_view/my_line_chart.dart +++ /dev/null @@ -1,272 +0,0 @@ -import 'package:fl_chart/fl_chart.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; - -class LineChartSample2 extends StatefulWidget { - final List lineChartSample2Data; - final String tipName; - - LineChartSample2(this.lineChartSample2Data, this.tipName, {Key key}) - : super(key: key); - - @override - State createState() => _LineChartSample2State(); -} - -class _LineChartSample2State extends State { - @override - Widget build(BuildContext context) { - return AspectRatio( - aspectRatio: 1.70, - child: LineChart( - mainData(), - swapAnimationDuration: Duration(milliseconds: 500), - swapAnimationCurve: Curves.decelerate, - ), - ); - } - - Widget bottomTitleWidgets(double value, TitleMeta meta) { - if ((meta.appliedInterval <= 1 && - double.parse(meta.formattedValue) % 1 != 0) || - (meta.appliedInterval > 1 && - double.parse(meta.formattedValue) % meta.appliedInterval != 0)) - return Text(""); - String text = - widget.lineChartSample2Data[int.parse(meta.formattedValue)].time ?? ""; - if (text.length == 10) - text = text.substring(5, 10); - else if (text.length == 7) text = text.substring(2, 7); - return SideTitleWidget( - axisSide: meta.axisSide, - child: Text(text, - style: const TextStyle( - fontWeight: MyFontWeight.light, - fontSize: 10, - color: Color(0xFF999999))), - ); - } - - static double processDouble(double input) { - if (input < 10) return 10; - String inputString = input.toInt().toString().substring(1); - String outputString = ""; - bool flag = false; - for (int i = 0; i < inputString.length; i++) { - if (inputString[i] != "0") flag = true; - outputString += "0"; - } - if (flag) - outputString = - (int.parse(input.toString().substring(0, 1)) + 1).toString() + - outputString; - else - outputString = input.toString().substring(0, 1) + outputString; - return double.parse(outputString); - } - - Widget leftTitleWidgets(double value, TitleMeta meta) { - String text; - if (value >= 1000000000) { - text = '${value ~/ 1000000000}B'; - } else if (value >= 1000000) { - text = '${value ~/ 1000000}M'; - } else if (value >= 1000) { - text = '${value ~/ 1000}K'; - } else { - text = value.toInt().toString(); - } - return Padding( - padding: EdgeInsets.only(right: 2.w), - child: Text(text, - style: const TextStyle( - fontWeight: MyFontWeight.light, - fontSize: 10, - color: Color(0xFF999999)), - textAlign: TextAlign.right), - ); - } - - LineChartData mainData() { - return LineChartData( - gridData: FlGridData( - show: true, - getDrawingHorizontalLine: (value) { - return FlLine( - color: Color(0xFFEBEBEB), - strokeWidth: 1, - ); - }, - getDrawingVerticalLine: (value) { - return FlLine( - color: Colors.transparent, - strokeWidth: 1, - ); - }, - ), - titlesData: FlTitlesData( - show: true, - rightTitles: AxisTitles( - sideTitles: SideTitles(showTitles: false), - ), - topTitles: AxisTitles( - sideTitles: SideTitles(showTitles: false), - ), - bottomTitles: AxisTitles( - sideTitles: SideTitles( - showTitles: true, - getTitlesWidget: bottomTitleWidgets, - ), - ), - leftTitles: AxisTitles( - sideTitles: SideTitles( - showTitles: true, - getTitlesWidget: leftTitleWidgets, - ), - ), - ), - borderData: FlBorderData( - show: true, - border: Border( - bottom: BorderSide( - color: Color(0xFF165DFF), - width: 1, - ), - top: BorderSide( - color: Color(0xFFEBEBEB), - width: 1, - ), - //表格左边线 - // left: BorderSide( - // color: Color(0xFFCBCBCB), - // width: 1, - // ), - ), - ), - minY: 0, - maxY: processDouble(widget.lineChartSample2Data - .map((e) => e.price ?? 0) - .reduce((value, element) => value > element ? value : element)), - lineTouchData: LineTouchData( - enabled: true, - getTouchedSpotIndicator: (barData, spotIndexes) { - return spotIndexes.map((spotIndex) { - return TouchedSpotIndicatorData( - FlLine( - color: Color(0xFF165DFF), - strokeWidth: 1, - dashArray: [2, 4], - ), - FlDotData( - show: true, - getDotPainter: (spot, percent, barData, index) { - return FlDotCirclePainter( - radius: 3, - color: Colors.white, - strokeWidth: 2.w, - strokeColor: Color(0xFF165DFF), - ); - }, - ), - ); - }).toList(); - }, - touchTooltipData: LineTouchTooltipData( - tooltipBgColor: Color(0xFF3D3D3D), - tooltipPadding: - const EdgeInsets.symmetric(vertical: 5, horizontal: 6), - tooltipMargin: 5, - tooltipRoundedRadius: 2, - tooltipHorizontalAlignment: FLHorizontalAlignment.center, - tooltipHorizontalOffset: -13, - getTooltipItems: (touchedSpots) { - return touchedSpots.map((LineBarSpot touchedSpot) { - return LineTooltipItem( - '${(widget.lineChartSample2Data[touchedSpot.x.toInt()].time ?? "").length >= 10 ? - (widget.lineChartSample2Data[touchedSpot.x.toInt()].time ?? "").substring(5, 10) : (widget.lineChartSample2Data[touchedSpot.x.toInt()].time ?? "")}', - const TextStyle( - color: Colors.white, - fontWeight: MyFontWeight.light, - fontSize: 10), - textAlign: TextAlign.start, - children: [ - TextSpan( - text: '\n${widget?.tipName ?? ""}: ', - style: const TextStyle( - color: Colors.white, - fontWeight: MyFontWeight.medium, - fontSize: 10), - ), - TextSpan( - text: '${AppUtils.calculateDouble(touchedSpot.y)}', - style: const TextStyle( - color: Color(0xFFFFC163), - fontWeight: MyFontWeight.light, - fontSize: 10), - ), - ], - ); - }).toList(); - }, - ), - ), - lineBarsData: [ - LineChartBarData( - spots: widget.lineChartSample2Data - .map((e) => FlSpot(e.index ?? 0, e.price ?? 0)) - .toList(), - isCurved: false, - color: Color(0xFF165DFF), - barWidth: 2.5, - dotData: FlDotData( - show: false, - getDotPainter: (spot, percent, barData, index) { - return FlDotCirclePainter( - radius: 3, - color: Color(0xFF165DFF), - strokeWidth: 0, - ); - }, - ), - belowBarData: BarAreaData( - show: true, - gradient: LinearGradient( - colors: [Color(0x33165DFF), Color(0x00165DFF)], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - ), - ], - ); - } -} - -class LineChartSample2Data { - double _index; - double _price; - String _time; - - LineChartSample2Data(this._index, this._price, this._time); - - double get index => _index; - - set index(double value) { - _index = value; - } - - double get price => _price; - - set price(double value) { - _price = value; - } - - String get time => _time; - - set time(String value) { - _time = value; - } -} diff --git a/lib/business_system/home/hot _selling_page.dart b/lib/business_system/home/hot _selling_page.dart deleted file mode 100644 index 3ec7e2d0..00000000 --- a/lib/business_system/home/hot _selling_page.dart +++ /dev/null @@ -1,53 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; - -import '../../../retrofit/business_api.dart'; -import 'overview/trade_goods.dart'; - -class HotSellingPage extends StatefulWidget { - final Map arguments; - - HotSellingPage({this.arguments}); - - @override - State createState() { - return _HotSellingPage(); - } -} - -class _HotSellingPage extends State { - BusinessApiService businessService; - - @override - void initState() { - super.initState(); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Colors.white, - appBar: MyAppBar( - title: "热销榜单", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: TradeGoods(widget.arguments["storeId"],"热销榜单"), - ), - ); - } -} diff --git a/lib/business_system/home/overview/trade_goods.dart b/lib/business_system/home/overview/trade_goods.dart deleted file mode 100644 index 61af791f..00000000 --- a/lib/business_system/home/overview/trade_goods.dart +++ /dev/null @@ -1,1150 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/goods_type_sales_list.dart'; -import '../../../retrofit/data/single_sales_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; - -class TradeGoods extends StatefulWidget { - final storeId; - final titleName; - - TradeGoods(this.storeId,this.titleName); - - @override - State createState() { - return _TradeGoods(); - } -} - -class _TradeGoods extends State { - final RefreshController _refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - int dateIndex = 0; - String selectedDate = ""; - String dayDate = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - String weekDate = ""; - String weekDateNum = - "${DateFormat("yyyy年MM月dd日").format(DateTime.now().subtract(Duration(days: 6)))} 至 " - "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - String monthlyDate = ""; - String monthlyDateNum = "${DateFormat("yyyy年MM月dd").format(DateTime.now())}"; - String customDate = ""; - String customDateNum = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - int _loadCount = 0; - BusinessApiService businessService; - List singleSalesList = []; - List goodsTypeSalesList = []; - String networkError = ""; - int networkStatus = 0; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({isLoading = true}) async { - if(isLoading) - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - if (dateIndex == 0) { - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - isSing: false); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - isSing: false); - } else if (dateIndex == 1) { - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23), - isSing: false); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23), - isSing: false); - } else if (dateIndex == 2) { - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "", - isSing: false); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "", - isSing: false); - } else if (dateIndex == 3) { - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(timeDate().length <= 15 ? 0 : 12, - timeDate().length <= 15 ? 10 : 23), - isSing: false); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(timeDate().length <= 15 ? 0 : 12, - timeDate().length <= 15 ? 10 : 23), - isSing: false); - } - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 2) { - _loadCount = 0; - EasyLoading.dismiss(); - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - if (mounted) setState(() {}); - } - } - - ///商品种类销售数据 - queryGoodsSalesList(date, endDat, {isSing = true}) async { - if (isSing) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - try { - BaseData> baseData = - await businessService.goodsSalesList({ - "date": date, - "endDate": endDat, - "groupId": 0, - "orderBy": 1, - "searchType": 2, - "type": 1 - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - }); - if (baseData != null && baseData.isSuccess) { - goodsTypeSalesList = baseData.data; - networkStatus = 1; - } - } finally { - if (isSing) { - setState(() {}); - EasyLoading.dismiss(); - } else { - addLoadCount(); - } - } - } - - ///单品销量报表 - querySingleSales(date, endDate, {isSing = true}) async { - if (isSing) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - try { - BaseData> baseData = - await businessService.singleSales({ - "date": date, - "endDate": endDate, - "groupId": 0, - "orderBy": 1, - "searchType": 2, - "type": 1 - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - singleSalesList = baseData.data; - } - } finally { - if (isSing) { - setState(() {}); - EasyLoading.dismiss(); - } else { - addLoadCount(); - } - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - body: Column( - children: [ - if(widget.titleName != "热销榜单") - Container( - color: Color(0xFFD8D8D8), - width: double.infinity, - height: 1.h, - ), - Expanded( - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - scrollController: scrollController, - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh:(){ - _onRefresh(isLoading: false); - }, - child: networkStatus == -1 ? noNetwork() : SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.circular(2), - border: - Border.all(color: Color(0xFFCFD0D1), width: 1.w), - ), - margin: EdgeInsets.only( - top: 16.h, right: 20.w, left: 20.w, bottom: 12.h), - child: Row( - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 0; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10)); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10)); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 0 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "日报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 0 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 1; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23)); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23)); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 1 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "周报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 1 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 2; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - ""); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - ""); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 2 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "月报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 2 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 3; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring( - timeDate().length <= 15 ? 0 : 12, - timeDate().length <= 15 ? 10 : 23)); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring( - timeDate().length <= 15 ? 0 : 12, - timeDate().length <= 15 ? 10 : 23)); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 3 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "自定义", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 3 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - ], - ), - ), - Align( - alignment: Alignment.center, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (dateIndex == 0) { - Navigator.of(context) - .pushNamed('/router/day_report_page') - .then((value) { - selectedDate = value; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10)); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10)); - }); - } else if (dateIndex == 1) { - Navigator.of(context) - .pushNamed('/router/week_report_page') - .then((value) { - weekDate = value; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23)); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23)); - }); - } else if (dateIndex == 2) { - Navigator.of(context) - .pushNamed('/router/monthly_report_page') - .then((value) { - monthlyDate = value; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10)); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10)); - }); - } else if (dateIndex == 3) { - Navigator.of(context) - .pushNamed('/router/custom_page',arguments: {"beyondDateRange": "0"}) - .then((value) { - customDate = value; - querySingleSales( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23)); - queryGoodsSalesList( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(12, 23)); - }); - } - }, - child: Container( - width: 200.w, - alignment: Alignment.center, - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only(bottom: 16.h), - child: Row( - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - child: Text( - dateIndex == 2 - ? ((monthlyDateNum.substring(0, 8) == - timeDate().substring(0, 8)) - ? "${timeDate().substring(0, 8)}(当月)" - : timeDate().substring(0, 8)) - : timeDate(), - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Colors.black, - ), - ), - )), - Image.asset( - "assets/image/bs_calendar_logo.webp", - width: 15, - height: 15, - ), - ], - ), - ), - ), - ), - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 15.h), - child: Text( - "商品分析", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.semi_bold, - color: Colors.black, - ), - )), - goodsTypeRecord(), - Container( - margin: - EdgeInsets.only(top: 14.h, left: 16.w, right: 16.w), - color: Color(0xFFECECEC), - height: 1.h, - width: double.infinity, - ), - singleSalesStatement(), - ], - )), - ), - ) - ], - ), - ); - } - - String timeDate() { - if (dateIndex == 0) { - return (selectedDate == "" || selectedDate == null) - ? "${dayDate ?? ""}(今日)" - : (dayDate == - DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate)) - ? "${DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))}(今日)" - : DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))); - } else if (dateIndex == 1) { - return (weekDate == "" || weekDate == null) ? weekDateNum : weekDate; - } else if (dateIndex == 2) { - return (monthlyDate == "" || monthlyDate == null) - ? "${monthlyDateNum ?? ""}" - : (monthlyDateNum == - (DateFormat("yyyy年MM月dd日") - .format(DateTime.parse(monthlyDate))) - ? "${(DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)))}" - : DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate))); - } else if (dateIndex == 3) { - return (customDate == "" || customDate == null) - ? "${customDateNum ?? ""}(今日)" - : ("${customDate.substring(0,11)} ""${customDate.substring(21,34)}"); - } - } - - ///商品种类销售数据 - Widget goodsTypeRecord() { - return Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 19.h), - child: Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Text( - "商品种类销售数据", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - SizedBox( - width: 8.w, - ), - Text( - "比上周一同时段", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF666666), - ), - ) - ], - )), - Container( - margin: EdgeInsets.symmetric(horizontal: 16.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(2), - border: Border.all( - color: Color(0xFFD6D6D6), - width: 1, - ), - ), - child: Column( - children: [ - Container( - color: Color(0xFFF3F7FF), - padding: EdgeInsets.only( - top: 7.h, left: 11.w, right: 24.w, bottom: 8.h), - child: Row( - children: [ - Expanded( - child: Text( - "分类", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF969799), - ), - ), - ), - Text( - "销售额", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF969799), - ), - ), - ], - ), - ), - if(networkStatus == 1) - (goodsTypeSalesList == null || goodsTypeSalesList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : Container( - height: 220.h, - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: goodsTypeSalesList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: goodsTypeItem( - goodsTypeSalesList[position], position), - ); - }, - ), - ), - if(networkStatus == 0) - ListView.builder( - padding: EdgeInsets.zero, - itemCount: 9, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return goodsTypeItemSm(position); - }, - ) - ], - ), - ), - ], - ); - } - - Widget goodsTypeItem(GoodsTypeSalesList goodsTypeSalesList, int index) { - return Container( - color: index % 2 == 0 ? Color(0xFFF9FAF8) : Colors.white, - padding: EdgeInsets.only(top: 8.h, left: 11.w, right: 24.w, bottom: 7.h), - child: Row( - children: [ - Expanded( - child: Text( - goodsTypeSalesList?.name ?? "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ), - Text( - goodsTypeSalesList?.value ?? "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ], - ), - ); - } - - Widget goodsTypeItemSm(index) { - return Container( - margin: EdgeInsets.only(bottom: 12.h), - padding: EdgeInsets.only(top: 8.h, left: 11.w, right: 24.w, bottom: 7.h), - width: double.infinity, - decoration: BoxDecoration( - color: index % 2 == 0 ? Color(0xFFF9FAF8) : Colors.white, - borderRadius: BorderRadius.circular(6), - ), - child: - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 50.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 50.w, - height: 20.h, - ), - ), - ], - ), - ); - } - - ///单品销量报表 - Widget singleSalesStatement() { - return Container( - padding: EdgeInsets.only(top: 23.h, bottom: 45.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 15.h), - child: Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Text( - "单品销量报表", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - SizedBox( - width: 8.w, - ), - Text( - "比上周一同时段", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF666666), - ), - ) - ], - )), - Container( - margin: EdgeInsets.symmetric(horizontal: 16.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(2), - border: Border.all( - color: Color(0xFFD6D6D6), - width: 1, - ), - ), - child: Column( - children: [ - Container( - color: Color(0xFFF3F7FF), - padding: EdgeInsets.only(top: 7.h, left: 17.w, bottom: 8.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "分类", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF969799), - ), - ), - flex: 2, - ), - Expanded( - child: Text( - "名称", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF969799), - ), - ), - flex: 2, - ), - Expanded( - child: Text( - "销售额", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF969799), - ), - ), - ), - Expanded( - child: Text( - "单价", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF969799), - ), - ), - ), - Expanded( - child: Text( - "销量", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF969799), - ), - ), - ), - ], - ), - ), - (singleSalesList == null || singleSalesList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - margin: EdgeInsets.all(20), - ) - : Container( - height: 243.h, - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: singleSalesList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: singleSalesItem( - singleSalesList[position], position), - ); - }, - ), - ) - ], - ), - ), - ], - ), - ); - } - - Widget singleSalesItem(SingleSalesList singleSalesList, int index) { - return Container( - color: index % 2 == 0 ? Color(0xFFF9FAF8) : Colors.white, - padding: EdgeInsets.only(top: 8.h, left: 16.w, bottom: 7.h), - child: Row( - children: [ - Expanded( - child: Text( - singleSalesList?.productGroupName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - flex: 2, - ), - Expanded( - child: Text( - singleSalesList?.productName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - flex: 2, - ), - Expanded( - child: Text( - singleSalesList?.sumPrice ?? "", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ), - Expanded( - child: Text( - singleSalesList?.sellPrict ?? "", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ), - Expanded( - child: Text( - (singleSalesList?.saleNum ?? 0).toString(), - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - ), - ), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/overview/trade_order.dart b/lib/business_system/home/overview/trade_order.dart deleted file mode 100644 index bd8a656a..00000000 --- a/lib/business_system/home/overview/trade_order.dart +++ /dev/null @@ -1,699 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/trade_summary_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../home_view/my_line_chart.dart'; - -class TradeOrder extends StatefulWidget { - final storeId; - - TradeOrder(this.storeId); - - @override - State createState() { - return _TradeOrder(); - } -} - -class _TradeOrder extends State { - final RefreshController _refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - List lineChartSample2DataOrderAmount = [ - LineChartSample2Data(0, 0, "2023-03-09"), - LineChartSample2Data(1, 0, "2023-03-10"), - LineChartSample2Data(2, 0, "2023-03-11"), - LineChartSample2Data(3, 0, "2023-03-12"), - LineChartSample2Data(4, 0, "2023-03-13"), - LineChartSample2Data(5, 0, "2023-03-14"), - LineChartSample2Data(6, 0, "2023-03-15") - ]; - List lineChartSample2DataOrderNum = [ - LineChartSample2Data(0, 0, "2023-03-09"), - LineChartSample2Data(1, 0, "2023-03-10"), - LineChartSample2Data(2, 0, "2023-03-11"), - LineChartSample2Data(3, 0, "2023-03-12"), - LineChartSample2Data(4, 0, "2023-03-13"), - LineChartSample2Data(5, 0, "2023-03-14"), - LineChartSample2Data(6, 0, "2023-03-15") - ]; - - int dateIndex = 0; - String selectedDate = ""; - String dayDate = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - String weekDate = ""; - String weekDateNum = - "${DateFormat("yyyy年MM月dd日").format(DateTime.now().subtract(Duration(days: 6)))} 至 " - "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - String monthlyDate = ""; - String monthlyDateNum = "${DateFormat("yyyy年MM月dd").format(DateTime(DateTime.now().year, DateTime.now().month, 1))}" - "${DateFormat("yyyy年MM月dd").format(DateTime(DateTime.now().year, DateTime.now().month + 1, 0))}"; - String customDate = ""; - String customDateNum = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - int _loadCount = 0; - BusinessApiService businessService; - TradeSummaryList tradeSummaryList; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({isLoading = true}) async { - if(isLoading) - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - if (dateIndex == 0) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "day", - isSing: false); - } else if (dateIndex == 1) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom", - isSing: false); - } else if (dateIndex == 2) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(10, 20), - "month", - isSing: false); - } else if (dateIndex == 3) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(timeDate().length <= 15 ? 0 : 13, - timeDate().length <= 15 ? 10 : 23), - "custom", - isSing: false); - } - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 1) { - _loadCount = 0; - EasyLoading.dismiss(); - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - if (mounted) setState(() {}); - } - } - - ///订单分析/订单量趋势 - queryBusinessAnalysis(selectDay, selectEndDay, queryRange, - {isSing = true}) async { - if (isSing) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - try { - BaseData baseData = await businessService - .saleBusinessAnalysis({ - "selectDay": selectDay, - "selectEndDay": selectEndDay, - "queryRange": queryRange - }).catchError((error) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), - alignment: Alignment.center); - }); - if (baseData != null && baseData.isSuccess) { - int forIndex = 0; - lineChartSample2DataOrderAmount.clear(); - lineChartSample2DataOrderNum.clear(); - tradeSummaryList = baseData.data; - if (queryRange != "day") { - DateTime startDate = DateTime.parse(selectDay); - DateTime endDate = DateTime.parse(selectEndDay); - while (startDate.isBefore(endDate) || - startDate.isAtSameMomentAs(endDate)) { - String startDateStr = DateFormat("yyyy-MM-dd").format(startDate); - var searchData = tradeSummaryList.saleBusinessAnalysisVOS - .where((element) => - element.localDateTime.substring(0, 10) == startDateStr) - ?.toList(); - double localDateBigDecimal = 0, localDateCount = 0; - if (searchData.isNotEmpty) { - localDateBigDecimal = double.tryParse( - searchData.first.localDateBigDecimal.toString()); - localDateCount = - double.tryParse(searchData.first.localDateCount.toString()); - } - lineChartSample2DataOrderAmount.add(LineChartSample2Data( - forIndex.toDouble(), localDateBigDecimal, startDateStr)); - lineChartSample2DataOrderNum.add(LineChartSample2Data( - forIndex.toDouble(), localDateCount, startDateStr)); - forIndex += 1; - startDate = startDate.add(Duration(days: 1)); - } - } else { - for (int i = 0; i < 25; i++) { - String dateStr = "${i < 10 ? "0$i" : i}:00:00"; - var searchData = tradeSummaryList.saleBusinessAnalysisVOS - .where((element) => - element.localDateTime.length > 10 && - element.localDateTime.substring(11) == dateStr) - ?.toList(); - double localDateBigDecimal = 0, localDateCount = 0; - if (searchData.isNotEmpty) { - localDateBigDecimal = double.tryParse( - searchData.first.localDateBigDecimal.toString()); - localDateCount = - double.tryParse(searchData.first.localDateCount.toString()); - } - dateStr = dateStr.substring(0, 5); - lineChartSample2DataOrderAmount.add(LineChartSample2Data( - i.toDouble(), localDateBigDecimal, dateStr)); - lineChartSample2DataOrderNum.add( - LineChartSample2Data(i.toDouble(), localDateCount, dateStr)); - } - } - } - } finally { - if (isSing) { - setState(() {}); - EasyLoading.dismiss(); - } else { - addLoadCount(); - } - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - body: Column( - children: [ - Container( - color: Color(0xFFD8D8D8), - width: double.infinity, - height: 1.h, - ), - Expanded( - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B),), - physics: BouncingScrollPhysics(), - scrollController: scrollController, - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: (){ - _onRefresh(isLoading: false); - }, - child: SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.circular(2), - border: - Border.all(color: Color(0xFFCFD0D1), width: 1.w), - ), - margin: EdgeInsets.only(top: 16.h, right: 20.w, left: 20.w, bottom: 12.h), - child: Row( - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 0; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "day"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 0 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "日报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 0 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 1; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 1 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "周报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 1 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 2; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(10, 20), - "month"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 2 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "月报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 2 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 3; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring( - timeDate().length <= 15 ? 0 : 13, - timeDate().length <= 15 ? 10 : 23), - "custom"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 3 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "自定义", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 3 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - ], - ), - ), - Align( - alignment: Alignment.center, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (dateIndex == 0) { - Navigator.of(context) - .pushNamed('/router/day_report_page') - .then((value) { - selectedDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "day"); - }); - } else if (dateIndex == 1) { - Navigator.of(context) - .pushNamed('/router/week_report_page') - .then((value) { - weekDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom"); - }); - } else if (dateIndex == 2) { - Navigator.of(context) - .pushNamed('/router/monthly_report_page') - .then((value) { - monthlyDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(10, 20), - "month"); - }); - } else if (dateIndex == 3) { - Navigator.of(context) - .pushNamed('/router/custom_page',arguments: {"beyondDateRange": "0"}) - .then((value) { - customDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom"); - }); - } - }, - child: Container( - width: 200.w, - alignment: Alignment.center, - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only(bottom: 16.h), - child: Row( - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - child: Text( - dateIndex == 2 - ? ((monthlyDateNum.substring(0, 8) == - timeDate().substring(0, 8)) - ? "${timeDate().substring(0, 8)}(当月)" - : timeDate().substring(0, 8)) - : timeDate(), - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Colors.black, - ), - ), - )), - Image.asset( - "assets/image/bs_calendar_logo.webp", - width: 15, - height: 15, - ), - ], - ), - ), - ), - ), - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 15.h), - child: Text( - "订单分析", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.semi_bold, - color: Colors.black, - ), - )), - orderAmount(), - orderNumTrend(), - ], - )), - ), - ) - ], - ), - ); - } - - String timeDate() { - if (dateIndex == 0) { - return (selectedDate == "" || selectedDate == null) - ? "${dayDate ?? ""}(今日)" - : (dayDate == - DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate)) - ? "${DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))}(今日)" - : DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))); - } else if (dateIndex == 1) { - return (weekDate == "" || weekDate == null) ? weekDateNum : weekDate; - } else if (dateIndex == 2) { - return (monthlyDate == "" || monthlyDate == null) - ? "${monthlyDateNum ?? ""}" - : (monthlyDateNum == - (DateFormat("yyyy年MM月dd日") - .format(DateTime.parse(monthlyDate)) + - DateFormat("yyyy年MM月dd日").format(DateTime( - DateTime.now().year, - DateTime.parse(monthlyDate).month + 1, - 0))) - ? "${(DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)) + DateFormat("yyyy年MM月dd日").format(DateTime(DateTime.now().year, DateTime.parse(monthlyDate).month + 1, 0)))}" - : (DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)) + - DateFormat("yyyy年MM月dd日").format(DateTime(DateTime.now().year, - DateTime.parse(monthlyDate).month + 1, 0)))); - } else if (dateIndex == 3) { - return (customDate == "" || customDate == null) - ? "${customDateNum ?? ""}(今日)" - : ("${customDate.substring(0,11)} ""${customDate.substring(21,34)}"); - } - } - - ///订单金额 - Widget orderAmount() { - return Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 15.h), - child: Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Text( - "订单金额", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - SizedBox( - width: 8.w, - ), - Text( - "近12周", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF666666), - ), - ) - ], - )), - Padding( - padding: EdgeInsets.symmetric(horizontal: 20.w), - child: LineChartSample2(lineChartSample2DataOrderAmount, "金额"), - ), - SizedBox( - height: 16.h, - ), - ], - ); - } - - ///订单量趋势 - Widget orderNumTrend() { - return Container( - padding: EdgeInsets.only(top: 12.h, bottom: 33.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 15.h), - child: Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Text( - "订单量趋势", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ) - ], - )), - Padding( - padding: EdgeInsets.symmetric(horizontal: 20.w), - child: LineChartSample2(lineChartSample2DataOrderNum, "订单量"), - ), - SizedBox( - height: 16.h, - ), - ], - ), - ); - } -} diff --git a/lib/business_system/home/overview/trade_overview_page.dart b/lib/business_system/home/overview/trade_overview_page.dart deleted file mode 100644 index 65cce994..00000000 --- a/lib/business_system/home/overview/trade_overview_page.dart +++ /dev/null @@ -1,83 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:huixiang/business_system/home/overview/trade_goods.dart'; -import 'package:huixiang/business_system/home/overview/trade_order.dart'; -import 'package:huixiang/business_system/home/overview/trade_summary.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../../generated/l10n.dart'; -import '../../../view_widget/my_tab.dart'; - -class TradeOverviewPage extends StatefulWidget { - final arguments; - - TradeOverviewPage({this.arguments}); - - @override - State createState() { - return _TradeOverviewPage(); - } -} - -class _TradeOverviewPage extends State with SingleTickerProviderStateMixin{ - final RefreshController refreshController = RefreshController(); - String storeId; - TabController tabController; - - @override - void initState() { - super.initState(); - storeId = widget?.arguments["storeId"] ??""; - tabController = TabController( - length: 3, vsync: this, initialIndex: widget?.arguments["index"]??0); - } - - @override - Widget build(BuildContext context) { - return DefaultTabController( - length: 3, - child: Scaffold( - appBar: MyAppBar( - title:"", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top, - bottom: TabBar( - // isScrollable: true, //可滚动 - overlayColor: MaterialStateProperty.all(Colors.white), - indicatorColor: Color(0xFF30415B), - labelColor: Colors.black, - labelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.bold, - ), - unselectedLabelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.normal, - color: Color(0xFF666666) - ), - controller: tabController, - //未选中文字颜色 - unselectedLabelColor: Color(0xffA29E9E), - indicatorSize: TabBarIndicatorSize.label, - //指示器与文字等宽 - tabs: [ - MyTab(text:"总览"), - MyTab(text: S.of(context).dingdan), - MyTab(text: "商品"), - ], - ), - ), - body: TabBarView( - children: [ - TradeSummary(storeId), - TradeOrder(storeId), - TradeGoods(storeId,"")], - ), - ), - ); - } - -} diff --git a/lib/business_system/home/overview/trade_summary.dart b/lib/business_system/home/overview/trade_summary.dart deleted file mode 100644 index 001f74bf..00000000 --- a/lib/business_system/home/overview/trade_summary.dart +++ /dev/null @@ -1,920 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/trade_summary_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../home_view/donut_auto_label_chart.dart'; -import '../home_view/my_line_chart.dart'; -import 'package:charts_flutter/flutter.dart' as charts; - -class TradeSummary extends StatefulWidget { - final storeId; - - TradeSummary(this.storeId); - - @override - State createState() { - return _TradeSummary(); - } -} - -class _TradeSummary extends State { - final RefreshController _refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - int operateSelect = 0; - int expensesSelect = 0; - int dateIndex = 0; - String selectedDate = ""; - String dayDate = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - String weekDate = ""; - String weekDateNum = - "${DateFormat("yyyy年MM月dd日").format(DateTime.now().subtract(Duration(days: 6)))} 至 " - "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - String monthlyDate = ""; - String monthlyDateNum = - "${DateFormat("yyyy年MM月dd").format(DateTime(DateTime.now().year, DateTime.now().month, 1))}" - "${DateFormat("yyyy年MM月dd").format(DateTime(DateTime.now().year, DateTime.now().month + 1, 0))}"; - String customDate = ""; - String customDateNum = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; - int _loadCount = 0; - BusinessApiService businessService; - TradeSummaryList tradeSummaryList; - List lineChartSample2DataAmount = [ - LineChartSample2Data(0, 0, "2023-03-09"), - LineChartSample2Data(1, 0, "2023-03-10"), - LineChartSample2Data(2, 0, "2023-03-11"), - LineChartSample2Data(3, 0, "2023-03-12"), - LineChartSample2Data(4, 0, "2023-03-13"), - LineChartSample2Data(5, 0, "2023-03-14"), - LineChartSample2Data(6, 0, "2023-03-15") - ]; - List lineChartSample2DataNum = [ - LineChartSample2Data(0, 0, "2023-03-09"), - LineChartSample2Data(1, 0, "2023-03-10"), - LineChartSample2Data(2, 0, "2023-03-11"), - LineChartSample2Data(3, 0, "2023-03-12"), - LineChartSample2Data(4, 0, "2023-03-13"), - LineChartSample2Data(5, 0, "2023-03-14"), - LineChartSample2Data(6, 0, "2023-03-15") - ]; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({isLoading = true}) async { - if(isLoading) - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - if (dateIndex == 0) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "day", - isSing: false); - } else if (dateIndex == 1) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom", - isSing: false); - } else if (dateIndex == 2) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(10, 20), - "month", - isSing: false); - } else if (dateIndex == 3) { - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(timeDate().length <= 15 ? 0 : 13, - timeDate().length <= 15 ? 10 : 23), - "custom", - isSing: false); - } - }); - } - - addLoadCount() { - _loadCount += 1; - if (_loadCount == 1) { - _loadCount = 0; - EasyLoading.dismiss(); - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - if (mounted) setState(() {}); - } - } - - ///经营分析 - queryBusinessAnalysis(selectDay, selectEndDay, queryRange, - {isSing = true}) async { - if (isSing) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - try { - BaseData baseData = await businessService - .saleBusinessAnalysis({ - "selectDay": selectDay, - "selectEndDay": selectEndDay, - "queryRange": queryRange - }).catchError((error) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), - alignment: Alignment.center); - }); - if (baseData != null && baseData.isSuccess) { - int forIndex = 0; - lineChartSample2DataAmount.clear(); - lineChartSample2DataNum.clear(); - tradeSummaryList = baseData.data; - if (queryRange != "day") { - DateTime startDate = DateTime.parse(selectDay); - DateTime endDate = DateTime.parse(selectEndDay); - while (startDate.isBefore(endDate) || - startDate.isAtSameMomentAs(endDate)) { - String startDateStr = DateFormat("yyyy-MM-dd").format(startDate); - var searchData = tradeSummaryList.saleBusinessAnalysisVOS - .where((element) => - element.localDateTime.substring(0, 10) == startDateStr) - ?.toList(); - double localDateBigDecimal = 0, localDateCount = 0; - if (searchData.isNotEmpty) { - localDateBigDecimal = double.tryParse( - searchData.first.localDateBigDecimal.toString()); - localDateCount = - double.tryParse(searchData.first.localDateCount.toString()); - } - lineChartSample2DataAmount.add(LineChartSample2Data( - forIndex.toDouble(), localDateBigDecimal, startDateStr)); - lineChartSample2DataNum.add(LineChartSample2Data( - forIndex.toDouble(), localDateCount, startDateStr)); - forIndex += 1; - startDate = startDate.add(Duration(days: 1)); - } - } else { - for (int i = 0; i < 25; i++) { - String dateStr = "${i < 10 ? "0$i" : i}:00:00"; - var searchData = tradeSummaryList.saleBusinessAnalysisVOS - .where((element) => - element.localDateTime.length > 10 && - element.localDateTime.substring(11) == dateStr) - ?.toList(); - double localDateBigDecimal = 0, localDateCount = 0; - if (searchData.isNotEmpty) { - localDateBigDecimal = double.tryParse( - searchData.first.localDateBigDecimal.toString()); - localDateCount = - double.tryParse(searchData.first.localDateCount.toString()); - } - dateStr = dateStr.substring(0, 5); - lineChartSample2DataAmount.add(LineChartSample2Data( - i.toDouble(), localDateBigDecimal, dateStr)); - lineChartSample2DataNum.add( - LineChartSample2Data(i.toDouble(), localDateCount, dateStr)); - } - } - } - } finally { - if (isSing) { - setState(() {}); - EasyLoading.dismiss(); - } else { - addLoadCount(); - } - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - body: Column( - children: [ - Container( - color: Color(0xFFD8D8D8), - width: double.infinity, - height: 1.h, - ), - Expanded( - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - scrollController: scrollController, - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh:(){ - _onRefresh(isLoading:false); - }, - child: SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.circular(2), - border: - Border.all(color: Color(0xFFCFD0D1), width: 1.w), - ), - margin: EdgeInsets.only( - top: 16.h, right: 20.w, left: 20.w, bottom: 12.h), - child: Row( - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 0; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "day"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 0 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "日报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 0 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 1; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 1 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "周报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 1 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 2; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(10, 20), - "month"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 2 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "月报", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 2 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - dateIndex = 3; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring( - timeDate().length <= 15 ? 0 : 13, - timeDate().length <= 15 ? 10 : 23), - "custom"); - }, - child: Container( - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: dateIndex == 3 - ? Color(0xFF30415B) - : Colors.transparent, - ), - padding: EdgeInsets.symmetric(vertical: 9.h), - child: Text( - "自定义", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: dateIndex == 3 - ? Colors.white - : Color(0xFF30415B), - ), - ), - ), - )), - ], - ), - ), - Align( - alignment: Alignment.center, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (dateIndex == 0) { - Navigator.of(context) - .pushNamed('/router/day_report_page') - .then((value) { - selectedDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "day"); - }); - } else if (dateIndex == 1) { - Navigator.of(context) - .pushNamed('/router/week_report_page') - .then((value) { - weekDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom"); - }); - } else if (dateIndex == 2) { - Navigator.of(context) - .pushNamed('/router/monthly_report_page') - .then((value) { - monthlyDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(10, 20), - "month"); - }); - } else if (dateIndex == 3) { - Navigator.of(context) - .pushNamed('/router/custom_page',arguments: {"beyondDateRange": "0"}) - .then((value) { - customDate = value; - queryBusinessAnalysis( - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - timeDate() - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(13, 23), - "custom"); - }); - } - }, - child: Container( - width: 200.w, - alignment: Alignment.center, - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only(bottom: 16.h), - child: Row( - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - child: Text( - dateIndex == 2 - ? ((monthlyDateNum.substring(0, 8) == - timeDate().substring(0, 8)) - ? "${timeDate().substring(0, 8)}(当月)" - : timeDate().substring(0, 8)) - : timeDate(), - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Colors.black, - ), - ), - )), - Image.asset( - "assets/image/bs_calendar_logo.webp", - width: 15, - height: 15, - ), - ], - ), - ), - ), - ), - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 15.h), - child: Text( - "经营分析", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.semi_bold, - color: Colors.black, - ), - )), - operateAnalysis(), - Container( - color: Color(0xFFF9FAF8), - height: 16.h, - width: double.infinity, - ), - expensesAnalysis(), - ], - )), - ), - ) - ], - ), - ); - } - - String timeDate() { - if (dateIndex == 0) { - return (selectedDate == "" || selectedDate == null) - ? "${dayDate ?? ""}(今日)" - : (dayDate == - DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate)) - ? "${DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))}(今日)" - : DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))); - } else if (dateIndex == 1) { - return (weekDate == "" || weekDate == null) ? weekDateNum : weekDate; - } else if (dateIndex == 2) { - return (monthlyDate == "" || monthlyDate == null) - ? "${monthlyDateNum ?? ""}" - : (monthlyDateNum == - (DateFormat("yyyy年MM月dd日") - .format(DateTime.parse(monthlyDate)) + - DateFormat("yyyy年MM月dd日").format(DateTime( - DateTime.now().year, - DateTime.parse(monthlyDate).month + 1, - 0))) - ? "${(DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)) + DateFormat("yyyy年MM月dd日").format(DateTime(DateTime.now().year, DateTime.parse(monthlyDate).month + 1, 0)))}" - : (DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)) + - DateFormat("yyyy年MM月dd日").format(DateTime(DateTime.now().year, - DateTime.parse(monthlyDate).month + 1, 0)))); - } else if (dateIndex == 3) { - return (customDate == "" || customDate == null) - ? "${customDateNum ?? ""}(今日)" - : ("${customDate.substring(0, 11)} " - "${customDate.substring(21, 34)}"); - } - } - - ///经营分析 - Widget operateAnalysis() { - return Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 21.w, bottom: 1.h), - child: Row( - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - operateSelect = 0; - }); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 10.h), - child: Text( - "营业额", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.medium, - color: operateSelect == 0 - ? Colors.black - : Color(0xFF969696), - ), - )), - if (operateSelect == 0) - Container( - height: 2.h, - width: 44.w, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(2), - ), - ), - ], - ), - ), - SizedBox( - width: 47.w, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - operateSelect = 1; - }); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 10.h), - child: Text( - "交易笔数", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.medium, - color: operateSelect == 1 - ? Colors.black - : Color(0xFF969696), - ), - )), - if (operateSelect == 1) - Container( - height: 2.h, - width: 44.w, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(2), - ), - ), - ], - ), - ), - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8), - margin: EdgeInsets.only(bottom: 30.h), - ), - if (operateSelect == 0) - Container( - padding: EdgeInsets.symmetric(horizontal: 20.w), - child: LineChartSample2(lineChartSample2DataAmount, "金额"), - ), - if (operateSelect == 1) - Padding( - padding: EdgeInsets.symmetric(horizontal: 20.w), - child: LineChartSample2(lineChartSample2DataNum, "交易笔数"), - ), - SizedBox( - height: 16.h, - ), - ], - ); - } - - ///收退款分析 - Widget expensesAnalysis() { - return Container( - padding: EdgeInsets.only(top: 12.h, bottom: 33.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 15.h), - child: Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Text( - "收退款分析", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ) - ], - )), - Padding( - padding: EdgeInsets.only(left: 21.w, bottom: 1.h), - child: Row( - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - expensesSelect = 0; - }); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 10.h), - child: Text( - "交易金额", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.medium, - color: expensesSelect == 0 - ? Colors.black - : Color(0xFF969696), - ), - )), - if (expensesSelect == 0) - Container( - height: 2.h, - width: 44.w, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(2), - ), - ), - ], - ), - ), - SizedBox( - width: 37.w, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - expensesSelect = 1; - }); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 10.h), - child: Text( - "交易笔数", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.medium, - color: expensesSelect == 1 - ? Colors.black - : Color(0xFF969696), - ), - )), - if (expensesSelect == 1) - Container( - height: 2.h, - width: 44.w, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(2), - ), - ), - ], - ), - ), - ], - ), - ), - if (expensesSelect == 0) - ((tradeSummaryList?.collectionAmount ?? "0") == "0" && - (tradeSummaryList?.refundAmount ?? "0") == "0") - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : - Container( - height: 150.h, - child: DonutAutoLabelChart([ - new charts.Series( - id: 'Sales', - colorFn: (LinearSales sales, __) => sales.color, - domainFn: (LinearSales sales, _) => sales.year, - measureFn: (LinearSales sales, _) => sales.sales, - data: [ - new LinearSales( - 0, - int.parse( - (tradeSummaryList?.collectionAmount ?? "0") - .replaceAll(".", "")), - charts.Color.fromHex(code: "#313CA9")), - new LinearSales( - 1, - int.parse((tradeSummaryList?.refundAmount ?? "0") - .replaceAll(".", "")), - charts.Color.fromHex(code: "#30415B")) - ], - // Set a label accessor to control the text of the arc label. - labelAccessorFn: (LinearSales row, _) => - '${(row.sales / 100)}', - ) - ], [ - "收款(${AppUtils.calculateDouble((tradeSummaryList?.collectionAmount == "0" && tradeSummaryList?.refundAmount == "0") ? 50 : (double.parse(tradeSummaryList?.collectionAmount ?? "0") / (double.parse(tradeSummaryList?.collectionAmount ?? "0") + double.parse(tradeSummaryList?.refundAmount ?? "0")) * 100))}%)", - "退款(${AppUtils.calculateDouble((tradeSummaryList?.collectionAmount == "0" && tradeSummaryList?.refundAmount == "0") ? 50 : (double.parse(tradeSummaryList?.refundAmount ?? "0") / (double.parse(tradeSummaryList?.collectionAmount ?? "0") + double.parse(tradeSummaryList?.refundAmount ?? "0")) * 100))}%)" - ]), - ), - if (expensesSelect == 1) - ((tradeSummaryList?.collectionCount ?? "0") == "0" && - (tradeSummaryList?.refundCount ?? "0") == "0") - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : - Container( - height: 150.h, - child: DonutAutoLabelChart([ - new charts.Series( - id: 'Sales', - colorFn: (LinearSales sales, __) => sales.color, - domainFn: (LinearSales sales, _) => sales.year, - measureFn: (LinearSales sales, _) => sales.sales, - data: [ - new LinearSales( - 0, - tradeSummaryList?.collectionCount ?? 0, - charts.Color.fromHex(code: "#313CA9"), - ), - new LinearSales(2, tradeSummaryList?.refundCount ?? 0, - charts.Color.fromHex(code: "#30415B")), - ], - // Set a label accessor to control the text of the arc label. - labelAccessorFn: (LinearSales row, _) => - '${(row.sales)} 笔', - ), - ], [ - "收款(${AppUtils.calculateDouble((tradeSummaryList?.collectionCount == 0 && tradeSummaryList?.refundCount == 0) ? 50 : ((tradeSummaryList?.collectionCount ?? 0) / ((tradeSummaryList?.collectionCount ?? 0) + (tradeSummaryList?.refundCount ?? 0)) * 100))}%)", - "退款(${AppUtils.calculateDouble((tradeSummaryList?.collectionCount == 0 && tradeSummaryList?.refundCount == 0) ? 50 : ((tradeSummaryList?.refundCount ?? 0) / ((tradeSummaryList?.collectionCount ?? 0) + (tradeSummaryList?.refundCount ?? 0)) * 100))}%)" - ]), - ), - ], - ), - ); - } -} diff --git a/lib/business_system/home/select_shop.dart b/lib/business_system/home/select_shop.dart deleted file mode 100644 index 98092caf..00000000 --- a/lib/business_system/home/select_shop.dart +++ /dev/null @@ -1,244 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_login_info.dart'; -import '../../retrofit/data/business_store_list.dart'; -import '../../utils/business_instance.dart'; -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; - -class SelectShop extends StatefulWidget { - final arguments; - - SelectShop({this.arguments}); - - @override - State createState() { - return _SelectShop(); - } -} - -class _SelectShop extends State { - final RefreshController refreshController = RefreshController(); - BusinessLoginInfo businessLoginInfo; - BusinessApiService businessService; - List records = []; - int selectIndex = 0; - - @override - void initState() { - super.initState(); - businessLoginInfo = widget.arguments["businessLoginInfo"]; - records = widget.arguments["records"]; - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: "选择门店", - titleColor: Colors.black, - leading: (widget.arguments["routeSource"] == "门店设置")?true:false, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Colors.white, - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () {}, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Container( - height: double.infinity, - padding: EdgeInsets.only(top: 13.h, left: 16.w, right: 16.w), - child: Column( - children: [ - Row( - children: [ - Image.asset( - "assets/image/bs_switch_shop.webp", - width: 24, - height: 24, - ), - SizedBox( - width: 4.w, - ), - Text( - (widget.arguments["routeSource"] == "门店设置")?"请选择门店":"请选择登录门店", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF1A1A1A)), - ), - ], - ), - SizedBox( - height: 20.h, - ), - Expanded( - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: (widget.arguments["routeSource"] == "门店设置") ? (records?.length ?? 0):(businessLoginInfo?.storeList?.length ?? 0), - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - setState(() { - selectIndex = position; - }); - }, - child: (widget.arguments["routeSource"] == "门店设置") ? merchantItem(records[position], position): - shopsItem(businessLoginInfo?.storeList[position], position), - ); - }, - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if(widget.arguments["routeSource"] == "门店设置"){ - Navigator.of(context) - .popAndPushNamed('/router/merchant_info',arguments: { - "storeId": records[selectIndex]?.id ?? "", - "storeName": records[selectIndex]?.storeName ?? "", - "records": records[selectIndex], - }); - }else{ - Navigator.of(context).pushReplacementNamed( - '/router/business_page', - arguments: { - "selectStoreIndex": selectIndex, - "businessLoginInfo": businessLoginInfo, - }); - } - }, - child: Container( - width: double.infinity, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only(bottom: 34.h, top: 10.h), - alignment: Alignment.center, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27.w), - ), - child: Text( - S.of(context).queding, - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ), - ], - ), - ), - ), - ); - } - - Widget shopsItem(StoreList storeList, index) { - return Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: selectIndex == index ? Color(0xFFEFF5FF) : Colors.white, - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: selectIndex == index ? Color(0xFF30415B) : Colors.white, - width: selectIndex == index ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), - child: Text( - storeList?.name ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: selectIndex == index - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (selectIndex == index) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - ); - } - - Widget merchantItem(Records records, index) { - return Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: selectIndex == index ? Color(0xFFEFF5FF) : Colors.white, - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: selectIndex == index ? Color(0xFF30415B) : Colors.white, - width: selectIndex == index ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), - child: Text( - records?.storeName ?? "", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: selectIndex == index - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (selectIndex == index) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/add_vip.dart b/lib/business_system/home/vip/add_vip.dart deleted file mode 100644 index 47339663..00000000 --- a/lib/business_system/home/vip/add_vip.dart +++ /dev/null @@ -1,325 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/add_vip_info.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -class AddVip extends StatefulWidget { - final Map arguments; - - AddVip({this.arguments}); - - @override - State createState() { - return _AddVip(); - } -} - -class _AddVip extends State { - final TextEditingController vipPhoneController = TextEditingController(); - final TextEditingController vipNameController = TextEditingController(); - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - BusinessApiService businessService; - AddVipInfo addVipInfo; - String networkError = ""; - int networkStatus = 0; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - ///新增会员接口 - addMember(String mobile,String nickName) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.createMemberSourceByMobile(mobile,nickName).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {});}); - if (baseData != null && baseData.isSuccess) { - addVipInfo = baseData.data; - Navigator.of(context).pop(); - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "会员新增成功,请前往会员管理查询会员新增情况", - color: Color(0xFF30415B), - )); - networkStatus = 1; - }else{ - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - networkStatus = 1; - } - } finally { - EasyLoading.dismiss(); - setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Colors.white, - appBar: MyAppBar( - title: "新增会员", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body:networkStatus == -1?noNetwork():Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - Container( - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Row( - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "会员手机号", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - Expanded( - child: TextField( - controller: vipPhoneController, - decoration: InputDecoration( - hintText: "请输入会员手机号", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ), - ), - Container( - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.symmetric(horizontal: 16.w), - margin: EdgeInsets.only(top: 16.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "会员姓名", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ), - Expanded( - child: TextField( - controller: vipNameController, - decoration: InputDecoration( - hintText: "请输入会员姓名", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - )), - Spacer(), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (vipPhoneController.text == "") { - SmartDialog.showToast("请输入会员手机号", - alignment: Alignment.center); - return; - } else { - addMember(vipPhoneController?.text ?? "",vipNameController?.text ?? ""); - } - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B), - ), - width: double.infinity, - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only(bottom: 34.h), - child: Text( - "确认新增", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ], - ), - ), - ), - ); - } - - Widget noNetwork() { - return Container( - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - addMember(vipPhoneController?.text ?? "",vipNameController?.text ?? ""); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/balance_change_record.dart b/lib/business_system/home/vip/balance_change_record.dart deleted file mode 100644 index 89b2c9d1..00000000 --- a/lib/business_system/home/vip/balance_change_record.dart +++ /dev/null @@ -1,1018 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/balance_change_list.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; - -class BalanceChangeRecord extends StatefulWidget { - final String storeId; - - BalanceChangeRecord( - Key key, - this.storeId, - ) : super(key: key); - - @override - State createState() { - return _BalanceChangeRecord(); - } -} - -class _BalanceChangeRecord extends State { - final RefreshController _refreshController = RefreshController(); - BusinessApiService businessService; - List records = []; - int _current = 1; - String networkError = ""; - int networkStatus = 0; - final TextEditingController editingController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - String selectTimeDate = ""; - bool _isShow = false; - int recordType = -1; - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - _focusNode.unfocus(); - } - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryBalanceChange(isRefreshData: false); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - queryBalanceChange({isRefreshData = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = - await businessService.getTenantMemberBill({ - "size": 10, - "pageSize": 10, - "current": _current, - "currentPage": 1, - "sort": "id", - "order": "descending", - "model": { - "startTime": (selectTimeDate == "" || selectTimeDate == null) - ? "" - : selectTimeDate - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 19), - "endTime": (selectTimeDate == "" || selectTimeDate == null) - ? "" - : selectTimeDate - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(selectTimeDate.length >= 21 ? 22 : 0, - selectTimeDate.length >= 21 ? 41 : 0), - "pm": recordType == -1 ? "" : recordType, - "phone": editingController?.text ?? "" - }, - "map": {}, - "timeRange": null - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll(baseData?.data?.records ?? []); - if ((baseData?.data?.records ?? []).isEmpty || - records.length.toString() == baseData.data.total) - _refreshController.loadNoData(); - else - _refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isRefreshData) setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - FocusScope.of(context).requestFocus(FocusNode());}, - child: Stack( - children: [ - Column( - children: [ - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8), - ), - timeSelect(), - balanceChangeSearch(), - Container( - color: Colors.white, - padding: EdgeInsets.only(left: 19.w, bottom: 12.h), - child: Row( - children: [ - Text( - "记录类型", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - _isShow = !_isShow; - }); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Icon( - _isShow - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, - color: Color(0xFF808080), - size: 24, - )), - ), - ], - )), - Expanded( - child:Container( - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: records.length == 0 ? false : true, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _isShow = false; - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _isShow = false; - _current++; - _onRefresh(isShowLoad: false); - }, - child: networkStatus == -1 - ? noNetwork() - : ((networkStatus == 0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return balanceChangeItemSm(); - }, - ) - : ((records == null || records.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : Container( - padding:EdgeInsets.only(top: 16.h), - child: ListView.builder( - itemCount: records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (isKeyBoardShow) - FocusScope.of(context) - .requestFocus(FocusNode()); - return; - }, - child: balanceChangeItem( - records[position], position), - ); - }, - ), - ))), - ), - )), - ], - ), - if (_isShow) - Container( - height: 100.h, - width: 100.w, - decoration: BoxDecoration( - color: Colors.white, - border: Border.all( - color: Color(0x29000000), - width: 0.5.w, - ), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only(top: 149.h, left: 19.w), - padding: EdgeInsets.symmetric(vertical: 8.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - recordType = 0; - _isShow = false; - records.clear(); - _onRefresh(); - }); - }, - child: Container( - width: double.infinity, - padding: EdgeInsets.symmetric( - vertical: 8.h, horizontal: 16.w), - child: Text( - "支出", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - )), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - recordType = 1; - _isShow = false; - records.clear(); - _onRefresh(); - }); - }, - child: Container( - width: double.infinity, - padding: EdgeInsets.symmetric( - vertical: 8.h, horizontal: 16.w), - child: Text( - "收入", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - ], - )) - ], - ), - ); - } - - /// 搜索框 - Widget balanceChangeSearch() { - return Container( - color: Colors.white, - child: Container( - height: 40.h, - margin: - EdgeInsets.only(left: 20.w, right: 17.w, top: 10.h, bottom: 15.h), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onTap: () { - setState(() { - _isShow = false; - }); - }, - onEditingComplete: () { - _isShow = false; - FocusScope.of(context).requestFocus(FocusNode()); - records.clear(); - _onRefresh(); - }, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - controller: editingController, - decoration: InputDecoration( - hintText: "会员手机号", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.symmetric( - vertical: 12.h, - ), - prefixIcon: Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - border: InputBorder.none, - ), - ), - ), - ); - } - - ///时间选择 - Widget timeSelect() { - return Container( - color: Colors.white, - child: GestureDetector( - onTap: () { - _isShow = false; - Navigator.of(context).pushNamed('/router/custom_page',arguments: {"beyondDateRange": "0"}).then((value) { - selectTimeDate = value; - records.clear(); - _onRefresh(); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only(left: 18.w, right: 18.w, top: 11.h), - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 12.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - (selectTimeDate == "" || selectTimeDate == null) - ? "开始时间 至 结束时间" - : "${selectTimeDate.substring(0, 11)} ${selectTimeDate.substring(21, 34)}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ], - ), - ), - ), - ); - } - - Widget balanceChangeItem(Records records, index) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - top: 13.h, - bottom: 16.h, - ), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "会员名称: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records?.nickname ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 3, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - child: Text( - "手机号: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records?.phone ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 3, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - child: Text( - "记录类型: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records.pm == 0 ? "支出" : "收入", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 3, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "变动金额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - "¥${records?.number ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "变动实储: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - "¥${records?.realNumber ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "变动后余额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - "¥${records?.balance ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "创建时间: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - records?.createTime ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - )), - ], - ), - ); - } - - Widget balanceChangeItemSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - top: 13.h, - bottom: 16.h, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 60.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - ], - )), - Expanded( - flex: 3, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 120.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - ], - )), - ], - )); - } - - Widget noNetwork() { - return Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/bus_vip_list.dart b/lib/business_system/home/vip/bus_vip_list.dart deleted file mode 100644 index 66235725..00000000 --- a/lib/business_system/home/vip/bus_vip_list.dart +++ /dev/null @@ -1,931 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/business_vip_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; - -class BusVipList extends StatefulWidget { - final String storeId; - - BusVipList( - Key key, - this.storeId, - ) : super(key: key); - - @override - State createState() { - return _BusVipList(); - } -} - -class _BusVipList extends State { - final RefreshController _refreshController = RefreshController(); - BusinessApiService businessService; - List records = []; - int _current = 1; - String networkError = ""; - int networkStatus = 0; - final TextEditingController editingController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - _focusNode.unfocus(); - } - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryVipList(isRefreshData: false); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - queryVipList({isRefreshData = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.vipDataList({ - "map": { - "nickname": "", - "phone": editingController?.text ?? "", - "source": "", - "hasMoney": "2" - }, - "model": {"tenantCode": null}, - "date": "", - "sort": "id", - "size": 10, - "current": _current - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll(baseData?.data?.records ?? []); - if ((baseData?.data?.records ?? []).isEmpty || - records.length.toString() == baseData.data.total) - _refreshController.loadNoData(); - else - _refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isRefreshData) setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8), - ), - vipSearch(), - Expanded( - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: records.length == 0 ? false : true, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _current++; - _onRefresh(isShowLoad: false); - }, - child: SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only( - left: 20.w, top: 16.h, bottom: 16.h), - child: Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Expanded( - child: Text( - "会员列表", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed( - '/router/vip_recharge_page', - arguments: { - "storeId": widget.storeId - }).then((value) { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - padding: EdgeInsets.symmetric( - horizontal: 14.w, vertical: 5.h), - margin: EdgeInsets.only(right: 8.w), - child: Text( - "会员充值", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed( - '/router/add_vip', - arguments: { - "storeId": widget.storeId - }).then((value) { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - padding: EdgeInsets.symmetric( - horizontal: 14.w, vertical: 5..h), - margin: EdgeInsets.only(right: 16.w), - child: Text( - "新增会员", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ), - )), - ], - ), - ), - networkStatus == -1 - ? noNetwork() - : ((networkStatus == 0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return vipListItemSm(); - }, - ) - : ((records == null || records.length == 0) - ? NoDataView( - src: - "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : ListView.builder( - itemCount: records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if((records[position]?.phone ??"") != ""){ - FocusScope.of(context) - .requestFocus(FocusNode()); - Navigator.of(context).pushNamed( - '/router/member_details_page', - arguments: { - "storeId": widget?.storeId??"", - "phoneNum":records[position]?.phone ?? "" - }); - }else{ - FocusScope.of(context) - .requestFocus(FocusNode()); - } - }, - child: vipListItem( - records[position], position), - ); - }, - ))), - ], - )))), - ], - ); - } - - /// 搜索框 - Widget vipSearch() { - return Container( - color: Colors.white, - child: Container( - height: 40.h, - margin: - EdgeInsets.only(left: 20.w, right: 17.w, top: 10.h, bottom: 15.h), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - records.clear(); - _onRefresh(); - }, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - controller: editingController, - decoration: InputDecoration( - hintText: "会员手机号", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.symmetric( - vertical: 12.h, - ), - prefixIcon: Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - border: InputBorder.none, - ), - ), - ), - ); - } - - Widget vipListItem(Records records, index) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - left: 12.h, - top: 16.h, - bottom: 16.h, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "会员名称: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records?.nickname ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 3, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - ), - child: Row( - children: [ - Expanded( - child: Text( - "手机号: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records?.phone ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 3, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - ), - child: Row( - children: [ - Expanded( - child: Text( - "加入时间: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records?.createTime ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 3, - ), - ], - ), - ), - if (records.isShow) - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "充值金额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - "¥${records?.realRecharge ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - if (records.isShow) - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "赠送金额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - "¥${records?.giftRecharge ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - if (records.isShow) - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "商户余额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - "¥${records?.realRecharge ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - if (records.isShow) - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "平台余额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 3, - child: Text( - "¥${records?.money ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - )), - ], - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - records.isShow = !records.isShow; - }); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 6.h), - child: Icon( - records.isShow - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, - color: Color(0xFF0D0D0D), - size: 24, - )), - ), - ], - ), - ); - } - - Widget vipListItemSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - left: 12.h, - top: 16.h, - bottom: 16.h, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 60.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 40.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - ], - )), - Expanded( - flex: 3, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 120.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 12), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - ], - )), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 24.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 16.w, - height: 16.h, - ), - ), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - margin: EdgeInsets.only(top: 120.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // "无法连接到网络", - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/business_vip_page.dart b/lib/business_system/home/vip/business_vip_page.dart deleted file mode 100644 index 97a6189a..00000000 --- a/lib/business_system/home/vip/business_vip_page.dart +++ /dev/null @@ -1,117 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:huixiang/business_system/home/vip/vip_recharge_flow.dart'; -import 'package:huixiang/business_system/order/ticket/ticket_tab.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../view_widget/my_appbar.dart'; -import '../../../view_widget/my_tab.dart'; -import 'balance_change_record.dart'; -import 'bus_vip_list.dart'; - -class BusinessVipPage extends StatefulWidget { - final Map arguments; - - BusinessVipPage({this.arguments}); - - @override - State createState() { - return _BusinessVipPage(); - } -} - -class _BusinessVipPage extends State - with SingleTickerProviderStateMixin { - List _allKey = []; - String storeId; - TabController tabController; - - @override - void initState() { - super.initState(); - tabController = TabController(length: 3, vsync: this, initialIndex: widget?.arguments["index"] ?? 0); - tabController.addListener(() { - if (!tabController.indexIsChanging) { - setState(() {}); - FocusScope.of(context).requestFocus(FocusNode()); - } - }); - loadFinish(); - storeId = widget.arguments["storeId"]; - } - - loadFinish() { - _allKey = [GlobalKey(), GlobalKey(), GlobalKey()]; - setState(() {}); - } - - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Column( - children: [ - Expanded(child: DefaultTabController( - length: 3, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "", - leadingColor: Colors.black, - background: Colors.white, - toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top, - bottom: TabBar ( - // isScrollable: true, //可滚动 - //去掉按钮阴影 - overlayColor: MaterialStateProperty.all(Colors.white), - indicator: const TicketTab( - width: 44, - borderSide: - BorderSide(width: 2.0, color: Color(0xFF30415B))), - labelColor: Colors.black, - labelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.bold, - ), - unselectedLabelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.normal, - color: Color(0xFF666666)), - controller: tabController, - //未选中文字颜色 - unselectedLabelColor: Color(0xFF666666), - //指示器与文字等宽 - tabs: [ - MyTab(text: "会员列表"), - MyTab(text: "会员充值流水"), - MyTab(text: "会员余额变动"), - ], - ), - ), - body: TabBarView( - controller: tabController, - children: [ - BusVipList( - _allKey[0], - storeId), - VipRechargeFlow( - _allKey[1], - storeId), - BalanceChangeRecord( - _allKey[2], - storeId,), - ], - ), - ), - )), - // SizedBox( - // height: 76.h, - // ), - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/member_details_page.dart b/lib/business_system/home/vip/member_details_page.dart deleted file mode 100644 index 0879431c..00000000 --- a/lib/business_system/home/vip/member_details_page.dart +++ /dev/null @@ -1,540 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/phone_query_member_info.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/custom_image.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -class MemberDetailsPage extends StatefulWidget { - final Map arguments; - - MemberDetailsPage({this.arguments}); - - @override - State createState() { - return _MemberDetailsPage(); - } -} - -class _MemberDetailsPage extends State { - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - PhoneQueryMemberInfo phoneQueryMemberInfo; - String networkError = ""; - int networkStatus = 0; - - @override - void initState() { - super.initState(); - queryMemberPhoneInfo(widget?.arguments["phoneNum"] ?? ""); - } - - ///根据手机号搜索用户信息 - queryMemberPhoneInfo(phoneNum, {isShow = true}) async { - try { - if (isShow) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService - .queryMemberInfo( - {"phoneNum": phoneNum, "isNewUser": false}).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - phoneQueryMemberInfo = baseData.data; - refreshController.loadComplete(); - refreshController.refreshCompleted(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - refreshController.refreshFailed(); - refreshController.loadFailed(); - } - } finally { - if (isShow) EasyLoading.dismiss(); - setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "会员详情", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: - networkStatus == -1 - ? noNetwork() : - SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - queryMemberPhoneInfo(widget?.arguments["phoneNum"] ?? "",isShow: false); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Container( - padding: EdgeInsets.only(top:15.h,left: 16.w,right: 16.w), - child: Column( - children: [ - vipPlate(), - vipFunction(), - vipRecord() - ], - )))); - } - - ///会员信息板块 - Widget vipPlate() { - return Container( - width: double.infinity, - margin: EdgeInsets.only(bottom: 12.h), - padding: EdgeInsets.only(bottom: 15.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - Container( - width: double.infinity, - padding: EdgeInsets.only(left: 16.w, bottom: 33.h, top: 13.h), - margin: EdgeInsets.only(bottom: 10.h), - decoration: BoxDecoration( - color: Colors.white, - gradient: LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, - colors: [Color(0xFF30415B), Color(0xFF5171A4)]), - borderRadius: BorderRadius.vertical( - top: Radius.circular(8), - ), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 52.h, - height: 52.h, - margin: EdgeInsets.only(right: 15.w,), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - ), - child:MImage( - (phoneQueryMemberInfo?.headimg ?? - ""), - width: double.infinity, - height: double.infinity, - fit: BoxFit.cover, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 8.h), - child: Text( - "会员名称:${phoneQueryMemberInfo?.nickName ?? ""}", - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - )), - Text( - "手机号:${phoneQueryMemberInfo?.phoneNum ?? ""}", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ) - ], - ), - ], - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 7.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bus_vip_balance.webp", - width: 24.h, - height: 24.h, - fit: BoxFit.fill, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "会员余额", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF252626), - ), - )) - ], - )), - Text( - phoneQueryMemberInfo?.balance ?? "0.00", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ) - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 7.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bus_coupon.webp", - width: 20.w, - height: 18.h, - fit: BoxFit.fill, - ), - Padding( - padding: EdgeInsets.only(left: 7.w), - child: Text( - "优惠券", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF252626), - ), - )) - ], - )), - Text( - (phoneQueryMemberInfo?.useableConponList?.length ?? 0) - .toString(), - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF30415B), - ), - ) - ], - )), - ], - ) - ], - ), - ); - } - - ///会员功能 - Widget vipFunction() { - return Container( - width: double.infinity, - margin: EdgeInsets.only(bottom: 12.h), - padding: EdgeInsets.only(bottom:17.h,top:27.h,), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child:Row( - children: [ - Expanded( - child:GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context) - .pushNamed('/router/vip_recharge_page', arguments: { - "storeId": widget.arguments["storeId"] ??"", - }); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding(padding:EdgeInsets.only(bottom: 12.h), - child: Image.asset( - "assets/image/bus_home_syt.webp", - width: 26.w, - height: 23.h, - fit: BoxFit.fill, - )), - Text( - "会员充值", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF252626), - ), - ), - ], - ), - )), - Expanded( - child:GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - if(widget.arguments["storeId"] == "0"){ - SmartDialog.show( - widget: SettlementTips( - () { - }, - text: "当前为所有门店状态,收银操作时,请将门店切换至要消费的门店!", - color: Color(0xFF30415B), - )); - }else{ - Navigator.of(context) - .pushNamed('/router/cashier_page', arguments: { - "storeId": widget.arguments["storeId"] ??"", - "phone":widget?.arguments["phoneNum"] ?? "" - }); - } - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding(padding:EdgeInsets.only(bottom: 12.h), - child: Image.asset( - "assets/image/bus_home_hyyetj.webp", - width: 23.h, - height: 23.h, - fit: BoxFit.fill, - )), - Text( - "会员收银", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF252626), - ), - ), - ], - ))), - Spacer() - // Expanded( - // child:Column( - // crossAxisAlignment: CrossAxisAlignment.center, - // mainAxisAlignment: MainAxisAlignment.center, - // children: [ - // Padding(padding:EdgeInsets.only(bottom: 12.h), - // child: Image.asset( - // "assets/image/bus_vip_cc.webp", - // width: 24.h, - // height: 24.h, - // fit: BoxFit.fill, - // )), - // Text( - // "会员充次", - // style: TextStyle( - // fontSize: 14.sp, - // fontWeight: MyFontWeight.medium, - // color: Color(0xFF252626), - // ), - // ), - // ], - // )), - ], - ), - ); - } - - ///会员消费/充值/充次记录 - Widget vipRecord() { - return Container( - width: double.infinity, - margin: EdgeInsets.only(bottom: 12.h), - padding: EdgeInsets.only(bottom:17.h,top:11.h,left: 17.w,right: 16.w), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child:Column( - children: [ - vipRecordText("消费记录"), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - ), - vipRecordText("充值记录"), - // Container( - // width: double.infinity, - // height: 1.h, - // color: Color(0xFFEBECEF), - // ), - // vipRecordText("充次记录"), - ], - ), - ); - } - - Widget vipRecordText(String text){ - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pushNamed( - '/router/record_details', - arguments: { - "storeId": widget.arguments["storeId"], - "titleName":text, - "mid":phoneQueryMemberInfo?.sid ??"", - "title":text == "消费记录" ?"bill_tenant_balance":"bill_tenant_balance", - "category":text == "消费记录" ?"bill_cate_buy":"bill_cate_rechange", - }); - }, - child: Container( - padding: EdgeInsets.symmetric(vertical: 16.h), - child: Row( - children: [ - Expanded( - child: Text( - text, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Padding(padding: EdgeInsets.only(right: 9.w,),child: Image.asset( - "assets/image/icon_right_z.webp", - width: 16.h, - height: 16.h, - color: Color(0xFF353535), - )), - ], - ), - ), - ); - } - - ///网络错误 - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - queryMemberPhoneInfo(widget?.arguments["phoneNum"] ?? ""); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/pay_success_page.dart b/lib/business_system/home/vip/pay_success_page.dart deleted file mode 100644 index 5dbbf9d6..00000000 --- a/lib/business_system/home/vip/pay_success_page.dart +++ /dev/null @@ -1,180 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:intl/intl.dart'; - -class PaySuccessPage extends StatefulWidget { - final Map arguments; - - PaySuccessPage({this.arguments}); - - @override - State createState() { - return _PaySuccessPage(); - } -} - -class _PaySuccessPage extends State { - - @override - void initState() { - super.initState(); - } - - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "收银成功", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: double.infinity, - margin: EdgeInsets.only(top:8.h, left: 16.w, right: 16.w), - padding: EdgeInsets.only(top:19.h,bottom: 36.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - Image.asset( - "assets/image/bus_pay_success_logo.png", - width: 76.h, - height: 76.h, - ), - Padding(padding: EdgeInsets.only(top:16.h,), - child:Text( - "收银成功", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 18.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Container( - width: double.infinity, - margin: EdgeInsets.only(left:17.w,right: 16.w,top:11.h,bottom:17.h), - child: Flex( - children: List.generate(70, (_) { - return SizedBox( - width: 2.w, - height: 1.h, - child: DecoratedBox( - decoration: - BoxDecoration(color: Color(0xFFEBECEF)), - ), - ); - }), - mainAxisAlignment: MainAxisAlignment.spaceBetween, - direction: Axis.horizontal, - ), - ), - Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w,bottom: 20.h), - child:Row( - children: [ - Expanded(child:Text( - "订单编号", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Text( - widget?.arguments["rechargeId"] ?? "", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ) - ], - )), - Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w,bottom: 20.h), - child:Row( - children: [ - Expanded(child:Text( - "支付金额", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Text( - "¥${widget?.arguments["rechargeMoney"] ?? ""}", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ) - ], - )), - Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w,bottom: 20.h), - child:Row( - children: [ - Expanded(child:Text( - "支付时间", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Text( - DateFormat("yyyy-MM-dd HH:mm:ss").format(DateTime.now()), - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ) - ], - )), - Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w), - child:Row( - children: [ - Expanded(child:Text( - "支付方式", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Text( - widget.arguments["payIndex"] == 1 ? "现金":(widget.arguments["payIndex"] == 2?"微信支付":"支付宝支付"), - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ) - ], - )), - ], - ), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/record_details.dart b/lib/business_system/home/vip/record_details.dart deleted file mode 100644 index 264f9c99..00000000 --- a/lib/business_system/home/vip/record_details.dart +++ /dev/null @@ -1,350 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shimmer/shimmer.dart'; -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/phone_query_member_info.dart'; -import '../../../retrofit/data/vip_record_details_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/no_data_view.dart'; - -class RecordDetails extends StatefulWidget { - final Map arguments; - - RecordDetails({this.arguments}); - - @override - State createState() { - return _RecordDetails(); - } -} - -class _RecordDetails extends State { - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - PhoneQueryMemberInfo phoneQueryMemberInfo; - String networkError = ""; - int networkStatus = 0; - String titleName; - int _current = 1; - List records = []; - String mid; - String title; - String category; - - @override - void initState() { - super.initState(); - titleName = widget?.arguments["titleName"] ?? ""; - mid = widget?.arguments["mid"] ?? ""; - title = widget?.arguments["title"] ?? ""; - category = widget?.arguments["category"] ?? ""; - queryMemberSourceBillDetails(mid:mid,title:title,category:category); - } - - ///查询会员消费/充值记录 - queryMemberSourceBillDetails({mid,title,category, isRefresh = true}) async { - try { - if (isRefresh) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = - await businessService.getMemberSourceBillDetails({ - "model": { - "mid": mid, - "title":title, - "category": category - }, - "current": _current, - "size": 10 - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll(baseData?.data?.records ?? []); - if ((baseData?.data?.records ?? []).isEmpty || - records.length.toString() == baseData.data.total) - refreshController.loadNoData(); - else - refreshController.loadComplete(); - networkStatus = 1; - } - } finally { - if (isRefresh) { - setState(() {}); - EasyLoading.dismiss(); - } - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: titleName, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1 - ? noNetwork() - : SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: records.length == 0 ? false : true, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _current = 1; - records.clear(); - queryMemberSourceBillDetails(mid:mid,title:title,category:category,isRefresh: false); - }, - onLoading: () { - _current++; - queryMemberSourceBillDetails(mid:mid,title:title,category:category,isRefresh: false); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Container( - child: - networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: recordItemSm(), - ); - }, - ) - : ((records == null || records.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: titleName == "消费记录"?"暂无消费记录":"暂无充值记录", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) : - Container( - margin: EdgeInsets.only(top: 16.h), - child: ListView.builder( - itemCount: records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: recordItem(records[position]), - ); - }, - ), - )), - ), - )); - } - - Widget recordItem(Records records) { - return Container( - width: double.infinity, - margin: EdgeInsets.only(bottom: 12.h, left: 16.w, right: 16.w), - padding: EdgeInsets.only(bottom: 12.h, top: 12.h, left: 16.w), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 20.h), - child: Text( - records?.createTime ?? "", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.bold), - ), - ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "金额:", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF666666), - ), - ), - TextSpan( - text: titleName == "消费记录"?"- ${records?.number}":"+ ${records?.number}", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFFFA5151), - ), - ), - ], - ), - ) - ], - ), - ); - } - - Widget recordItemSm() { - return Container( - width: double.infinity, - margin: EdgeInsets.only(bottom: 12.h, left: 16.w, right: 16.w), - padding: EdgeInsets.only(bottom: 12.h, top: 12.h, left: 16.w), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(bottom: 16.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 141.w, - height: 20.h, - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 42.w, - height: 20.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 55.w, - height: 20.h, - ), - ), - ], - ) - ], - ), - ); - } - - ///网络错误 - Widget noNetwork() { - return Container( - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - // _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/vip_recharge_flow.dart b/lib/business_system/home/vip/vip_recharge_flow.dart deleted file mode 100644 index db080b87..00000000 --- a/lib/business_system/home/vip/vip_recharge_flow.dart +++ /dev/null @@ -1,985 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/recharge_flow_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; - -class VipRechargeFlow extends StatefulWidget { - final String storeId; - - VipRechargeFlow( - Key key, - this.storeId, - ) : super(key: key); - - @override - State createState() { - return _VipRechargeFlow(); - } -} - -class _VipRechargeFlow extends State { - final RefreshController _refreshController = RefreshController(); - BusinessApiService businessService; - List records = []; - int _current = 1; - String networkError = ""; - int networkStatus = 0; - final TextEditingController editingController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - _focusNode.unfocus(); - } - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryRechargeFlow(isRefreshData: false); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - queryRechargeFlow({isRefreshData = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.rechargeFlow({ - "size": 10, - "pageSize": 10, - "current": _current, - "currentPage": 1, - "sort": "id", - "order": "descending", - "model": {"id": editingController?.text ?? ""}, - // "map": {"startDate": "", "endDate": ""}, - "timeRange": null - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll(baseData?.data?.records ?? []); - if ((baseData?.data?.records ?? []).isEmpty || - records.length.toString() == baseData.data.total) - _refreshController.loadNoData(); - else - _refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isRefreshData) setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8), - ), - rechargeFlowSearch(), - Expanded( - child:Container( - child:SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: records.length == 0 ? false : true, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _current++; - _onRefresh(isShowLoad: false); - }, - child: SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 20.w, top: 16.h,bottom: 16.h), - child: Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Expanded( - child: Text( - "充值流水", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF0D0D0D), - ), - ), - ), - ], - ), - ), - networkStatus == -1 - ? noNetwork() - : ((networkStatus == 0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return rechargeFlowItemSm(); - }, - ) - : ((records == null || records.length == 0) - ? NoDataView( - src: - "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : ListView.builder( - itemCount: records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: - HitTestBehavior.opaque, - onTap: () { - if (isKeyBoardShow) - FocusScope.of(context) - .requestFocus( - FocusNode()); - return; - }, - child: rechargeFlowItem( - records[position], - position), - ); - }, - ))), - ], - ))), - )), - ], - ); - } - - /// 搜索框 - Widget rechargeFlowSearch() { - return Container( - color: Colors.white, - child: Container( - height: 40.h, - margin: - EdgeInsets.only(left: 20.w, right: 17.w, top: 10.h, bottom: 15.h), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - records.clear(); - _onRefresh(); - }, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - controller: editingController, - decoration: InputDecoration( - hintText: "订单编号", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.symmetric( - vertical: 12.h, - ), - prefixIcon: Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - border: InputBorder.none, - ), - ), - ), - ); - } - - Widget rechargeFlowItem(Records records, index) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - top: 13.h, - bottom: 16.h, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - left: 12.h, - ), - child: Text( - "订单编号: ${records?.id ?? ""}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.bold), - ), - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 13.h), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "充值用户: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records?.createPerson ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - child: Text( - "手机号: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - records?.phone ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - child: Text( - "充值实付金额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - Expanded( - child: Text( - "¥${records?.rechargeMoney ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "充值实赠金额: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 2, - child: Text( - "¥${records?.giftdMoney ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - if (records.isShow) - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "充值门店: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 2, - child: Text( - records?.storeName ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - if (records.isShow) - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "充值方式: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 2, - child: Text( - records?.rechargeName ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12.h, - left: 12.w, - ), - child: Row( - children: [ - Expanded( - flex: 1, - child: Text( - "入账时间: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Expanded( - flex: 2, - child: Text( - records?.createTime ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - ], - )), - ], - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - records.isShow = !records.isShow; - }); - }, - child: Container( - padding: - EdgeInsets.symmetric(horizontal: 24.w, vertical: 6.h), - child: Icon( - records.isShow - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, - color: Color(0xFF0D0D0D), - size: 24, - )), - ), - ], - ) - ], - ), - ); - } - - Widget rechargeFlowItemSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - top: 13.h, - bottom: 16.h, - ), - child: Column( - children: [ - Container( - padding: EdgeInsets.only( - left: 12.h, - ), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 60.w, - height: 18.h, - ), - ), - SizedBox( - width: 15.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 198.w, - height: 18.h, - ), - ), - ], - ), - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 13.h), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 60.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - ), - ], - )), - Expanded( - flex: 2, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 120.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 12, - left: 12.h, - ), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 44.w, - height: 18.h, - ), - ), - ), - ], - )), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 24.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 16.w, - height: 16.h, - ), - ), - ], - ) - ], - ), - ); - } - - Widget noNetwork() { - return Container( - margin: EdgeInsets.only(top: 120.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/home/vip/vip_recharge_page.dart b/lib/business_system/home/vip/vip_recharge_page.dart deleted file mode 100644 index 93dd966e..00000000 --- a/lib/business_system/home/vip/vip_recharge_page.dart +++ /dev/null @@ -1,1711 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/bus_recharge_list.dart'; -import '../../../retrofit/data/phone_query_member_info.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/round_button.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; - -class VipRechargePage extends StatefulWidget { - final Map arguments; - - VipRechargePage({this.arguments}); - - @override - State createState() { - return _VipRechargePage(); - } -} - -class _VipRechargePage extends State { - BusinessApiService businessService; - final TextEditingController vipPhoneController = TextEditingController(); - final RefreshController _refreshController = RefreshController(); - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - int selectIndex = 0; - int payIndex = 1; - String networkError = ""; - int networkStatus = 0; - List records = []; - PhoneQueryMemberInfo phoneQueryMemberInfo; - String rechargeId; - List manualQueryInfo; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - _onRefresh(); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (vipPhoneController?.text != "") - await queryMemberPhoneInfo(vipPhoneController?.text ?? "", isShow: false); - else - await queryRechargeList("", isShow: false); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - ///充值列表 - queryRechargeList(mid, {isShow = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = - await businessService.getRechargePreferential({ - "current": 1, - "size": 999, - "model": { - "rechargeType": "", - "tenantCode": BusinessInstance.instance.businessTenant, - "mid": mid - } - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.clear(); - records.addAll(baseData?.data?.records ?? []); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isShow) setState(() {}); - } - } - - ///根据手机号搜索用户信息 - queryMemberPhoneInfo(phoneNum, {isShow = true}) async { - try { - if (isShow) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService - .queryMemberInfo( - {"phoneNum": phoneNum, "isNewUser": false}).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - phoneQueryMemberInfo = baseData.data; - queryRechargeList(phoneQueryMemberInfo?.mid ?? ""); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isShow) EasyLoading.dismiss(); - } - } - - ///充值方式支付 - payMemberType( - authCode, memberSourceId, rechargePreferentialId, source) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.posMemberRecharge({ - "authCode": authCode, - "memberSourceId": memberSourceId, - "rechargePreferentialId": rechargePreferentialId, - "source": source - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - rechargeId = baseData.data; - Navigator.of(context) - .popAndPushNamed('/router/pay_success_page', arguments: { - "rechargeId": baseData.data, - "rechargeMoney": records[selectIndex].rechargeMoney, - "payIndex": payIndex, - }); - networkStatus = 1; - setState(() {}); - } else { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally { - EasyLoading.dismiss(); - } - } - - ///手动查询充值订单状态 - manualQueryRechargeOrder(memberRechargeId) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.manualQuery({ - "phone": phoneQueryMemberInfo?.phoneNum ?? "", - "memberRechargeId": memberRechargeId, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(); - Navigator.of(context) - .popAndPushNamed('/router/pay_success_page', arguments: { - "rechargeId": baseData.data, - "rechargeMoney": records[selectIndex].rechargeMoney, - "payIndex": payIndex, - }); - } else { - if (baseData.msg != "需要用户输入支付密码") Navigator.of(context).pop(); - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: S.of(context).chongzhi, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: SmartRefresher( - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - controller: _refreshController, - onRefresh: (){ - _onRefresh(isShowLoad: false); - }, - physics: BouncingScrollPhysics(), - child: networkStatus == -1? noNetwork() : SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child:networkStatus == 0 ?vipRechargeSm():Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ///会员搜索框 - Container( - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.symmetric(horizontal: 16.w), - margin: EdgeInsets.only( - bottom: 16.h, right: 16.w, left: 16.w, top: 8.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "会员", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ), - Expanded( - child: TextField( - controller: vipPhoneController, - textInputAction: TextInputAction.search, - onEditingComplete: () { - FocusScope.of(context) - .requestFocus(FocusNode()); - queryMemberPhoneInfo( - vipPhoneController.text ?? ""); - }, - decoration: InputDecoration( - hintText: "请输入会员手机号", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - )), - - ///会员信息 - if (phoneQueryMemberInfo != null) - Container( - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 16.w), - margin: EdgeInsets.only( - bottom: 16.h, right: 16.w, left: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 16.h), - child: Text( - "用户名称: ${phoneQueryMemberInfo?.nickName ?? ""}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )), - Padding( - padding: EdgeInsets.only(bottom: 16.h), - child: Text( - "手机号: ${phoneQueryMemberInfo?.phoneNum ?? ""}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )), - Text( - "会员余额: ¥${phoneQueryMemberInfo?.balance ?? ""}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - )), - - ///充值列表 - rechargeList(), - - ///选择充值的套餐 - if (networkStatus == 1 && records.length > 0) - Container( - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.all(16), - margin: EdgeInsets.only( - bottom: 24.h, - right: 16.w, - left: 16.w, - ), - child: Column( - children: [ - Row( - children: [ - Expanded( - child: Text( - "本次充值(元)", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ), - Text( - AppUtils.calculateDouble((double.tryParse( - records[selectIndex] - ?.rechargeMoney) ?? - 0)), - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.symmetric(vertical: 16.h), - ), - Row( - children: [ - Expanded( - child: Text( - "充后余额(元)", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ), - Text( - "${AppUtils.calculateDouble((double.tryParse(records[selectIndex]?.rechargeMoney) ?? 0) + (double.tryParse(records[selectIndex]?.giftdMoney) ?? 0))}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ], - ), - ), - - ///充值方式 - Padding( - padding: EdgeInsets.only(left: 16.w, bottom: 16.h), - child: Text( - "充值方式", - style: TextStyle( - color: Colors.black, - fontSize: 15.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Padding( - padding: EdgeInsets.only(left: 16.w, right: 10.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - payIndex = 1; - }); - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: payIndex == 1 - ? Color(0xFF30415B) - : Color(0x29C5C5C5), - width: 2, - ), - color: payIndex == 1 - ? Color(0XFFEBF3FF) - : Color(0xFFF9FAF8)), - padding: EdgeInsets.only( - top: 21.h, - bottom: 15.h, - ), - margin: EdgeInsets.only(right: 6.w), - child: Column( - children: [ - Image.asset( - "assets/image/bus_vip_xj.webp", - width: 45.w, - height: 36.h, - ), - Padding( - padding: EdgeInsets.only(top: 15.h), - child: Text( - "现金支付", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )) - ], - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - payIndex = 3; - }); - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: payIndex == 3 - ? Color(0xFF30415B) - : Color(0x29C5C5C5), - width: 2, - ), - color: payIndex == 3 - ? Color(0XFFEBF3FF) - : Color(0xFFF9FAF8)), - padding: EdgeInsets.only( - top: 21.h, - bottom: 15.h, - ), - margin: EdgeInsets.only(right: 6.w, left: 6.w), - child: Column( - children: [ - Image.asset( - "assets/image/bus_vip_alipay.webp", - width: 36.h, - height: 36.h, - ), - Padding( - padding: EdgeInsets.only(top: 15.h), - child: Text( - "支付宝支付", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )) - ], - ), - ), - )), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - payIndex = 2; - }); - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: payIndex == 2 - ? Color(0xFF30415B) - : Color(0x29C5C5C5), - width: 2, - ), - color: payIndex == 2 - ? Color(0XFFEBF3FF) - : Color(0xFFF9FAF8)), - padding: EdgeInsets.only( - top: 21.h, - bottom: 15.h, - ), - margin: EdgeInsets.only(right: 6.w, left: 6.w), - child: Column( - children: [ - Image.asset( - "assets/image/bus_vip_wx.webp", - width: 36.h, - height: 36.h, - ), - Padding( - padding: EdgeInsets.only(top: 15.h), - child: Text( - "微信支付", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )) - ], - ), - ), - )), - ], - ), - ), - - ///确认充值 - Align( - alignment: Alignment.bottomCenter, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (widget.arguments["storeId"] == "0") { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "请选择门店进行充值", - color: Color(0xFF30415B), - )); - } else { - if (vipPhoneController.text == "") { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "请输入会员手机号进行充值", - color: Color(0xFF30415B), - )); - } else { - showRechargePayDialog(); - } - } - }, - child: Container( - color: Colors.white, - width: double.infinity, - margin: EdgeInsets.only(top: 132.h), - padding: EdgeInsets.only( - top: 10.h, - left: 16.w, - right: 16.w, - bottom: 34.h), - child: Container( - padding:EdgeInsets.symmetric(vertical: 16.h), - alignment: Alignment.center, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27), - ), - child: Text( - "确认充值", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ), - )) - ], - ), - )), - ), - ), - ); - } - - ///确认充值支付提示弹窗 - showRechargePayDialog() { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - contentPadding: EdgeInsets.all(0), - content: Container( - width: MediaQuery.of(context).size.width - 80, - padding: EdgeInsets.only( - top: 24.h, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: - EdgeInsets.only(bottom: 20.h, left: 14.w, right: 14.w), - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "请确认充账户及充值套餐后再点击确认", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - bottom: 18.h, left: 14.w, right: 14.w), - child: Text( - "充值账户: ${phoneQueryMemberInfo?.phoneNum ?? ""}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Padding( - padding: EdgeInsets.only( - bottom: 18.h, left: 14.w, right: 14.w), - child: Text( - "充值套餐: 充${records[selectIndex]?.rechargeMoney ?? ""}送${records[selectIndex]?.giftdMoney ?? ""}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8), - ), - Container( - height: 55.h, - child: Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Colors.black, - fontSize: 16.sp, - fontWeight: FontWeight.bold, - padding: EdgeInsets.all(14), - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - Container( - width: 1.w, - height: double.infinity, - color: Color(0xFFD8D8D8), - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(14), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - if (payIndex == 1) { - payMemberType( - null, - phoneQueryMemberInfo?.sid ?? "", - records[selectIndex]?.id ?? "", - payIndex); - } else { - Navigator.of(context).pushNamed( - '/router/scan_code_page', - arguments: { - "storeId": widget.arguments["storeId"], - "scanCodeType": "充值支付", - "rechargePreferentialId": - records[selectIndex]?.id ?? "", - "memberSourceId": - phoneQueryMemberInfo?.sid ?? "", - "source": payIndex.toString(), - "rechargeMoney": - records[selectIndex]?.rechargeMoney ?? - "" - }).then((value) { - if (value == 1) { - queryMemberPhoneInfo( - vipPhoneController?.text ?? "", - isShow: false); - } else { - manualQueryInfo = value; - showPayQueryDialog( - manualQueryInfo[0], manualQueryInfo[1]); - } - }); - } - }, - ), - flex: 1, - ), - ], - ), - ) - ], - ), - ), - ); - }, - ); - } - - ///手动查询弹窗 - showPayQueryDialog(String queryDialog, String rechargeOrderId) { - showDialog( - context: context, - barrierDismissible: false, - builder: (context) { - return AlertDialog( - contentPadding: EdgeInsets.all(0), - content: Container( - width: MediaQuery.of(context).size.width - 80, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - alignment: Alignment.topRight, - padding: - EdgeInsets.symmetric(horizontal: 5.w, vertical: 10.h), - child: Image.asset( - "assets/image/cancel.webp", - width: 24.h, - height: 24.h, - )), - ), - Padding( - padding: - EdgeInsets.only(bottom: 20.h, left: 14.w, right: 14.w), - child: Text( - queryDialog, - style: TextStyle( - color: Colors.black, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - Padding( - padding: - EdgeInsets.only(bottom: 20.h, left: 14.w, right: 14.w), - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "请确认用户支付成功后再点击手动查询", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFFA5151), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "\n*", - style: TextStyle( - color: Colors.blue, - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "订单查询成功后可关闭当前弹窗", - style: TextStyle( - color: Colors.blue, - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - TextSpan( - text: "*", - style: TextStyle( - color: Colors.blue, - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - manualQueryRechargeOrder(rechargeOrderId); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - padding: EdgeInsets.symmetric( - horizontal: 26.w, vertical: 10.h), - margin: EdgeInsets.only(right: 8.w, bottom: 20.h), - child: Text( - "手动查询", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ), - )), - ], - ), - ), - ); - }, - ); - } - - Widget rechargeList() { - return Container( - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h), - child: (records != null && (records?.length ?? 0) > 0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: records?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - setState(() { - selectIndex = position; - }); - }, - child: rechargeItem(records[position], position)); - }, - ) - : NoDataView( - src: "assets/image/xiao_fei.webp", - isShowBtn: false, - text: "暂无充值套餐~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 90.h, left: 60.w, right: 60.w), - )); - } - - Widget rechargeItem(Records records, index) { - return Stack( - alignment: Alignment.topRight, - children: [ - Container( - width: double.infinity, - height: 69.h, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: selectIndex == index - ? Color(0xFF30415B) - : Color(0x29C5C5C5), - width: 2, - ), - color: - selectIndex == index ? Color(0XFFEBF3FF) : Color(0xFFF9FAF8)), - margin: EdgeInsets.only(bottom: 14.w), - padding: EdgeInsets.only(left: 16), - child: Flex( - direction: Axis.horizontal, - children: [ - Expanded( - flex: 2, - child: Container( - child: Text.rich( - TextSpan(children: [ - TextSpan( - text: "储值 ", - style: TextStyle( - fontSize: 12.sp, - color: selectIndex == index - ? Color(0xFF4D4D4D) - : Color(0xFF868686), - fontWeight: MyFontWeight.regular), - ), - TextSpan( - text: records?.rechargeMoney ?? "0", - style: TextStyle( - fontSize: 18.sp, - fontFamily: 'JDZhengHT', - color: selectIndex == index - ? Color(0xFF353535) - : Color(0xFF302F3A), - fontWeight: MyFontWeight.medium), - ), - TextSpan( - text: "元", - style: TextStyle( - fontSize: 18.sp, - fontFamily: 'JDZhengHT', - color: selectIndex == index - ? Color(0xFF353535) - : Color(0xFF302F3A), - fontWeight: MyFontWeight.semi_bold), - ), - ]), - ), - )), - Container( - width: 1.w, - height: 37.h, - color: selectIndex == index - ? Color(0xFF302F3A) - : Color(0xFF979797), - margin: EdgeInsets.only(right: 16.w, left: 12), - ), - Expanded( - flex: 3, - child: Text.rich( - TextSpan(children: [ - TextSpan( - text: "赠送 ", - style: TextStyle( - fontSize: 12.sp, - color: selectIndex == index - ? Color(0xFF353535) - : Color(0xFF868686), - fontWeight: MyFontWeight.regular), - ), - TextSpan( - text: records?.giftdMoney ?? "0", - style: TextStyle( - fontSize: 18.sp, - fontFamily: 'JDZhengHT', - color: selectIndex == index - ? Color(0xFF353535) - : Color(0xFF302F3A), - fontWeight: MyFontWeight.medium), - ), - TextSpan( - text: "元", - style: TextStyle( - fontSize: 18.sp, - fontFamily: 'JDZhengHT', - color: selectIndex == index - ? Color(0xFF353535) - : Color(0xFF302F3A), - fontWeight: MyFontWeight.semi_bold), - ), - ]), - ), - ) - ], - ), - ), - if (selectIndex == index) - Image.asset( - "assets/image/bus_vip_j.webp", - width: 32.h, - height: 32.h, - fit: BoxFit.fill, - ), - ], - ); - } - - Widget vipRechargeSm() { - return Container( - margin: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ///会员搜索框 - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(top:8.h,bottom:16.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:double.infinity, - height: 51.h, - ), - ), - - ///会员信息 - Container( - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.only(top: 16.h, bottom: 16.h, left: 16.w), - margin: EdgeInsets.only(bottom: 16.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:70.w, - height: 17.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:43.w, - height: 17.h, - ), - ), - ], - ), - SizedBox(height: 16.h,), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:56.w, - height: 17.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:85.w, - height: 17.h, - ), - ), - ], - ), - SizedBox(height: 16.h,), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:70.w, - height: 17.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:77.w, - height: 17.h, - ), - ), - ], - ), - ], - )), - - ///充值列表 - ListView.builder( - padding: EdgeInsets.zero, - itemCount: 3, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return rechargeItemSm(); - }, - ), - - ///选择充值的套餐 - Container( - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.all(16), - margin: EdgeInsets.only( - bottom: 24.h, - ), - child: Column( - children: [ - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:89.w, - height: 17.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:26.w, - height: 17.h, - ), - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.symmetric(vertical: 16.h), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:89.w, - height: 17.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:26.w, - height: 17.h, - ), - ), - ], - ), - ], - ), - ), - - ///充值方式 - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(left: 16.w, bottom: 16.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:60.w, - height: 21.h, - ), - ), - Row( - children: [ - Expanded(child:Container( - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.only(top: 16.h, bottom: 16.h, left: 16.w), - margin: EdgeInsets.only(right: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(bottom:15.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:45.w, - height: 32.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:56.w, - height: 17.h, - ), - ), - ], - ))), - Expanded(child:Container( - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.only(top: 16.h, bottom: 16.h, left: 16.w), - margin: EdgeInsets.only(right: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(bottom:15.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:45.w, - height: 32.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:56.w, - height: 17.h, - ), - ), - ], - ))), - Expanded(child:Container( - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.only(top: 16.h, bottom: 16.h, left: 16.w), - margin: EdgeInsets.only(right: 16.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(bottom:15.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:45.w, - height: 32.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:56.w, - height: 17.h, - ), - ), - ], - ))), - ], - ) - , - - ///确认充值 - Align( - alignment: Alignment.bottomCenter, - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(bottom: 16.h,top: 30.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(27), - ), - width:double.infinity, - height: 54.h, - ), - ),) - ], - ), - ); - } - - Widget rechargeItemSm() { - return Container( - width: double.infinity, - height: 69.h, - color: Colors.white, - margin: EdgeInsets.only(bottom: 14.w), - padding: EdgeInsets.only(left: 16), - child: Flex( - direction: Axis.horizontal, - children: [ - Expanded( - flex: 2, - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:25.w, - height: 15.h, - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:50.w, - height: 25.h, - ), - ), - ], - ) - ], - )), - Container( - width: 1.w, - height: 37.h, - color: Color(0xFF979797), - margin: EdgeInsets.only(right: 16.w, left: 12), - ), - Expanded( - flex: 3, - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:25.w, - height: 15.h, - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right:10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width:60.w, - height: 25.h, - ), - ), - ], - ) - ], - ), - ) - ], - ), - ); - } - - Widget noNetwork() { - return Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // "无法连接到网络", - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } - -} diff --git a/lib/business_system/login/business_login_page.dart b/lib/business_system/login/business_login_page.dart deleted file mode 100644 index 68263c38..00000000 --- a/lib/business_system/login/business_login_page.dart +++ /dev/null @@ -1,589 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/business_instance.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:sharesdk_plugin/sharesdk_interface.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_login_info.dart'; -import '../../utils/font_weight.dart'; -import '../../view_widget/border_text.dart'; -import '../../view_widget/round_button.dart'; -import '../../view_widget/settlement_tips_dialog.dart'; - -class BusinessLoginPage extends StatefulWidget { - final Map arguments; - - BusinessLoginPage({this.arguments}); - - @override - State createState() { - return _BusinessLoginPage(); - } -} - -class _BusinessLoginPage extends State { - TextEditingController _userPhoneController = TextEditingController(); - TextEditingController _passwordController = TextEditingController(); - String phoneInputTips, pwdInputTips; - final TapGestureRecognizer tapGestureRecognizer = TapGestureRecognizer(); - var checkStatus = false; - BusinessApiService businessService; - - @override - void initState() { - super.initState(); - } - - @override - void dispose() { - super.dispose(); - _userPhoneController.removeListener(() {}); - _userPhoneController.dispose(); - _passwordController.dispose(); - } - - void refresh() { - if (!mounted) return; - setState(() {}); - } - - login() async { - SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { - showAlertDialog(); - return; - } - if (_userPhoneController.text == "") { - SmartDialog.showToast(S.of(context).qingshurushoujihao, - alignment: Alignment.center); - return; - } - if (_passwordController.text == "") { - SmartDialog.showToast("请输入密码", alignment: Alignment.center); - return; - } - if (!checkStatus) { - SmartDialog.showToast(S.of(context).gouxuanxieyi, - alignment: Alignment.center); - return; - } - - var param = { - "grantType": "password", - "account": _userPhoneController.text, - "password": _passwordController.text, - }; - - EasyLoading.show( - status: S.of(context).zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - businessService = BusinessApiService(Dio(), context: context); - BaseData baseData = - await businessService.annoToken(param).catchError((error) { - print(error.message); - }); - if (baseData != null && baseData.isSuccess) { - var businessLoginInfo = BusinessLoginInfo.fromJson(baseData.data); - if(businessLoginInfo.storeList.length > 1){ - businessLoginInfo.storeList.insert(0, StoreList(name: "所有门店")); - } - BusinessInstance.instance.businessTenant = businessLoginInfo.tenantCode; - BusinessInstance.instance.businessToken = businessLoginInfo.token; - BusinessInstance.instance.expirationTime = businessLoginInfo?.expirationTime ?? ""; - BusinessInstance.instance.serviceStatus = businessLoginInfo?.status?.desc ?? ""; - sharedPreferences.setString('account', _userPhoneController.text); - sharedPreferences.setString('password', _passwordController.text); - sharedPreferences.setString('identitySwitch', "1"); - if (businessLoginInfo.storeList.length > 1) { - Navigator.of(context) - .pushReplacementNamed('/router/select_shop', arguments: { - "businessLoginInfo": businessLoginInfo, - "routeSource":"登录", - }); - } else { - Navigator.of(context) - .pushReplacementNamed('/router/business_page', arguments: {"businessLoginInfo": businessLoginInfo}); - } - } else { - if (baseData.msg != null) - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - EasyLoading.dismiss(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - resizeToAvoidBottomInset: false, - body: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), - child: Stack( - children: [ - Container( - padding: - EdgeInsets.only(top:34.h, left: 16.w, right: 17.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(left: 5.w), - child: Text("您好!", - style: TextStyle( - fontSize: 26.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.bold)), - ), - Padding( - padding: EdgeInsets.only(left: 5.w, top: 15.h), - child: Text("欢迎使用回乡收银商家APP", - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.medium)), - ), - SizedBox(height:134.h), - Row( - children: [ - Image.asset( - "assets/image/business_phone.webp", - width: 10.w, - height: 15.h, - ), - SizedBox(width: 4.w), - Text("手机号码/用户名", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xD9000000), - fontWeight: MyFontWeight.bold)) - ], - ), - Container( - margin: EdgeInsets.only(top: 13.h, bottom: 24.h), - child: TextField( - controller: _userPhoneController, - keyboardType: TextInputType.text, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF000000), - fontWeight: MyFontWeight.regular), - decoration: InputDecoration( - hintText: "请输入手机号码或用户名", - hintStyle: TextStyle( - fontSize: 14.sp, - color: Color(0xFF262626), - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.only( - left: 12.w, top: 16.h, bottom: 15.h), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(4), - borderSide: BorderSide.none), - filled: true, - fillColor: Color(0xFFF8F9FA), - ), - onChanged: (value) { - if (value.isEmpty) { - phoneInputTips = "请输入手机号码"; - } else { - phoneInputTips = null; - } - refresh(); - }, - // inputFormatters: [ - // LengthLimitingTextInputFormatter(11) - // ], - ), - ), - Row( - children: [ - Image.asset( - "assets/image/business_code.webp", - width: 12.w, - height: 15.h, - ), - SizedBox(width: 4.w), - Text("密码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xD9000000), - fontWeight: MyFontWeight.bold)) - ], - ), - Container( - margin: EdgeInsets.only(top: 12.h, bottom: 75.h), - child: TextField( - controller: _passwordController, - keyboardType: TextInputType.text, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF000000), - fontWeight: MyFontWeight.regular), - decoration: InputDecoration( - hintText: "请输入密码", - hintStyle: TextStyle( - fontSize: 14.sp, - color: Color(0xFF262626), - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.only( - left: 12.w, top: 16.h, bottom: 15.h), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(4), - borderSide: BorderSide.none), - filled: true, - fillColor: Color(0xFFF8F9FA), - ), - onChanged: (value) { - if (value.isEmpty) { - pwdInputTips = "请输入密码"; - } else { - pwdInputTips = null; - } - refresh(); - }, - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - login(); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 15.h), - margin: EdgeInsets.only(bottom: 22.h), - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - child: Text(S.of(context).login, - style: TextStyle( - fontSize: 16.sp, - color: Colors.white, - fontWeight: MyFontWeight.bold)), - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Checkbox( - value: checkStatus, - onChanged: (a) { - setState(() { - checkStatus = !checkStatus; - }); - }, - checkColor: Color(0xFFFFFFFF), - fillColor: - MaterialStateProperty.all(Color(0xFF30415B)), - ), - Expanded( - child: Text.rich( - TextSpan(children: [ - TextSpan( - text: S.of(context).privacy_policy1, - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - ), - ), - TextSpan( - // text: S.of(context).privacy_policy2, - text: "《一心回乡用户协议》", - recognizer: TapGestureRecognizer() - ..onTap = () { - Navigator.of(context).pushNamed( - '/router/user_service_page'); - }, - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - ), - ), - TextSpan( - text: "、", - style: TextStyle( - fontSize: 11.sp, - color: Colors.black, - ), - ), - TextSpan( - text: S.of(context).privacy_policy3, - recognizer: tapGestureRecognizer, - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - ), - ), - TextSpan( - text: S.of(context).privacy_policy4, - style: TextStyle( - fontSize: 11.sp, - height: 1.2, - color: Color(0xFF010101), - ), - ), - ]), - )), - SizedBox( - width: 30, - ) - ], - ), - Padding(padding:EdgeInsets.only(top:45.h), - child: - Row( - mainAxisAlignment:MainAxisAlignment.center, - children: [ - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pushNamed( - '/router/register_retrieve_password',arguments:{"titleName":"注册账号"}); - }, - child:Column( - children: [ - Image.asset( - "assets/image/register_account.webp", - width:24.h, - height:24.h, - fit: BoxFit.fill, - ), - Padding(padding:EdgeInsets.only(top:4.h), - child: Text( - "注册账号", - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - fontWeight: MyFontWeight.regular), - )) - ], - ), - ), - SizedBox(width:63.w), - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pushNamed( - '/router/register_retrieve_password',arguments:{"titleName":"找回密码"}); - }, - child:Column( - children: [ - Image.asset( - "assets/image/retrieve_password.webp", - width:24.h, - height:24.h, - fit: BoxFit.fill, - ), - Padding(padding:EdgeInsets.only(top:4.h), - child: Text( - "找回密码", - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - fontWeight: MyFontWeight.regular), - )) - ], - )), - ], - ),) - ], - ), - ), - Container( - margin: EdgeInsets.only(top:74.h), - child: Image.asset( - "assets/image/business_login.webp", - fit: BoxFit.cover, - width: double.infinity, - height: 199.h, - ), - ) - ], - ), - ), - )), - ); - } - - showAlertDialog() { - //显示对话框 - showDialog( - context: context, - builder: (BuildContext context) { - return WillPopScope( - onWillPop: () async => false, - child: SimpleDialog( - titlePadding: EdgeInsets.all(10), - backgroundColor: Colors.transparent, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(6), - ), - children: [ - Stack( - alignment: Alignment.bottomCenter, - children: [ - Container( - alignment: Alignment.center, - width: double.infinity, - height: 325.h, - padding: EdgeInsets.only(left: 16.w, right: 16.w), - decoration: new BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(top: 24.h, bottom: 10.h), - child: Text( - S.of(context).xieyitanchuang, - style: TextStyle( - color: Color(0xff4D4D4D), - fontSize: 18.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - Text.rich( - TextSpan(children: [ - TextSpan( - text: S.of(context).yinsizhengce1, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - height: 1.3.h, - color: Color(0xff727272), - ), - ), - TextSpan( - text: S.of(context).yinsixieyi, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - color: Color(0xff32A060)), - recognizer: TapGestureRecognizer() - ..onTap = () { - Navigator.of(context) - .popAndPushNamed('/router/treaty_page'); - }, - ), - ]), - ), - SizedBox( - height: 10.h, - ), - Text( - S.of(context).yinsizhengce2, - style: TextStyle( - color: Color(0xff727272), - fontSize: 14.sp, - height: 1.3.h, - fontWeight: MyFontWeight.medium, - ), - ), - SizedBox( - height: 16.h, - ), - ], - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - onTap: () { - Navigator.of(context).pop(); - // exit(0); - }, - child: Container( - height: 40.h, - alignment: Alignment.bottomCenter, - margin: EdgeInsets.only(bottom: 20.h), - child: BorderText( - padding: EdgeInsets.only( - top: 10.h, - bottom: 10.h, - left: 36.w, - right: 36.w, - ), - text: S.of(context).jujue, - fontSize: 12.sp, - textColor: Color(0xFF32A060), - borderColor: Color(0xFF32A060), - borderWidth: 1.w, - radius: 23, - ), - ), - ), - SizedBox( - width: 21.w, - ), - Container( - height: 40.h, - margin: EdgeInsets.only(bottom: 20.h), - alignment: Alignment.bottomCenter, - child: RoundButton( - text: S.of(context).tongyibingjixu, - textColor: Colors.white, - fontSize: 12.sp, - callback: () { - SharedPreferences.getInstance().then((value) { - value.setBool("isShowPrivacyPolicy", true); - }); - SharesdkPlugin.uploadPrivacyPermissionStatus( - 1, - (success) => { - Navigator.of(context).pop(), - }, - ); - }, - padding: EdgeInsets.only( - top: 10.h, - bottom: 10.h, - left: 21.5.w, - right: 21.5.w, - ), - backgroup: Color(0xff32A060), - radius: 23, - ), - ), - SizedBox( - height: 20.h, - ), - ], - ), - ], - ) - ], - ), - ); - }, - ); - } -} diff --git a/lib/business_system/login/captcha/bus_block_puzzle_captcha.dart b/lib/business_system/login/captcha/bus_block_puzzle_captcha.dart deleted file mode 100644 index 0f7c5e16..00000000 --- a/lib/business_system/login/captcha/bus_block_puzzle_captcha.dart +++ /dev/null @@ -1,551 +0,0 @@ -import 'dart:convert'; -import 'dart:math'; - -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/login/captcha/click_word_captcha.dart'; - -import '../../../retrofit/business_api.dart'; -import '../../../utils/captcha_util.dart'; -import '../../../utils/widget_util.dart'; - -typedef VoidSuccessCallback = dynamic Function(String v); - -class BusBlockPuzzleCaptchaPage extends StatefulWidget { - final VoidSuccessCallback onSuccess; //拖放完成后验证成功回调 - final VoidCallback onFail; //拖放完成后验证失败回调 - - BusBlockPuzzleCaptchaPage({this.onSuccess, this.onFail}); - - @override - _BusBlockPuzzleCaptchaPageState createState() => _BusBlockPuzzleCaptchaPageState(); -} - -class _BusBlockPuzzleCaptchaPageState extends State - with TickerProviderStateMixin { -// String baseImageBase64 = -// "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCADIAlgDASIAAhEBAxEB/8QAHAABAAMBAQEBAQAAAAAAAAAAAAUGBwQIAwIB/8QASBAAAQMDAQUEBQYLBQkAAAAAAAECAwQFEQYHEiExURMiQWEycYGRoQgUI0KCsRUkM1JicpLB0eHwNDVzorM3U2NkdZOy0vH/xAAaAQEAAwEBAQAAAAAAAAAAAAAAAgMEBQEG/8QAMhEBAAIBAgMECQQCAwAAAAAAAAECAwQRBSExEkFR8BMiMmFxgaGxwQaR0eEUI0Jisv/aAAwDAQACEQMRAD8A9UgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAR9TeaCnXD6hrndGIrvuPYiZ6I2vWkb2nZIAr8mq6Fi4SGqcnVGt/ep+otWWt/5R80P68ar/wCOSfor+DNOv00TtN4hPA56Otpa1iupKiKZE57jkXHr6HQQmNurTW1bx2qzvAADxIBE3/UNusUSOrpvpHJlkLE3nu9SdPNcIZreto12qn9na446JiqiNXd7SRfemOPTHtNen0WXUc6xy8ZcnXca0mhnsZLb28I5z/XzbADB32XWl8Y50kd0lYq5xUTdm32Ne5PghyybMNSObvJRU+907duToV4Vg6ZNRWJ8++GGvHNRk549LaY+cfiXoIHnOWxa9sDGvp4rxDGi5RKWdZW+1rHLw9aHZY9r19t0vZXqCG5RNVUeqtSGZvtRN3h03U9ZZbgGS9e1pslb/CfMfVox8cxxPZ1FLUn3x5+z0ACvaS1hZtVQK61VP07EzJTSpuyxp1VvinFOKZTzLCcTLivhtNMkbTHdLs48lcle1Sd4AAVpgIu/ahs+n4Emvdzo6CN2d3t5Uar8eDUXi5fJMmf3Pbxoqj/ss1xuC/8ALUjm/wCpuGvBoNTqI3xY5mPGI5fv0Rm9Y5TLVAY3D8obSj3okluv0Lc+k+CJUT9mRVLXY9rOibzIkVNf6aCZcfR1jXUy56IsiIir6lUnl4bq8Ub3xz+yUc+i8gNVHIitVFReKKniDCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHLX1sdIzvd6ReTE/rgh9KudKeFXc3LwanVSEgpZLhUOc9yozPff+5P64E6Viec9EbTPc4qmatukqxsRz0/MZwanr/mfeDTDn4WqqEani2JM/Ff4Fjghjp40jhYjGJ4IfQnOaY5V5KZ01bTvfmgU0rb8Yc6ocvVXp+5DlqdG0j2r2FTURu8N7DkT2YRfiWgEYzXjvV34fpskbWpDNLnpm6W1/wA4pcztZxSWnVWyN88c/cqnXYNbPic2C8L2kS8EqGp3m/rInNPNOPkpoBVtW6Wjucb6qga2KvTiqJwbN5L5+fv8tFM1cnq5Y+bh6nhWo0MzqOG2neOtZ5xP8/fwlZ43sljbJG5r2ORHNc1coqLyVFKrrbVbbPGtJQq19xenFeaQovivVeie1eGEWoWHU9ZYaeqo3Rue1EckccnBYZc8fZnOU69Mqf3R1gfqG4y1lwc91LG/elcvOZ68d3PxX+eUsppq45m+X2Y+rFn/AFDl1+Oml0Fdst+U/wDXx5/nuju3fDT2lq/U07q6umfHSvd3538Xy9d3PuzyTzxg02y2C22aNG0FKxkmMOlcm9I71uXj7OXkScbGxsayNqNY1ERrWphEToh/SnPq8mbl0jwdzhfBNPw+va27WTvtPXf3eHncABldkIPUulLNqSBzLrRRySYw2dqbsrOmHpx8c4XKdUUnATx5b4rRfHO0+5C+OuSvZvG8PNmuNB3fRFUy7WuomloYn5jrIu7LTqvLfROXTeTgvJcZRF0vZTtGj1NG22XdzIb3G3LVTg2qanNzU8HInNvtThlG6NNHHNE+KZjZIntVrmOTKOReCoqeKHm3apoyXRd6p7nZnyR2+aXfp3tXvUsyd5GZ6cMtXoiovLK/VaXU4+NU/wAXV8ssezb8T55+6XCzYL8Mt6fBzx98eHnzyekaiaKmgknqJGRQxNV75HuRrWNRMqqqvBERPE8/bSNtlRO6Wh0avzenTLX3CRnff/htX0U81TPHgiYyQOvdoV31pQ260wwvijc1jZ4IEVVq6jOEwicVbnCtZ1XjnCY1HZTstpdNwxXO+RR1N9ciOai4cyk8m+Cv6u9icMq73Bw/TcIxf5PEY7V59mn5nztHvlfOrya2/o9Nyr3yyHTmyHV2raj8I3Z7rfHOqOfVXJzpKiROqMVd5eX11b5Gi235POn4o2Lc7vdqqZPS7JY4Y1+zuucn7RtQMGq/Uuuzz6tuxXwiPz1b8Wkx448ZZFUfJ/0fLHuxz3iB35zKlqr/AJmqnwKfqT5OdQxkkmm74yf82muEW6qp45lZwz9j2no0GSnGtbSd/STPx5tVZ7PR40tt911sjuzKKZtRRxKquSgq/paWZOarGqLjxTKsVFzz6HpPZltJtGvaR6UmaS6QtR09BK5Fe1OW81frsyuMoiYymUTKFm1DY7ZqK1y2690cVZRyc45E5L1RU4tVPBUVFQ8mbRNE3rZRqijudoq6j5l2u9b7i1E3o3YX6KThje3c803Xtzw9JE31vp+LR2bRFMvj3T5/dor2cvKeUvYoKZsp1zT670wyuakcNxhVIq2mav5OTHNEXjuuTii+tMqqKXM4GXFbFecd42mFExNZ2kABW8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPzK7djc7ogEXWq6oqEYzrut/iScETYYmxs5J8ThoGb1Q5y/UT4r/SkiTvPcAAIAAAAAApWt9KSXKqirLajUqJHNjnavBFTkj/Z4+Xq42q00ENst0FHTJ9HE3GV5uXxVfNV4nWcb7nSMu0VsdMiV0sLqhkW6vGNqoiuzjHNye8tnJe9Yp3QwYeHafT6i+qpG1r9f6+Pf4y7AAVN4AAAK9dtaaftNHeaq4XBIYLPJHFXO7J7uxdJu7iYRqqud9vLPMsJO2O1Y3tG3nf8x+7yJiQjdSWal1BZKu2VzVWCoZu5Tmx3Nrk80VEX2EkDyl7Y7Res7TDy1YtE1t0lkuyXZtLYrnUXa/MY6thkfDSMauWo1Mosv2vDlhFXPPhrQBp1uty63LOXNPP7KtNpqabHGPH0AAZF4AABEat0/Rap07W2e5szT1LFbvJ6UbubXt82rhU9RLglW00tFqztMETs8ebMbtW7NtrP4OujuzhdUfg2vblUYqK7DJUzjgiq1yKv1XO6nsM8sfKosbKPWdBdI2MYy6UitkxzdLEqIrl+w+NPsnojZ/d337Q9iucr0fPU0cT5XJ4ybqI//Minb4tEZ8WLWR/yjafjHmV+ae1EXT4AOEoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPlU/kHf14n1PxOmYXp5HsdRzW7nL1yh2HBbn/TSM6oip7P/p3ntupIACIAAAAABTaz/a9a/wDo1T/rRFyK3ftN1Fwv1Nd7fd5rdVwUz6XLII5UcxzmuXg9F8WoW4ZiJneduUqssTMRtG/ODX16qrLZoPwakSXGvq4aCmdKiqxkkrt1HORPBEyvsQiKupvmlbxYvwle3Xi33OqbQStmpo4nxSua5zXsWNE7uW4VHZVOqnbVaRrbnR1VJftQVNdTSNY6Hdp4oJKeZrt5srHsTmmE4Lw588n7o9K1cl3oa/UN7muzqBVdSw/N2QRteqbvaORvpPwqoi8ETK4RC6k46V2mYnrvy68uW07cvp81NoyWtvETHTbn08d+fP6/JTNTatu1C7UNVT6gWWqt0zuyoKC2unpGMaqdyebs8o9UzvYe1Grn1Flqq286g1jX2i1XVbPRWymhknkhgjlmlllRytRFka5qNRG8eGc/D41uzuaotdws8OoaumsVVJJL81jgj32ue7fVqyKmXM3lXhzxwVyoS910vUyXn8K2S8TWuufA2mnxCyaOdjVVWq5q47yZXC58uRr9Lp9oiu2+085jlHs9Y2+PjtM9VUUzxO877cuW/wAenP4eG/gyyuueodM6f2mV6XCJL9Dc6CP55DA1GvRewj3tx281FWNeKccKq48Cztq9XX7atqqyUGoktlitkdHLmOkikna6SJy7jFe1W7rlRznK5HKm61G4RVJObZlTz6fv9sqLvWzOvNVDVz1MjGb6PY9j1wiIiYVWcscEXCcix2jTcVt1bqC/MqJHy3hlMx8StRGx9i1zUwvjne+BPNqsE1tNdptty9X3Y47491tvD5r8VbxERb7/AB/pnNLrPU9bpqz2elrKRNTVt6qbK+5up03Ejp1kV9QkXo7+6xMM9FVzyTgkpSVGrLLtYstkuWolutjrqKpqG9pSwxTLIzcRWvVjUTCbyKiojc7youcZPnq/SMVj0ivzenvlynjvrrxFPams+c0ckj3OV7Y3ZSVqbytVmHbyOXgmMpF6Gs91ue1iC/1cuo6umoLdLTvr7xRtomyyPc3djhg3GOa1Gq5VeqLlU8OGff8AValr1iIrtbujffu28O7aOXuhbz6NoABxVgAAAAAAADAflaMYtBph6/lEnnanqVrc/FELz8nlyu2P2HeXOFqGp6kqJUT4GX/KwubJL9p+2NVUfS00tVJ0xI5rW/6T/ebNshtq2nZjpqlc1Wv+ZMme1UwqOk+kci+1yn0Grr2OE4Yt1mZn/wBfyn2t67LeAD59AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ0zlpKxHYXDV96KTDXI5qOauWqmUVPE47pTLNDvRpmRvh1ToRtrubad3YVLsRKvdev1V6L5FvZ7dd46veqfABU8AAAAIbVWoqPTduWpq3b0r8pDA1e9K7onROq+HuRZVrN57NeqN71pWbWnaIcmsNWUmmvmrJWrNPM9FWNi95see8/+CeK+pSwwTR1EEc0D2yRSNR7HtXKOaqZRUPPe5eNWXC5XBkLqiaNizTbid1jU5Mb7M4TmuF5qXLZNqpjEbZK6VEY5c0b3csrxWPPxT2p0Q35tF2Me9ecx1cDTcYtbVdjLG1Lez8Y/n6TtDVQAc59CAAAAAB+KiaOngkmne2OKNqve9y4RrUTKqp+zK9rWp2ysdZKCRHNRc1b28spyjz6+K+xOqGnSaa2pyxjj5+6GHiOvx6DBOa/yjxnwW3ResKTVHztkTVgqIHriJ6950We6/7kVOOF9aFnPOK0950fcbbcViWnmkYk0W+mWvavNjvZjKc0ynJTc9JakotTW1KmjXclZhJ4HL3ondF6ovHC+PryibeJcPjD/uwc6T9J8/w5/B+Kzqo9BqOWWO7pvHn+U2ADku8AAAfKsqYKKknqquVkNNAx0ssj1w1jWplVVeiIh9TzVt52nRXuOTTmnpkfa2P/AByrYvCoci8I2L4sReKr9ZUTHD0ulwvhuXiOeMVI5d8+EeeinPnrhrvZSnpPtY2v8GSJTXKqTLVyixUcaIi557q7jfVvv8z2S1qNajWoiNRMIickMo2BbP36Vs0l3u8Kx3u4sRFjemHU0PNI+qOVe877KY7vHWDXx7V482aMOD2McbR+ftEfLd7h37O9usgAOEtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhr1aFqUdLS4SVeLmLwR38FJkEq2ms7w9idlEpb5WWiRYZGLJE3gsMndc31L4E7R6ttM+ElnWmev1Z03U/a9H4kncLdSXCPcq4WyY5LycnqVOKFVuOg45VVaOufH+jKxH/FFT95pi2HJ7fKXu8StEd2t0jd6O4Uj29WzNVPvOSt1RY6JrlqLtRIrebWyo937Lcr8CgVWzm7vcvZz256dXve1fduKfiDZZXy/2q50sCf8KJ0v3q0sjBpo52yIW3jo7dRbVIImPisNK6aTklRUIrWJ5o30l9u6U6yWG+65uS1tTLJ2DlxJXTp3cZ9GNvDPjwTCJ448dJsuzaxW97ZapklxmTj+MqisRf1Ewip68l0Y1rGo1iI1rUwiImERCU6rFgjbTxz8ZY8mlnPP+2eXg4LDZ6OxW2Oht0e5E3irl4ukd4ucviq/yTCIiGY7SNEvoppbxZY1dSuVX1FOznCvNXt/R8VTw58vR14GXFqL479vrv197zWcPxavD6G0bbdPczHQ+0NjoYqLUEmHJhsdYvJyeCSdF/S5dcc10yN7ZI2vjc17HIjmuauUVF5KilE1Xs6pLjI+qs72UVW7i6NU+hkXrhPRXzTh5Z4lJjdqbRz1aqVNJCi9O0gdn3tyuPJTTbDi1HrYp2nwcWNfrOF+prKTekdLR+f72n4tzBl1BtMq0Z+OW+CZ3g6KRY/gqOJJNpMCt/u2Xe6dqmPuKJ0mWO5qr+peGzG85NvjE/wv5/JHtjY58jmtY1FVznLhERPFTNavaNVPbikoIYl6ySLJ8ERCGcuotVvRPxiohVem5C3HublM+ak6aK3W87QyZv1XppnsaStstp6RETH35/RP6y121IpKKxPVXrlr6tOSJ4ozz/S92eaR+z/Ra1UsV2u8apToqPghdzlXwe79Honjz5c7FprQlLb3sqLm5lXUpxazH0bF9S+kvr93iXMuvq6YaTi0/f1k0fC9Trc0azifd7NO6Pj5+Pgj79Z6O+22ShuEe/C/iipwcx3g5q+Cp/JcoqoYdftPX7QtxSuoppEhauGVsCd3GfRkbxx4cFyi+Z6BP49rXtVr0RzVTCoqZRUI6LiF9JvXbtVnrEurxDhWPW7X37N46WhlendrlM9rIdQ0roJOS1FOivjXzVvpJ4ct72F3odY6crY2up73b+9yZJM2N/7LsL8CFv8AsxsF0c6Snjkt8y8c0yojFX9RcoierBSLlsXuKJ+IXajn/wAeJ0X3bx0Ix8K1POLTjnw7vz92OuTium9W9YyR4x1/H2a1PqOyU7N6ovNtib1fVManxUq1/wBrOlLQ16RVr7jO1cdlRM30Xz31wzH2jOm7FNQOem/WWhjc8VbJI5fduJ95O2vYVRtejrxeZ52/7uliSL2K5yuynsQurouD4fWy55t7oj+p+8Lo1XEMvKuKK/GWe602j6j11Mlpt1PJS0c/dSgo8ySz8OT3ImXJz4IiJjnnGTQtkuyBljqYL1qhsU1zjw+npEVHR0zvznLyc9PDHBq8UyuFTTNNaWsumYHR2S3w0quTD5Ey6R/6z1y5fUq8CaI63j0eh/xdBT0ePv8AGfPfzmZ8WnT6G0W9LqLdq30gAB826IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACIq9NWWrVVmtlLvKuVcyNGOX2twpxpojTycrev/AH5P/YsYLIy3jpaWPJw/SZJ3virM++sfwiqTTtnpMdjbqZFRco5zEeqe1cqSoBCbTbrK/Fgx4Y2xVise6NgAHi0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z"; - String baseImageBase64 = ""; - String slideImageBase64 = ""; - String captchaToken = ""; - String secretKey = ""; //加密key - - Size baseSize = Size.zero; //底部基类图片 - Size slideSize = Size.zero; //滑块图片 - - var sliderColor = Colors.white; //滑块的背景色 - var sliderIcon = Icons.arrow_forward; //滑块的图标 - var movedXBorderColor = Colors.white; //滑块拖动时,左边已滑的区域边框颜色 - double sliderStartX = 0; //滑块未拖前的X坐标 - double sliderXMoved = 0; - bool sliderMoveFinish = false; //滑块拖动结束 - bool checkResultAfterDrag = false; //拖动后的校验结果 - - //-------------动画------------ - int _checkMilliseconds = 0; //滑动时间 - bool _showTimeLine = false; //是否显示动画部件 - bool _checkSuccess = false; //校验是否成功 - AnimationController controller; - - //高度动画 - Animation offsetAnimation; - - //底部部件key - GlobalKey _containerKey = new GlobalKey(); - - //背景图key - GlobalKey _baseImageKey = new GlobalKey(); - - //滑块 - GlobalKey _slideImageKey = new GlobalKey(); - double _bottomSliderSize = 60.h; - - //------------动画------------ - - //校验通过 - void checkSuccess(String content) { - setState(() { - checkResultAfterDrag = true; - _checkSuccess = true; - _showTimeLine = true; - }); - _forwardAnimation(); - updateSliderColorIcon(); - - //刷新验证码 - Future.delayed(Duration(milliseconds: 1000)).then((v) { - _reverseAnimation().then((v) { - setState(() { - _showTimeLine = false; - }); - //回调 - if (widget.onSuccess != null) { - widget.onSuccess(content); - } - //关闭验证码 - print(content); - Navigator.pop(context); - }); - }); - } - - //校验失败 - void checkFail() { - setState(() { - _showTimeLine = true; - _checkSuccess = false; - checkResultAfterDrag = false; - }); - _forwardAnimation(); - updateSliderColorIcon(); - - //刷新验证码 - Future.delayed(Duration(milliseconds: 1000)).then((v) { - _reverseAnimation().then((v) { - setState(() { - _showTimeLine = false; - }); - loadCaptcha(); - //回调 - if (widget.onFail != null) { - widget.onFail(); - } - }); - }); - } - - //重设滑动颜色与图标 - void updateSliderColorIcon() { - var _sliderColor; //滑块的背景色 - var _sliderIcon; //滑块的图标 - var _movedXBorderColor; //滑块拖动时,左边已滑的区域边框颜色 - - //滑块的背景色 - if (sliderMoveFinish) { - //拖动结束 - _sliderColor = checkResultAfterDrag ? Colors.green : Colors.red; - _sliderIcon = checkResultAfterDrag ? Icons.check : Icons.close; - _movedXBorderColor = checkResultAfterDrag ? Colors.green : Colors.red; - } else { - //拖动未开始或正在拖动中 - _sliderColor = sliderXMoved > 0 ? Color(0xff447ab2) : Colors.white; - _sliderIcon = Icons.arrow_forward; - _movedXBorderColor = Color(0xff447ab2); - } - - sliderColor = _sliderColor; - sliderIcon = _sliderIcon; - movedXBorderColor = _movedXBorderColor; - setState(() {}); - } - - //加载验证码 - void loadCaptcha() async { - setState(() { - _showTimeLine = false; - sliderMoveFinish = false; - checkResultAfterDrag = false; - sliderColor = Colors.white; //滑块的背景色 - sliderIcon = Icons.arrow_forward; //滑块的图标 - movedXBorderColor = Colors.white; //滑块拖动时,左边已滑的区域边框颜色 - }); - BusinessApiService businessService = BusinessApiService(Dio(), context: context); - ClickWordCaptchaModel baseData = await businessService - .captchaGet({"captchaType": "blockPuzzle"}).catchError((onError) {}); - if (baseData == null) { - setState(() { - secretKey = ""; - }); - return; - } - - sliderXMoved = 0; - sliderStartX = 0; - captchaToken = ''; - checkResultAfterDrag = false; - - baseImageBase64 = baseData.imgStr; - secretKey = baseData.secretKey; - baseImageBase64 = baseImageBase64.replaceAll('\n', ''); - slideImageBase64 = baseData.jigsawImageBase64; - slideImageBase64 = slideImageBase64.replaceAll('\n', ''); - captchaToken = baseData.token; - - var baseR = await WidgetUtil.getImageWH( - image: Image.memory(Base64Decoder().convert(baseImageBase64))); - baseSize = baseR.size; - - var silderR = await WidgetUtil.getImageWH( - image: Image.memory(Base64Decoder().convert(slideImageBase64))); - slideSize = silderR.size; - - setState(() {}); - } - - //校验验证码 - void checkCaptcha(sliderXMoved, captchaToken, {BuildContext myContext}) { - setState(() { - sliderMoveFinish = true; - }); - //滑动结束,改变滑块的图标及颜色 -// updateSliderColorIcon(); - - //pointJson参数需要aes加密 - -// MediaQueryData mediaQuery = MediaQuery.of(myContext); - var pointMap = {"x": sliderXMoved, "y": 5}; - var pointStr = json.encode(pointMap); - var cryptedStr = pointStr; - - // secretKey 不为空 进行as加密 - if (!CaptchaUtil.isEmpty(secretKey)) { - cryptedStr = CaptchaUtil.aesEncode(key: secretKey, content: pointStr); - // var dcrypt = CaptchaUtil.aesDecode(key: secretKey, content: cryptedStr); - // json.decode(dcrypt); - } - - BusinessApiService businessService = BusinessApiService(Dio(), context: context); - businessService - .captchaCheck({ - "pointJson": cryptedStr, - "captchaType": "blockPuzzle", - "token": captchaToken - }) - .catchError((onError) {}) - .then((res) { - if (res) { - checkFail(); - return; - } - //如果不加密 将 token 和 坐标序列化 通过 --- 链接成字符串 - var captchaVerification = "$captchaToken---$pointStr"; - if (!CaptchaUtil.isEmpty(secretKey)) { - //如果加密 将 token 和 坐标序列化 通过 --- 链接成字符串 进行加密 加密密钥为 _clickWordCaptchaModel.secretKey - captchaVerification = CaptchaUtil.aesEncode( - key: secretKey, content: captchaVerification); - } - checkSuccess(captchaVerification); - }) - .catchError((error) { - loadCaptcha(); - print(error); - }); - } - - @override - void initState() { - super.initState(); - initAnimation(); - loadCaptcha(); - } - - @override - void dispose() { - controller.dispose(); - super.dispose(); - } - - // 初始化动画 - void initAnimation() { - controller = - AnimationController(duration: Duration(milliseconds: 500), vsync: this); - - offsetAnimation = Tween(begin: 0.5, end: 0) - .animate(CurvedAnimation(parent: controller, curve: Curves.ease)) - ..addListener(() { - this.setState(() {}); - }); - } - - // 反向执行动画 - _reverseAnimation() async { - await controller.reverse(); - } - - // 正向执行动画 - _forwardAnimation() async { - await controller.forward(); - } - - @override - void didUpdateWidget(BusBlockPuzzleCaptchaPage oldWidget) { - // TODO: implement didUpdateWidget - super.didUpdateWidget(oldWidget); - } - - @override - Widget build(BuildContext context) { - return MaxScaleTextWidget( - child: buildContent(context), - ); - } - - Widget buildContent(BuildContext context) { - var mediaQuery = MediaQuery.of(context); - var dialogWidth = 0.9 * mediaQuery.size.width; - if (dialogWidth < 330) { - dialogWidth = mediaQuery.size.width; - } - - return Scaffold( - backgroundColor: Colors.transparent, - body: Center( - child: Container( - key: _containerKey, - width: dialogWidth, - height: MediaQuery.of(context).size.height >= 750 ? 310.h:325.h, - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - _topContainer(), - _middleContainer(), - _bottomContainer(), - ], - ), - ), - ), - ); - } - - ///顶部,提示+关闭 - _topContainer() { - return Container( - height: 50.h, - padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0), - decoration: BoxDecoration( - border: Border(bottom: BorderSide(width: 1.w, color: Color(0xffe5e5e5))), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - '请完成安全验证', - style: TextStyle(fontSize: 18), - ), - IconButton( - icon: Icon(Icons.highlight_off), - iconSize: 30, - color: Colors.black38, - onPressed: () { - //退出 - Navigator.pop(context); - }), - ], - ), - ); - } - - _middleContainer() { - ////显示验证码 - return Container( - margin: EdgeInsets.symmetric(vertical: 10.h), - child: Stack( - children: [ - ///底图 310*155 - baseImageBase64.length > 0 - ? Image.memory( - Base64Decoder().convert(baseImageBase64), - fit: BoxFit.fitWidth, - key: _baseImageKey, - gaplessPlayback: true, - ) - : Container( - width: 310.w, - height: 155.h, - alignment: Alignment.center, - child: CircularProgressIndicator(), - ), - - ///滑块图 - (baseImageBase64.length > 0 && slideImageBase64.length > 0) - ? Container( - margin: EdgeInsets.fromLTRB(sliderXMoved, 0, 0, 0), - child: Image.memory( - Base64Decoder().convert(slideImageBase64), - fit: BoxFit.fitHeight, - key: _slideImageKey, - gaplessPlayback: true, - ), - ) - : Container(), - - //刷新按钮 - Positioned( - top: 0, - right: 0, - child: IconButton( - icon: Icon(Icons.refresh), - iconSize: 30, - color: Colors.black54, - onPressed: () { - //刷新 - loadCaptcha(); - }), - ), - Positioned( - bottom: 0, - left: -10.w, - right: -10.w, - child: Offstage( - offstage: !_showTimeLine, - child: FractionalTranslation( - translation: Offset(0, offsetAnimation.value), - child: Container( - margin: EdgeInsets.only(left: 10.w, right: 10.w), - height: 40.h, - color: _checkSuccess - ? Color(0x7F66BB6A) - : Color.fromRGBO(200, 100, 100, 0.4), - alignment: Alignment.centerLeft, - child: Text( - _checkSuccess - ? "${(_checkMilliseconds / (60.0 * 12)).toStringAsFixed(2)}s验证成功" - : "验证失败", - style: TextStyle(color: Colors.white), - ), - ), - ), - )), - Positioned( - bottom: -20.h, - left: 0, - right: 0, - child: Offstage( - offstage: !_showTimeLine, - child: Container( - margin: EdgeInsets.only(left: 10.w, right: 10.w), - height: 20.h, - color: Colors.white, - ), - )) - ], - ), - ); - } - - ///底部,滑动区域 - _bottomContainer() { - return baseSize.width > 0 - ? Container( - height: 70.h, - width: baseSize.width, -// color: Colors.cyanAccent, - child: Stack( - alignment: AlignmentDirectional.centerStart, - children: [ - Container( - height: _bottomSliderSize, - decoration: BoxDecoration( - border: Border.all( - width: 1.w, - color: Color(0xffe5e5e5), - ), - color: Color(0xfff8f9fb), - ), - ), - Container( - alignment: Alignment.center, - child: Text( - '向右拖动滑块填充拼图', - style: TextStyle(fontSize: 14.sp), - ), - ), - Container( - width: sliderXMoved, - height: _bottomSliderSize - 2.h, - decoration: BoxDecoration( - border: Border.all( - width: sliderXMoved > 0 ? 1 : 0, - color: movedXBorderColor, - ), - color: Color(0xfff3fef1), - ), - ), - GestureDetector( - onPanStart: (startDetails) { - ///开始 - _checkMilliseconds = - new DateTime.now().millisecondsSinceEpoch; - // print(startDetails.localPosition); - sliderStartX = startDetails.localPosition.dx; - }, - onPanUpdate: (updateDetails) { - ///更新 - // print(updateDetails.localPosition); - double _w1 = _baseImageKey.currentContext.size.width - - _slideImageKey.currentContext.size.width; - double offset = - updateDetails.localPosition.dx - sliderStartX; - if (offset < 0) { - offset = 0; - } - if (offset > _w1) { - offset = _w1; - } - // print("offset ------ $offset"); - setState(() { - sliderXMoved = offset; - }); - //滑动过程,改变滑块左边框颜色 - updateSliderColorIcon(); - }, - onPanEnd: (endDetails) { - //结束 - // print("endDetails"); - checkCaptcha(sliderXMoved, captchaToken); - int _nowTime = new DateTime.now().millisecondsSinceEpoch; - _checkMilliseconds = _nowTime - _checkMilliseconds; - }, - child: Container( - width: _bottomSliderSize, - height: _bottomSliderSize, - margin: EdgeInsets.only( - left: sliderXMoved > 0 ? sliderXMoved : 1), - decoration: BoxDecoration( - border: Border( - top: BorderSide( - width: 1.w, - color: Color(0xffe5e5e5), - ), - right: BorderSide( - width: 1.w, - color: Color(0xffe5e5e5), - ), - bottom: BorderSide( - width: 1.w, - color: Color(0xffe5e5e5), - ), - ), - color: sliderColor, - ), - child: IconButton( - icon: Icon(sliderIcon), - iconSize: 30, - color: Colors.black54, - onPressed: () {}, - ), - ), - ) - ], - )) - : Container(); - } -} - -class MaxScaleTextWidget extends StatelessWidget { - final double max; - final Widget child; - - MaxScaleTextWidget({Key key, this.max = 1.0, this.child}) : super(key: key); - - @override - Widget build(BuildContext context) { - var data = MediaQuery.of(context); - var textScaleFactor = min(max, data.textScaleFactor); - return MediaQuery( - data: data.copyWith(textScaleFactor: textScaleFactor), child: child); - } -} diff --git a/lib/business_system/login/captcha/bus_click_word_captcha.dart b/lib/business_system/login/captcha/bus_click_word_captcha.dart deleted file mode 100644 index 4ec1cda9..00000000 --- a/lib/business_system/login/captcha/bus_click_word_captcha.dart +++ /dev/null @@ -1,367 +0,0 @@ -import 'dart:convert'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../../retrofit/business_api.dart'; -import '../../../utils/captcha_util.dart'; -import '../../../utils/widget_util.dart'; - -typedef VoidSuccessCallback = dynamic Function(String v); - -class BusClickWordCaptcha extends StatefulWidget { - final VoidSuccessCallback onSuccess; //文字点击后验证成功回调 - final VoidCallback onFail; //文字点击完成后验证失败回调 - - const BusClickWordCaptcha({Key key, this.onSuccess, this.onFail}) - : super(key: key); - - @override - _BusClickWordCaptchaState createState() => _BusClickWordCaptchaState(); -} - -class _BusClickWordCaptchaState extends State { - BusClickWordCaptchaState _busClickWordCaptchaState = BusClickWordCaptchaState.none; - List _tapOffsetList = []; - BusClickWordCaptchaModel _busClickWordCaptchaModel = BusClickWordCaptchaModel(); - - Color titleColor = Colors.black; - Color borderColor = Color(0xffdddddd); - String bottomTitle = ""; - Size baseSize = Size(310.0, 155.0); - - //改变底部样式及字段 - _changeResultState() { - switch (_busClickWordCaptchaState) { - case BusClickWordCaptchaState.normal: - titleColor = Colors.black; - borderColor = Color(0xffdddddd); - break; - case BusClickWordCaptchaState.success: - _tapOffsetList = []; - titleColor = Colors.green; - borderColor = Colors.green; - bottomTitle = "验证成功"; - break; - case BusClickWordCaptchaState.fail: - _tapOffsetList = []; - titleColor = Colors.red; - borderColor = Colors.red; - bottomTitle = "验证失败"; - break; - default: - titleColor = Colors.black; - borderColor = Color(0xffdddddd); - bottomTitle = "数据加载中……"; - break; - } - setState(() {}); - } - - @override - void initState() { - super.initState(); - _loadCaptcha(); - } - - //加载验证码 - _loadCaptcha() async { - _tapOffsetList = []; - _busClickWordCaptchaState = BusClickWordCaptchaState.none; - _changeResultState(); - BusinessApiService businessService = BusinessApiService(Dio(), context: context); - BusClickWordCaptchaModel baseData = (await businessService.captchaGet({"captchaType": "clickWord"}).catchError((onError) {})) as BusClickWordCaptchaModel; - if (baseData == null) { - _busClickWordCaptchaModel.secretKey = ""; - bottomTitle = "加载失败,请刷新"; - _busClickWordCaptchaState = BusClickWordCaptchaState.normal; - _changeResultState(); - return; - } - else { - _busClickWordCaptchaModel = baseData; - var baseR = await WidgetUtil.getImageWH( - image: Image.memory( - Base64Decoder().convert(_busClickWordCaptchaModel.imgStr))); - baseSize = baseR.size; - - bottomTitle = "请依次点击【${_busClickWordCaptchaModel.wordStr}】"; - } - - _busClickWordCaptchaState = BusClickWordCaptchaState.normal; - _changeResultState(); - } - - //校验验证码 - _checkCaptcha() async { - List> mousePos = []; - _tapOffsetList.map((size) { - mousePos - .add({"x": size.dx.roundToDouble(), "y": size.dy.roundToDouble()}); - }).toList(); - var pointStr = json.encode(mousePos); - - var cryptedStr = pointStr; - - // secretKey 不为空 进行as加密 - if (!CaptchaUtil.isEmpty(_busClickWordCaptchaModel.secretKey)) { - cryptedStr = CaptchaUtil.aesEncode( - key: _busClickWordCaptchaModel.secretKey, content: pointStr); - // var dcrypt = CaptchaUtil.aesDecode( - // key: _busClickWordCaptchaModel.secretKey, content: cryptedStr); - } - -// Map _map = json.decode(dcrypt); - BusinessApiService businessService = BusinessApiService(Dio(), context: context); - bool baseData = await businessService.captchaCheck({ - "pointJson": cryptedStr, - "captchaType": "clickWord", - "token": _busClickWordCaptchaModel.token - }).catchError((onError) {}); - if (baseData) { - _checkFail(); - return; - } - //如果不加密 将 token 和 坐标序列化 通过 --- 链接成字符串 - var captchaVerification = "${_busClickWordCaptchaModel.token}---$pointStr"; - if (!CaptchaUtil.isEmpty(_busClickWordCaptchaModel.secretKey)) { - //如果加密 将 token 和 坐标序列化 通过 --- 链接成字符串 进行加密 加密密钥为 _busClickWordCaptchaModel.secretKey - captchaVerification = CaptchaUtil.aesEncode( - key: _busClickWordCaptchaModel.secretKey, - content: captchaVerification); - } - _checkSuccess(captchaVerification); - } - - //校验失败 - _checkFail() async { - _busClickWordCaptchaState = BusClickWordCaptchaState.fail; - _changeResultState(); - - await Future.delayed(Duration(milliseconds: 1000)); - _loadCaptcha(); - //回调 - if (widget.onFail != null) { - widget.onFail(); - } - } - - //校验成功 - _checkSuccess(String pointJson) async { - _busClickWordCaptchaState = BusClickWordCaptchaState.success; - _changeResultState(); - - await Future.delayed(Duration(milliseconds: 1000)); - - var cryptedStr = CaptchaUtil.aesEncode(key: 'BGxdEUOZkXka4HSj', content: pointJson); - - print(cryptedStr); - //回调 pointJson 是经过es加密之后的信息 - if (widget.onSuccess != null) { - widget.onSuccess(cryptedStr); - } - //关闭 - Navigator.pop(context); - } - - @override - Widget build(BuildContext context) { - var data = MediaQuery.of(context); - var dialogWidth = 0.9 * data.size.width; - var isRatioCross = false; - if (dialogWidth < 320.0) { - dialogWidth = data.size.width; - isRatioCross = true; - } - return Scaffold( - backgroundColor: Colors.transparent, - body: Center( - child: Container( - width: dialogWidth, - height: 320.h, - color: Colors.white, - child: Column( - children: [ - _topConttainer(), - _captchaContainer(), - _bottomContainer() - ], - ), - ), - ), - ); - } - - //图片验证码 - _captchaContainer() { - List _widgetList = []; - if (!CaptchaUtil.isEmpty(_busClickWordCaptchaModel.imgStr)) { - _widgetList.add(Image( - width: baseSize.width, - height: baseSize.height, - gaplessPlayback: true, - image: MemoryImage( - Base64Decoder().convert(_busClickWordCaptchaModel.imgStr)))); - } - - double _widgetW = 20; - for (int i = 0; i < _tapOffsetList.length; i++) { - Offset offset = _tapOffsetList[i]; - _widgetList.add(Positioned( - left: offset.dx - _widgetW * 0.5, - top: offset.dy - _widgetW * 0.5, - child: Container( - alignment: Alignment.center, - width: _widgetW, - height: _widgetW, - decoration: BoxDecoration( - color: Color(0xCC43A047), - borderRadius: BorderRadius.all(Radius.circular(_widgetW))), - child: Text( - "${i + 1}", - style: TextStyle(color: Colors.white, fontSize: 15), - ), - ))); - } - _widgetList.add(//刷新按钮 - Positioned( - top: 0, - right: 0, - child: IconButton( - icon: Icon(Icons.refresh), - iconSize: 30, - color: Colors.deepOrangeAccent, - onPressed: () { - //刷新 - _loadCaptcha(); - }), - )); - - return GestureDetector( - onTapDown: (TapDownDetails details) { - debugPrint( - "onTapDown globalPosition全局坐标系位置: ${details.globalPosition} localPosition组件坐标系位置: ${details.localPosition} "); - if (!CaptchaUtil.isListEmpty(_busClickWordCaptchaModel.wordList) && - _tapOffsetList.length < _busClickWordCaptchaModel.wordList.length) { - _tapOffsetList.add( - Offset(details.localPosition.dx, details.localPosition.dy)); - } - setState(() {}); - if (!CaptchaUtil.isListEmpty(_busClickWordCaptchaModel.wordList) && - _tapOffsetList.length == _busClickWordCaptchaModel.wordList.length) { - _checkCaptcha(); - } - }, - child: Container( - width: baseSize.width, - height: baseSize.height, - child: Stack( - children: _widgetList, - ), - )); - } - - //底部提示部件 - _bottomContainer() { - return Container( - height: 50.h, - margin: EdgeInsets.only(top: 10), - alignment: Alignment.center, - width: baseSize.width, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(4)), - border: Border.all(color: borderColor)), - child: - Text(bottomTitle, style: TextStyle(fontSize: 18, color: titleColor)), - ); - } - - //顶部,提示+关闭 - _topConttainer() { - return Container( - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - margin: EdgeInsets.only(bottom: 20, top: 5), - decoration: BoxDecoration( - border: Border(bottom: BorderSide(width: 1, color: Color(0xffe5e5e5))), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - '请完成安全验证', - style: TextStyle(fontSize: 18), - ), - IconButton( - icon: Icon(Icons.highlight_off), - iconSize: 35, - color: Colors.black54, - onPressed: () { - //退出 - Navigator.pop(context); - }), - ], - ), - ); - } -} - -//校验状态 -enum BusClickWordCaptchaState { - normal, //默认 可自定义描述 - success, //成功 - fail, //失败 - none, //无状态 用于加载使用 -} - -//请求数据模型 -class BusClickWordCaptchaModel { - String imgStr; //图表url 目前用base64 data - String jigsawImageBase64; //图表url 目前用base64 data - String token; // 获取的token 用于校验 - List wordList; //显示需要点选的字 - String wordStr; //显示需要点选的字转换为字符串 - String secretKey; //加密key - - BusClickWordCaptchaModel( - {this.imgStr = "", - this.jigsawImageBase64 = "", - this.token = "", - this.secretKey = "", - this.wordList = const [], - this.wordStr = ""}); - - //解析数据转换模型 - static BusClickWordCaptchaModel fromMap(Map map) { - BusClickWordCaptchaModel captchaModel = BusClickWordCaptchaModel(); - captchaModel.imgStr = map["originalImageBase64"] ?? ""; - captchaModel.jigsawImageBase64 = map["jigsawImageBase64"] ?? ""; - captchaModel.token = map["token"] ?? ""; - captchaModel.secretKey = map["secretKey"] ?? ""; - captchaModel.wordList = map["wordList"] ?? []; - - if (!CaptchaUtil.isListEmpty(captchaModel.wordList)) { - captchaModel.wordStr = captchaModel.wordList.join(","); - } - - return captchaModel; - } - - //将模型转换 - Map toJson() { - var map = new Map(); - map['imgStr'] = imgStr; - map['jigsawImageBase64'] = jigsawImageBase64; - map['token'] = token; - map['secretKey'] = token; - map['wordList'] = wordList; - map['wordStr'] = wordStr; - return map; - } - - @override - String toString() { - // TODO: implement toString - return JsonEncoder.withIndent(' ').convert(toJson()); - } -} diff --git a/lib/business_system/login/register_retrieve_password.dart b/lib/business_system/login/register_retrieve_password.dart deleted file mode 100644 index f605442f..00000000 --- a/lib/business_system/login/register_retrieve_password.dart +++ /dev/null @@ -1,759 +0,0 @@ -import 'dart:async'; - -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:sharesdk_plugin/sharesdk_interface.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../utils/flutter_utils.dart'; -import '../../utils/font_weight.dart'; -import '../../view_widget/border_text.dart'; -import '../../view_widget/my_appbar.dart'; -import '../../view_widget/round_button.dart'; -import '../../view_widget/settlement_tips_dialog.dart'; -import 'captcha/bus_block_puzzle_captcha.dart'; - -class RegisterRetrievePassword extends StatefulWidget { - final Map arguments; - - RegisterRetrievePassword({this.arguments}); - - @override - State createState() { - return _RegisterRetrievePassword(); - } -} - -class _RegisterRetrievePassword extends State { - TextEditingController phoneController = TextEditingController(); - TextEditingController codeController = TextEditingController(); - TextEditingController passwordController = TextEditingController(); - TextEditingController changePasswordController = TextEditingController(); - TextEditingController businessNameController = TextEditingController(); - final TapGestureRecognizer tapGestureRecognizer = TapGestureRecognizer(); - var checkStatus = false; - String titleName; - BusinessApiService businessService; - Color statusCodeTextColor = Color(0xFF353535); - var verifyStatus = 0; - var mobileStatus = 0; - var btnText = "获取验证码"; - var sendCodeStatus = 0; - Timer _timer; - int phoneState = 1; - String mobile; - String newMobile; - - @override - void initState() { - super.initState(); - titleName = widget?.arguments["titleName"] ?? ""; - } - - @override - void dispose() { - super.dispose(); - if (_timer != null && _timer.isActive) _timer.cancel(); - } - - ///发送验证码 - sendVerifyCode(v) async { - BusinessApiService businessService = - BusinessApiService(Dio(), context: context); - BaseData baseData = await businessService.busSendVerify({ - "areaCode": "+86", - "mobile": phoneController.text, - "verification": v - }).catchError((onError) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), - alignment: Alignment.center); - }); - if (baseData != null && baseData.isSuccess) { - sendCodeStatus = 1; - countdown(); - SmartDialog.showToast(baseData.data, alignment: Alignment.center); - } else { - btnText = S.of(context).send_code; - sendCodeStatus = 0; - SmartDialog.showToast("${baseData.msg}", alignment: Alignment.center); - refresh(); - } - } - - ///刷新页面 - void refresh() { - if (!mounted) return; - setState(() {}); - } - - ///发送验证码成功倒计时 - countdown() { - if (_timer != null && _timer.isActive) return; - int countdown = 60; - _timer = Timer.periodic(Duration(seconds: 1), (timer) { - countdown--; - if (countdown == 0) { - btnText = "重新发送"; - sendCodeStatus = 0; - _timer.cancel(); - } else { - btnText = "${countdown}s"; - } - if (!mounted) return; - setState(() {}); - }); - } - - ///注册接口 - register() async { - try { - if (codeController.text == "") { - SmartDialog.showToast("请输入验证码", alignment: Alignment.center); - return; - } - if (phoneController.text == "") { - SmartDialog.showToast(S.of(context).qingshurushoujihao, - alignment: Alignment.center); - return; - } - if (passwordController.text == "") { - SmartDialog.showToast("请输入密码", alignment: Alignment.center); - return; - } - if (businessNameController.text == "") { - SmartDialog.showToast("请输入商户名称", alignment: Alignment.center); - return; - } - if (!checkStatus) { - SmartDialog.showToast(S.of(context).gouxuanxieyi, - alignment: Alignment.center); - return; - } - - var param = { - "areaCode": "+86", - "mobile": phoneController.text, - "capcha": codeController.text, - "tenantName": businessNameController.text, - "password": passwordController.text, - }; - EasyLoading.show( - status: S.of(context).zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - businessService = BusinessApiService(Dio(), context: context); - BaseData baseData = - await businessService.tenantAppLogin(param).catchError((error) { - print(error.message); - }); - if (baseData != null && baseData.isSuccess) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: baseData.data, - color: Color(0xFF30415B), - )); - Navigator.of(context).pop(); - } else { - if (baseData.msg != null) - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally { - EasyLoading.dismiss(); - } - } - - ///找回密码 - userChangePsd() async { - try { - if (phoneController.text == "") { - SmartDialog.showToast(S.of(context).qingshurushoujihao, - alignment: Alignment.center); - return; - } - if (codeController.text == "") { - SmartDialog.showToast("请输入验证码", alignment: Alignment.center); - return; - } - if (passwordController.text == "") { - SmartDialog.showToast("请输入密码", alignment: Alignment.center); - return; - } - if (changePasswordController.text == "") { - SmartDialog.showToast("请输入确认密码", alignment: Alignment.center); - return; - } - if (passwordController.text != changePasswordController.text) { - SmartDialog.showToast("两次密码不一致,请重新输入", alignment: Alignment.center); - return; - } - - var param = { - "areaCode": "+86", - "mobile": phoneController.text, - "capcha": codeController.text, - "newPassword": changePasswordController.text, - }; - EasyLoading.show( - status: S.of(context).zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - businessService = BusinessApiService(Dio(), context: context); - BaseData baseData = - await businessService.tenantUserChangePsd(param).catchError((error) { - print(error.message); - }); - if (baseData != null && baseData.isSuccess) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: baseData.data, - color: Color(0xFF30415B), - )); - Navigator.of(context).pop(); - } else { - if (baseData.msg != null) - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: titleName, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Column( - children: [ - registerAccount(), - GestureDetector( - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - if (titleName == "注册账号") { - register(); - } else { - userChangePsd(); - } - }, - child: Container( - padding: EdgeInsets.symmetric(vertical: 15.h), - margin: - EdgeInsets.symmetric(horizontal: 16.w, vertical: 30.h), - alignment: Alignment.center, - width: double.infinity, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - child: Text( - titleName == "注册账号" ? "注册" : "确定", - style: TextStyle( - fontSize: 16.sp, - color: Colors.white, - fontWeight: MyFontWeight.bold), - ), - ), - ), - if (titleName == "注册账号") - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Checkbox( - value: checkStatus, - onChanged: (a) { - setState(() { - checkStatus = !checkStatus; - }); - }, - checkColor: Color(0xFFFFFFFF), - fillColor: MaterialStateProperty.all(Color(0xFF30415B)), - ), - Expanded( - child: Text.rich( - TextSpan(children: [ - TextSpan( - text: S.of(context).privacy_policy1, - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - ), - ), - TextSpan( - text: "《一心回乡用户协议》", - recognizer: TapGestureRecognizer() - ..onTap = () { - Navigator.of(context) - .pushNamed('/router/user_service_page'); - }, - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - ), - ), - TextSpan( - text: "、", - style: TextStyle( - fontSize: 11.sp, - color: Colors.black, - ), - ), - TextSpan( - text: S.of(context).privacy_policy3, - recognizer: tapGestureRecognizer, - style: TextStyle( - fontSize: 11.sp, - color: Color(0xFF010101), - ), - ), - TextSpan( - text: S.of(context).privacy_policy4, - style: TextStyle( - fontSize: 11.sp, - height: 1.2, - color: Color(0xFF010101), - ), - ), - ]), - )), - SizedBox( - width: 30, - ) - ], - ), - ], - )), - ); - } - - Widget registerAccount() { - return Container( - padding: - EdgeInsets.only(top: 21.h, bottom: 16.h, left: 15.w, right: 18.w), - margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 16.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - ///手机号 - Row( - children: [ - Text( - "手机号码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - Expanded( - child: TextField( - controller: phoneController, - decoration: InputDecoration( - hintText: "请输入手机号码", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 23.w), - ), - inputFormatters: [LengthLimitingTextInputFormatter(11)], - keyboardType: TextInputType.phone, - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(bottom: 16.h), - ), - - ///验证码 - Row( - children: [ - Text( - "验证码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - Expanded( - flex: 2, - child: TextField( - controller: codeController, - decoration: InputDecoration( - hintText: "请输入验证码", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 23.w), - ), - keyboardType: TextInputType.phone, - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - mobile = phoneController.text; - if (mobile == "") { - SmartDialog.showToast(S.of(context).qingshurushoujihao, - alignment: Alignment.center); - return; - } - loadingBlockPuzzle(context); - }, - child: Text( - btnText, - textAlign: TextAlign.right, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - )), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(bottom: 16.h), - ), - - ///密码 - Row( - children: [ - Text( - "密码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - Expanded( - child: TextField( - controller: passwordController, - decoration: InputDecoration( - hintText: "请输入密码", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 23.w), - ), - keyboardType: TextInputType.phone, - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(bottom: 16.h), - ), - - ///商户名称/确认密码 - titleName == "注册账号" - ? Row( - children: [ - Text( - "商户名称", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - Expanded( - child: TextField( - controller: businessNameController, - decoration: InputDecoration( - hintText: "请输入商户名称", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 23.w), - ), - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ) - : Row( - children: [ - Text( - "确认密码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - Expanded( - child: TextField( - controller: changePasswordController, - decoration: InputDecoration( - hintText: "请再次输入密码", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 23.w), - ), - keyboardType: TextInputType.phone, - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ) - ], - )); - } - - showAlertDialog() { - //显示对话框 - showDialog( - context: context, - builder: (BuildContext context) { - return WillPopScope( - onWillPop: () async => false, - child: SimpleDialog( - titlePadding: EdgeInsets.all(10), - backgroundColor: Colors.transparent, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(6), - ), - children: [ - Stack( - alignment: Alignment.bottomCenter, - children: [ - Container( - alignment: Alignment.center, - width: double.infinity, - height: 325.h, - padding: EdgeInsets.only(left: 16.w, right: 16.w), - decoration: new BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(top: 24.h, bottom: 10.h), - child: Text( - S.of(context).xieyitanchuang, - style: TextStyle( - color: Color(0xff4D4D4D), - fontSize: 18.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - Text.rich( - TextSpan(children: [ - TextSpan( - text: S.of(context).yinsizhengce1, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - height: 1.3.h, - color: Color(0xff727272), - ), - ), - TextSpan( - text: S.of(context).yinsixieyi, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - color: Color(0xff32A060)), - recognizer: TapGestureRecognizer() - ..onTap = () { - Navigator.of(context) - .popAndPushNamed('/router/treaty_page'); - }, - ), - ]), - ), - SizedBox( - height: 10.h, - ), - Text( - S.of(context).yinsizhengce2, - style: TextStyle( - color: Color(0xff727272), - fontSize: 14.sp, - height: 1.3.h, - fontWeight: MyFontWeight.medium, - ), - ), - SizedBox( - height: 16.h, - ), - ], - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - onTap: () { - Navigator.of(context).pop(); - // exit(0); - }, - child: Container( - height: 40.h, - alignment: Alignment.bottomCenter, - margin: EdgeInsets.only(bottom: 20.h), - child: BorderText( - padding: EdgeInsets.only( - top: 10.h, - bottom: 10.h, - left: 36.w, - right: 36.w, - ), - text: S.of(context).jujue, - fontSize: 12.sp, - textColor: Color(0xFF32A060), - borderColor: Color(0xFF32A060), - borderWidth: 1.w, - radius: 23, - ), - ), - ), - SizedBox( - width: 21.w, - ), - Container( - height: 40.h, - margin: EdgeInsets.only(bottom: 20.h), - alignment: Alignment.bottomCenter, - child: RoundButton( - text: S.of(context).tongyibingjixu, - textColor: Colors.white, - fontSize: 12.sp, - callback: () { - SharedPreferences.getInstance().then((value) { - value.setBool("isShowPrivacyPolicy", true); - }); - SharesdkPlugin.uploadPrivacyPermissionStatus( - 1, - (success) => { - Navigator.of(context).pop(), - }, - ); - }, - padding: EdgeInsets.only( - top: 10.h, - bottom: 10.h, - left: 21.5.w, - right: 21.5.w, - ), - backgroup: Color(0xff32A060), - radius: 23, - ), - ), - SizedBox( - height: 20.h, - ), - ], - ), - ], - ) - ], - ), - ); - }, - ); - } - - //滑动拼图 - loadingBlockPuzzle(BuildContext context, {barrierDismissible = true}) { - showDialog( - context: context, - barrierDismissible: barrierDismissible, - builder: (BuildContext context) { - return BusBlockPuzzleCaptchaPage( - onSuccess: (v) { - sendVerifyCode(v); - }, - onFail: () { - print("onFail"); - }, - ); - }, - ); - } -} diff --git a/lib/business_system/mine/account_information.dart b/lib/business_system/mine/account_information.dart deleted file mode 100644 index 27504d47..00000000 --- a/lib/business_system/mine/account_information.dart +++ /dev/null @@ -1,130 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../retrofit/data/business_login_info.dart'; -import '../../utils/flutter_utils.dart'; -import '../../utils/font_weight.dart'; -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; - -class AccountInformation extends StatefulWidget { - final Map arguments; - - AccountInformation({this.arguments}); - @override - State createState() { - return _AccountInformation(); - } -} - -class _AccountInformation extends State { - final RefreshController refreshController = RefreshController(); - BusinessLoginInfo businessLoginInfo; - - @override - void initState() { - super.initState(); - businessLoginInfo = widget.arguments["businessLoginInfo"]; - } - - @override - Widget build(BuildContext context) { - return - Scaffold( - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: "账号信息", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Colors.white, - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child:Container( - margin: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w), - child:Column( - children: [ - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ), - ], - ), - padding: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w,), - child: Column( - children: [ - textItem("账号名称", businessLoginInfo?.name), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top:2.h,bottom: 16.h) - ), - textItem("账号",AppUtils.phoneEncode(businessLoginInfo?.account ?? "")), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top:2.h,bottom: 16.h) - ), - textItem("电话",businessLoginInfo?.mobile?? ""), - ], - ), - ), - ], - ), - ), - ), - ), - ); - } - - Widget textItem(left,right){ - return Container( - padding: EdgeInsets.only(bottom: 16.h), - child: Row( - children: [ - Expanded(child:Text( - left, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium),)), - Text( - right, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium),), - ], - ) - ); - } - -} diff --git a/lib/business_system/mine/business_mine_page.dart b/lib/business_system/mine/business_mine_page.dart deleted file mode 100644 index 5e767f0e..00000000 --- a/lib/business_system/mine/business_mine_page.dart +++ /dev/null @@ -1,508 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:visibility_detector/visibility_detector.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_login_info.dart'; -import '../../retrofit/data/business_store_list.dart'; -import '../../retrofit/data/tenant_info.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../utils/font_weight.dart'; -import '../../view_widget/settlement_tips_dialog.dart'; - -class BusinessMinePage extends StatefulWidget { - final BusinessLoginInfo businessLoginInfo; - final String storeId; - - BusinessMinePage(Key key,this.businessLoginInfo, this.storeId): super(key: key); - - @override - State createState() { - return _BusinessMinePage(); - } -} - -class _BusinessMinePage extends State{ - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - List records = []; - double visiblePercentage; - int networkStatus = 0; - TenantInfo tenantInfo; - - @override - void initState() { - super.initState(); - } - - @override - void dispose() { - super.dispose(); - refreshController.dispose(); - } - - ///门店设置列表 - queryStoreList() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService - .getStoreList(BusinessInstance.instance.businessTenant, "1", "100") - .catchError((error) { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: AppUtils.dioErrorTypeToString(error.type), - color: Color(0xFF30415B), - )); - networkStatus = -1; - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll((baseData.data.records ?? []).reversed); - queryTenantInfo(); - refreshController.refreshCompleted(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - ///查询商户信息 - queryTenantInfo() async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService - .tenantInfo(BusinessInstance.instance.businessTenant) - .catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - tenantInfo = baseData.data; - BusinessInstance.instance.expirationTime = baseData.data.expirationTime; - BusinessInstance.instance.serviceStatus = baseData.data.status.desc; - } - } finally { - setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return VisibilityDetector( - key: Key('my-widget-key'), - onVisibilityChanged: (visibilityInfo) { - visiblePercentage = visibilityInfo.visibleFraction; - if (visiblePercentage == 1) queryStoreList(); - }, - child: Column( - children: [ - Expanded( - child: Container( - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - if (widget.businessLoginInfo != null) { - queryStoreList(); - } else - refreshController.refreshFailed(); - }, - child: SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Container( - child: Column( - children: [ - mineInfo(), - commonFunctions(), - otherFunctions(), - SizedBox( - height: 54.h, - ), - Text( - "@回乡信息公司", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.medium), - ), - ], - ), - )), - ), - ), - ), - SizedBox( - height: 76.h, - ), - ], - )); - } - - Widget mineInfo() { - return Container( - child: Stack( - alignment:Alignment.bottomCenter, - children: [ - Stack( - children: [ - Container( - width: double.infinity, - height: 238.h, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - "assets/image/bs_mine_bg.webp", - ), - fit: BoxFit.cover, - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/account_information', arguments: { - "businessLoginInfo": widget.businessLoginInfo, - }); - }, - child: Container( - padding: EdgeInsets.only( - top: MediaQuery.of(context).padding.top + 50, left: 16.w), - child: Row( - children: [ - (widget?.businessLoginInfo?.avatar != "") - ? MImage( - widget?.businessLoginInfo?.avatar ?? "", - fit: BoxFit.cover, - width: 69.h, - height: 69.h, - radius: BorderRadius.circular(100), - errorSrc: "assets/image/default_2_1.webp", - fadeSrc: "assets/image/default_2_1.webp", - ) - : Image.asset( - "assets/image/bs_mine_heading.webp", - width: 69, - height: 69, - fit: BoxFit.fill, - ), - SizedBox( - width: 10.w, - ), - Container( - height: 69.h, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Text( - widget?.businessLoginInfo?.name ?? "", - style: TextStyle( - fontSize: 18.sp, - color: Color(0xFF374C6C), - fontWeight: MyFontWeight.semi_bold), - ), - Text( - 'ID:${widget?.businessLoginInfo?.account ?? ""}', - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF374C6C), - fontWeight: MyFontWeight.regular), - ), - ], - ), - ) - ], - ), - ), - ), - ], - ), - if(BusinessInstance.instance.serviceStatus == "正常") - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pushNamed( - '/router/service_subscription_page', - arguments: { - "storeId":widget.storeId ?? "", - "packageName":tenantInfo?.packageName ?? "" - }).then((value){ - if(value == 1){ - setState((){}); - } - }); - }, - child: Container( - padding: EdgeInsets.only(bottom:12.h,left: 16.w), - child:Column( - crossAxisAlignment:CrossAxisAlignment.start, - children: [ - if(tenantInfo != null) - Container( - padding:EdgeInsets.only(left: 4.w,right: 4.w,bottom:2.h,top: 1.h), - margin:EdgeInsets.only(bottom:5.h), - decoration: BoxDecoration( - color: Colors.transparent, - border: Border.all( - color: Color(0xFF2E3552), - width: 1, - ), - borderRadius: BorderRadius.circular(4), - ), - child:Text( - tenantInfo?.packageName ??"", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF2E3552), - fontWeight: MyFontWeight.regular), - ), - ), - Row( - children: [ - Padding(padding:EdgeInsets.only(right: 14.w), - child: Text( - "服务有效期:${(BusinessInstance.instance.expirationTime ?? "").length > 9 ? (BusinessInstance.instance.expirationTime ?? "").substring(0, 10) : ""}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF353535), - fontWeight: MyFontWeight.regular), - )), - Padding(padding:EdgeInsets.only(right:4.w), - child: Text( - "去续费", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF353535), - fontWeight: MyFontWeight.regular), - )), - Image.asset( - "assets/image/icon_right_z.webp", - width: 16.h, - height: 16.h, - color: Color(0xFF353535), - ), - ], - ) - ], - ), - ), - ) - ], - ), - ); - } - - ///常用功能 - Widget commonFunctions() { - return Container( - margin: EdgeInsets.only(top: 26.h, left: 16.w, right: 17.w, bottom: 23.h), - child: Column( - children: [ - Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Text( - '常用功能', - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF262626), - fontWeight: MyFontWeight.semi_bold), - ), - ], - ), - SizedBox( - height: 20.h, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if(networkStatus == -1){ - queryStoreList(); - return; - } - else if (widget.businessLoginInfo.storeList.length > 1) { - Navigator.of(context).pushNamed('/router/select_shop', - arguments: {"routeSource": "门店设置", "records": records}); - } else { - Navigator.of(context) - .pushNamed('/router/merchant_info', arguments: { - "storeId": widget.storeId, - "storeName": records[0].storeName, - "records": records[0], - }); - } - }, - child: commonFunctionsItem( - "assets/image/bs_shop_logo.webp", "门店设置", "",20,20), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(left: 32.w, bottom: 12.h), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - // Navigator.of(context).pushNamed('/router/shop_reservation_code', - // arguments: {"storeId": widget.storeId,}); - SmartDialog.showToast("该功能暂未开放!", alignment: Alignment.center); - }, - child: commonFunctionsItem( - "assets/image/bs_mine_code.webp", "门店预约二维码", "",18,18), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(left: 32.w, bottom: 12.h), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/security_setting', arguments: { - "storeId": widget.storeId, - "businessLoginInfo": widget.businessLoginInfo, - }); - }, - child: commonFunctionsItem( - "assets/image/bs_secure.webp", "安全设置", "登录手机号/密码",18,22)), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(left: 32.w, bottom: 12.h), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/clerk_manage_page', arguments: { - "storeId": widget.storeId, - }); - }, - child: commonFunctionsItem( - "assets/image/bs_mine_clerk.webp", "店员管理", "",18,20), - ), - ], - ), - ); - } - - Widget commonFunctionsItem(icon, leftText, rightText,double width,double height) { - return Container( - margin: EdgeInsets.only(bottom: 14.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - icon, - width: width.w, - height: height.h, - fit: BoxFit.fill, - ), - SizedBox( - width:11.w, - ), - Expanded( - child: Text( - leftText, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.bold), - )), - Text( - rightText, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF353535), - fontWeight: MyFontWeight.medium), - ), - Image.asset( - "assets/image/icon_right_z.webp", - width: 16, - height: 16, - color: Color(0xFF353535), - ), - ], - ), - ); - } - - Widget otherFunctions() { - return Container( - margin: EdgeInsets.only( - left: 16.w, - right: 17.w, - ), - child: Column( - children: [ - Row( - children: [ - Container( - width: 4.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 12.w), - ), - Text( - '其他功能', - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF262626), - fontWeight: MyFontWeight.semi_bold), - ), - ], - ), - SizedBox( - height: 20.h, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed('/router/user_service_page'); - }, - child: - commonFunctionsItem("assets/image/bs_user.webp", "关于我们", "",24,24)) - ], - ), - ); - } - -} diff --git a/lib/business_system/mine/clerk_manage/add_new_clerk_page.dart b/lib/business_system/mine/clerk_manage/add_new_clerk_page.dart deleted file mode 100644 index d72e73b7..00000000 --- a/lib/business_system/mine/clerk_manage/add_new_clerk_page.dart +++ /dev/null @@ -1,546 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/user_info_edit.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/my_appbar.dart'; - -class AddNewClerkPage extends StatefulWidget { - final Map arguments; - - AddNewClerkPage({this.arguments}); - - @override - State createState() { - return _AddNewClerkPage(); - } -} - -class _AddNewClerkPage extends State { - String titleName; - final TextEditingController editingPhoneController = TextEditingController(); - final TextEditingController editingNameController = TextEditingController(); - bool isKeyBoardShow = false; - FocusNode _focusNode = FocusNode(); - BusinessApiService businessService; - String selectSexIndex = "N"; - String clerkAccount; - String clerkName; - String clerkSex; - String sexCode; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - titleName = widget?.arguments["titleName"] ??""; - clerkAccount = widget?.arguments["clerkAccount"] ?? ""; - clerkName = widget?.arguments["clerkName"] ?? ""; - clerkSex = widget?.arguments["sex"] ?? ""; - sexCode = widget?.arguments["sexCode"] ?? ""; - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - ///店员信息编辑/新增店员 - editUser(account,name,sex) async { - try{ - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.userEdit({ - "account":account, - "name":name, - "sex":sex, - "password": "123456", - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(1); - SmartDialog.showToast(titleName == "编辑店员资料" ? "店员资料编辑成功" : "新增店员成功", - alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - }}finally{ - EasyLoading.dismiss(); - } - } - - ///修改店员信息 - modifyUser(account,name,sex) async { - try{ - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.userModify({ - "account": account == ""?clerkAccount:account, - "name": name == "" ? clerkName :name, - "sex": sex == ""?sexCode:sex, - "password": "123456", - "id":widget?.arguments["id"]??"" - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(1); - SmartDialog.showToast("修改店员信息成功", - alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - }}finally{ - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Colors.white, - appBar: MyAppBar( - title: titleName, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "员工姓名", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - Expanded( - child: TextField( - controller: editingNameController, - decoration: InputDecoration( - hintText: clerkName != ""?clerkName:"请输入员工姓名", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBEBEB), - margin: EdgeInsets.only(bottom: 16.h), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "员工性别", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - showSexSelect(selectSexIndex); - }, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - clerkSex != "" ? clerkSex:(selectSexIndex == "" ? "请选择员工性别":(selectSexIndex == "N"?"未知":(selectSexIndex == "M" ? "男":"女"))), - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - Image.asset( - "assets/image/bs_right.webp", - width: 14.h, - height: 14.h, - color: Color(0xFF353535), - ) - ], - ) - ) - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBEBEB), - margin: EdgeInsets.only(top: 16.h), - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: "手机号", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - ), - ), - Expanded( - child: TextField( - controller: editingPhoneController, - keyboardType: TextInputType.phone, - decoration: InputDecoration( - hintText: clerkAccount != ""?clerkAccount:"请输入手机号", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - inputFormatters: [ - LengthLimitingTextInputFormatter(11) - ], - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBEBEB), - margin: EdgeInsets.only(bottom: 16.h), - ), - Spacer(), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (editingNameController.text == "" && clerkName == "") { - SmartDialog.showToast("请输入员工姓名", - alignment: Alignment.center); - return; - } else if (selectSexIndex == "" && clerkSex == "") { - SmartDialog.showToast("请选择员工性别", - alignment: Alignment.center); - return; - } else if (editingPhoneController.text == "" && clerkAccount == "") { - SmartDialog.showToast("请输入手机号", - alignment: Alignment.center); - return; - } { - if(clerkName != "" || clerkAccount != "" || clerkSex != ""){ - modifyUser(editingPhoneController.text,editingNameController.text,selectSexIndex); - }else - editUser(editingPhoneController.text,editingNameController.text,selectSexIndex); - } - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B), - ), - width: double.infinity, - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only(bottom: 34.h), - child: Text( - S.of(context).baocun, - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ], - ), - ), - ), - ); - } - - showSexSelect(index) { - showModalBottomSheet( - context: context, - isDismissible: false, - builder: (context) { - return StatefulBuilder(builder: ( - context, - state, - ) { - return Container( - width: double.infinity, - height: 290.h, - padding: EdgeInsets.only(top: 12.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topRight: Radius.circular(6), - topLeft: Radius.circular(6), - )), - child: Column( - children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 14.w), - child: Row( - children: [ - Expanded( - child:GestureDetector( - behavior:HitTestBehavior.opaque, - onTap: (){ - state((){ - selectSexIndex = ""; - Navigator.of(context).pop(); - }); - }, - child: Text( - S.of(context).quxiao, - style: TextStyle( - color: Colors.black, - fontSize: 16.sp, - fontWeight: MyFontWeight.black, - ), - ), - )), - Expanded(child:GestureDetector( - behavior:HitTestBehavior.opaque, - onTap: (){ - selectSexIndex == "N"? "未知" :(selectSexIndex == "M" ? "男" : "女" ); - Navigator.of(context).pop(); - setState((){});}, - child: Container( - alignment: Alignment.centerRight, - child: Text( - S.of(context).queding, - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: MyFontWeight.black, - ), - ), - ), - )) - ], - ), - ), - Container( - margin: EdgeInsets.only(top: 12.h, bottom: 13.h), - height: 1.h, - color: Color(0xFFF2F2F2)), - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap: () { - state((){ - selectSexIndex = "M"; - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - padding: - EdgeInsets.only(top:12.h, bottom:12.h, left: 12.w), - margin: EdgeInsets.symmetric(horizontal: 14.w), - decoration: BoxDecoration( - borderRadius:BorderRadius.circular(6), - border: Border.all( - color: selectSexIndex == "M" ? Color(0xFF30415B):Color(0xFFF7F7F7), - width: selectSexIndex == "M" ? 1 :0, - ), - color: selectSexIndex == "M" ? Color(0xFFEFF5FF) :Color(0xFFF7F7F7), - ), - child: Text( - "男", - style: TextStyle( - color: selectSexIndex == "M"? Color(0xFF30415B):Color(0xFF4D4D4D), - fontSize: 18.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - ), - SizedBox( - height: 13.h, - ), - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap: () { - state((){ - selectSexIndex = "W"; - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - padding: - EdgeInsets.only(top: 12.h, bottom: 12.h, left: 12.w), - margin: EdgeInsets.symmetric(horizontal: 14.w), - decoration: BoxDecoration( - borderRadius:BorderRadius.circular(6), - border: Border.all( - color: selectSexIndex == "W" ? Color(0xFF30415B):Color(0xFFF7F7F7), - width: selectSexIndex == "W" ? 1 :0, - ), - color: selectSexIndex == "W" ? Color(0xFFEFF5FF) :Color(0xFFF7F7F7), - ), - child: Text( - "女", - style: TextStyle( - color: selectSexIndex == "W" ?Color(0xFF30415B):Color(0xFF4D4D4D), - fontSize: 18.sp, - fontWeight: MyFontWeight.regular, - ), - )), - ), - SizedBox( - height: 13.h, - ), - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap: () { - state((){ - selectSexIndex = "N"; - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - padding: - EdgeInsets.only(top: 12.h, bottom: 12.h, left: 12.w), - margin: EdgeInsets.symmetric(horizontal: 14.w), - decoration: BoxDecoration( - borderRadius:BorderRadius.circular(6), - border: Border.all( - color: selectSexIndex == "N" ? Color(0xFF30415B):Color(0xFFF7F7F7), - width: selectSexIndex == "N" ? 1 :0, - ), - color: selectSexIndex == "N" ? Color(0xFFEFF5FF) :Color(0xFFF7F7F7), - ), - child: Text( - "未知", - style: TextStyle( - color: selectSexIndex == "N" ?Color(0xFF30415B):Color(0xFF4D4D4D), - fontSize: 18.sp, - fontWeight: MyFontWeight.regular, - ), - )), - ) - ], - ), - ); - }); - }, - ); - } -} diff --git a/lib/business_system/mine/clerk_manage/clerk_manage_page.dart b/lib/business_system/mine/clerk_manage/clerk_manage_page.dart deleted file mode 100644 index 050fbcdd..00000000 --- a/lib/business_system/mine/clerk_manage/clerk_manage_page.dart +++ /dev/null @@ -1,512 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/clerk_manage_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../view_widget/border_text.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/round_button.dart'; - -class ClerkManagePage extends StatefulWidget { - final Map arguments; - - ClerkManagePage({this.arguments}); - - @override - State createState() { - return _ClerkManagePage(); - } -} - -class _ClerkManagePage extends State { - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - String networkError = ""; - int networkStatus = 0; - List records = []; - int _current = 1; - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryClerkList(); - EasyLoading.dismiss(); - if (refreshController.isRefresh) refreshController.refreshCompleted(); - if (mounted) setState(() {}); - } - - ///查询店员管理列表 - queryClerkList({isShow = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.clerkList({ - "size": 20, - "pageSize": 20, - "current": _current, - "currentPage": 1, - "sort": "id", - "order": "descending", - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll(baseData?.data?.records ?? []); - if ((baseData?.data?.records ?? []).isEmpty || - records.length.toString() == baseData.data.total) - refreshController.loadNoData(); - else - refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isShow) setState(() {}); - } - } - - ///删除店员 - queryDelUser(ids) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = - await businessService.delUser(ids).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - await editOnRefresh(); - SmartDialog.showToast("删除店员成功", alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - appBar: MyAppBar( - title: "店员管理", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1 - ? noNetwork() - : Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - Expanded( - child: Container( - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: records.length == 0 ? false : true, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _current++; - _onRefresh(isShowLoad: false); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Container( - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: clerkManageItemSm(), - ); - }, - ) - : ((records == null || records.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无商品分类", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - itemCount: records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: clerkManageItem( - records[position]), - ); - }, - )), - ), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed( - '/router/add_new_clerk_page', - arguments: { - "storeId": widget.arguments["storeId"], - "titleName": "添加新店员" - }).then((value) { - if (value == 1) { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - } - }); - }, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B), - ), - width: double.infinity, - alignment: Alignment.center, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only(bottom: 34.h), - child: Text( - "添加店员", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - ), - )), - ], - ), - )); - } - - editOnRefresh() { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - } - - ///店员管理列表 - Widget clerkManageItem(Records records) { - return Container( - child: Column( - children: [ - Row( - children: [ - Expanded( - child: Text( - records?.name ?? "", - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/add_new_clerk_page', arguments: { - "storeId": widget.arguments["storeId"], - "titleName": "编辑店员资料", - "clerkAccount": (records?.mobile == "") - ? (records?.account ?? "") - : (records?.mobile ?? ""), - "clerkName": records?.name ?? "", - "sex": records?.sex?.desc ?? "", - "sexCode": records?.sex?.code ?? "", - "id": records?.id ?? "" - }).then((value) { - if(value == 1) - editOnRefresh(); - }); - }, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 17.w), - child: Text( - "编辑", - style: TextStyle( - color: Color(0xFF30415B), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showDelGroupDialog(records?.id); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w, left: 17.w), - child: Text( - S.of(context).shanchu, - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 14.sp, - fontWeight: FontWeight.bold, - ), - ), - ), - ) - ], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 16.h), - color: Color(0xFFEBEBEB), - height: 1.h, - width: double.infinity, - ) - ], - ), - ); - } - - Widget clerkManageItemSm() { - return Container( - child: Column( - children: [ - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 112.w, - height: 20.h, - ), - ), - Spacer(), - Padding( - padding: EdgeInsets.symmetric(horizontal: 17.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - ), - Padding( - padding: EdgeInsets.only(right: 16.w, left: 17.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - ), - ], - ), - Container( - margin: EdgeInsets.symmetric(vertical: 16.h), - color: Color(0xFFEBEBEB), - height: 1.h, - width: double.infinity, - ) - ], - ), - ); - } - - ///删除分组提示弹窗 - showDelGroupDialog(id) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 139.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "选中数据将被永久删除, 是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - queryDelUser(id); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/mine/merchant_info.dart b/lib/business_system/mine/merchant_info.dart deleted file mode 100644 index 8b3c95f5..00000000 --- a/lib/business_system/mine/merchant_info.dart +++ /dev/null @@ -1,1137 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/business_store_list.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/font_weight.dart'; - -class MerchantInfo extends StatefulWidget { - final Map arguments; - - MerchantInfo({this.arguments}); - - @override - State createState() { - return _MerchantInfo(); - } -} - -class _MerchantInfo extends State { - int platformIndex = 0; - int useErpIndex = 0; - int isEnableIndex = 0; - BusinessApiService businessService; - Records records; - int tradeTypeIndex = 0; - String posTypeCode; - int shopTypeIndex = 0; - String serviceType; - TextEditingController shopNameController = TextEditingController(); - TextEditingController telController = TextEditingController(); - TextEditingController sortController = TextEditingController(); - List image; - String logo; - String facade; - - @override - void initState() { - super.initState(); - records = widget.arguments["records"]; - } - - ///保存店铺信息 - saveInfo() async { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.saveStoreInfo({ - "id": widget.arguments["storeId"], - "storeName": (shopNameController.text??"")== "" ? records.storeName: shopNameController.text, - "posType": posTypeCode == null ? records.posType.code: tradeTypeCode(), - "serviceType": serviceType == null ? records.serviceType : shopTypeCode(), - "tel": telController.text ?? records.tel, - "logo": logo, - "facade": facade, - "sort": (sortController.text??"")==""? records.sort :double.tryParse(sortController.text), - "platformShow": platformIndex == 0 ? records.platformShow :(platformIndex == 1 ?true:false), - "isEnable": isEnableIndex == 0 ? records.isEnable :(isEnableIndex == 1 ?true:false), - "useErp": useErpIndex == 0 ? records.useErp :(useErpIndex == 1 ?true:false), - "isAutoSendRefundAddress": 1 - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - EasyLoading.dismiss(); - SmartDialog.showToast("店铺设置修改成功", alignment: Alignment.center); - Navigator.of(context).pop(); - } else { - EasyLoading.dismiss(); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).unfocus(); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: "门店设置", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Column( - children: [ - Container( - margin: EdgeInsets.only(top: 16.h, left: 14.w, right: 14.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - ), - padding: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 17.h), - child: Column( - children: [ - textItem("店铺名称", shopNameController, records.storeName ?? ""), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 2.h, bottom: 16.h)), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showTradeType(); - }, - child: textItems("收单类型", - posTypeCode == null ? tradeType() : posTypeCode), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 2.h, bottom: 16.h)), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showShopType(); - }, - child: textItems( - "店铺类型", serviceType == null ? shopType()??"" : serviceType??""), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 2.h)), - textItem("负责人电话", telController, records.tel ?? ""), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 2.h, bottom: 16.h)), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.pushNamed(context, "/router/shop_image_info", - arguments: { - "logo": ((logo ?? "") != "") ? logo : records.logo, - "facade": ((facade ??"") != "")?facade : records.facade, - "storeId":widget.arguments["storeId"], - }).then((value){ - if(value != null) { - image = value; - logo = image[0]; - facade = image[1]; - } - }); - }, - child: textItems("门店图片", "精美的图片更加吸引顾客"), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 2.h)), - textItem( - "排序", sortController, records.sort.toString() ?? ""), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 2.h, bottom: 16.h)), - Row( - children: [ - Expanded( - child: Text( - "是否在平台展示", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - platformIndex = 1; - }); - }, - child: Row( - children: [ - Image.asset( - (platformIndex == 0 ?(records.platformShow == true):(platformIndex==1)) - ? "assets/image/bs_check.webp" - : "assets/image/bs_uncheck.webp", - width: 16, - height: 16, - fit: BoxFit.cover, - ), - SizedBox( - width: 5.w, - ), - Text( - "是", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium), - ), - ], - ), - ), - SizedBox( - width: 36.w, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - platformIndex = 2; - }); - }, - child: Row( - children: [ - Image.asset( - (platformIndex == 0 ?(records.platformShow == false):(platformIndex==2)) - ? "assets/image/bs_check.webp" - : "assets/image/bs_uncheck.webp", - width: 16, - height: 16, - fit: BoxFit.cover, - ), - SizedBox( - width: 5.w, - ), - Text( - "否", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium), - ) - ], - ), - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.symmetric(vertical: 16.h)), - Row( - children: [ - Expanded( - child: Text( - "是否启用仓库管理", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - useErpIndex = 1; - }); - }, - child: Row( - children: [ - Image.asset( - (useErpIndex == 0 ?(records.useErp == true):(useErpIndex==1)) - ? "assets/image/bs_check.webp" - : "assets/image/bs_uncheck.webp", - width: 16, - height: 16, - fit: BoxFit.cover, - ), - SizedBox( - width: 5.w, - ), - Text( - "是", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium), - ), - ], - ), - ), - SizedBox( - width: 36.w, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - useErpIndex = 2; - }); - }, - child: Row( - children: [ - Image.asset( - (useErpIndex == 0 ?(records.useErp == false):(useErpIndex==2)) - ? "assets/image/bs_check.webp" - : "assets/image/bs_uncheck.webp", - width: 16, - height: 16, - fit: BoxFit.cover, - ), - SizedBox( - width: 5.w, - ), - Text( - "否", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium), - ) - ], - ), - ), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - margin: EdgeInsets.symmetric(vertical: 16.h)), - Row( - children: [ - Expanded( - child: Text( - "是否启用门店", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isEnableIndex = 1; - }); - }, - child: Row( - children: [ - Image.asset( - (isEnableIndex == 0 ?(records.isEnable == true):(isEnableIndex==1)) - ? "assets/image/bs_check.webp" - : "assets/image/bs_uncheck.webp", - width: 16, - height: 16, - fit: BoxFit.cover, - ), - SizedBox( - width: 5.w, - ), - Text( - "是", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium), - ), - ], - ), - ), - SizedBox( - width: 36.w, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - isEnableIndex = 2; - }); - }, - child: Row( - children: [ - Image.asset( - (isEnableIndex == 0 ?(records.isEnable == false):(isEnableIndex==2)) - ? "assets/image/bs_check.webp" - : "assets/image/bs_uncheck.webp", - width: 16, - height: 16, - fit: BoxFit.cover, - ), - SizedBox( - width: 5.w, - ), - Text( - "否", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium), - ) - ], - ), - ), - ], - ), - ], - ), - ), - Spacer(), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - saveInfo(); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.only(bottom: 55.h, left: 16.w, right: 16.w), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).baocun, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ), - ); - } - - Widget textItem(left, rightController, right) { - return Container( - child: Row( - children: [ - Expanded( - child: Text( - left, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - flex: 1, - ), - Expanded( - child: TextField( - controller: rightController, - decoration: InputDecoration( - hintText: right ?? "", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - border: InputBorder.none, - ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - flex: 2, - ), - ], - )); - } - - Widget textItems(left, right) { - return Container( - padding: EdgeInsets.only(bottom: 16.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - left, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - Text( - right, - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.right, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.medium), - ), - SizedBox( - width: 4.w, - ), - Image.asset( - "assets/image/icon_right_z.webp", - width: 16.h, - height: 16.h, - color: Color(0xFF7A797F), - ), - ], - )); - } - - ///收单类型 - String tradeType() { - if (records.posType.code == "NORMALSTORE") { - return "普通餐饮"; - } else if (records.posType.code == "FASTSTORE") { - return "快消餐饮"; - } else if (records.posType.code == "RETAILSTORE") { - return "零售店"; - } else if (records.posType.code == "DIRECT") { - return "直付商店"; - } - } - - ///收单类型选择 - String tradeTypeCode() { - if (tradeTypeIndex == 0) { - return "NORMALSTORE"; - } else if (tradeTypeIndex == 1) { - return "FASTSTORE"; - } else if (tradeTypeIndex == 2) { - return "RETAILSTORE"; - } else if (tradeTypeIndex == 3) { - return "DIRECT"; - } - } - - ///收单类型弹窗选择 - showTradeType() { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return StatefulBuilder(builder: ( - context, - state, - ) { - return Container( - width: double.infinity, - height: 420.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - "选择收单类型", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), - GestureDetector( - onTap: () { - state(() { - Navigator.of(context).pop(); - }); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w), - child: Image.asset( - "assets/image/cancel.webp", - width: 25.h, - height: 25.h, - ), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - children: [ - GestureDetector( - onTap: () { - state(() { - tradeTypeIndex = 0; - posTypeCode = "普通餐饮"; - }); - }, - child: Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: tradeTypeIndex == 0 - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: tradeTypeIndex == 0 - ? Color(0xFF30415B) - : Colors.white, - width: tradeTypeIndex == 0 ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), - child: Text( - "普通餐饮", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: tradeTypeIndex == 0 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (tradeTypeIndex == 0) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () { - state(() { - tradeTypeIndex = 1; - posTypeCode = "快消餐饮"; - }); - }, - child: Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: tradeTypeIndex == 1 - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: tradeTypeIndex == 1 - ? Color(0xFF30415B) - : Colors.white, - width: tradeTypeIndex == 1 ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), - child: Text( - "快消餐饮", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: tradeTypeIndex == 1 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (tradeTypeIndex == 1) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () { - state(() { - tradeTypeIndex = 2; - posTypeCode = "零售店"; - }); - }, - child: Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: tradeTypeIndex == 2 - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: tradeTypeIndex == 2 - ? Color(0xFF30415B) - : Colors.white, - width: tradeTypeIndex == 2 ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), - child: Text( - "零售店", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: tradeTypeIndex == 2 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (tradeTypeIndex == 2) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () { - state(() { - tradeTypeIndex = 3; - posTypeCode = "直付商店"; - }); - }, - child: Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: tradeTypeIndex == 3 - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: tradeTypeIndex == 3 - ? Color(0xFF30415B) - : Colors.white, - width: tradeTypeIndex == 3 ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), - child: Text( - "直付商店", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: tradeTypeIndex == 3 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (tradeTypeIndex == 3) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () { - setState(() { - Navigator.of(context).pop(posTypeCode); - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.only(top: 25.h), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).queding, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ) - ], - ), - ); - }); - }); - } - - ///店铺类型 - String shopType() { - if (records.serviceType == "EATSTORE") { - return "吃"; - } else if (records.serviceType == "DRINKSTORE") { - return "喝"; - } else if (records.serviceType == "HAPPYSTORE") { - return "玩"; - } - } - - ///店铺类型选择 - String shopTypeCode() { - if (shopTypeIndex == 0) { - return "EATSTORE"; - } else if (shopTypeIndex == 1) { - return "DRINKSTORE"; - } else if (shopTypeIndex == 2) { - return "HAPPYSTORE"; - } - } - - ///店铺类型弹窗选择 - showShopType() { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return StatefulBuilder(builder: ( - context, - state, - ) { - return Container( - width: double.infinity, - height: 360.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - "选择店铺类型", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), - GestureDetector( - onTap: () { - state(() { - Navigator.of(context).pop(); - }); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w), - child: Image.asset( - "assets/image/cancel.webp", - width: 25.h, - height: 25.h, - ), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column( - children: [ - GestureDetector( - onTap: () { - state(() { - shopTypeIndex = 0; - serviceType = "吃"; - }); - }, - child: Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: shopTypeIndex == 0 - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: shopTypeIndex == 0 - ? Color(0xFF30415B) - : Colors.white, - width: shopTypeIndex == 0 ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), - child: Text( - "吃", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: shopTypeIndex == 0 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (shopTypeIndex == 0) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () { - state(() { - shopTypeIndex = 1; - serviceType = "喝"; - }); - }, - child: Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: shopTypeIndex == 1 - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: shopTypeIndex == 1 - ? Color(0xFF30415B) - : Colors.white, - width: shopTypeIndex == 1 ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), - child: Text( - "喝", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: shopTypeIndex == 1 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (shopTypeIndex == 1) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () { - state(() { - shopTypeIndex = 2; - serviceType = "玩"; - }); - }, - child: Container( - height: 52.h, - margin: EdgeInsets.only(bottom: 12), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Container( - height: 52.h, - width: double.infinity, - decoration: BoxDecoration( - color: shopTypeIndex == 2 - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.w), - border: Border.all( - color: shopTypeIndex == 2 - ? Color(0xFF30415B) - : Colors.white, - width: shopTypeIndex == 2 ? 1.w : 0, - ), - ), - padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), - child: Text( - "玩", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: shopTypeIndex == 2 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D)), - ), - ), - if (shopTypeIndex == 2) - Image.asset( - "assets/image/bs_shop.webp", - width: 20, - height: 20, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () { - setState(() { - Navigator.of(context).pop(serviceType); - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.only(top: 25.h), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).queding, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ) - ], - ), - ); - }); - }); - } -} diff --git a/lib/business_system/mine/security_setting.dart b/lib/business_system/mine/security_setting.dart deleted file mode 100644 index dd98b804..00000000 --- a/lib/business_system/mine/security_setting.dart +++ /dev/null @@ -1,363 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_login_info.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../utils/font_weight.dart'; -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; - -class SecuritySetting extends StatefulWidget { - final Map arguments; - - SecuritySetting({this.arguments}); - - @override - State createState() { - return _SecuritySetting(); - } -} - -class _SecuritySetting extends State { - final RefreshController refreshController = RefreshController(); - int pageState = 1; - final TextEditingController newPasswordController = TextEditingController(); - final TextEditingController oldPasswordController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - BusinessLoginInfo businessLoginInfo; - BusinessApiService businessService; - String oldPassword; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - businessLoginInfo = widget.arguments["businessLoginInfo"]; - if(oldPasswordController.text != "" && newPasswordController.text != ""){ - oldPasswordController.text = ""; - newPasswordController.text = ""; - } - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - ///修改密码 - modifyCode() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.modifyPassword({ - "id": businessLoginInfo?.userId ?? "", - "account": businessLoginInfo?.account ?? "", - "password": newPasswordController.text, - "name": businessLoginInfo?.name ?? "", - }).catchError((error) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), - alignment: Alignment.center); - }); - if (baseData != null && baseData.isSuccess) { - SmartDialog.showToast("修改成功", alignment: Alignment.center); - pageState = 1; - setState(() {}); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Scaffold( - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: pageState == 1 ? "安全设置" : "修改登录密码", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Colors.white, - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () {}, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - if (pageState == 1) - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ), - ], - ), - padding: EdgeInsets.only( - top: 16.h, - left: 16.w, - right: 16.w, - ), - child: Column( - children: [ - Row( - children: [ - Expanded( - child: Text( - "登录手机号", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.medium), - )), - Text( - "134****7777", - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.right, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.medium), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 16.h, bottom: 16.h), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - pageState = 2; - }); - }, - child: Row( - children: [ - Expanded( - child: Text( - "修改登录密码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.medium), - )), - Image.asset( - "assets/image/icon_right_z.webp", - width: 16, - height: 16, - color: Color(0xFF353535), - ), - ], - ), - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(top: 16.h, bottom: 16.h), - ), - ], - ), - ), - if (pageState == 2) changePassword(), - if (pageState == 2) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - SharedPreferences.getInstance().then((value) { - oldPassword = value.getString("password"); - }); - if(oldPasswordController.text == ""){ - SmartDialog.showToast("请输入旧密码", alignment: Alignment.center); - return; - }else if(newPasswordController.text == ""){ - SmartDialog.showToast("请输入新密码", alignment: Alignment.center); - return;}else if(oldPasswordController.text != oldPassword){ - SmartDialog.showToast("旧密码输入错误", alignment: Alignment.center); - return; - }else{ - modifyCode(); - } - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.only(bottom: 55.h, top: 36.h), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - "确认修改", - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ), - ), - ), - ), - ); - } - - Widget changePassword() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ), - ], - ), - padding: EdgeInsets.only( - top: 16.h, - left: 16.w, - right: 16.w, - ), - child: Column( - children: [ - Row( - children: [ - Text( - "旧密码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.medium), - ), - Expanded( - child: TextField( - controller: oldPasswordController, - decoration: InputDecoration( - hintText: "请输入旧密码", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - keyboardType: TextInputType.phone, - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(bottom: 16.h), - ), - Row( - children: [ - Text( - "新密码", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.medium), - ), - Expanded( - child: TextField( - controller: newPasswordController, - decoration: InputDecoration( - hintText: "请输入新密码", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - contentPadding: EdgeInsets.only(left: 16.w), - ), - keyboardType: TextInputType.phone, - style: TextStyle( - color: Color(0xFF808080), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(bottom: 16.h), - ), - ], - ), - ); - } -} diff --git a/lib/business_system/mine/service_subscription/function_version_detail.dart b/lib/business_system/mine/service_subscription/function_version_detail.dart deleted file mode 100644 index 1a0dfb69..00000000 --- a/lib/business_system/mine/service_subscription/function_version_detail.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; - -class FunctionVersionDetail extends StatefulWidget { - final Map arguments; - - FunctionVersionDetail({this.arguments}); - - @override - State createState() { - return _FunctionVersionDetail(); - } -} - -class _FunctionVersionDetail extends State { - - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "功能版本介绍", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body:Container( - width: double.infinity, - height: double.infinity, - child:Image.asset( - "assets/image/activity_q.webp", - width: double.infinity, - height: double.infinity, - fit: BoxFit.fill, - ), - ), - ); - } -} diff --git a/lib/business_system/mine/service_subscription/service_purchase_record.dart b/lib/business_system/mine/service_subscription/service_purchase_record.dart deleted file mode 100644 index 3cf30a2b..00000000 --- a/lib/business_system/mine/service_subscription/service_purchase_record.dart +++ /dev/null @@ -1,459 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/service_bug_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/my_appbar.dart'; -import '../../../view_widget/no_data_view.dart'; - -class ServicePurchaseRecord extends StatefulWidget { - final Map arguments; - - ServicePurchaseRecord({this.arguments}); - - @override - State createState() { - return _ServicePurchaseRecord(); - } -} - -class _ServicePurchaseRecord extends State { - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - int _current = 1; - String networkError = ""; - int networkStatus = 0; - List records = []; - - ///离开页面记着销毁和清除 - @override - void dispose() { - super.dispose(); - refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryPackageBuyList(); - EasyLoading.dismiss(); - if (!mounted) return; - if (refreshController.isRefresh) refreshController.refreshCompleted(); - setState(() {}); - } - - ///服务购买记录 - queryPackageBuyList() async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.packageBuyList({ - "current": _current, - "map": {}, - "model": {"tenantCode": BusinessInstance.instance.businessTenant}, - "order": "descending", - "size": 10, - "sort": "createTime" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - records.addAll(baseData?.data?.records ?? []); - if ((baseData?.data?.records ?? []).isEmpty || - records.length.toString() == baseData.data.total) - refreshController.loadNoData(); - else - refreshController.loadComplete(); - networkStatus = 1; - } - } finally { - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "购买记录", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - ), - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: records.length == 0 ? false : true, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _current = 1; - records.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _current++; - _onRefresh(isShowLoad: false); - }, - child: networkStatus == -1 - ? noNetwork() - : ((networkStatus == 0) - ? Container( - margin: EdgeInsets.only(top: 12.h), - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return purchaseRecordItemSm(); - }, - )) - : ((records == null || records.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无购买记录", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : Container( - margin: EdgeInsets.only(top: 12.h), - child: ListView.builder( - itemCount: records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: purchaseRecordItem(records[position]), - ); - }, - ), - )))), - ); - } - - Widget purchaseRecordItem(Records records) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - left: 12.h, - top: 12.h, - bottom: 12.h, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - records?.packageName ?? "", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 13.h), - ), - - ///服务内容暂未定义,暂时隐藏 - // Padding( - // padding: EdgeInsets.only(bottom: 12.h), - // child: Text( - // "套餐内容: 会员管理", - // style: TextStyle( - // fontSize: 12.sp, - // color: Color(0xFF1A1A1A), - // fontWeight: MyFontWeight.regular), - // ), - // ), - Padding( - padding: EdgeInsets.only(bottom: 12.h), - child: Text( - "套餐年限: ${records?.packageNum ?? "0"}年", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Padding( - padding: EdgeInsets.only(bottom: 12.h), - child: Text( - "套餐金额: ${records?.packagePrice ?? "0"}元", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Padding( - padding: EdgeInsets.only(bottom: 12.h), - child: Text( - "购买时间: ${records?.createTime ?? ""}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - )), - Text( - "支付方式: ${records?.payChannel == 1 ? "微信支付" :"支付宝支付"}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - ), - ); - } - - Widget purchaseRecordItemSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h), - padding: EdgeInsets.only( - left: 12.h, - top: 16.h, - bottom: 16.h, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 70.w, - height: 20.h, - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 13.h), - ), - Padding( - padding: EdgeInsets.only(bottom: 12.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(left: 15.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 18.h, - ), - ), - ], - )), - Padding( - padding: EdgeInsets.only(bottom: 12.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(left: 15.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 30.w, - height: 18.h, - ), - ), - ], - )), - Padding( - padding: EdgeInsets.only(bottom: 12.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(left: 15.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 123.w, - height: 18.h, - ), - ), - ], - )), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(left: 15.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 48.w, - height: 18.h, - ), - ), - ], - ) - ], - )); - } - - Widget noNetwork() { - return Container( - margin: EdgeInsets.only(top: 120.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // "无法连接到网络", - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/mine/service_subscription/service_subscription_page.dart b/lib/business_system/mine/service_subscription/service_subscription_page.dart deleted file mode 100644 index e0486834..00000000 --- a/lib/business_system/mine/service_subscription/service_subscription_page.dart +++ /dev/null @@ -1,1292 +0,0 @@ -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:fluwx/fluwx.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shimmer/shimmer.dart'; -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/tenant_info.dart'; -import '../../../retrofit/data/tenant_package_calculate_details.dart'; -import '../../../retrofit/data/tenant_package_list.dart'; -import '../../../retrofit/data/wx_pay.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../utils/min.dart'; -import '../../../view_widget/classic_header.dart'; -import '../../../view_widget/my_footer.dart'; -import '../../../view_widget/no_data_view.dart'; -import '../../../view_widget/settlement_tips_dialog.dart'; -import 'package:tobias/tobias.dart' as tobias; - -class ServiceSubscriptionPage extends StatefulWidget { - final Map arguments; - - ServiceSubscriptionPage({this.arguments}); - - @override - State createState() { - return _ServiceSubscriptionPage(); - } -} - -class _ServiceSubscriptionPage extends State { - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - String networkError = ""; - int networkStatus = 0; - int selectIndex = 0; - int serviceType = 0; - int payType = 1; - TenantInfo tenantInfo; - List tenantPackageList = []; - TenantPackageCalculateDetails tenantPackageCalculateDetails; - dynamic payListen; - - @override - void initState() { - super.initState(); - queryTenantList(); - payListen = weChatResponseEventHandler.listen((event) async { - print("payCallback: ${event.errCode}"); - if (event.errCode == 0) { - queryTenantInfo(); - } else { - SmartDialog.showToast("购买服务失败", alignment: Alignment.center); - return; - } - }); - } - - @override - void dispose() { - super.dispose(); - if (payListen != null) payListen.cancel(); - } - - ///服务套餐列表 - queryTenantList({isSing = true}) async { - if (isSing) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData> baseData = - await businessService.tenantPackage().catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - }); - if (baseData != null && baseData.isSuccess) { - tenantPackageList = baseData.data; - queryTenantCalculate(isSing: false); - networkStatus = 1; - refreshController.refreshCompleted(); - refreshController.loadComplete(); - } - } finally { - if (isSing) { - setState(() {}); - EasyLoading.dismiss(); - } - } - } - - ///服务套餐计算 - queryTenantCalculate({isSing: true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = - await businessService.tenantPackageCalculate({ - "packageId": int.tryParse(tenantPackageList[serviceType]?.id ?? 0), - "packageSale": { - "packagePrice": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.packagePrice ?? - "", - "originalPackagePrice": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.originalPackagePrice ?? - "", - "duration": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.duration ?? - 0, - "packageDiscount": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.packageDiscount ?? - 0, - "isRecommend": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.isRecommend ?? - false, - "saleName": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.saleName ?? - "", - "canDiscount": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.canDiscount ?? - false, - } - }).catchError((error) { - if (isSing) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - refreshController.refreshFailed(); - refreshController.loadFailed(); - } - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - tenantPackageCalculateDetails = baseData.data; - networkStatus = 1; - if (isSing) { - refreshController.refreshCompleted(); - refreshController.loadComplete(); - } - } - } finally { - setState(() {}); - } - } - - ///服务套餐支付 - tenantPay() async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - businessService = BusinessApiService(Dio(), - context: context, - pay: true, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - BaseData baseData = await businessService.tenantApplyPay({ - "packageId": - int.tryParse(tenantPackageCalculateDetails?.packageId ?? 0), - "payChannel": payType, - "packageSale": { - "packagePrice": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.packagePrice ?? - "", - "originalPackagePrice": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.originalPackagePrice ?? - "", - "duration": tenantPackageList[serviceType] - ?.tenantPackageSale[selectIndex] - ?.duration ?? - 0, - } - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - }); - if (baseData != null && baseData.isSuccess) { - if (payType == 1) { - if (Platform.isAndroid) { - if (!(await Min.isInitialize())) { - // 小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, - // 然而充值时小程序未初始化会导致回调内部代码调用getPackage空指针, - // 故而在此初始化一下 - await Min.initialize(); - } - } - WxPay wxPay = WxPay.fromJson(baseData.data); - await registerWxApi( - appId: wxPay.appId, - doOnAndroid: true, - universalLink: "https://hx.lotus-wallet.com/app/", - ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, - ); - } else { - tobias.isAliPayInstalled().then((value) => { - // 判断是否安装了支付宝 - if (!value) - {SmartDialog.showToast("请安装支付宝", alignment: Alignment.center)} - else - { - tobias.aliPay(baseData.data["body"]).then((payRes) { - if (payRes['resultStatus'] == 9000 || - payRes['resultStatus'] == '9000') { - queryTenantInfo(); - } else { - if (payRes['memo'] != "") - SmartDialog.showToast(payRes['memo'], - alignment: Alignment.center); - } - }) - } - }); - } - networkStatus = 1; - } else { - SmartDialog.show( - clickBgDismissTemp: false, - widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally { - EasyLoading.dismiss(); - setState(() {}); - } - } - - ///查询商户信息 - queryTenantInfo() async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService - .tenantInfo(BusinessInstance.instance.businessTenant) - .catchError((error) { - networkStatus = -1; - networkError = AppUtils.dioErrorTypeToString(error.type); - }); - if (baseData != null && baseData.isSuccess) { - tenantInfo = baseData.data; - BusinessInstance.instance.expirationTime = baseData.data.expirationTime; - BusinessInstance.instance.serviceStatus = baseData.data.status.desc; - networkStatus = 1; - Navigator.of(context).pop(1); - SmartDialog.showToast("购买服务成功", alignment: Alignment.center); - } - } finally { - setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "服务订购", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1 - ? noNetwork() - : (networkStatus == 0 - ? serviceSm() - : SmartRefresher( - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - controller: refreshController, - onRefresh: () { - queryTenantList(isSing: false); - }, - physics: BouncingScrollPhysics(), - child: Stack( - children: [ - SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ///续费时间 - Container( - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 16.w), - margin: EdgeInsets.only( - bottom: 16.h, right: 16.w, left: 16.w), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 16.h), - child:Row( - children: [ - Expanded(child:Text( - "你当前的套餐是: ${BusinessInstance.instance.serviceStatus == "正常" ? (widget?.arguments["packageName"] ?? ""):BusinessInstance.instance.serviceStatus}", - maxLines: 1, - overflow:TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: - MyFontWeight.regular, - ), - )), - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap:(){ - Navigator.of(context).pushNamed( - '/router/service_purchase_record',arguments: { - "storeId":widget.arguments["storeId"], - }); - }, - child: Row( - children: [ - Text( - "购买记录", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 12.sp, - fontWeight: - MyFontWeight.regular, - ), - ), - Padding(padding:EdgeInsets.only(left:4.w,right:12.w), - child: Image.asset( - "assets/image/bs_right.webp", - width:7.w, - height:12.h, - color:Color(0xFF1A1A1A), - )), - ], - ), - ) - ], - )), - Padding( - padding: - EdgeInsets.only(bottom: 16.h), - child: Text( - "你的到期时间是: ${(BusinessInstance.instance.expirationTime ?? "").length > 9 ? (BusinessInstance.instance.expirationTime ?? "").substring(0, 10) : ""}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: - MyFontWeight.regular, - ), - )), - Text( - "购买后到期时间: ${(tenantPackageCalculateDetails?.expirationTime ?? "").length > 9 ? (tenantPackageCalculateDetails?.expirationTime ?? "").substring(0, 10) : ""}", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ) - ], - )), - - ///服务套餐 - Column( - children: [ - Padding( - padding: EdgeInsets.symmetric( - horizontal: 16.w), - child: Row( - children: [ - Expanded( - child: Text( - "请选择购买", - style: TextStyle( - fontSize: 15.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed( - '/router/function_version_detail'); - }, - child: Row( - children: [ - Padding( - padding: EdgeInsets.only( - right: 2.w), - child: Text( - "功能版本介绍", - style: TextStyle( - fontSize: 12.sp, - color: - Color(0xFF1A1A1A), - fontWeight: - MyFontWeight - .regular), - )), - Image.asset( - "assets/image/icon_right_z.webp", - width: 14.h, - height: 14.h, - color: Color(0xFF1A1A1A), - ), - ], - ), - ) - ], - ), - ), - serviceTypeList(), - ], - ), - ], - ), - )), - - ///确认充值 - Align( - alignment: Alignment.bottomCenter, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - payMode(); - }, - child: Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only( - top: 10.h, - left: 16.w, - right: 16.w, - bottom: 34.h), - child: Container( - alignment: Alignment.center, - height: 54.h, - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27), - ), - child: Text( - "确认", - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ), - ), - )) - ], - ), - )), - ); - } - - ///服务套餐分类 - Widget serviceTypeList() { - return (tenantPackageList != null && (tenantPackageList?.length ?? 0) > 0) - ? Column( - children: [ - Container( - height: 59.h, - alignment: Alignment.centerLeft, - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: tenantPackageList?.length ?? 0, - scrollDirection: Axis.horizontal, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - serviceType = position; - selectIndex = 0; - queryTenantCalculate(); - }); - }, - child: serviceTypeItem( - tenantPackageList[position], position)); - }, - )), - serviceList(), - ], - ) - : NoDataView( - src: "assets/image/xiao_fei.webp", - isShowBtn: false, - text: "暂无服务套餐~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 20.h, left: 60.w, right: 60.w), - ); - } - - ///服务套餐分类列表 - Widget serviceTypeItem(TenantPackageList tenantPackageList, index) { - return Container( - padding: EdgeInsets.only(right: 18.w, left: 16.w, top: 19.h), - child: Column( - children: [ - Text( - tenantPackageList?.name ?? "", - style: TextStyle( - fontSize: 14.sp, - color: serviceType == index - ? Color(0xFF30415B) - : Color(0xFF302F3A), - fontWeight: serviceType == index - ? MyFontWeight.bold - : MyFontWeight.regular), - ), - if (serviceType == index) - Container( - margin: EdgeInsets.only(top: 5.h), - width: 24.w, - height: 2.h, - color: Color(0xFF30415B), - ), - ], - ), - ); - } - - ///服务套餐选择 - Widget serviceList() { - return Container( - child: (tenantPackageList != null && - (tenantPackageList[serviceType]?.tenantPackageSale?.length ?? - 0) > - 0) - ? GridView.builder( - itemCount: - tenantPackageList[serviceType]?.tenantPackageSale?.length ?? - 0, - padding: EdgeInsets.only( - top: 12.h, right: 16.w, left: 16.w, bottom: 120.h), - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 3, - crossAxisSpacing: 13.w, - mainAxisSpacing: 14.h, - childAspectRatio: 0.8), - itemBuilder: (context, index) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - selectIndex = index; - queryTenantCalculate(); - }); - }, - child: serviceItem( - tenantPackageList[serviceType] - .tenantPackageSale[index], - index)); - }, - ) - : NoDataView( - src: "assets/image/xiao_fei.webp", - isShowBtn: false, - text: "暂无服务套餐~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 20.h, left: 60.w, right: 60.w), - )); - } - - ///服务套餐选择列表 - Widget serviceItem(TenantPackageSale tenantPackageSale, index) { - return Stack( - alignment: Alignment.topRight, - children: [ - Stack( - children: [ - Container( - alignment: Alignment.center, - width: double.infinity, - padding: EdgeInsets.only(top: 18.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: selectIndex == index - ? Color(0xFF30415B) - : Color(0x29C5C5C5), - width: 2, - ), - color: selectIndex == index - ? Color(0XFFEBF3FF) - : Color(0xFFF9FAF8)), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "${tenantPackageSale?.duration ?? 0}年", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF302F3A), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.only(bottom: 18.h, top: 10.h), - child: Text.rich( - TextSpan(children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 14.sp, - fontWeight: FontWeight.bold, - color: Color(0xFF30415B), - ), - ), - TextSpan( - text: ((tenantPackageSale?.canDiscount ?? false) == - true) - ? (tenantPackageSale?.packagePrice ?? "") - : (tenantPackageSale?.originalPackagePrice ?? - ""), - style: TextStyle( - fontSize: 24.sp, - fontWeight: FontWeight.bold, - color: Color(0xFF30415B), - ), - ), - ]), - )), - if (AppUtils.calculateDouble(((tenantPackageSale - ?.canDiscount ?? - false) == - true) - ? (double.tryParse( - (tenantPackageSale?.packagePrice ?? "0")) / - ((tenantPackageSale?.duration ?? 0) * 12)) - : (double.tryParse( - (tenantPackageSale?.originalPackagePrice ?? - "0")) / - ((tenantPackageSale?.duration ?? 0) * 12))) != - "0") - Text( - "¥${AppUtils.calculateDouble(((tenantPackageSale?.canDiscount ?? false) == true) ? (double.tryParse((tenantPackageSale?.packagePrice ?? "0")) / ((tenantPackageSale?.duration ?? 0) * 12)) : (double.tryParse((tenantPackageSale?.originalPackagePrice ?? "0")) / ((tenantPackageSale?.duration ?? 0) * 12)))}/月", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF302F3A), - fontWeight: MyFontWeight.bold), - ), - ], - ), - ), - if ((tenantPackageSale?.canDiscount ?? false) == true && ((tenantPackageSale?.packageDiscount?? "")!=100)) - Container( - decoration: BoxDecoration( - color: Color(0xFFFF8F1F), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(4), - bottomRight: Radius.circular(4), - ), - ), - padding: EdgeInsets.symmetric(horizontal: 4.w), - child: Text( - "${AppUtils.calculateDouble((tenantPackageSale?.packageDiscount ?? 0) / 10)}折", - style: TextStyle( - fontSize: 12.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - ), - ) - ], - ), - if (selectIndex == index) - Image.asset( - "assets/image/bus_vip_j.webp", - width: 32.h, - height: 32.h, - fit: BoxFit.fill, - ), - ], - ); - } - - ///支付方式弹窗 - payMode() { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return StatefulBuilder(builder: ( - context, - state, - ) { - return Container( - width: double.infinity, - height: 302.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - "支付方式", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), - GestureDetector( - onTap: () { - state(() { - Navigator.of(context).pop(); - }); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w), - child: Image.asset( - "assets/image/cancel.webp", - width: 25.h, - height: 25.h, - ), - ), - ), - ], - ), - Column( - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - state(() { - payType = 1; - }); - }, - child: Container( - alignment: Alignment.center, - width: double.infinity, - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 18.w), - margin: EdgeInsets.symmetric(horizontal: 14.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6), - border: Border.all( - color: payType == 1 - ? Color(0xFF30415B) - : Color(0x29C5C5C5), - width: 1, - ), - color: payType == 1 - ? Color(0XFFEBF3FF) - : Color(0xFFF9FAF8)), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bus_vip_wx.webp", - width: 20.w, - height: 18.h, - ), - Padding( - padding: EdgeInsets.only(left: 5.w), - child: Text( - "微信支付", - style: TextStyle( - fontSize: 14.sp, - color: payType == 1 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - ], - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - state(() { - payType = 2; - }); - }, - child: Container( - alignment: Alignment.center, - width: double.infinity, - padding: EdgeInsets.only( - top: 16.h, bottom: 16.h, left: 18.w), - margin: EdgeInsets.symmetric( - horizontal: 14.w, vertical: 12.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6), - border: Border.all( - color: payType == 2 - ? Color(0xFF30415B) - : Color(0x29C5C5C5), - width: 1, - ), - color: payType == 2 - ? Color(0XFFEBF3FF) - : Color(0xFFF9FAF8)), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bus_vip_alipay.webp", - width: 20.h, - height: 20.h, - ), - Padding( - padding: EdgeInsets.only(left: 5.w), - child: Text( - "支付宝", - style: TextStyle( - fontSize: 14.sp, - color: payType == 2 - ? Color(0xFF30415B) - : Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - )), - ], - ), - ), - ), - ], - ), - GestureDetector( - onTap: () { - setState(() { - Navigator.of(context).pop(); - tenantPay(); - }); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.symmetric( - vertical: 25.h, horizontal: 16.w), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).queren, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ); - }); - }); - } - - Widget serviceSm() { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.symmetric(horizontal: 16.w), - padding: EdgeInsets.only(top: 17.h, bottom: 16.h, left: 16.w), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 112.w, - height: 20.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 85.w, - height: 20.h, - ), - ), - ], - ), - SizedBox( - height: 16.h, - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 112.w, - height: 20.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 85.w, - height: 20.h, - ), - ), - ], - ), - SizedBox( - height: 16.h, - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 112.w, - height: 20.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 85.w, - height: 20.h, - ), - ), - ], - ) - ], - ), - ), - SizedBox( - height: 12.h, - ), - Expanded( - child: Container( - padding: - EdgeInsets.only(top: 17.h, bottom: 16.h, left: 16.w, right: 16.w), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 75.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 72.w, - height: 17.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(left: 5.w, right: 16.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 16.w, - height: 17.h, - ), - ), - ], - ), - SizedBox( - height: 19.h, - ), - Container( - height: 25.h, - margin: EdgeInsets.only(bottom: 27.h), - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.horizontal, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 59.w, - ), - ); - }, - ), - ), - Expanded( - child: GridView.builder( - itemCount: 5, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 3, - crossAxisSpacing: 13.w, - mainAxisSpacing: 14.h, - childAspectRatio: 0.8), - itemBuilder: (context, index) { - return Container( - alignment: Alignment.center, - width: double.infinity, - padding: EdgeInsets.only(top: 18.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: Color(0x29C5C5C5), - width: 2, - ), - color: Color(0xFFF9FAF8)), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 21.w, - height: 20.h, - ), - ), - Padding( - padding: EdgeInsets.only(bottom: 18.h, top: 10.h), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 60.w, - height: 25.h, - ), - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 68.w, - height: 20.h, - ), - ), - ], - ), - ); - }, - )), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(bottom: 34.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(27), - ), - width: double.infinity, - height: 54.h, - ), - ), - ], - ), - )) - ], - ); - } - - ///网络错误 - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - queryTenantList(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/mine/shop_image_info.dart b/lib/business_system/mine/shop_image_info.dart deleted file mode 100644 index a2ce961c..00000000 --- a/lib/business_system/mine/shop_image_info.dart +++ /dev/null @@ -1,346 +0,0 @@ -import 'dart:io'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/upload_result.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:image_pickers/image_pickers.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../retrofit/business_api.dart'; -import '../../utils/business_instance.dart'; - -class ShopImageInfo extends StatefulWidget { - final Map arguments; - - ShopImageInfo({this.arguments}); - - @override - State createState() { - return _ShopImageInfo(); - } -} - -class _ShopImageInfo extends State { - String filePath; - String logoPath; - BusinessApiService businessService; - Map imageInfo = { - "logo": "", - "facade": "", - }; - - @override - void initState() { - super.initState(); - } - - refresh() async { - setState(() {}); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: "门店图片", - titleColor: Colors.black, - background: Color(0xFFFFFFFF), - leadingColor: Colors.black, - ), - body: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - padding: EdgeInsets.only(top: 16.h, left: 18.w, bottom: 16.h), - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 16.h), - child: Text( - "店铺logo", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showImagePicker(1); - }, - child: Container( - height: 77.h, - width: 77.h, - decoration: BoxDecoration( - color: Color(0xFFF2F2F2), - borderRadius: BorderRadius.circular(4), - ), - alignment: Alignment.center, - child: (widget.arguments["logo"] != "") - ? (logoPath == null - ? MImage( - widget.arguments["logo"], - fit: BoxFit.contain, - radius: BorderRadius.circular(2), - width: MediaQuery.of(context).size.width / 1.5, - height: MediaQuery.of(context).size.width / 1.5, - errorSrc: "assets/image/default_2_1.webp", - fadeSrc: "assets/image/default_2_1.webp", - ) - : Image.file( - File(logoPath), - width: MediaQuery.of(context).size.width / 1.5, - height: MediaQuery.of(context).size.width / 1.5, - fit: BoxFit.cover, - )) - : SvgPicture.asset( - "assets/svg/zhaopianshipin.svg", - width: 24.h, - height: 24.h, - fit: BoxFit.contain, - ), - ), - ) - ], - ), - ), - Container( - margin: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w), - padding: EdgeInsets.only(top: 16.h, left: 18.w, bottom: 16.h), - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 16.h), - child: Text( - "门面图", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showImagePicker(2); - }, - child: Container( - height: 77.h, - width: 77.h, - decoration: BoxDecoration( - color: Color(0xFFF2F2F2), - borderRadius: BorderRadius.circular(4), - ), - alignment: Alignment.center, - child: (widget.arguments["facade"] != "") - ? (filePath == null - ? MImage( - widget.arguments["facade"], - fit: BoxFit.contain, - radius: BorderRadius.circular(2), - width: MediaQuery.of(context).size.width / 1.5, - height: MediaQuery.of(context).size.width / 1.5, - errorSrc: "assets/image/default_2_1.webp", - fadeSrc: "assets/image/default_2_1.webp", - ) - : Image.file( - File(filePath), - width: MediaQuery.of(context).size.width / 1.5, - height: MediaQuery.of(context).size.width / 1.5, - fit: BoxFit.cover, - )) - : SvgPicture.asset( - "assets/svg/zhaopianshipin.svg", - width: 24.h, - height: 24.h, - fit: BoxFit.contain, - ), - ), - ) - ], - ), - ), - Spacer(), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pop([imageInfo["logo"] == "" ? widget.arguments["logo"]:imageInfo["logo"], - imageInfo["facade"] == "" ? widget.arguments["facade"]:imageInfo["facade"]]); - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.only(bottom: 55.h, left: 16.w, right: 16.w), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - S.of(context).baocun, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ); - } - - ///显示图片选择方式 - showImagePicker(index) { - showCupertinoModalPopup( - context: context, - builder: (contetx) { - return CupertinoActionSheet( - title: Text(S.of(context).genghuantouxiang), - actions: [ - CupertinoActionSheetAction( - child: Text(S.of(context).paizhao), - onPressed: () { - openCamera(index); - Navigator.of(context).pop(); - }, - isDefaultAction: true, - isDestructiveAction: false, - ), - CupertinoActionSheetAction( - child: Text(S.of(context).xiangce), - onPressed: () { - openStorage(index); - Navigator.of(context).pop(); - }, - isDefaultAction: true, - isDestructiveAction: false, - ), - ], - cancelButton: CupertinoActionSheetAction( - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text(S.of(context).quxiao), - isDestructiveAction: true, - ), - ); - }); - } - - ///拍照 - openCamera(index) async { - if (await Permission.camera.isGranted) { - Media medias = await ImagePickers.openCamera( - cameraMimeType: CameraMimeType.photo, - cropConfig: CropConfig( - enableCrop: true, - width: 200, - height: 200, - ), - compressSize: 500, - ); - if (medias == null) return; - if(index == 1){ - logoPath = medias.path; - }else{ - filePath = medias.path; - } - fileImgUpload(index); - } else { - await Permission.camera.request(); - openCamera(index); - } - } - - ///打开相册 - openStorage(index) async { - if (await Permission.storage.isGranted) { - List medias = await ImagePickers.pickerPaths( - galleryMode: GalleryMode.image, - selectCount: 1, - showGif: true, - showCamera: false, - compressSize: 500, - uiConfig: UIConfig( - uiThemeColor: Color(0xFFFFFFFF), - ), - cropConfig: CropConfig( - enableCrop: true, - width: 200, - height: 200, - ), - ); - if (medias == null || medias.length == 0) return; - if (index == 1) { - logoPath = medias[0].path; - } else { - filePath = medias[0].path; - } - setState(() {}); - fileImgUpload(index); - } else { - await Permission.storage.request(); - openStorage(index); - } - } - - ///文件上传 - fileImgUpload(index) async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - if (logoPath != null && logoPath != "" && await File(logoPath).exists() || filePath != null && filePath != "" && await File(filePath).exists()) { - BaseData baseData = await businessService - .upload(File(index == 1 ? logoPath:filePath), 1) - .catchError((onError) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), - alignment: Alignment.center); - }); - if (baseData != null && baseData.isSuccess) { - UploadResult uploadResult = baseData.data; - if (index == 1) { - imageInfo["logo"] = uploadResult.url; - } else { - imageInfo["facade"] = uploadResult.url; - } - } - EasyLoading.dismiss(); - } - } -} diff --git a/lib/business_system/mine/shop_reservation_code.dart b/lib/business_system/mine/shop_reservation_code.dart deleted file mode 100644 index 0c92631b..00000000 --- a/lib/business_system/mine/shop_reservation_code.dart +++ /dev/null @@ -1,208 +0,0 @@ -import 'dart:typed_data'; - -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:image_gallery_saver/image_gallery_saver.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:qr_flutter/qr_flutter.dart'; - -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; - -class ShopReservationCode extends StatefulWidget { - final Map arguments; - - ShopReservationCode({this.arguments}); - - @override - State createState() { - return _ShopReservationCode(); - } -} - -class _ShopReservationCode extends State { - final RefreshController refreshController = RefreshController(); - - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - title: "门店预约二维码", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: - // networkStatus == -1 - // ? noNetwork() : - SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - // _onRefresh(isShowLoad: false); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Container( - padding: EdgeInsets.only(top:16.h,bottom:45.h), - child: - // ListView.builder( - // itemCount: 10, - // physics: BouncingScrollPhysics(), - // shrinkWrap: true, - // itemBuilder: (context, position) { - // return GestureDetector( - // behavior: HitTestBehavior.opaque, - // onTap: () {}, - // child: assortItemSm(), - // ); - // }, - // ) - // : ((productGroupList == null || - // productGroupList.records.length == 0) - // ? NoDataView( - // src: "assets/image/bs_no data_logo.webp", - // isShowBtn: false, - // text: "暂无商品分类", - // fontSize: 16.sp, - // margin: EdgeInsets.all(20.h), - // ) : - ListView.builder( - itemCount:6, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: reservationCodeItem(), - ); - }, - )), - )); - } - - void saveQrImg(String qrImgData) async{ - try { - EasyLoading.show(status: "正在保存...", maskType: EasyLoadingMaskType.clear); - // 如果用户已授权存储权限 - if (await Permission.storage.request().isGranted) { - final painter = QrPainter( - data: qrImgData, - version: QrVersions.auto, - gapless: true, - errorCorrectionLevel: QrErrorCorrectLevel.L, - ); - ByteData imageData = await painter.toImageData(600.0); - final data = imageData.buffer.asUint8List(); - if (data != null) { - var result = await - ImageGallerySaver.saveImage(data, - isReturnImagePathOfIOS: true); - if (result["isSuccess"] == true) { - SmartDialog.showToast("保存成功!", alignment: Alignment.center); - } else - SmartDialog.showToast("保存失败!${result["errorMessage"] ?? ""}", - alignment: Alignment.center); - } else - SmartDialog.showToast("获取图片失败!", alignment: Alignment.center); - } else { - // 没有存储权限时,弹出没有存储权限的弹窗 - await Permission.storage.request(); - SmartDialog.showToast("请在授予应用储存权限后再试!", alignment: Alignment.center); - } - } catch (e, s) { - SmartDialog.showToast("22222", alignment: Alignment.center); - SmartDialog.showToast(e.toString(), alignment: Alignment.center); - SmartDialog.showToast(s.toString(), alignment: Alignment.center); - } finally { - EasyLoading.dismiss(); - } - } - - Widget reservationCodeItem() { - return Container( - width: double.infinity, - margin: EdgeInsets.only(left: 16.w, right: 16.w,bottom:12.h), - padding: EdgeInsets.only(top:12.h, bottom: 12.h,left:20.w,), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(8), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - QrImage( - data: "555562332356564512", - version: QrVersions.auto, - size: 104.h, - gapless: true, - padding: EdgeInsets.all(0), - ), - SizedBox(width: 10.w,), - Expanded(child:Container( - height: 104.h, - child: Column( - children: [ - Expanded(child:Padding(padding: EdgeInsets.only(right: 22.w), - child: Text( - "海峡姐妹理发彭和会所", - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - color: Color(0xD9000000), - fontSize: 18.sp, - fontWeight: MyFontWeight.bold, - ), - ),)), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - saveQrImg("555562332356564512"); - }, - child: Container( - padding: EdgeInsets.only(top:15.h,right: 22.w), - alignment: Alignment.bottomRight, - child: Image.asset( - "assets/image/bus_code_save.webp", - width: 20.w, - height: 18.h, - ), - ), - ) - ], - ), - )), - ], - ), - ); - } -} diff --git a/lib/business_system/order/business_order_detail.dart b/lib/business_system/order/business_order_detail.dart deleted file mode 100644 index c7ab9e2d..00000000 --- a/lib/business_system/order/business_order_detail.dart +++ /dev/null @@ -1,845 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_order_detail_info.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; - -class BusinessOrderDetail extends StatefulWidget { - final Map arguments; - - BusinessOrderDetail({this.arguments}); - @override - State createState() { - return _BusinessOrderDetail(); - } -} - -class _BusinessOrderDetail extends State { - final RefreshController refreshController = RefreshController(); - BusinessApiService businessService; - BusinessOrderDetailInfo orderDetailInfo; - String networkError = ""; - int networkStatus = 0; - - @override - void initState() { - super.initState(); - queryOrderDetail(); - } - - @override - void dispose() { - super.dispose(); - refreshController.dispose(); - } - - ///查询订单详情 - queryOrderDetail() async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.getAdminOrderDetail({ - "id": widget.arguments["id"], - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - }); - if (baseData != null && baseData.isSuccess) { - orderDetailInfo = baseData.data; - networkStatus = 1; - } - } finally { - EasyLoading.dismiss(); - if (refreshController.isRefresh) refreshController.refreshCompleted(); - setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: "订单详情", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: networkStatus == -1 ? noNetwork():SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh:(){queryOrderDetail();}, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: SingleChildScrollView( - physics: NeverScrollableScrollPhysics(), - child: Container( - margin: EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w), - child: Column( - children: [goodsInfo(), (networkStatus == 0)?orderInfoSm():orderInfo()], - ), - ), - ), - ), - ); - } - - ///商品信息 - Widget goodsInfo() { - return Container( - padding: EdgeInsets.all(12), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - child: Column( - children: [ - Row( - children: [ - Container( - width: 2.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 4.w), - ), - Expanded( - child: Text( - "商品信息", - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold), - )), - Text( - status()?? "", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFFFA5151), - fontWeight: MyFontWeight.semi_bold), - ) - ], - ), - SizedBox( - height: 12.h, - ), - networkStatus == 0?ListView.builder( - padding: EdgeInsets.zero, - itemCount: 3, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return goodsInfoSm(); - }, - ): - ListView.builder( - padding: EdgeInsets.zero, - itemCount: orderDetailInfo?.orderProductDTOList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return goodsInfoItem(orderDetailInfo.orderProductDTOList[position]); - }, - ) - - ], - ), - ); - } - - Widget goodsInfoItem(OrderProductDtoList orderProductDTOList) { - return Container( - margin: EdgeInsets.only(bottom: 12.h), - height: 77.h, - child: Row( - children: [ - MImage( - orderProductDTOList?.skuImg ?? "", - width: 77.h, - height: 77.h, - fit: BoxFit.fill, - ), - SizedBox( - width: 12.w, - ), - Expanded(child:Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded(child: Text( - orderProductDTOList?.productName ?? "", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold - ), - )), - Row( - children: [ - Expanded(child: Text( - "×${orderProductDTOList?.buyNum ?? 0}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold - ), - )), - Text( - "¥${orderProductDTOList?.sellPrice ?? ""}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold - ), - ) - ], - ) - ], - )) - ], - ), - ); - } - - ///订单信息 - Widget orderInfo() { - return Container( - padding: EdgeInsets.all(12), - margin: EdgeInsets.only(top: 12.h,bottom:30.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - child: Column( - children: [ - Row( - children: [ - Container( - width: 2.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 4.w), - ), - Text( - "订单信息", - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold), - ) - ], - ), - SizedBox( - height: 12.h, - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - copyOrderCode(orderDetailInfo?.orderCode ?? ""); - SmartDialog.showToast("复制成功!", - alignment: Alignment.center); - }, - child:Row( - children: [ - Expanded( - child: Text( - "订单号", - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: Color(0xFF808080), - ), - )), - Text( - orderDetailInfo?.orderCode ?? "", - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - border: Border.all( - color: Color(0xFF30415B), - width: 1.w, - ), - ), - padding: EdgeInsets.symmetric(horizontal: 7.w, vertical: 2.h), - margin: EdgeInsets.only(left: 4.w), - child: Text( - "复制", - style: TextStyle( - fontSize: 10.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ), - ], - ) - ), - orderInfoItem("创建时间", orderDetailInfo?.createTime ?? "无"), - orderInfoItem("门店", orderDetailInfo?.storeName ?? "无"), - orderInfoItem("用户名", orderDetailInfo?.memberInfo?.name ?? "无"), - orderInfoItem("手机号", orderDetailInfo?.memberInfo?.phone ?? "无"), - orderInfoItem("订单金额", orderDetailInfo?.orderSum ?? "0.00"), - orderInfoItem("优惠金额", orderDetailInfo?.discountAmount ??"0.00"), - orderInfoItem("实付金额", orderDetailInfo?.paySum ?? "0.00"), - orderInfoItem("预约时间", orderDetailInfo?.subcribeTime ?? "无"), - ], - ), - ); - } - - Widget goodsInfoSm(){ - return Container( - margin: EdgeInsets.only(bottom: 12.h), - height: 77.h, - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(4), - ), - width: 77.h, - height: 77.h, - ), - ), - SizedBox( - width: 12.w, - ), - Expanded(child:Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 117.w, - height: 20.h, - ), - ), - Spacer(), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 15.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 29.w, - height: 20.h, - ), - ), - ], - ) - ], - )) - ], - ), - ); - } - - Widget orderInfoSm(){ - return Container( - padding: EdgeInsets.all(12), - margin: EdgeInsets.only(top: 12.h,bottom:30.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - child: Column( - children: [ - Row( - children: [ - Container( - width: 2.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 4.w), - ), - Text( - "订单信息", - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold), - ) - ], - ), - SizedBox( - height: 12.h, - ), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 42.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 171.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 56.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 147.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 28.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 70.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 42.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 34.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 42.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 84.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 56.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 25.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 56.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 38.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 56.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 55.w, - height: 20.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 56.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 147.w, - height: 20.h, - ), - ), - ], - )), - ], - ), - ); - } - - Widget orderInfoItem(leftText, rightText) { - return Container( - margin: EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - leftText, - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: Color(0xFF808080), - ), - ), - SizedBox(width: 10.w), - Expanded( - child: Text( - rightText, - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - flex: 1, - ), - ], - ), - ); - } - - ///复制订单号 - copyOrderCode(String orderCode) { - print(orderCode); - Clipboard.setData(ClipboardData(text: orderCode)); - } - - String status (){ - if(orderDetailInfo?.orderStatus == -1){ - return "错误订单"; - }else { - if(orderDetailInfo?.orderStatus == 1){ - return "未付款"; - }else if(orderDetailInfo?.orderStatus == 5){ - return "已取消"; - }else if(orderDetailInfo?.payStatus == 1 && orderDetailInfo?.refundStatus == 2){ - return "退款待审核"; - }else if(orderDetailInfo?.orderStatus == 3 && orderDetailInfo?.refundStatus == 1){ - return "已退款"; - }else if(orderDetailInfo?.orderStatus == 4){ - return "已完成"; - }else if(orderDetailInfo?.orderStatus == 2){ - return "已付款"; - }else if(orderDetailInfo?.orderStatus == 3){ - return "已确认"; - } - } - } - - Widget noNetwork() { - return Container( - color: Colors.white, - width: double.infinity, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - queryOrderDetail(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/order/business_order_page.dart b/lib/business_system/order/business_order_page.dart deleted file mode 100644 index 56fbf718..00000000 --- a/lib/business_system/order/business_order_page.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:huixiang/business_system/order/ticket/ticket_page.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../view_widget/my_appbar.dart'; -import '../../view_widget/my_tab.dart'; -import 'order_list_page.dart'; - -class BusinessOrderPage extends StatefulWidget { - final String storeId; - - BusinessOrderPage(Key key,this.storeId): super(key: key); - - @override - State createState() { - return _BusinessOrderPage(); - } -} - -class _BusinessOrderPage extends State - with SingleTickerProviderStateMixin{ - final RefreshController refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - TabController tabController; - - @override - void initState() { - super.initState(); - tabController = TabController(length: 2, vsync: this); - tabController.addListener(() { - if (!tabController.indexIsChanging) { - FocusScope.of(context).requestFocus(FocusNode()); - } - }); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Expanded(child: - DefaultTabController( - length: 2, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title:"", - leading: false, - background: Colors.white, - bottom: TabBar( - // isScrollable: true, //可滚动 - //去掉按钮阴影 - overlayColor: MaterialStateProperty.all(Colors.white), - indicatorColor: Color(0xFF30415B), - labelColor: Colors.black, - labelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.bold, - ), - unselectedLabelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.normal, - color: Color(0xFF666666) - ), - controller: tabController, - //未选中文字颜色 - unselectedLabelColor: Color(0xffA29E9E), - indicatorSize: TabBarIndicatorSize.label, - //指示器与文字等宽 - tabs: [ - MyTab(text:"订单列表"), - MyTab(text: "票券"), - ], - ), - ), - body: TabBarView( - controller: tabController, - children: [ - OrderListPage(widget.storeId), - TicketPage(widget.storeId)], - ), - ), - ),), - ], - ); - } -} diff --git a/lib/business_system/order/order_list.dart b/lib/business_system/order/order_list.dart deleted file mode 100644 index 3c47d1f1..00000000 --- a/lib/business_system/order/order_list.dart +++ /dev/null @@ -1,1031 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../utils/font_weight.dart'; -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_order_list.dart'; -import '../../retrofit/data/order_user_detail.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../view_widget/border_text.dart'; -import '../../view_widget/no_data_view.dart'; -import '../../view_widget/round_button.dart'; -import '../../view_widget/settlement_tips_dialog.dart'; - -class OrderList extends StatefulWidget { - final int status; - final String storeId; - final String keyword; - final String time; - final bool isKeyBoardShow; - - OrderList(Key key, this.status, this.storeId, this.keyword, this.time, - this.isKeyBoardShow) - : super(key: key); - - @override - State createState() { - return _OrderList(); - } -} - -class _OrderList extends State { - final RefreshController _refreshController = RefreshController(); - ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics(); - final ScrollController controller = ScrollController(); - BusinessApiService businessService; - List adminOrderDTOList = []; - int _pageIndex = 1; - String networkError = ""; - int networkStatus = 0; - OrderUserDetail orderUserDetail; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryOrderList(isRefreshData: false); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - ///订单列表 - queryOrderList({String queryId, isRefreshData = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = - await businessService.findAdminOrderList({ - "orderCode": "", - "keywordType": 1, - "keyword": widget.keyword == "" ? (queryId ?? "") : widget.keyword, - "orderStatus": "", - "startTime": widget.time - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 19), - "endTime": widget.time - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(widget.time.length >= 21 ? 22 : 0, - widget.time.length >= 21 ? 41 : 0), - "pageIndex": (widget.keyword != "" || queryId != null) ? 1 : _pageIndex, - "pageSize": 10, - "refundStatus": widget.status == 3 ? "1" : "", - "payStatus": widget.status == 1 ? "0" : (widget.status == 2 ? "1" : ""), - "showCancelOrder": 1, - "orderType": "" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - if (queryId == null) { - adminOrderDTOList.addAll(baseData?.data?.adminOrderDTOList ?? []); - if ((baseData?.data?.adminOrderDTOList ?? []).isEmpty || - adminOrderDTOList.length == baseData.data.total) - _refreshController.loadNoData(); - else - _refreshController.loadComplete(); - } else if (adminOrderDTOList != null) - for (int i = 0; i < adminOrderDTOList.length; i++) { - if (adminOrderDTOList[i].orderCode == queryId) { - adminOrderDTOList[i] = baseData?.data?.adminOrderDTOList?.first; - break; - } - } - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isRefreshData) setState(() {}); - } - } - - ///确认扣款 - orderBalancePay(String orderCode,String orderId,String payMoney) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.balancePay({ - "orderId": orderId, - "payMoney": payMoney, - "payChannel": 1, - "sid":orderUserDetail?.id ?? "", - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - await queryOrderList(queryId: orderCode); - SmartDialog.showToast("扣款成功", alignment: Alignment.center); - setState(() {}); - } else { - SmartDialog.show( - widget: SettlementTips( - () { - }, - text: baseData.msg, - color: Color(0xFF30415B), - )); - } - } finally { - EasyLoading.dismiss(); - } - } - - ///查询订单列表用户金额详情 - queryOrderUserDetail(String orderId) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.getOrderUserDetail(orderId).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - orderUserDetail = baseData.data; - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: adminOrderDTOList.length == 0 ? false : true, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _pageIndex = 1; - adminOrderDTOList.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _pageIndex++; - _onRefresh(isShowLoad: false); - }, - child: networkStatus == -1 - ? noNetwork() - : ((networkStatus == 0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return orderItemSm(); - }, - ) - : ((adminOrderDTOList == null || adminOrderDTOList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : Padding( - padding: EdgeInsets.only(top: 16.h), - child: ListView.builder( - itemCount: adminOrderDTOList?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (widget.isKeyBoardShow) { - FocusScope.of(context) - .requestFocus(FocusNode()); - return; - } else { - Navigator.of(context).pushNamed( - '/router/business_order_detail', - arguments: { - "id": adminOrderDTOList[position].id, - "storeId": widget.storeId - }); - } - }, - child: orderItem(adminOrderDTOList[position]), - ); - }, - ), - ))), - ); - } - - Widget orderItem(AdminOrderDtoList adminOrderDtoList) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(bottom: 12.h, left: 12.w, right: 12.w), - child: Row( - children: [ - Image.asset( - "assets/image/bs_switch_shop.webp", - width: 16, - height: 16, - ), - SizedBox( - width: 3.w, - ), - Expanded( - child: Text( - adminOrderDtoList?.storeName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold), - )), - Text( - widget.status == 0 - ? "全部" - : widget.status == 1 - ? "未付款" - : widget.status == 2 - ? "已付款" - : "已退款", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFFFA5151), - fontWeight: MyFontWeight.semi_bold), - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Column( - children: [ - Container( - margin: EdgeInsets.only(top: 17.h, bottom: 13.h), - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: adminOrderDtoList?.orderProductList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return orderGoodsList( - adminOrderDtoList.orderProductList[position]); - }, - ), - ), - Row( - children: [ - Text( - "订单编号:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - Padding( - padding: EdgeInsets.only(left: 14.w), - child: Text( - adminOrderDtoList?.orderCode ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - ], - ), - SizedBox( - height: 4.h, - ), - Row( - children: [ - Text( - "支付时间:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - SizedBox( - width: 14.w, - ), - Expanded( - child: Text( - adminOrderDtoList?.createTime ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - Text( - "¥ ${adminOrderDtoList?.paySum ?? ""}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF181818), - fontWeight: MyFontWeight.medium), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - if (adminOrderDtoList.ticketStatus != null && - adminOrderDtoList.refundStatus == 0) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/order_write_off', arguments: { - "tickets": adminOrderDtoList.tickets, - "orderCode": adminOrderDtoList?.orderCode ?? "", - "userName": adminOrderDtoList?.name ?? "", - "ticketStatus": adminOrderDtoList?.ticketStatus, - }).then((value) async { - queryOrderList( - queryId: adminOrderDtoList.orderCode); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - padding: EdgeInsets.symmetric( - vertical: 5.h, horizontal: 26.w), - margin: EdgeInsets.only( - right: ((adminOrderDtoList.payStatus == 1 && - adminOrderDtoList.refundStatus == 0 && - adminOrderDtoList - .enableRefundApprover == - false) || - adminOrderDtoList.payStatus == 0) - ? 20.w - : 0, - top: 20.h), - child: Text( - "核销", - style: TextStyle( - fontSize: 12.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - ), - ), - ), - if (adminOrderDtoList.payStatus == 0 && - adminOrderDtoList.refundStatus == 0 && adminOrderDtoList.orderType == 6) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () async{ - await queryOrderUserDetail(adminOrderDtoList.id); - showPayDialog(adminOrderDtoList.orderCode,adminOrderDtoList.id,adminOrderDtoList.orderSum); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(4), - border: Border.all( - color: Color(0xFF30415B), - width: 1, - ), - ), - padding: EdgeInsets.symmetric( - vertical: 5.h, horizontal: 14.w), - margin: EdgeInsets.only(top: 20.h), - child: Text( - "确认扣款", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ), - ), - if (adminOrderDtoList.payStatus == 1 && - adminOrderDtoList.refundStatus == 0 && - adminOrderDtoList.enableRefundApprover == false) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context) - .pushNamed('/router/request_refund', arguments: { - "refundAmount": adminOrderDtoList?.paySum ?? "", - "mid": adminOrderDtoList?.mid ?? "", - "orderId": adminOrderDtoList?.id ?? "", - "storeId": widget.storeId ?? "", - }).then((value) { - if (value == 1) { - queryOrderList( - queryId: adminOrderDtoList.orderCode); - } - }); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(4), - border: Border.all( - color: Color(0xFF30415B), - width: 1, - ), - ), - padding: EdgeInsets.symmetric( - vertical: 5.h, horizontal: 14.w), - margin: EdgeInsets.only(top: 20.h), - child: Text( - "申请退款", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ), - ), - ], - ), - if (adminOrderDtoList.payStatus == 1 && - adminOrderDtoList.refundStatus == 0 && - adminOrderDtoList.enableRefundApprover == true) - Padding( - padding: EdgeInsets.only(top: 15.h), - child: Text( - "备注:暂无退款权限,请前往企业微信联系退款审核人员进行审批", - style: TextStyle( - fontSize: 12.sp, - color: Colors.red, - fontWeight: MyFontWeight.regular), - ), - ), - ], - ), - ), - ], - ), - ); - } - - ///确认扣款提示弹窗 - showPayDialog(String orderCode,String orderId,String payMoney) { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - contentPadding:EdgeInsets.all(0), - content: Container( - width: MediaQuery.of(context).size.width - 84, - padding: EdgeInsets.only(top: 24.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - Padding(padding: EdgeInsets.only(bottom: 31.h),child:Text( - "确定对该订单进行扣款吗?", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 18.sp, - fontWeight: MyFontWeight.bold, - ), - )), - Padding(padding:EdgeInsets.only(bottom: 18.h), - child: Row( - children: [ - Expanded(child:Column( - children: [ - Image.asset( - "assets/image/bus_yue.webp", - width: 40.h, - height: 40.h, - ), - Padding(padding:EdgeInsets.symmetric(vertical:8.h), - child: Text( - "余额", - style: TextStyle( - color: Color(0xFF252626), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )), - Text( - orderUserDetail?.balance ?? "", - style: TextStyle( - color: Color(0xFF252626), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ) - ], - )), - Container( - height:46.h, - width: 1.w, - color: Color(0xFFD8D8D8), - ),Expanded(child:Column( - children: [ - Image.asset( - "assets/image/bus_real_recharge.webp", - width: 40.h, - height: 40.h, - ), - Padding(padding:EdgeInsets.symmetric(vertical:8.h), - child: Text( - "实储余额", - style: TextStyle( - color: Color(0xFF252626), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )), - Text( - orderUserDetail?.realRecharge ?? "", - style: TextStyle( - color: Color(0xFF252626), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ) - ], - )), - Container( - height:46.h, - width: 1.w, - color: Color(0xFFD8D8D8), - ),Expanded(child:Column( - children: [ - Image.asset( - "assets/image/bus_give_yue.webp", - width: 40.h, - height: 40.h, - ), - Padding(padding:EdgeInsets.symmetric(vertical:8.h), - child: Text( - "赠送余额", - style: TextStyle( - color: Color(0xFF252626), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )), - Text( - "${AppUtils.calculateDouble(double.tryParse(orderUserDetail?.balance ?? "0") - double.tryParse(orderUserDetail?.realRecharge ?? "0"))}", - style: TextStyle( - color: Color(0xFF252626), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ) - ], - )), - ], - ),), - Container( - width:double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8),), - Container( - height: 55.h, - child: Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Colors.black, - fontSize: 16.sp, - fontWeight: FontWeight.bold, - padding: EdgeInsets.all(14), - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - Container( - width: 1.w, - height:double.infinity, - color: Color(0xFFD8D8D8), - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(14), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - Navigator.of(context).pop(); - orderBalancePay(orderCode,orderId,payMoney); - }, - ), - flex: 1, - ), - ], - ), - ) - ], - ), - ), - ); - }, - ); - } - - Widget orderGoodsList(OrderProductList orderProductList) { - return Container( - margin: EdgeInsets.only(bottom: 13.h), - child: Row( - children: [ - Expanded( - child: Text( - orderProductList?.productName ?? "", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.medium), - )), - Text( - "x${(orderProductList?.buyNum ?? 0).toString()}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF000000), - fontWeight: MyFontWeight.regular), - ) - ], - ), - ); - } - - Widget orderItemSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(bottom: 12.h, left: 12.w, right: 12.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 16.h, - height: 16.h, - ), - ), - SizedBox( - width: 3.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 84.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 42.w, - height: 20.h, - ), - ), - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Column( - children: [ - Container( - margin: EdgeInsets.only(top: 17.h, bottom: 13.h), - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: 5, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: orderGoodsSm(), - ); - }, - ), - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 20.h, - ), - ), - Padding( - padding: EdgeInsets.only(left: 14.w), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 118.w, - height: 20.h, - ), - ), - ), - ], - ), - SizedBox( - height: 4.h, - ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 20.h, - ), - ), - SizedBox( - width: 14.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 73.w, - height: 20.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(left: 4.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 45.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 36.w, - height: 20.h, - ), - ), - ], - ), - SizedBox( - height: 20.h, - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 20.w), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 76.w, - height: 27.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 76.w, - height: 27.h, - ), - ), - ], - ) - ], - ), - ), - ], - ), - ); - } - - Widget orderGoodsSm() { - return Container( - margin: EdgeInsets.only(bottom: 13.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 84.w, - height: 20.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 17.w, - height: 20.h, - ), - ), - ], - ), - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // "无法连接到网络", - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/order/order_list_page.dart b/lib/business_system/order/order_list_page.dart deleted file mode 100644 index e7f21744..00000000 --- a/lib/business_system/order/order_list_page.dart +++ /dev/null @@ -1,232 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../utils/font_weight.dart'; -import '../../view_widget/my_appbar.dart'; -import '../../view_widget/my_tab.dart'; -import 'order_list.dart'; - -class OrderListPage extends StatefulWidget { - final String storeId; - - OrderListPage(this.storeId); - - @override - State createState() { - return _OrderListPage(); - } -} - -class _OrderListPage extends State { - final RefreshController refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - final TextEditingController editingController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - List _allKey = []; - String selectTimeDate = ""; - String selectTimeDateNum = - "${DateFormat("yyyy年MM月dd日 00:00:00").format(DateTime.now().subtract(Duration(days: 2)))} 至 " - "${DateFormat("yyyy年MM月dd日 23:59:59").format(DateTime.now())}"; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - loadFinish(); - } - - loadFinish() { - _allKey = [GlobalKey(), GlobalKey(), GlobalKey(), GlobalKey()]; - setState(() {}); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Column( - children: [ - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8), - ), - orderSearch(), - timeSelect(), - Expanded( - child: DefaultTabController( - length: 4, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "", - leading: false, - background: Colors.white, - // toolbarHeight: MediaQuery.of(context).size.height >= 750 ? (kToolbarHeight + 15.h) : kToolbarHeight, - bottom: TabBar( - // isScrollable: true, //可滚动 - //去掉按钮阴影 - overlayColor: MaterialStateProperty.all(Colors.white), - indicatorColor: Color(0xFF30415B), - labelColor: Colors.black, - labelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.bold, - ), - unselectedLabelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.normal, - color: Color(0xFF666666)), - // controller: tabController, - //未选中文字颜色 - unselectedLabelColor: Color(0xffA29E9E), - indicatorSize: TabBarIndicatorSize.label, - //指示器与文字等宽 - tabs: [ - MyTab(text: "全部"), - MyTab(text: "未付款"), - MyTab(text: "已付款"), - MyTab(text: "已退款"), - ], - ), - ), - body: TabBarView( - children: [ - OrderList(_allKey[0], 0, widget.storeId, - editingController.text, selectTime(),MediaQuery.of(context).viewInsets.bottom != 0 ? isKeyBoardShow = true: isKeyBoardShow = false), - OrderList(_allKey[1], 1, widget.storeId, - editingController.text, selectTime(),MediaQuery.of(context).viewInsets.bottom != 0 ? isKeyBoardShow = true: isKeyBoardShow = false), - OrderList(_allKey[2], 2, widget.storeId, - editingController.text, selectTime(),MediaQuery.of(context).viewInsets.bottom != 0 ? isKeyBoardShow = true: isKeyBoardShow = false), - OrderList(_allKey[3], 3, widget.storeId, - editingController.text, selectTime(),MediaQuery.of(context).viewInsets.bottom != 0 ? isKeyBoardShow = true: isKeyBoardShow = false), - ], - ), - ), - ), - ), - SizedBox( - height: 76.h, - ), - ], - ), - ); - } - - /// 搜索框 - Widget orderSearch() { - return Container( - color: Colors.white, - child: Container( - height: 40.h, - margin: EdgeInsets.only( - left: 18.w, - right: 18.w, - top: 6.h, - ), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - loadFinish(); - }, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - controller: editingController, - decoration: InputDecoration( - hintText: "请输入订单ID", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.symmetric( - vertical: 12.h, - ), - prefixIcon: Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - border: InputBorder.none, - ), - ), - ), - ); - } - - Widget timeSelect() { - return Container( - color: Colors.white, - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/custom_page',arguments: {"beyondDateRange": "0"}).then((value) { - selectTimeDate = value; - loadFinish(); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - margin: - EdgeInsets.only(left: 18.w, right: 18.w, top: 13.h,), - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 12.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - ("${selectTime().substring(0, 11)} ${selectTime().substring(21, 34)}"), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ], - ), - ), - ), - ); - } - - String selectTime() { - if (selectTimeDate == "" || selectTimeDate == null) { - return selectTimeDateNum; - } else - return selectTimeDate; - } -} diff --git a/lib/business_system/order/order_write_off.dart b/lib/business_system/order/order_write_off.dart deleted file mode 100644 index 0d54d0a5..00000000 --- a/lib/business_system/order/order_write_off.dart +++ /dev/null @@ -1,693 +0,0 @@ -import 'dart:convert'; -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_order_list.dart' as business; -import '../../retrofit/data/ticket_details.dart'; -import '../../utils/business_instance.dart'; -import '../../view_widget/classic_header.dart'; -import '../../view_widget/my_footer.dart'; - -class OrderWriteOff extends StatefulWidget { - final Map arguments; - - OrderWriteOff({this.arguments}); - - @override - State createState() { - return _OrderWriteOff(); - } -} - -class _OrderWriteOff extends State { - final RefreshController refreshController = RefreshController(); - var writeOffCheck = false; - List tickets; - TicketDetails ticketDetails; - business.AdminOrderDtoList adminOrderDTOList; - BusinessApiService businessService; - - @override - void initState() { - super.initState(); - if (widget.arguments["tickets"] != null) { - tickets = widget.arguments["tickets"]; - } else { - ticketDetails = widget.arguments["ticketDetails"]; - } - } - - ///多个核销 - severalWiped(ticketWipedBatch) async { - try { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService - .wipedBatchs(jsonEncode(ticketWipedBatch).replaceAll("\\\"", "\"")) - .catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(); - SmartDialog.showToast("核销成功", alignment: Alignment.center); - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: "核销", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Color(0xFF30415B), - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - refreshController.refreshCompleted(); - }, - physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: Stack( - children: [ - SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - margin: EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w,bottom:100.h), - child: Column( - children: [ - basicInfo(), - writeOffInfo(), - ], - ), - ), - ), - Align( - alignment: Alignment.bottomCenter, - child: GestureDetector( - onTap: () { - if (tickets != null - ? (widget.arguments["ticketStatus"] == false) - : (ticketDetails.state == 9)) { - return; - } else { - List ticketWipedBatch = []; - if (widget.arguments["tickets"] != null) { - tickets.forEach((element) { - List skuTickets = []; - element.ticketItemList.forEach((ele) { - if (ele.isSelect) { - skuTickets.add({ - "number": 1, - "skuTicket": ele.name, - "state": ele.state, - }); - } - }); - if (skuTickets.isNotEmpty) { - ticketWipedBatch.add({ - "itemMap": [ - { - "productSkuld": element.productSkuId, - "ticketExchangeName": element.name, - "ticketId": element.id, - "skuTickets": skuTickets - } - ], - "ticketCode": element.code, - }); - } - }); - } else { - List skuTickets = []; - ticketDetails.ticketItemList.forEach((element) { - if (element.isSelect) { - skuTickets.add({ - "number": 1, - "skuTicket": element.name, - "state": element.state, - }); - } - }); - if (skuTickets.isNotEmpty) { - ticketWipedBatch.add({ - "itemMap": [ - { - "productSkuld": ticketDetails.productSkuId, - "ticketExchangeName": ticketDetails.name, - "ticketId": ticketDetails.id, - "skuTickets": skuTickets - } - ], - "ticketCode": ticketDetails.code, - }); - } - } - if (ticketWipedBatch.length == 0) { - SmartDialog.showToast("请选择要核销的商品", - alignment: Alignment.center); - return; - } else { - severalWiped(ticketWipedBatch); - } - } - }, - child: Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only( - top: 10.h, - left: 16.w, - right: 16.w, - bottom: 34.h), - child: Container( - width: double.infinity, - alignment: Alignment.center, - height: 54.h, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: (tickets != null - ? (widget.arguments["ticketStatus"] == true) - : (ticketDetails.state != 9)) - ? Color(0xFF30415B) - : Color(0xFFABACAB)), - child: Text( - "确认核销", - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - )), - )) - ], - ), - ), - ); - } - - ///基本信息 - Widget basicInfo() { - return Container( - padding: EdgeInsets.all(12), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - child: Column( - children: [ - Row( - children: [ - Container( - width: 2.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 4.w), - ), - Text( - "基础信息", - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold), - ), - ], - ), - SizedBox( - height: 12.h, - ), - basicInfoItem("用户名称:", - widget?.arguments["userName"] ?? ticketDetails?.userName ?? ""), - basicInfoItem( - "订单编号:", - widget?.arguments["orderCode"] ?? - (ticketDetails.code.replaceAll("T", "")) ?? - ""), - ], - ), - ); - } - - Widget basicInfoItem(leftText, rightText) { - return Container( - margin: EdgeInsets.only(top: 8.h, bottom: 8.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - leftText, - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: Color(0xFF808080), - ), - ), - SizedBox(width: 10.w), - Text( - rightText, - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - ), - ); - } - - ///待核销信息 - Widget writeOffInfo() { - return Container( - padding: EdgeInsets.all(12), - margin: EdgeInsets.only(top: 12.h, bottom: 30.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - ), - child: Column( - children: [ - Row( - children: [ - Container( - width: 2.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 4.w), - ), - Text( - "待核销项", - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold), - ) - ], - ), - SizedBox( - height: 17.h, - ), - ListView.builder( - padding: EdgeInsets.zero, - itemCount: tickets != null - ? (tickets?.length ?? 0) - : (ticketDetails?.ticketItemList?.length ?? 0), - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return tickets != null - ? writeOffInfoItem(tickets[position]) - : scanCodeInfoItem(ticketDetails.ticketItemList[position]); - }, - ) - // ListView.builder( - // padding: EdgeInsets.zero, - // itemCount:3, - // scrollDirection: Axis.vertical, - // shrinkWrap: true, - // physics: BouncingScrollPhysics(), - // itemBuilder: (context, position) { - // return GestureDetector( - // onTap: () { - // }, - // child: writeOffInfoItems(), - // ); - // }, - // ) - ], - ), - ); - } - - ///订单列表进入的核销数据 - Widget writeOffInfoItem(business.Tickets tickets) { - return Container( - width: double.infinity, - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - tickets?.name ?? "", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 14.sp, - color: tickets.state != 9 - ? (tickets.state == 7 - ? Color(0xFFACACAC) - : (tickets.state == 8 - ? Color(0xFFACACAC) - : Color(0xFF30415B))) - : Color(0xFFABACAB), - ), - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Padding( - padding: EdgeInsets.only(right: 10.w), - child: Text( - (tickets.state != 9) - ? (tickets.state == 7 - ? "已退款" - : (tickets.state == 8 ? "票券已失效" : "待核销")) - : "已核销", - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 12.sp, - color: (tickets.state != 9) - ? (tickets.state == 7 - ? Color(0xFFACACAC) - : (tickets.state == 8 - ? Color(0xFFACACAC) - : Color(0xFF30415B))) - : Color(0xFFACACAC), - ), - ), - ), - ], - )) - ], - ), - ListView.builder( - padding: EdgeInsets.zero, - itemCount: tickets?.ticketItemList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: skuTicketsItem(tickets.ticketItemList[position]), - ); - }, - ), - Container( - margin: EdgeInsets.only(bottom: 11.h, top: 13.h), - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - ) - ], - ), - ); - } - - ///扫码进入/票券列表进入的核销数据 - Widget scanCodeInfoItem(TicketItemList ticketItemList) { - return Container( - width: double.infinity, - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - ticketItemList?.name ?? "", - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: ticketItemList.state == 1 - ? Color(0xFF0D0D0D) - : Color(0xFFABACAB), - ), - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Padding( - padding: EdgeInsets.only(right: 10.w), - child: Text( - (ticketItemList.state == 1) ? "待核销" : "已核销", - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 12.sp, - color: (ticketItemList.state == 1 && ticketDetails.state != 9) - ? Color(0xFF30415B) - : Color(0xFFACACAC), - ), - ), - ), - SizedBox( - height: 25.h, - ), - if (ticketItemList.state == 1 && ticketDetails.state != 9) - Checkbox( - value: ticketItemList.isSelect, - onChanged: (a) { - setState(() { - ticketItemList.isSelect = !ticketItemList.isSelect; - }); - }, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(2.0), - ), - checkColor: Color(0xFFFFFFFF), - fillColor: MaterialStateProperty.all(Color(0xFF30415B)), - ), - ], - )) - ], - ), - if (ticketItemList.state != 1) - Align( - alignment: Alignment.centerRight, - child: Container( - margin: EdgeInsets.only(right: 10.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - border: Border.all( - color: Color(0xFFCFCFCF), - width: 1.w, - ), - ), - child: Icon( - Icons.check, - color: Color(0xFFCFCFCF), - size: 14.w, - )), - ), - Container( - margin: EdgeInsets.only(bottom: 11.h, top: 13.h), - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - ) - ], - ), - ); - } - - Widget skuTicketsItem(business.TicketItemList ticketItemList) { - return Container( - width: double.infinity, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - ticketItemList?.name ?? "", - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 12.sp, - color: ticketItemList.state == 1 - ? Color(0xFF0D0D0D) - : Color(0xFFABACAB), - ), - )), - (ticketItemList.state == 7 || ticketItemList.state == 8) - ? (ticketItemList.state != 9 - ? Container( - margin: EdgeInsets.symmetric(vertical: 20.h), - ) - : Align( - alignment: Alignment.centerRight, - child: Container( - margin: EdgeInsets.only( - right: 15.w, top: 10.h, bottom: 10.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - border: Border.all( - color: Color(0xFFCFCFCF), - width: 1.w, - ), - ), - child: Icon( - Icons.check, - color: Color(0xFFCFCFCF), - size: 14.w, - )), - )) - : (ticketItemList.state == 1 - ? Checkbox( - value: ticketItemList.isSelect, - onChanged: (a) { - setState(() { - ticketItemList.isSelect = !ticketItemList.isSelect; - }); - }, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(2.0), - ), - checkColor: Color(0xFFFFFFFF), - fillColor: MaterialStateProperty.all(Color(0xFF30415B)), - ) - : Align( - alignment: Alignment.centerRight, - child: Container( - margin: EdgeInsets.only( - right: 15.w, top: 10.h, bottom: 10.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular( - 2, - ), - border: Border.all( - color: Color(0xFFCFCFCF), - width: 1.w, - ), - ), - child: Icon( - Icons.check, - color: Color(0xFFCFCFCF), - size: 14.w, - )), - )) - ], - ), - ); - } - - Widget writeOffInfoItems() { - return Container( - width: double.infinity, - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - "哈哈哈哈哈", - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - ), - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Padding( - padding: EdgeInsets.only(right: 10.w), - child: Text( - "已核销", - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 12.sp, - color: Color(0xFF30415B), - ), - ), - ), - SizedBox( - height: 25.h, - ), - Checkbox( - value: writeOffCheck, - onChanged: (a) { - setState(() { - writeOffCheck = !writeOffCheck; - }); - }, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(2.0), - ), - checkColor: Color(0xFFFFFFFF), - fillColor: MaterialStateProperty.all(Color(0xFF30415B)), - ), - ], - )) - ], - ), - Container( - margin: EdgeInsets.only(bottom: 11.h, top: 13.h), - width: double.infinity, - height: 1.h, - color: Color(0xFFEBECEF), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/order/request_refund.dart b/lib/business_system/order/request_refund.dart deleted file mode 100644 index 516ec3bf..00000000 --- a/lib/business_system/order/request_refund.dart +++ /dev/null @@ -1,558 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; - -import '../../generated/l10n.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/refund_reason_list.dart'; -import '../../utils/business_instance.dart'; -import '../../utils/flutter_utils.dart'; -import '../../view_widget/border_text.dart'; -import '../../view_widget/round_button.dart'; -import '../../view_widget/settlement_tips_dialog.dart'; - -class RequestRefund extends StatefulWidget { - final Map arguments; - - RequestRefund({this.arguments}); - - @override - State createState() { - return _RequestRefund(); - } -} - -class _RequestRefund extends State { - final RefreshController refreshController = RefreshController(); - final TextEditingController modifyAmountController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - int modifyAmountState = 0; - int refundState = 0; - RefundReasonList reasonReasonList; - BusinessApiService businessService; - String refundAmount; - String selectRefundReason; - - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - refundAmount = widget.arguments["refundAmount"]; - queryRefundReason(); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - ///退款原因 - queryRefundReason() async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.refundReason({ - "current": 1, - "model": {"type": 3}, - "size": 20 - }).catchError((error) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), - alignment: Alignment.center); - }); - if (baseData != null && baseData.isSuccess) { - reasonReasonList = baseData.data; - } - } - - ///申请退款 - orderRefund() async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.refundOrder({ - "tenant_code": BusinessInstance.instance.businessTenant, - "orderId": widget.arguments["orderId"], - "mid": widget.arguments["mid"], - "reason": selectRefundReason, - "backMoney": modifyAmountController.text == "" - ? refundAmount - : modifyAmountController.text, - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData?.data ?? "", - color: Color(0xFF30415B), - )); - Navigator.of(context).pop(refundState); - } else { - SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); - } - } finally { - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: Color(0xFFF8F8FA), - appBar: MyAppBar( - title: S.of(context).shenqingtuikuan, - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - brightness: Brightness.dark, - ), - body: Container( - margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w), - child: Column( - children: [ - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - boxShadow: [ - BoxShadow( - color: Color(0x0F06152E).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ), - ], - ), - padding: EdgeInsets.only( - top: 16.h, - left: 16.w, - right: 16.w, - ), - child: Column( - children: [ - Row( - children: [ - Container( - width: 2.w, - height: 16.h, - color: Color(0xFF30415B), - margin: EdgeInsets.only(right: 6.w), - ), - Text( - "申请金额", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], - ), - SizedBox( - height: modifyAmountState == 0 ? 32.h : 16.h, - ), - Row( - children: [ - if (modifyAmountState == 0) - Expanded( - child: Text.rich( - TextSpan( - children: [ - TextSpan( - text: "¥", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 24.sp, - fontWeight: MyFontWeight.semi_bold, - ), - ), - TextSpan( - text: refundAmount ?? "", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 24.sp, - fontWeight: MyFontWeight.medium, - ), - ), - ], - ), - )), - if (modifyAmountState == 1) - Text( - "¥", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 24.sp, - fontWeight: MyFontWeight.semi_bold, - ), - ), - if (modifyAmountState == 1) - Expanded( - child: TextField( - controller: modifyAmountController, - decoration: InputDecoration( - hintText: "请输入修改金额", - hintStyle: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), - border: InputBorder.none, - ), - keyboardType: TextInputType.phone, - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 24.sp, - fontWeight: MyFontWeight.medium), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - // showModifyAmountDialog(); - setState(() { - modifyAmountState = 1; - }); - }, - child: Row( - children: [ - Image.asset( - "assets/image/bs_edit.webp", - fit: BoxFit.cover, - width: 16, - height: 16, - ), - SizedBox( - width: 4.w, - ), - Text( - "修改金额", - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), - ) - ], - ), - Container( - height: 1.h, - width: double.infinity, - color: Color(0xFFEBECEF), - margin: EdgeInsets.only(bottom: 24.h), - ), - Padding( - padding: EdgeInsets.only(bottom: 25.h), - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - showRefundReason(); - }, - child: Row( - children: [ - Expanded( - child: Text( - "退款原因", - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - )), - Text( - selectRefundReason ?? "请选择退款原因", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - Padding( - padding: EdgeInsets.only(left: 8.w), - child: Image.asset( - "assets/image/bs_right.webp", - width: 8.w, - height: 12.h, - )), - ], - ), - ), - ) - ], - ), - ), - Spacer(), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (refundState == 1) { - orderRefund(); - } else { - if (selectRefundReason == null) { - SmartDialog.showToast("请选择退款原因", - alignment: Alignment.center); - } else - showModifyAmountDialog(); - } - }, - child: Container( - width: double.infinity, - alignment: Alignment.center, - margin: EdgeInsets.only(bottom: 55.h, top: 125.h), - padding: EdgeInsets.symmetric(vertical: 16.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(27), - color: Color(0xFF30415B)), - child: Text( - "确定退款", - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Colors.white, - ), - ), - ), - ) - ], - ), - ), - ), - ); - } - - ///修改金额提示 - showModifyAmountDialog() { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84.w, - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "申请退款", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 15.h, - ), - Text( - "此操作将进行退款申请,是否继续?", - style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox( - height: 35.h, - ), - Row( - children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - ), - onTap: () { - setState(() { - refundState = 1; - Navigator.of(context).pop(); - }); - }, - ), - flex: 1, - ), - ], - ) - ], - ), - ), - ); - }, - ); - } - - ///退款原因 - showRefundReason() { - showModalBottomSheet( - context: context, - backgroundColor: Colors.transparent, - builder: (context) { - return Container( - width: double.infinity, - height: 309.h, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only(top: 12.h,bottom: 12.h,left: 41.w), - child: Text( - "退款原因", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 17.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), - GestureDetector( - onTap: () { - setState(() { - Navigator.of(context).pop(); - }); - }, - child: Padding( - padding: EdgeInsets.only(right: 16.w), - child: Image.asset( - "assets/image/cancel.webp", - width: 25.h, - height: 25.h, - ), - ), - ), - ], - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: reasonReasonList?.records?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - selectRefundReason = - reasonReasonList.records[position].reason; - }); - Navigator.of(context).pop(); - }, - child: refundReasonItem( - reasonReasonList.records[position]), - ); - }, - ), - ) - ], - ), - ); - }); - } - - refundReasonItem(Records records) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.symmetric(vertical: 16.h), - child: Text( - records?.reason ?? "", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - ), - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFEBEBEB), - ) - ], - ); - } -} diff --git a/lib/business_system/order/ticket/ticket_list.dart b/lib/business_system/order/ticket/ticket_list.dart deleted file mode 100644 index 87b77886..00000000 --- a/lib/business_system/order/ticket/ticket_list.dart +++ /dev/null @@ -1,612 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/ticket_details.dart'; -import '../../../retrofit/data/ticket_show.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; - -class TicketList extends StatefulWidget { - final String ticketState; - final String ticketType; - final String storeId; - final String keyword; - final bool typeScreen; - final bool stateScreen; - final bool isKeyBoardShow; - - TicketList(Key key, this.ticketState, this.ticketType, this.storeId, this.keyword,this.typeScreen,this.stateScreen, - this.isKeyBoardShow) - : super(key: key); - - @override - State createState() { - return _TicketList(); - } -} - -class _TicketList extends State { - final RefreshController _refreshController = RefreshController(); - ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics(); - final ScrollController controller = ScrollController(); - BusinessApiService businessService; - List ticketShowList = []; - int _pageNum = 1; - String networkError = ""; - int networkStatus = 0; - TicketDetails ticketDetails; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryTicketList(isRefreshData: false); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - queryTicketList({String queryName,isRefreshData = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.showList({ - "pageNum": _pageNum, - "pageSize": 10, - "productId": 0, - "productSkuId": 0, - "searchKey": widget.keyword == "" ? (queryName ?? "") : widget.keyword, - "state": widget?.ticketState ?? "", - "storeId": widget?.storeId ?? "", - "ticketCode": "", - "ticketId": 0, - "ticketItemIds": [], - "type": widget?.ticketType ?? "" - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - ticketShowList.addAll(baseData?.data?.list ?? []); - if ((baseData?.data?.list ?? []).isEmpty || - ticketShowList.length.toString() == baseData.data.total) - _refreshController.loadNoData(); - else - _refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isRefreshData) setState(() {}); - } - } - - ///票券详情 - queryTicketDetails(code) async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = - await businessService.ticketCode(code).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - ticketDetails = baseData.data; - if(ticketDetails.state != 9){ - Navigator.of(context) - .pushNamed('/router/order_write_off', arguments: { - "ticketDetails": ticketDetails, - }).then((value) async { - queryTicketList(queryName: ticketDetails.name); - }); - } - else{ - Navigator.of(context) - .pushNamed('/router/order_write_off', arguments: { - "ticketDetails": ticketDetails, - }); - } - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - @override - Widget build(BuildContext context) { - return SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: ticketShowList.length == 0 ? false : true, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _pageNum = 1; - ticketShowList.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _pageNum++; - _onRefresh(isShowLoad: false); - }, - child: networkStatus == -1 - ? noNetwork() - : ((networkStatus == 0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return ticketListSm(); - }, - ) - : ((ticketShowList == null || ticketShowList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : Padding( - padding: EdgeInsets.only(top: 16.h), - child: ListView.builder( - itemCount: ticketShowList?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (widget.isKeyBoardShow || widget.stateScreen == true || widget.typeScreen == true) { - FocusScope.of(context) - .requestFocus(FocusNode()); - return; - } else { - queryTicketDetails(ticketShowList[position].code ?? ""); - } - }, - child: ticketListItem(ticketShowList[position],position), - ); - }, - ), - ))), - ); - } - - Widget ticketListItem(TicketShowList ticketShowList,index) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 13.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Text( - ticketShowList.name ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 14.sp, - color: Colors.black, - fontWeight: MyFontWeight.bold), - ), - ), - Text( - ticketState(index), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFFFA5151), - fontWeight: MyFontWeight.bold), - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding( - padding: EdgeInsets.only(top: 13.h, left: 12.w), - child: Row( - children: [ - Text( - "联系人:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - SizedBox( - width: 26.w, - ), - Text( - ticketShowList?.nickName ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ) - ], - )), - Padding( - padding: EdgeInsets.only(top: 12.h, left: 12.w), - child: Row( - children: [ - Text( - "手机号:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - SizedBox( - width: 26.w, - ), - Text( - ticketShowList?.userPhone ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 12.h), - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Row( - children: [ - Text( - "票券编号: ", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - Expanded( - child: Text( - ticketShowList?.code ??"", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.regular), - )), - Text( - "¥ ${ticketShowList?.amount ??""}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF181818), - fontWeight: MyFontWeight.bold), - ) - ], - )), - if(ticketShowList.state == 1 || ticketShowList?.state == 2) - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - queryTicketDetails(ticketShowList.code ?? ""); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(4), - ), - padding: - EdgeInsets.symmetric(vertical: 5.h, horizontal: 26.w), - margin: EdgeInsets.only(top: 16.h, right:12.w), - child: Text( - "核销", - style: TextStyle( - fontSize: 12.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - ), - ), - ) - ], - ), - ], - ), - ); - } - - String ticketState(index){ - if (ticketShowList[index].state == 1 || ticketShowList[index].state == 2) { - return "可使用"; - } else if (ticketShowList[index].state == 7) { - return "已取消"; - } else if (ticketShowList[index].state == 8) { - return "已失效"; - }else if (ticketShowList[index].state == 9) { - return "已使用"; - } - } - - Widget ticketListSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.all(16), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 13.h), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 154.w, - height: 18.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 42.w, - height: 18.h, - ), - ), - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding( - padding: EdgeInsets.only(top: 13.h, left: 12.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 40.w, - height: 17.h, - ), - ), - SizedBox( - width: 26.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 24.w, - height: 17.h, - ), - ), - ], - )), - Padding( - padding: EdgeInsets.only(top: 12.h, left: 12.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 40.w, - height: 17.h, - ), - ), - SizedBox( - width: 26.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 17.h, - ), - ), - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 12.h), - ), - Padding( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 17.h, - ), - ), - SizedBox(width:14.w,), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 115.w, - height: 17.h, - ), - ), - ], - )), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - margin: EdgeInsets.only(right: 20.w,top:16.h), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 76.w, - height: 27.h, - ), - ), - ], - ), - ], - ) - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // "无法连接到网络", - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/order/ticket/ticket_page.dart b/lib/business_system/order/ticket/ticket_page.dart deleted file mode 100644 index e75c5528..00000000 --- a/lib/business_system/order/ticket/ticket_page.dart +++ /dev/null @@ -1,634 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:huixiang/business_system/order/ticket/ticket_list.dart'; -import 'package:huixiang/business_system/order/ticket/ticket_records_page.dart'; -import 'package:huixiang/business_system/order/ticket/ticket_statistics_page.dart'; -import 'package:huixiang/business_system/order/ticket/ticket_tab.dart'; -import 'package:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/my_appbar.dart'; -import '../../../view_widget/my_tab.dart'; - -class TicketPage extends StatefulWidget { - final String storeId; - - TicketPage(this.storeId); - - @override - State createState() { - return _TicketPage(); - } -} - -class _TicketPage extends State - with SingleTickerProviderStateMixin { - final RefreshController refreshController = RefreshController(); - final ScrollController scrollController = ScrollController(); - final TextEditingController editingController = TextEditingController(); - FocusNode _focusNode = FocusNode(); - bool isKeyBoardShow = false; - List _allKey = []; - String selectTimeDate = ""; - String selectTimeDateNum = - "${DateFormat("yyyy年MM月dd日 00:00:00").format(DateTime.now().subtract(Duration(days:5)))} 至 " - "${DateFormat("yyyy年MM月dd日 23:59:59").format(DateTime.now())}"; - bool typeScreen = false; - bool stateScreen = false; - String ticketType; - String ticketState = "-1"; - TabController tabController; - - @override - void initState() { - super.initState(); - tabController = TabController(length: 3, vsync: this); - tabController.addListener(() { - if (!tabController.indexIsChanging) { - setState(() {}); - FocusScope.of(context).requestFocus(FocusNode()); - } - }); - WidgetsBinding.instance.addPostFrameCallback((_) { - setState(() { - print("object: ${MediaQuery.of(context).viewInsets.bottom}"); - if (MediaQuery.of(context).viewInsets.bottom == 0) { - if (isKeyBoardShow) { - isKeyBoardShow = false; - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); - } - } else { - isKeyBoardShow = true; - } - }); - }); - loadFinish(); - } - - loadFinish() { - _allKey = [GlobalKey(), GlobalKey(), GlobalKey()]; - setState(() {}); - } - - ///离开页面记着销毁和清除 - @override - void dispose() { - _focusNode.unfocus(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Stack( - children: [ - Column( - children: [ - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFD8D8D8), - ), - ticketSearch(), - tabController.index == 0 ? screen() : timeSelect(), - Expanded( - child: DefaultTabController( - length: 3, - child: Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "", - leading: false, - background: Colors.white, - bottom: TabBar( - // isScrollable: true, //可滚动 - //去掉按钮阴影 - overlayColor: MaterialStateProperty.all(Colors.white), - indicator: const TicketTab( - width: 33, - borderSide: BorderSide( - width: 2.0, color: Color(0xFF30415B))), - labelColor: Colors.black, - labelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.bold, - ), - unselectedLabelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.normal, - color: Color(0xFF666666)), - controller: tabController, - //未选中文字颜色 - unselectedLabelColor: Color(0xFF0D0D0D), - //指示器与文字等宽 - tabs: [ - MyTab(text: "票券列表"), - MyTab(text: "核销记录"), - MyTab(text: "核销统计"), - ], - ), - ), - body: TabBarView( - controller: tabController, - children: [ - TicketList( - _allKey[0], - ticketState == "-1" ? "0" : ticketState, - ticketType, - widget.storeId, - editingController.text, - typeScreen, - stateScreen, - MediaQuery.of(context).viewInsets.bottom != 0 - ? isKeyBoardShow = true - : isKeyBoardShow = false), - TicketRecordPage( - _allKey[1], - 1, - widget.storeId, - editingController.text, - (selectTimeDate == "" || selectTimeDate == null) ? "" :selectTimeDate, - MediaQuery.of(context).viewInsets.bottom != 0 - ? isKeyBoardShow = true - : isKeyBoardShow = false), - TicketStatisticsPage( - _allKey[2], - 2, - widget.storeId, - editingController.text, - selectTime(), - MediaQuery.of(context).viewInsets.bottom != 0 - ? isKeyBoardShow = true - : isKeyBoardShow = false), - ], - ), - ), - ), - ), - SizedBox( - height: 76.h, - ), - ], - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 18.w), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (typeScreen && tabController.index == 0) - Expanded( - child: Container( - height: 176.h, - decoration: BoxDecoration( - color: Colors.white, - border: Border.all( - color: Color(0x29000000), - width: 0.5.w, - ), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only(top: 108.h), - padding: EdgeInsets.symmetric( - horizontal: 16.w, vertical: 8.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketType = ""; - typeScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "所有", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - )), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketType = "ADOPT_WARRANT"; - typeScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "认领凭证", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketType = "IDENTITY_CARD"; - typeScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "身份卡片", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketType = "NORMAL"; - typeScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "常规票券", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ))), - ], - ))), - if (!typeScreen || !stateScreen) Expanded(child: Container()), - SizedBox( - width: 14.w, - ), - if (stateScreen && tabController.index == 0) - Expanded( - child: Container( - height: 210.h, - decoration: BoxDecoration( - color: Colors.white, - border: Border.all( - color: Color(0x29000000), - width: 0.5.w, - ), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only(top: 108.h), - padding: EdgeInsets.symmetric( - horizontal: 16.w, vertical: 8.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketState = "0"; - stateScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "全部", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ))), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketState = "1"; - stateScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "可使用", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketState = "7"; - stateScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "已取消", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketState = "8"; - stateScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "已失效", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - ticketState = "9"; - stateScreen = false; - loadFinish(); - }); - }, - child: Container( - width: double.infinity, - padding: - EdgeInsets.symmetric(vertical: 8.h), - child: Text( - "已使用", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - ], - ))), - ], - ), - ), - ], - ), - ); - } - - /// 搜索框 - Widget ticketSearch() { - return Container( - color: Colors.white, - child: Container( - height: 40.h, - margin: - EdgeInsets.only(left: 18.w, right: 18.w, top: 6.h, bottom: 13.h), - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - child: TextField( - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onTap: () { - typeScreen = false; - stateScreen = false; - }, - onEditingComplete: () { - FocusScope.of(context).requestFocus(FocusNode()); - loadFinish(); - }, - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - controller: editingController, - decoration: InputDecoration( - hintText: "请输入票券名称/用户名/手机号", - hintStyle: TextStyle( - color: Color(0xFF808080), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - contentPadding: EdgeInsets.symmetric( - vertical: 12.h, - ), - prefixIcon: Image.asset( - "assets/image/bs_goods_search.webp", - width: 20, - height: 20, - ), - border: InputBorder.none, - ), - ), - ), - ); - } - - ///筛选框 - Widget screen() { - return Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only(left: 18.w, right: 18.w), - child: Row( - children: [ - Expanded( - child: GestureDetector( - onTap: () { - setState(() { - typeScreen = !typeScreen; - FocusScope.of(context).requestFocus(FocusNode()); - stateScreen = false; - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0XFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - padding: EdgeInsets.symmetric(horizontal: 9.w, vertical: 11.h), - child: Row( - children: [ - Expanded( - child: Text( - ticketType == null ? "类型筛选" : shopTypeSelect(), - style: TextStyle( - color: Color(0xFF808080), - fontSize: 18.sp, - fontWeight: MyFontWeight.regular), - )), - Icon( - (typeScreen != null && !typeScreen) - ? Icons.keyboard_arrow_down - : Icons.keyboard_arrow_up, - color: Color(0xFF808080), - size: 24, - ), - ], - ), - ), - ), - ), - SizedBox( - width: 14.w, - ), - Expanded( - child: GestureDetector( - onTap: () { - setState(() { - stateScreen = !stateScreen; - FocusScope.of(context).requestFocus(FocusNode()); - typeScreen = false; - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0XFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - padding: - EdgeInsets.symmetric(horizontal: 9.w, vertical: 11.h), - child: Row( - children: [ - Expanded( - child: Text( - ticketState == "-1" ? "状态筛选" : shopStateSelect(), - style: TextStyle( - color: Color(0xFF808080), - fontSize: 18.sp, - fontWeight: MyFontWeight.regular), - )), - Icon( - (stateScreen != null && !stateScreen) - ? Icons.keyboard_arrow_down - : Icons.keyboard_arrow_up, - color: Color(0xFF808080), - size: 24, - ), - ], - ), - ))), - ], - ), - ); - } - - ///类型筛选 - String shopTypeSelect() { - if (ticketType == "") { - return "所有"; - } else if (ticketType == "ADOPT_WARRANT") { - return "认领凭证"; - } else if (ticketType == "IDENTITY_CARD") { - return "身份卡片"; - } else if (ticketType == "NORMAL") { - return "常规票券"; - } - } - - ///类型筛选 - String shopStateSelect() { - if (ticketState == "0") { - return "全部"; - } else if (ticketState == "1") { - return "可使用"; - } else if (ticketState == "7") { - return "已取消"; - } else if (ticketState == "8") { - return "已失效"; - } else if (ticketState == "9") { - return "已使用"; - } - } - - ///时间选择 - Widget timeSelect() { - return Container( - color: Colors.white, - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/custom_page',arguments: {"beyondDateRange": "0"}).then((value) { - selectTimeDate = value; - loadFinish(); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFFF7F8FA), - borderRadius: BorderRadius.circular(2), - ), - margin: EdgeInsets.only( - left: 18.w, - right: 18.w, - ), - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 12.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - (tabController.index == 1 && (selectTimeDate == "" || selectTimeDate == null)) ? "开始时间 至 结束时间" :"${selectTime().substring(0, 11)} ${selectTime().substring(21, 34)}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF30415B), - fontWeight: MyFontWeight.regular), - ), - ], - ), - ), - ), - ); - } - - String selectTime() { - if (selectTimeDate == "" || selectTimeDate == null) { - return selectTimeDateNum; - } else - return selectTimeDate; - } -} diff --git a/lib/business_system/order/ticket/ticket_records_page.dart b/lib/business_system/order/ticket/ticket_records_page.dart deleted file mode 100644 index 54e6e2ce..00000000 --- a/lib/business_system/order/ticket/ticket_records_page.dart +++ /dev/null @@ -1,622 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/ticket_record.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; - -class TicketRecordPage extends StatefulWidget { - final int status; - final String storeId; - final String keyword; - final String time; - final bool isKeyBoardShow; - - TicketRecordPage(Key key, this.status, this.storeId, this.keyword, this.time, - this.isKeyBoardShow) - : super(key: key); - - @override - State createState() { - return _TicketRecordPage(); - } -} - -class _TicketRecordPage extends State { - final RefreshController _refreshController = RefreshController(); - ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics(); - final ScrollController controller = ScrollController(); - BusinessApiService businessService; - List ticketRecordList = []; - int _pageNum = 1; - String networkError = ""; - int networkStatus = 0; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - _onRefresh(); - } - - _onRefresh({bool isShowLoad = true}) async { - if (isShowLoad) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - await queryRecordsList(isRefreshData: false); - EasyLoading.dismiss(); - if (!mounted) return; - if (_refreshController.isRefresh) _refreshController.refreshCompleted(); - setState(() {}); - } - - queryRecordsList({isRefreshData = true}) async { - try { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData baseData = await businessService.wipedRecord({ - "pageNum":_pageNum, - "pageSize": 10, - "searchKey": widget?.keyword ?? "", - "startTime": widget.time == "" ? "" :widget.time - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 19), - "endTime": widget.time == "" ? "" :widget.time - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(widget.time.length >= 21 ? 22 : 0, - widget.time.length >= 21 ? 41 : 0), - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - setState(() {}); - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - if (!mounted) return; - if (baseData != null && baseData.isSuccess) { - ticketRecordList.addAll(baseData?.data?.list ?? []); - if ((baseData?.data?.list ?? []).isEmpty || - ticketRecordList.length.toString() == baseData.data.total) - _refreshController.loadNoData(); - else - _refreshController.loadComplete(); - networkStatus = 1; - } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } finally { - if (isRefreshData) setState(() {}); - } - } - - @override - Widget build(BuildContext context) { - return SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: ticketRecordList.length == 0 ? false : true, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _pageNum = 1; - ticketRecordList.clear(); - _onRefresh(isShowLoad: false); - }, - onLoading: () { - _pageNum++; - _onRefresh(isShowLoad: false); - }, - child: networkStatus == -1 - ? noNetwork() - : ((networkStatus==0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return recordsSm(); - }, - ) - : ((ticketRecordList == null || ticketRecordList.length == 0) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : Padding( - padding: EdgeInsets.only(top: 16.h), - child: ListView.builder( - itemCount: ticketRecordList?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (widget.isKeyBoardShow) - FocusScope.of(context) - .requestFocus(FocusNode()); - return; - }, - child: recordsItem(ticketRecordList[position],position), - ); - }, - ), - ))), - ); - } - - Widget recordsItem(TicketRecordList ticketRecordList,index) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding(padding:EdgeInsets.only(left: 12.w,right: 18.w,bottom:13.h), - child: Row( - children: [ - Expanded(child:Text( - ticketRecordList?.ticketName ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 14.sp, - color: Colors.black, - fontWeight: MyFontWeight.bold), - )), - Text( - "核销次数: ${ticketRecordList?.ticketItems[0]?.canWipedNumber ?? "0"}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ) - ], - ),), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding(padding:EdgeInsets.only(top:13.h,left:12.w), - child:Row( - children: [ - Text( - "联系人:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - SizedBox(width: 26.w,), - Text( - ticketRecordList?.userName ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - )), - Padding(padding:EdgeInsets.only(top:12.h,left:12.w), - child:Row( - children: [ - Text( - "手机号:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - Text( - ticketRecordList?.userPhone ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - ),), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical:12.h), - ), - Padding(padding:EdgeInsets.only(left:12.w), - child:Row( - children: [ - Text( - "核销店铺:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - SizedBox(width: 14.w,), - Text( - ticketRecordList?.wipedUserName ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.regular), - ) - ], - )), - Padding(padding:EdgeInsets.only(left:12.w), - child:Row( - children: [ - Text( - "票券编号:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - SizedBox(width: 14.w,), - Text( - ticketRecordList?.ticketCode ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.regular), - ) - ], - )), - Padding(padding:EdgeInsets.symmetric(horizontal:12.w), - child:Row( - children: [ - Text( - "核销时间:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - SizedBox(width: 14.w,), - Expanded(child:Text( - ticketRecordList?.ticketItems[0]?.finishTime ??"", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.regular), - )), - Text( - "¥ ${ticketRecordList?.ticket?.amount ??""}", - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF181818), - fontWeight: MyFontWeight.bold), - ) - ], - )), - ], - ), - ); - } - - Widget recordsSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.all(16), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding(padding:EdgeInsets.only(left: 12.w,right: 18.w,bottom:13.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 154.w, - height: 18.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 10.w, - height: 18.h, - margin: EdgeInsets.only(left: 14.w), - ), - ), - ], - ),), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding(padding:EdgeInsets.only(top:13.h,left:12.w), - child:Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 40.w, - height: 18.h, - ), - ), - SizedBox(width: 26.w,), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 24.w, - height: 18.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.only(top:12.h,left:12.w), - child:Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 40.w, - height: 18.h, - ), - ), - SizedBox(width: 26.w,), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 18.h, - ), - ), - ], - ),), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical:12.h), - ), - Container( - padding:EdgeInsets.only(left:12.w), - margin: EdgeInsets.only(bottom: 6.h), - child:Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - SizedBox(width: 14.w,), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 84.w, - height: 18.h, - ), - ), - ], - )), - Container(padding:EdgeInsets.only(left:12.w), - margin: EdgeInsets.only(bottom: 6.h), - child:Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - SizedBox(width: 14.w,), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 107.w, - height: 18.h, - ), - ), - ], - )), - Padding(padding:EdgeInsets.symmetric(horizontal:12.w), - child:Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - SizedBox(width: 14.w,), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 107.w, - height: 18.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 36.w, - height: 18.h, - ), - ), - ], - )), - ], - ) - ); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // "无法连接到网络", - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - _onRefresh(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/order/ticket/ticket_statistics_page.dart b/lib/business_system/order/ticket/ticket_statistics_page.dart deleted file mode 100644 index 7d908354..00000000 --- a/lib/business_system/order/ticket/ticket_statistics_page.dart +++ /dev/null @@ -1,564 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shimmer/shimmer.dart'; - -import '../../../generated/l10n.dart'; -import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/base_data.dart'; -import '../../../retrofit/data/ticket_stats_list.dart'; -import '../../../utils/business_instance.dart'; -import '../../../utils/flutter_utils.dart'; -import '../../../utils/font_weight.dart'; -import '../../../view_widget/no_data_view.dart'; - -class TicketStatisticsPage extends StatefulWidget { - final int status; - final String storeId; - final String keyword; - final String time; - final bool isKeyBoardShow; - - TicketStatisticsPage(Key key, this.status, this.storeId, this.keyword, - this.time, this.isKeyBoardShow) - : super(key: key); - - @override - State createState() { - return _TicketStatisticsPage(); - } -} - -class _TicketStatisticsPage extends State { - final RefreshController _refreshController = RefreshController(); - ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics(); - final ScrollController controller = ScrollController(); - BusinessApiService businessService; - List _infoList = []; - String networkError = ""; - int networkStatus = 0; - - @override - void dispose() { - super.dispose(); - _refreshController.dispose(); - } - - @override - void initState() { - super.initState(); - queryStatsList(); - } - - queryStatsList({isLoading = true}) async { - try { - if (isLoading) - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.storeId); - } - BaseData> baseData = - await businessService.wipedStats({ - "searchKey": widget?.keyword ?? "", - "startDate": widget.time - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(0, 10), - "endDate": widget.time - .replaceAll("年", "-") - .replaceAll("月", "-") - .replaceAll("日", "") - .substring(widget.time.length >= 21 ? 22 : 0, - widget.time.length >= 21 ? 32 : 0), - }).catchError((error) { - networkError = AppUtils.dioErrorTypeToString(error.type); - networkStatus = -1; - _refreshController.refreshFailed(); - _refreshController.loadFailed(); - }); - _infoList.clear(); - if (baseData != null && baseData.isSuccess) { - baseData.data.forEach((e1) { - e1.infoList.forEach((e2) { - e2.wipedDate = e1.wipedDate; - _infoList.add(e2); - }); - }); - networkStatus = 1; - _refreshController.refreshCompleted(); - _refreshController.loadComplete(); - } - } finally { - if (isLoading) setState(() {}); - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader(color: Color(0xFF30415B)), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - queryStatsList(isLoading: false); - }, - child: networkStatus == -1 - ? noNetwork() - : ((networkStatus == 0) - ? ListView.builder( - padding: EdgeInsets.zero, - itemCount: 10, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return statisticsSm(); - }, - ) - : ((_infoList.isEmpty) - ? NoDataView( - src: "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "暂无数据", - fontSize: 16.sp, - iconHeight: 120.h, - margin: EdgeInsets.all(50.h), - ) - : Padding( - padding: EdgeInsets.only(top: 16.h), - child: ListView.builder( - itemCount: _infoList.length, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (widget.isKeyBoardShow) - FocusScope.of(context) - .requestFocus(FocusNode()); - return; - }, - child: statisticsItem(_infoList[position]), - ); - }, - ), - ))), - ); - } - - Widget statisticsItem(InfoList infoList) { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 12.w, right: 18.w, bottom: 13.h), - child: Row( - children: [ - Expanded( - child: Text( - infoList?.ticketName ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 14.sp, - color: Colors.black, - fontWeight: MyFontWeight.bold), - )), - Text( - "核销次数: ${infoList?.wipedNumber ?? 0}", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding( - padding: EdgeInsets.only(top: 13.h, left: 12.w), - child: Row( - children: [ - Text( - "核销项:", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ), - SizedBox( - width: 13.w, - ), - Text( - infoList?.ticketItemName ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF1A1A1A), - fontWeight: MyFontWeight.regular), - ) - ], - )), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 12.h), - ), - Padding( - padding: EdgeInsets.only(left: 12.w), - child: Row( - children: [ - Text( - "核销时间 :", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - SizedBox( - width: 14.w, - ), - Text( - infoList?.wipedDate ?? "", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF808080), - fontWeight: MyFontWeight.regular), - ) - ], - )), - ], - ), - ); - } - - Widget statisticsSm() { - return Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - margin: EdgeInsets.all(16), - padding: EdgeInsets.symmetric(vertical: 12.h), - child: Column( - children: [ - Padding( - padding: EdgeInsets.only(left: 12.w, right: 18.w, bottom: 13.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 154.w, - height: 18.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 10.w, - height: 18.h, - margin: EdgeInsets.only(left: 14.w), - ), - ), - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - ), - Padding( - padding: EdgeInsets.only(top: 13.h, left: 12.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 40.w, - height: 18.h, - ), - ), - SizedBox( - width: 26.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 24.w, - height: 18.h, - ), - ), - ], - )), - Padding( - padding: EdgeInsets.only(top: 12.h, left: 12.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 40.w, - height: 18.h, - ), - ), - SizedBox( - width: 26.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 77.w, - height: 18.h, - ), - ), - ], - ), - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF4F6F7), - margin: EdgeInsets.symmetric(vertical: 12.h), - ), - Container( - padding: EdgeInsets.only(left: 12.w), - margin: EdgeInsets.only(bottom: 6.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - SizedBox( - width: 14.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 84.w, - height: 18.h, - ), - ), - ], - )), - Container( - padding: EdgeInsets.only(left: 12.w), - margin: EdgeInsets.only(bottom: 6.h), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - SizedBox( - width: 14.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 107.w, - height: 18.h, - ), - ), - ], - )), - Padding( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 52.w, - height: 18.h, - ), - ), - SizedBox( - width: 14.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 107.w, - height: 18.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 36.w, - height: 18.h, - ), - ), - ], - )), - ], - )); - } - - Widget noNetwork() { - return Container( - color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // "无法连接到网络", - networkError.substring(0, networkError.indexOf(",")), - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.bold), - ), - Padding( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Text( - "请检查网络设置或稍后重试", - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF7A797F), - fontWeight: MyFontWeight.regular), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - queryStatsList(); - }, - child: Container( - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(15), - ), - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), - child: Text( - "重试", - style: TextStyle( - fontSize: 14.sp, - color: Colors.white, - fontWeight: MyFontWeight.regular), - )), - ) - ], - ), - ); - } -} diff --git a/lib/business_system/order/ticket/ticket_tab.dart b/lib/business_system/order/ticket/ticket_tab.dart deleted file mode 100644 index 10544a51..00000000 --- a/lib/business_system/order/ticket/ticket_tab.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:flutter/material.dart'; - -class TicketTab extends Decoration { - /// Create an underline style selected tab indicator. - /// - /// The [borderSide] and [insets] arguments must not be null. - const TicketTab({ - this.width = 20, - this.strokeCap = StrokeCap.round, - this.borderSide = const BorderSide(width: 2.0, color: Colors.white), - this.insets = EdgeInsets.zero, - }) : assert(borderSide != null), - assert(insets != null); - - /// The color and weight of the horizontal line drawn below the selected tab. - final BorderSide borderSide; - - /// Locates the selected tab's underline relative to the tab's boundary. - /// - /// The [TabBar.indicatorSize] property can be used to define the tab - /// indicator's bounds in terms of its (centered) tab widget with - /// [TabBarIndicatorSize.label], or the entire tab with - /// [TabBarIndicatorSize.tab]. - final EdgeInsetsGeometry insets; - - ///新增的属性 - final double width; // 控制器宽度 - final StrokeCap strokeCap; // 控制器边角形状 - - @override - Decoration lerpFrom(Decoration a, double t) { - if (a is TicketTab) { - return TicketTab( - borderSide: BorderSide.lerp(a.borderSide, borderSide, t), - insets: EdgeInsetsGeometry.lerp(a.insets, insets, t), - ); - } - return super.lerpFrom(a, t); - } - - @override - Decoration lerpTo(Decoration b, double t) { - if (b is TicketTab) { - return TicketTab( - borderSide: BorderSide.lerp(borderSide, b.borderSide, t), - insets: EdgeInsetsGeometry.lerp(insets, b.insets, t), - ); - } - return super.lerpTo(b, t); - } - - @override - BoxPainter createBoxPainter([VoidCallback onChanged]) { - return _UnderlinePainter(this, onChanged); - } - - ///决定控制器宽度的方法 - Rect _indicatorRectFor(Rect rect, TextDirection textDirection) { - assert(rect != null); - assert(textDirection != null); - final Rect indicator = insets.resolve(textDirection).deflateRect(rect); - - // 希望的宽度 - double wantWidth = this.width; - // 取中间坐标 - double cw = (indicator.left + indicator.right) / 2; - - print( - '$cw,indicator left${indicator.left}, right ${indicator.right}, indicator top ${indicator.top},indicator bottom${indicator.bottom}, border width${borderSide.width}'); - //这里是核心代码 //下划线靠左 - // return Rect.fromLTWH(indicator.left, - // indicator.bottom - borderSide.width, wantWidth, borderSide.width); - - //下划线居中 - return Rect.fromLTWH(cw - wantWidth / 2, - indicator.bottom - borderSide.width, wantWidth, borderSide.width); - } - - @override - Path getClipPath(Rect rect, TextDirection textDirection) { - return Path()..addRect(_indicatorRectFor(rect, textDirection)); - } -} - -class _UnderlinePainter extends BoxPainter { - _UnderlinePainter(this.decoration, VoidCallback onChanged) - : assert(decoration != null), - super(onChanged); - - final TicketTab decoration; - - ///决定控制器边角形状的方法 - @override - void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) { - assert(configuration != null); - assert(configuration.size != null); - final Rect rect = offset & configuration.size; - final TextDirection textDirection = configuration.textDirection; - final Rect indicator = decoration - ._indicatorRectFor(rect, textDirection) - .deflate(decoration.borderSide.width / 2.0); - final Paint paint = decoration.borderSide.toPaint() - ..strokeCap = decoration.strokeCap; //这块更改为想要的形状 - canvas.drawLine(indicator.bottomLeft, indicator.bottomRight, paint); - } -} \ No newline at end of file diff --git a/lib/business_system/scan_code_page.dart b/lib/business_system/scan_code_page.dart deleted file mode 100644 index 8273bc7e..00000000 --- a/lib/business_system/scan_code_page.dart +++ /dev/null @@ -1,260 +0,0 @@ -import 'dart:ui'; -import 'package:dio/dio.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:image_pickers/image_pickers.dart'; -import 'package:scan/scan.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/ticket_details.dart'; -import '../../utils/business_instance.dart'; -import '../generated/l10n.dart'; -import '../utils/font_weight.dart'; -import '../view_widget/settlement_tips_dialog.dart'; - -class ScanCodePage extends StatefulWidget { - final Map arguments; - - ScanCodePage({this.arguments}); - - @override - State createState() { - return _ScanCodePage(); - } -} - -class _ScanCodePage extends State { - ScanController controller = ScanController(); - final screenWidth = window.physicalSize.width; - final screenHeight = window.physicalSize.height; - BusinessApiService businessService; - TicketDetails ticketDetails; - - @override - void initState() { - super.initState(); - } - - @override - void dispose() { - if (this.controller != null) { - this.controller.pause(); - } - super.dispose(); - } - - ///票券详情 - queryTicketDetails(code) async { - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = - await businessService.ticketCode(code).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - ticketDetails = baseData.data; - Navigator.of(context) - .popAndPushNamed('/router/order_write_off', arguments: { - "ticketDetails": ticketDetails, - }); - } else { - Navigator.of(context).pop(); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); - } - } - - ///会员充值支付 - rechargePay(authCode) async { - try{ - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.posMemberRecharge({ - "rechargePreferentialId": widget?.arguments["rechargePreferentialId"] ?? "", - "memberSourceId": widget?.arguments["memberSourceId"] ?? "", - "source": widget?.arguments["source"] ?? 1, - "authCode": authCode ?? null - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(1); - Navigator.of(context).popAndPushNamed('/router/pay_success_page',arguments: { - "rechargeId":baseData.data, - "rechargeMoney":widget?.arguments["rechargeMoney"], - "payIndex":int.tryParse(widget?.arguments["source"]), - }); - } else { - Navigator.of(context).pop([baseData.msg,baseData.data]); - }}finally{ - EasyLoading.dismiss(); - } - } - - ///收银台支付 - cashierPay(authCode) async { - try{ - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - if (businessService == null) { - businessService = BusinessApiService(Dio(), - context: context, - token: BusinessInstance.instance.businessToken, - tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"]); - } - BaseData baseData = await businessService.prePayOrder({ - "orderId": widget?.arguments["orderId"] ?? "", - "payChannel": widget?.arguments["payChannel"] ?? "", - "mid":widget?.arguments["mid"] ?? "", - "authCode": authCode ?? null - }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - Navigator.of(context).pop(1); - SmartDialog.show( - widget: SettlementTips( - () {}, - text: baseData.data, - color: Color(0xFF30415B), - )); - } else { - Navigator.of(context).pop([baseData.msg,baseData.data]); - }}finally{ - EasyLoading.dismiss(); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Stack( - children: [ - Positioned( - child: Column( - children: [ - Expanded( - child: ScanView( - controller: controller, - scanAreaScale: 0.7, - scanLineColor: Colors.green.shade400, - onCapture: (data) { - if (data != null && - data != "" && - widget.arguments["scanCodeType"] == null) { - queryTicketDetails(data); - } else { - if(widget.arguments["scanCodeType"] == "充值支付"){ - rechargePay(data); - }else{ - cashierPay(data); - } - } - }, - ), - flex: 1, - ), - ], - ), - top: 0, - bottom: 0, - left: 0, - right: 0, - ), - Positioned( - child: Container( - margin: EdgeInsets.only(left: 12.w, right: 16.w, top: 16.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 10.w), - alignment: Alignment.centerLeft, - child: Image.asset( - "assets/image/return_left.webp", - fit: BoxFit.fill, - color: Colors.white, - ), - ), - ), - Spacer(), - ], - ), - ), - top: MediaQuery.of(context).padding.top, - left: 0, - right: 0, - ), - Positioned( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - pickImage(); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.white.withAlpha(35), - borderRadius: BorderRadius.circular(100), - ), - padding: EdgeInsets.all(8.w), - margin: EdgeInsets.only(left: 12.w, right: 16.w, top: 16.h), - child: Icon( - Icons.image, - size: 25.w, - color: Colors.white, - ), - ), - ), - right: 0, - bottom: 50.h, - ), - ], - ), - ); - } - - pickImage() async { - List medias = await ImagePickers.pickerPaths( - galleryMode: GalleryMode.image, - selectCount: 1, - showGif: true, - showCamera: false, - compressSize: 500, - uiConfig: UIConfig( - uiThemeColor: Color(0xFFFFFFFF), - ), - cropConfig: CropConfig( - enableCrop: false, - ), - ); - if (medias != null && medias.length > 0) { - String result = await Scan.parse(medias[0].path); - if (result != null && result != "") { - queryTicketDetails(result); - } else { - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "照片中未识别到二维码/条码", - color: Color(0xFF30415B), - )); - } - } - } -} diff --git a/lib/community/community_child_list.dart b/lib/community/community_child_list.dart index a0283165..fff9cd45 100644 --- a/lib/community/community_child_list.dart +++ b/lib/community/community_child_list.dart @@ -1,13 +1,11 @@ -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/comunity_comment.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'community_list.dart'; @@ -25,9 +23,9 @@ class CommunityChildList extends StatefulWidget { class _CommunityChildList extends State { RefreshController refreshController = RefreshController(); final ScrollController scrollController = ScrollController(); - ApiService apiService; + ApiService? apiService; int pageNum = 1; - String userId; + String? userId; bool isLoadMore = false; List comments = []; @@ -44,20 +42,11 @@ class _CommunityChildList extends State { ///动态列表 queryCommunity() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - userId = value.getString('userId'); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } if(isLoadMore){ pageNum += 1; isLoadMore = false; }else pageNum = 1; - BaseData> baseData = await apiService.trendList({ + BaseData>? baseData = await apiService?.trendList({ "onlyFollow": widget.typeStr == "关注" ? true : false, "onlyMe": false, "pageNum": pageNum, @@ -70,15 +59,15 @@ class _CommunityChildList extends State { refreshController.refreshCompleted(); refreshController.loadComplete(); - if (baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { if (pageNum == 1) { comments.clear(); } - comments.addAll(baseData.data.list); + comments.addAll(baseData?.data?.list ?? []); // comments.sort((a,b)=>b.createTime.compareTo(a.createTime)); // print("comments: ${comments.length}"); - if (int.tryParse(baseData.data.total) < (pageNum * 10)) { + if ((int.tryParse("${baseData?.data?.total}") ?? 0) < (pageNum * 10)) { refreshController.loadNoData(); } }); diff --git a/lib/community/community_child_page.dart b/lib/community/community_child_page.dart index 36ae5b00..bd58e204 100644 --- a/lib/community/community_child_page.dart +++ b/lib/community/community_child_page.dart @@ -1,19 +1,17 @@ import 'dart:convert'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/comunity_comment.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../utils/flutter_utils.dart'; @@ -36,9 +34,9 @@ class CommunityChildPage extends StatefulWidget { class CommunityChildPageState extends State with AutomaticKeepAliveClientMixin { RefreshController refreshController = RefreshController(); - ApiService apiService; + ApiService? apiService; int pageNum = 1; - String userId; + String? userId; bool isLoadMore = false; bool isRefresh = true; bool isLoadingData = false; @@ -65,7 +63,7 @@ class CommunityChildPageState extends State } ///动态列表 - queryCommunity(String searchKey) async { + queryCommunity(String? searchKey) async { if (!isRefresh) { isRefresh = true; return; @@ -74,19 +72,11 @@ class CommunityChildPageState extends State return; } isLoadingData = true; - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - userId = value.getString('userId'); - apiService = ApiService(Dio(), - context: context, - token: value.getString("token"), - showLoading: false); - } if (isLoadMore) { pageNum += 1; isLoadMore = false; } else if (searchKey == null) pageNum = 1; - BaseData> baseData = await apiService.trendList({ + BaseData>? baseData = await apiService?.trendList({ "mid": "", "onlyFollow": widget.typeStr == "关注" ? true : false, "onlyMe": false, @@ -96,64 +86,28 @@ class CommunityChildPageState extends State }).catchError((error) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center); - if (searchKey == null) { - refreshController.refreshFailed(); - refreshController.loadFailed(); - } }); - if (searchKey == null) { - refreshController.refreshCompleted(); - refreshController.loadComplete(); - } - if (baseData.isSuccess) { - if (searchKey != null) { - if (baseData?.data?.list != null && baseData.data.list.isNotEmpty) - articles.forEach((element) { - if (element.id == searchKey) { - element.content = jsonEncode(baseData.data.list[0].subjectInfo); - element.mainTitle = baseData.data.list[0].subject; - element.followed = baseData.data.list[0].selfFollow; - element.liked = baseData.data.list[0].selfLike; - element.authorHeadImg = baseData.data.list[0].memberInfo?.avatar; - element.authorName = baseData.data.list[0].memberInfo?.nickname; - element.location = baseData.data.list[0].location; - element.createTime = baseData.data.list[0].createTime; - element.author = baseData.data.list[0].memberInfo?.mid; - element.viewers = baseData.data.list[0]?.viewers; - element.likes = baseData.data.list[0]?.likes; - element.comments = baseData.data.list[0]?.comments; - this.isRefresh = false; - setState(() {}); - } - }); - } else { - if (pageNum == 1) { - articles.clear(); - } - baseData.data.list.forEach((element) { - var article = Article(); - article.id = element.id; - article.content = jsonEncode(element.subjectInfo); - article.mainTitle = element.subject; - article.followed = element.selfFollow; - article.liked = element.selfLike; - article.authorHeadImg = element.memberInfo?.avatar; - article.authorName = element.memberInfo?.nickname; - article.location = element.location; - article.createTime = element.createTime; - article.author = element.memberInfo?.mid; - article.viewers = element?.viewers; - article.likes = element?.likes; - article.comments = element?.comments; - articles.add(article); + if (baseData?.isSuccess ?? false) { + if (baseData?.data?.list?.isNotEmpty ?? false) + articles.forEach((element) { + if (element.id == searchKey) { + element.content = jsonEncode(baseData?.data?.list?[0].subjectInfo); + element.mainTitle = baseData?.data?.list?[0].subject; + element.followed = baseData?.data?.list?[0].selfFollow; + element.liked = baseData?.data?.list?[0].selfLike; + element.authorHeadImg = baseData?.data?.list?[0].memberInfo?.avatar; + element.authorName = baseData?.data?.list?[0].memberInfo?.nickname; + element.location = baseData?.data?.list?[0].location; + element.createTime = baseData?.data?.list?[0].createTime; + element.author = baseData?.data?.list?[0].memberInfo?.mid; + element.viewers = baseData?.data?.list?[0].viewers; + element.likes = baseData?.data?.list?[0].likes; + element.comments = baseData?.data?.list?[0].comments; + this.isRefresh = false; + setState(() {}); + } }); - // comments.sort((a,b)=>b.createTime.compareTo(a.createTime)); - // print("comments: ${comments.length}"); - if (int.tryParse(baseData.data.total) < (pageNum * 10)) { - refreshController.loadNoData(); } - } - } isLoadingData = false; } @@ -170,7 +124,7 @@ class CommunityChildPageState extends State SmartRefresher( controller: refreshController, enablePullDown: true, - enablePullUp: (articles == null || articles.length == 0) ? false:true, + enablePullUp: (articles.length == 0) ? false:true, physics: BouncingScrollPhysics(), header: MyHeader(), footer: CustomFooter( @@ -183,14 +137,15 @@ class CommunityChildPageState extends State isLoadMore = true; setState(() {}); }, - child: (articles == null || articles.length == 0) + child: (articles.length == 0) ? NoDataView( src: "assets/image/guan_zhu.webp", isShowBtn: false, text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~", fontSize: 16.sp, - margin: - EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), + margin: EdgeInsets.only( + top: 120.h, left: 60.w, right: 60.w, + ), ) : ListView.builder( controller: sc, diff --git a/lib/community/community_course.dart b/lib/community/community_course.dart index b0d2e410..ba650790 100644 --- a/lib/community/community_course.dart +++ b/lib/community/community_course.dart @@ -1,23 +1,20 @@ -import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/brand.dart'; -import 'package:huixiang/retrofit/data/category_select_list.dart'; -import 'package:huixiang/retrofit/data/collect_class_list.dart'; -import 'package:huixiang/retrofit/data/course_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/brand.dart'; +import 'package:huixiang/data/category_select.dart'; +import 'package:huixiang/data/collect_class.dart'; +import 'package:huixiang/data/course.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'community_view/class_list_view.dart'; import 'community_view/class_title_tab.dart'; import 'community_view/course_banner.dart'; @@ -35,16 +32,16 @@ class _CommunityCourse extends State final ScrollController scrollController = ScrollController(); final RefreshController refreshController = RefreshController(); - ApiService apiService; + ApiService? apiService; List globaKeys = []; List brands = []; List bannerData = []; - List classSelectList = []; - List classList = []; - List classTabList = []; - List collectList = []; + List classSelectList = []; + List classList = []; + List classTabList = []; + List collectList = []; int checkIndex = 0; - Map> collectMap = new Map(); + Map> collectMap = new Map(); @override void initState() { @@ -63,23 +60,14 @@ class _CommunityCourse extends State ///banner queryCourseBanner() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.queryBanner({ + BaseData>? baseData = await apiService?.queryBanner({ "model": {"type": "COURSE_BANNER"}, }).catchError((onError) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { bannerData.clear(); - bannerData.addAll(baseData.data.records); + bannerData.addAll(baseData?.data?.records ?? []); refreshController.refreshCompleted(); } else { refreshController.refreshFailed(); @@ -90,18 +78,10 @@ class _CommunityCourse extends State ///课程分类列表 classListAsync() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.categoryList().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.categoryList().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { - classSelectList = baseData.data; + classSelectList = baseData!.data ?? []; }); queryClassList(""); } @@ -110,15 +90,7 @@ class _CommunityCourse extends State ///课程列表 queryClassList(categoryId) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.courseList({ + BaseData>? baseData = await apiService?.courseList({ "categoryId":categoryId, "pageNum": 1, "pageSize":10, @@ -130,20 +102,20 @@ class _CommunityCourse extends State refreshController.loadFailed(); } }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if(categoryId == "") { refreshController.refreshCompleted(); refreshController.loadComplete(); setState(() { classList.clear(); - classList.addAll(baseData.data.list); + classList.addAll(baseData?.data?.list ?? []); }); if(classSelectList.length > 0) queryClassList(classSelectList[checkIndex].id); }else{ setState(() { classTabList.clear(); - classTabList.addAll(baseData.data.list); + classTabList.addAll(baseData?.data?.list ?? []); }); } } @@ -151,19 +123,11 @@ class _CommunityCourse extends State ///课程的合集列表 collectionList() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.collectList().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.collectList().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { collectList.clear(); - collectList.addAll(baseData.data); + collectList.addAll(baseData!.data ?? []); collectList.forEach((element) { collectCourse(element.id); }); @@ -174,23 +138,15 @@ class _CommunityCourse extends State ///合集包含的课程列表 collectCourse(collectId) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.collect(collectId).catchError((error) { + BaseData>? baseData = await apiService?.collect(collectId).catchError((error) { }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { if(!collectMap.containsKey(collectId)){ collectMap[collectId] = []; } - collectMap[collectId].clear(); - collectMap[collectId].addAll(baseData.data); + collectMap[collectId]?.clear(); + collectMap[collectId]?.addAll(baseData!.data ?? []); }); } } diff --git a/lib/community/community_details.dart b/lib/community/community_details.dart index 3051a971..49521731 100644 --- a/lib/community/community_details.dart +++ b/lib/community/community_details.dart @@ -1,16 +1,15 @@ import 'dart:ui'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/member_comment_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/member_comment.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/tips_dialog.dart'; @@ -25,7 +24,7 @@ import '../view_widget/my_footer.dart'; class CommunityDetails extends StatefulWidget { final Map arguments; - CommunityDetails({this.arguments}); + CommunityDetails({required this.arguments}); @override State createState() { @@ -43,15 +42,15 @@ class _CommunityDetails extends State final GlobalKey commentKey = GlobalKey(); final ScrollController scrollController = ScrollController(); - List memberList = []; - ApiService apiService; + List memberList = []; + ApiService? apiService; var commentFocus = FocusNode(); String hintText = S.current.liuxianinjingcaidepinglunba; bool isKeyBoardShow = false; int commentTotal = 0; - Article article; - String businessId; + Article? article; + String? businessId; final GlobalKey inputKey = GlobalKey(); final TextEditingController commentTextController = TextEditingController(); @@ -155,20 +154,13 @@ class _CommunityDetails extends State ///详情接口 queryDetails(id) async { SharedPreferences value = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - BaseData
baseData = - await apiService.informationInfo(id).catchError((onError) { + BaseData
? baseData = await apiService?.informationInfo(id).catchError((onError) { debugPrint(onError.toString()); refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - article = baseData.data; + article = baseData!.data; EasyLoading.dismiss(); refreshController.refreshCompleted(); }); @@ -236,26 +228,25 @@ class _CommunityDetails extends State physics: BouncingScrollPhysics(), child: Column( children: [ - if (article != null) - CommunityDynamic( - article, - 0, - exitFull: () { - setState(() {}); - }, - userId: widget.arguments != null - ? widget.arguments["userId"] - : widget.arguments["mid"], - itemCount: 3, - isDetails: true, - heightFun: (height) { - this.height = height + - MediaQuery.of(context).padding.top + - kToolbarHeight + - 24; - if (mounted) setState(() {}); - }, - ), + CommunityDynamic( + article, + 0, + exitFull: () { + setState(() {}); + }, + userId: widget.arguments != null + ? widget.arguments["userId"] + : widget.arguments["mid"], + itemCount: 3, + isDetails: true, + heightFun: (height) { + this.height = height + + MediaQuery.of(context).padding.top + + kToolbarHeight + + 24; + if (mounted) setState(() {}); + }, + ), CommentList( commentKey, article?.likes ?? 0, @@ -271,7 +262,7 @@ class _CommunityDetails extends State }); }, ), - if (memberList == null || memberList.length == 0) + if (memberList.length == 0) Container( width: double.infinity, alignment: Alignment.topCenter, @@ -312,21 +303,21 @@ class _CommunityDetails extends State ], ), ), - )); + ),); } ///给文章/活动点赞 _queryInformationLikes() async { - BaseData baseData = - await apiService.informationLikes(businessId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - commentKey.currentState.setState(() {}); + BaseData? baseData = await apiService?.informationLikes("${businessId}").catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + commentKey.currentState?.setState(() {}); setState(() { + int likes = article?.likes ?? 0; if (article?.liked ?? false) - article?.likes -= 1; + article?.likes = likes - 1; else - article?.likes += 1; - article?.liked = !(article.liked ?? false); + article?.likes = likes + 1; + article?.liked = !(article?.liked ?? false); }); } else { // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); @@ -335,15 +326,15 @@ class _CommunityDetails extends State ///动态发布评论 _queryMemberComment(String content) async { - BaseData baseData = await apiService.memberComment({ + BaseData? baseData = await apiService?.memberComment({ "content": content, "parentId": parenId, "relationalId": businessId, "relationalType": 4 }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - CommentListState state = commentKey.currentState; - state.queryMemberCommentList(); + if (baseData?.isSuccess ?? false) { + CommentListState? state = commentKey.currentState as CommentListState?; + state?.queryMemberCommentList(); commentTextController.text = ""; FocusScope.of(context).unfocus(); _queryMemberCommentList(false); @@ -353,10 +344,10 @@ class _CommunityDetails extends State ///滑动到评论列表 _toComment() { if (commentKey.currentContext == null) return; - RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); - Offset first = firstRenderBox.localToGlobal(Offset.zero); + RenderBox? firstRenderBox = commentKey.currentContext?.findRenderObject() as RenderBox?; + Offset? first = firstRenderBox?.localToGlobal(Offset.zero); scrollController.animateTo( - first.dy + + (first?.dy ?? 0) + scrollController.offset - (kToolbarHeight + MediaQuery.of(context).padding.top), duration: Duration(milliseconds: 300), @@ -383,10 +374,10 @@ class _CommunityDetails extends State ///删除评论 delComment(memberComment) async { - BaseData baseData = await apiService.delComment(memberComment.id); - if (baseData != null && baseData.isSuccess) { - CommentListState state = commentKey.currentState; - state.queryMemberCommentList(); + BaseData? baseData = await apiService?.delComment(memberComment.id); + if (baseData?.isSuccess ?? false) { + CommentListState? state = commentKey.currentState as CommentListState?; + state?.queryMemberCommentList(); } } @@ -401,23 +392,15 @@ class _CommunityDetails extends State _queryMemberCommentList(bool isOnRefresh) async { if (!isOnRefresh) EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: sharedPreferences.getString("token"), - // showLoading: true, - ); - BaseData> baseData = - await apiService.memberCommentList({ + BaseData>? baseData = await apiService?.memberCommentList({ "pageNum": 1, "pageSize": 100, "relationalId": businessId, "relationalType": 4, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - commentTotal = baseData.data.size; - memberList = baseData.data.list; + if (baseData?.isSuccess ?? false) { + commentTotal = baseData!.data?.size; + memberList = baseData!.data?.list ?? []; contentHeight(); if (mounted) setState(() {}); EasyLoading.dismiss(); diff --git a/lib/community/community_list.dart b/lib/community/community_list.dart index 358af6f8..e1aa4e87 100644 --- a/lib/community/community_list.dart +++ b/lib/community/community_list.dart @@ -1,11 +1,10 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/photo_view_gallery_screen.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/comunity_comment.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; @@ -18,11 +17,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class CommunityList extends StatefulWidget { final List comments; - final String userId; + final String? userId; final int commentType; final bool isList; - final Function exitFull; - final Function removalDynamic; + final Function? exitFull; + final Function? removalDynamic; CommunityList(this.comments, this.userId, this.commentType, {this.isList = false, this.exitFull, this.removalDynamic}); @@ -34,7 +33,7 @@ class CommunityList extends StatefulWidget { } class _CommunityList extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -48,22 +47,22 @@ class _CommunityList extends State { ///关注/取关会员 _vipFollow(followId, isFollow) async { - BaseData baseData = await apiService.follow(followId); - if (baseData != null && baseData.isSuccess) { - widget.exitFull(); + BaseData? baseData = await apiService?.follow(followId); + if (baseData?.isSuccess ?? false) { + widget.exitFull?.call(); SmartDialog.showToast(isFollow ? "关注成功" : "取关成功", alignment: Alignment.center); setState(() {}); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } ///删除动态 _deleteDynamic(id) async { - BaseData baseData = await apiService.deleteTrend(id); - if (baseData != null && baseData.isSuccess) { - widget.exitFull(); + BaseData? baseData = await apiService?.deleteTrend(id); + if (baseData?.isSuccess ?? false) { + widget.exitFull?.call(); SmartDialog.showToast("删除成功", alignment: Alignment.center); setState(() {}); } else { @@ -78,7 +77,7 @@ class _CommunityList extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - (widget.comments == null || widget.comments.length == 0) + (widget.comments.length == 0) ? NoDataView( src: widget.commentType == 1 ? "assets/image/dong_tai.webp" @@ -108,7 +107,7 @@ class _CommunityList extends State { // setState(() {}); // }, }).then((value) { - widget.exitFull(); + widget.exitFull?.call(); setState(() {}); }); setState(() {}); @@ -122,13 +121,10 @@ class _CommunityList extends State { } ///动态内容 - Widget buildMedia(SubjectInfo subjectInfo, position) { - if (subjectInfo == null) { - return Container(); - } + Widget buildMedia(SubjectInfo? subjectInfo, position) { Widget itemWidget = Container(); - if (subjectInfo.type == "image" && subjectInfo.images.length > 0) { - if (subjectInfo.images.length == 1) { + if (subjectInfo?.type == "image" && (subjectInfo?.images?.isNotEmpty ?? false)) { + if (subjectInfo?.images?.length == 1) { itemWidget = Container( child: InkWell( onTap: () { @@ -136,25 +132,28 @@ class _CommunityList extends State { context, MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen( - images: subjectInfo.images, //传入图片list + images: subjectInfo?.images ?? [], //传入图片list index: 0, //传入当前点击的图片的index - ))); + ), + ), + ); }, child: MImage( - subjectInfo.images[0], + "${subjectInfo?.images?[0]}", fit: BoxFit.contain, radius: BorderRadius.circular(2), width: MediaQuery.of(context).size.width / 1.5, height: MediaQuery.of(context).size.width / 1.5, errorSrc: "assets/image/default_2_1.webp", fadeSrc: "assets/image/default_2_1.webp", - )), + ), + ), ); } else { itemWidget = GridView.builder( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: (subjectInfo.images.length == 2 || - subjectInfo.images.length == 4) + crossAxisCount: (subjectInfo?.images?.length == 2 || + subjectInfo?.images?.length == 4) ? 2 : 3, crossAxisSpacing: 12.w, @@ -172,12 +171,12 @@ class _CommunityList extends State { context, MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen( - images: subjectInfo.images, //传入图片list + images: subjectInfo?.images ?? [], //传入图片list index: position, //传入当前点击的图片的index ))); }, child: MImage( - subjectInfo.images[position], + "${subjectInfo?.images![position]}", fit: BoxFit.cover, aspectRatio: 1, radius: BorderRadius.circular(1), @@ -187,10 +186,10 @@ class _CommunityList extends State { ), ); }, - itemCount: subjectInfo.images.length, + itemCount: subjectInfo?.images?.length ?? 0, ); } - } else if (subjectInfo.type == "video" && subjectInfo.video.isNotEmpty) { + } else if (subjectInfo?.type == "video" && (subjectInfo?.video?.isNotEmpty ?? false)) { itemWidget = Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.width / 7 * 5, @@ -201,7 +200,7 @@ class _CommunityList extends State { width: double.infinity, height: double.infinity, child: MImage( - subjectInfo.video.replaceAll(".mp4", "_poster.jpg"), + subjectInfo?.video?.replaceAll(".mp4", "_poster.jpg") ?? "", fit: BoxFit.cover, radius: BorderRadius.circular(2), errorSrc: "assets/image/default_2_1.webp", @@ -262,17 +261,17 @@ class _CommunityList extends State { builder: (context) => PhotoViewGalleryScreen( images: [ - (comments?.memberInfo?.avatar ?? "") + (comments.memberInfo?.avatar ?? "") .isEmpty ? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg" - : comments?.memberInfo?.avatar + : comments.memberInfo?.avatar ], //传入图片list index: 0, //传入当前点击的图片的index ), )); }, child: MImage( - (comments?.memberInfo?.avatar ?? + (comments.memberInfo?.avatar ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"), width: 44, height: 44, @@ -290,7 +289,7 @@ class _CommunityList extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - comments?.memberInfo?.nickname ?? "", + comments.memberInfo?.nickname ?? "", style: TextStyle( fontSize: 15.sp, fontWeight: MyFontWeight.semi_bold, @@ -298,7 +297,7 @@ class _CommunityList extends State { ), ), Text( - comments?.createTime ?? "", + comments.createTime ?? "", style: TextStyle( fontSize: 13.sp, fontWeight: MyFontWeight.regular, @@ -310,15 +309,15 @@ class _CommunityList extends State { ], ), ), - if ((comments?.memberInfo?.mid ?? "") != (widget.userId)) + if ((comments.memberInfo?.mid ?? "") != (widget.userId)) GestureDetector( onTap: () { setState(() { if (widget.commentType == 0) { comments.selfFollow = !(comments.selfFollow ?? false); - _vipFollow(comments?.memberInfo?.mid, - comments?.selfFollow ?? false); + _vipFollow(comments.memberInfo?.mid, + comments.selfFollow ?? false); } else { showDeleteDialog(position); } @@ -331,21 +330,21 @@ class _CommunityList extends State { alignment: Alignment.center, child: RoundButton( height: 25.h, - backgroup: (comments?.selfFollow ?? false) + backgroup: (comments.selfFollow ?? false) ? Color(0xFFE6E6E6) : Color(0xFF32A060), - textColor: (comments?.selfFollow ?? false) + textColor: (comments.selfFollow ?? false) ? Color(0xFF808080) : Colors.white, - text: (comments?.selfFollow ?? false) + text: (comments.selfFollow ?? false) ? S.of(context).yiguanzhu : S.of(context).guanzhu, radius: 20, icons: Icon( - (comments?.selfFollow ?? false) + (comments.selfFollow ?? false) ? Icons.check : Icons.add, - color: (comments?.selfFollow ?? false) + color: (comments.selfFollow ?? false) ? Color(0xFF808080) : Colors.white, size: 15, @@ -375,7 +374,7 @@ class _CommunityList extends State { fontSize: 15.sp, ), ), - buildMedia(comments?.subjectInfo, position), + buildMedia(comments.subjectInfo, position), // if (!widget.isDetails) SizedBox( height: 12.h, @@ -386,7 +385,7 @@ class _CommunityList extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ IconText( - "${comments?.viewers ?? ""}", + "${comments.viewers ?? ""}", space: 4.w, leftImage: "assets/svg/liulanliang.svg", iconSize: 16, diff --git a/lib/community/community_page.dart b/lib/community/community_page.dart index 9aedf3b7..18ba7222 100644 --- a/lib/community/community_page.dart +++ b/lib/community/community_page.dart @@ -1,15 +1,15 @@ +import 'dart:ui'; + import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; import 'package:huixiang/community/community_child_page.dart'; -import 'package:huixiang/home/huixiang_brand_page.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_tab.dart'; -import '../generated/l10n.dart'; import '../utils/upload_async.dart'; import 'community_course.dart'; -import 'headlines/article_page.dart'; class CommunityPage extends StatefulWidget { @override @@ -19,10 +19,14 @@ class CommunityPage extends StatefulWidget { } class _CommunityPage extends State - with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin,UploadObserver { - TabController tabcontroller; + with + SingleTickerProviderStateMixin, + AutomaticKeepAliveClientMixin, + UploadObserver { + TabController? tabcontroller; + + CommunityChildPage? guanzhu, tuijian; - CommunityChildPage guanzhu,tuijian ; final GlobalKey tuijianKey = GlobalKey(); final GlobalKey guanzhuKey = GlobalKey(); @@ -47,23 +51,22 @@ class _CommunityPage extends State tabcontroller = TabController(length: lables.length, vsync: this, initialIndex: 1); } - @override void dispose() { super.dispose(); UploadInstance.instance.uploadObserverList.remove(this); } - void onChildScroll(){ - if(scrollCount == 0){ + void onChildScroll() { + if (scrollCount == 0) { setState(() { b = NeverScrollableScrollPhysics(); }); } - scrollCount+=1; - Future.delayed(Duration(seconds:1), () { - scrollCount-=1; - if(scrollCount == 0){ + scrollCount += 1; + Future.delayed(Duration(seconds: 1), () { + scrollCount -= 1; + if (scrollCount == 0) { setState(() { b = BouncingScrollPhysics(); }); @@ -72,13 +75,15 @@ class _CommunityPage extends State } @override - void onUploadFinish(){ - if(tabcontroller.index == 0){ - CommunityChildPageState page = guanzhuKey.currentState; - page.onRefresh(); - }else if(tabcontroller.index == 1){ - CommunityChildPageState page = tuijianKey.currentState; - page.onRefresh(); + void onUploadFinish() { + if (tabcontroller?.index == 0) { + CommunityChildPageState? page = + guanzhuKey.currentState as CommunityChildPageState?; + page?.onRefresh(); + } else if (tabcontroller?.index == 1) { + CommunityChildPageState? page = + tuijianKey.currentState as CommunityChildPageState?; + page?.onRefresh(); } } @@ -88,24 +93,17 @@ class _CommunityPage extends State @override Widget build(BuildContext context) { + super.build(context); return Scaffold( - appBar: MyAppBar( - leading: false, + appBar: AppBar( + toolbarHeight: Get.statusBarHeight, centerTitle: true, - titleChild: PreferredSize( - preferredSize: Size( - MediaQuery.of(context).size.width - 60.w, - 38.h, - ), - child: Theme( - data: ThemeData( - splashColor: Colors.transparent, // 点击时的水波纹颜色设置为透明 - highlightColor: Colors.transparent, // 点击时的背景高亮颜色设置为透明 - ), - child: TabBar( + title: SizedBox( + width: MediaQuery.of(context).size.width - 160, + child: TabBar( controller: tabcontroller, automaticIndicatorColorAdjustment: true, - isScrollable: true, + isScrollable: false, indicatorWeight: 2, indicatorColor: Color(0xFF39B54A), labelPadding: EdgeInsets.only(left: 8.w, right: 8.w), @@ -116,27 +114,14 @@ class _CommunityPage extends State ), labelStyle: TextStyle( color: Colors.black, - fontSize: MediaQuery.of(context).size.width >= 650 ? 12.sp : 18.sp, + fontSize: + MediaQuery.of(context).size.width >= 650 ? 12.sp : 18.sp, fontWeight: FontWeight.bold, ), labelColor: Colors.black, tabs: lables.map((e) => MyTab(text: e)).toList(), - )), + ), ), - // onTap: () { - // _toRelease(); - // }, - // action: GestureDetector( - // behavior: HitTestBehavior.opaque, - // child: Container(color: Colors.transparent, - // padding: EdgeInsets.only(left: 20,right: 20), - // child: SvgPicture.asset( - // "assets/svg/shequ_fabu.svg", - // fit: BoxFit.contain, - // width: 24, - // height: 24, - // ),) - // ) ), body: Container( padding: EdgeInsets.only(bottom: 76.h), @@ -148,19 +133,20 @@ class _CommunityPage extends State // } else if(e == "了解健康"){ // return ArticlePage(onChildScroll); // } else - if(e == "视频"){ + if (e == "视频") { return CommunityCourse(); - } else if(e == "广场"){ + } else if (e == "广场") { if (tuijian == null){ tuijian = CommunityChildPage(tuijianKey,"广场",onChildScroll,_toRelease); } - return tuijian; - }else if(e == "关注"){ + return tuijian!; + } else if (e == "关注") { if (guanzhu == null){ guanzhu = CommunityChildPage(guanzhuKey,"关注",onChildScroll,_toRelease); } - return guanzhu; + return guanzhu!; } + return tuijian!; }).toList(), controller: tabcontroller, ), diff --git a/lib/community/community_view/class_details.dart b/lib/community/community_view/class_details.dart index 6087a3f9..e9e1a2ef 100644 --- a/lib/community/community_view/class_details.dart +++ b/lib/community/community_view/class_details.dart @@ -1,23 +1,19 @@ -import 'dart:convert'; import 'dart:ui'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/community_view/class_details_video.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/chapter.dart'; -import 'package:huixiang/retrofit/data/course_details.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/chapter.dart'; +import 'package:huixiang/data/course_details.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/tips_dialog.dart'; import 'package:huixiang/web/web_view/comment_list.dart'; import 'package:huixiang/web/web_view/input_comment.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:sharesdk_plugin/sharesdk_defines.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart'; @@ -28,7 +24,7 @@ import '../../view_widget/share_dialog.dart'; class ClassDetails extends StatefulWidget { final Map arguments; - ClassDetails({this.arguments}); + ClassDetails({required this.arguments}); @override State createState() { @@ -37,7 +33,7 @@ class ClassDetails extends StatefulWidget { } class _ClassDetails extends State with WidgetsBindingObserver { - ApiService apiService; + ApiService? apiService; final GlobalKey commentKey = GlobalKey(); final GlobalKey videoKey = GlobalKey(); final ScrollController scrollController = ScrollController(); @@ -48,7 +44,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { final GlobalKey inputKey = GlobalKey(); final TextEditingController commentTextController = TextEditingController(); int commentTotal = 0; - CourseDetails course; + CourseDetails? course; List chapterList = []; bool isShowImg = true; int chapterIndex = 0; @@ -70,24 +66,14 @@ class _ClassDetails extends State with WidgetsBindingObserver { ///课程章节列表 queryChapterList(courseId) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - showLoading: true - ); - } - BaseData> baseData = - await apiService.catalogList(courseId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.catalogList(courseId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { chapterList.clear(); - chapterList.addAll(baseData.data); + chapterList.addAll(baseData!.data ?? []); chapterIndex = 0; - ClassDetailsVideoState state = videoKey.currentState; - state.initVideo(chapterList[chapterIndex].content.fileUrl); + ClassDetailsVideoState? state = videoKey.currentState as ClassDetailsVideoState?; + state?.initVideo(chapterList[chapterIndex].content?.fileUrl); // initVideo(chapterList[chapterIndex].content.fileUrl); }); } @@ -96,19 +82,10 @@ class _ClassDetails extends State with WidgetsBindingObserver { ///课程详情 courseDetails(id) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = - await apiService.course(id).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.course(id).catchError((error) {}); + if (baseData?.isSuccess ?? false) { setState(() { - course = baseData.data; + course = baseData!.data; }); } } @@ -224,8 +201,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { coverImg: chapterList.length > chapterIndex ? chapterList[chapterIndex] - .content - .coverImg + .content?.coverImg : "", isShowImg: this.isShowImg, changeShowImg: (isShowImg) { @@ -243,7 +219,8 @@ class _ClassDetails extends State with WidgetsBindingObserver { ), Container( margin: EdgeInsets.only( - top: 40.h, left: 16.w, right: 16.w), + top: 40.h, left: 16.w, right: 16.w, + ), decoration: BoxDecoration( color: Colors.transparent, ), @@ -262,7 +239,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { onTap: () { Navigator.of(context).pop( course != null - ? course.viewers + 1 + ? (course!.viewers ?? 0) + 1 : 0); }, ), @@ -275,7 +252,8 @@ class _ClassDetails extends State with WidgetsBindingObserver { Container( margin: EdgeInsets.only(bottom: 16.h), padding: EdgeInsets.only( - left: 16, top: 16, right: 10), + left: 16, top: 16, right: 10, + ), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -284,7 +262,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { offset: Offset(0, 2), blurRadius: 14, spreadRadius: 0, - ) + ), ], ), child: Column( @@ -296,11 +274,11 @@ class _ClassDetails extends State with WidgetsBindingObserver { Container( // height: 22.h, padding: EdgeInsets.only( - left: 2, right: 2), + left: 2, right: 2, + ), alignment: Alignment.center, decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(2), + borderRadius: BorderRadius.circular(2), border: Border.all( width: 1, color: Color(0xFFFF7A1A), @@ -308,10 +286,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { ), ), child: Text( - (course?.tags != null && - course.tags.length > 0) - ? course.tags[0] - : "", + "${course?.tags?[0]}", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 14.sp, @@ -325,15 +300,12 @@ class _ClassDetails extends State with WidgetsBindingObserver { ), Expanded( child: Text( - course != null - ? course.subject - : "", + course?.subject ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( fontSize: 16.sp, - fontWeight: - MyFontWeight.semi_bold, + fontWeight: MyFontWeight.semi_bold, color: Color(0xFF1A1A1A), ), ), @@ -361,7 +333,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { children: [ Expanded( child: Text( - "${S.of(context).jiangshi}:${course != null ? course.author.name : ""}", + "${S.of(context).jiangshi}:${course?.author?.name}", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -369,7 +341,8 @@ class _ClassDetails extends State with WidgetsBindingObserver { fontWeight: MyFontWeight.regular, color: Colors.black, ), - )), + ), + ), Text( "${S.of(context).bofangcishu}:", style: TextStyle( @@ -382,9 +355,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { width: 4, ), Text( - course != null - ? course.viewers.toString() - : "", + "${course?.viewers}", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -400,7 +371,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { height: 10.h, ), Text( - course != null ? course.introduce : "", + course?.introduce ?? "", overflow: isShowMore ? TextOverflow.visible : TextOverflow.ellipsis, @@ -423,7 +394,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { child: Align( alignment: Alignment.center, child: Icon( - (isShowMore != null && !isShowMore) + (!isShowMore) ? Icons.keyboard_arrow_down : Icons.keyboard_arrow_up, color: Colors.black, @@ -438,7 +409,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { anthology(), CommentList( commentKey, - course?.likes ?? course?.likes ?? 0, + course?.likes ?? 0, widget.arguments["id"], 3, isKeyBoardShow, @@ -537,8 +508,8 @@ class _ClassDetails extends State with WidgetsBindingObserver { setState(() { chapterIndex = position; isShowImg = true; - ClassDetailsVideoState state = videoKey.currentState; - state.initVideo(chapterList[position].content.fileUrl); + ClassDetailsVideoState? state = videoKey.currentState as ClassDetailsVideoState?; + state?.initVideo(chapterList[position].content?.fileUrl); // initVideo(chapterList[position].content.fileUrl); }); }, @@ -566,7 +537,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { color: position == chapterIndex ? Color(0xFF32A060) : Color(0xFFE5E5E5), ), child: Text( - chapterList?.name ?? chapterList.name ?? "", + chapterList.name ?? chapterList.name ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -580,18 +551,19 @@ class _ClassDetails extends State with WidgetsBindingObserver { ///课程点赞 _queryCourseLikes() async { - BaseData baseData = await apiService - .courseLikes(widget.arguments["id"]) + BaseData? baseData = await apiService?.courseLikes(widget.arguments["id"]) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - if (course.selfLiked ?? false) - course.likes -= 1; - else - course.likes += 1; - course.selfLiked = !course.selfLiked ?? false; + int likes = course?.likes ?? 0; + if (course?.selfLiked ?? false) { + course?.likes = likes - 1; + } else { + course?.likes = likes + 1; + } + course?.selfLiked = !(course?.selfLiked ?? false); }); - commentKey.currentState.setState(() {}); + commentKey.currentState?.setState(() {}); } else { // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } @@ -599,15 +571,15 @@ class _ClassDetails extends State with WidgetsBindingObserver { ///发布评论 _queryMemberComment(String content) async { - BaseData baseData = await apiService.memberComment({ + BaseData? baseData = await apiService?.memberComment({ "content": content, "parentId": parenId, "relationalId": widget.arguments["id"], "relationalType": 3 }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - CommentListState state = commentKey.currentState; - state.queryMemberCommentList(); + if (baseData?.isSuccess ?? false) { + CommentListState? state = commentKey.currentState as CommentListState?; + state?.queryMemberCommentList(); commentTextController.text = ""; FocusScope.of(context).unfocus(); // _toComment(); @@ -617,10 +589,10 @@ class _ClassDetails extends State with WidgetsBindingObserver { ///滑动到评论列表 _toComment() { if (commentKey.currentContext == null) return; - RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); - Offset first = firstRenderBox.localToGlobal(Offset.zero); + RenderBox? firstRenderBox = commentKey.currentContext!.findRenderObject() as RenderBox?; + Offset? first = firstRenderBox?.localToGlobal(Offset.zero); scrollController.animateTo( - first.dy + + (first?.dy ?? 0) + scrollController.offset - (kToolbarHeight + MediaQuery.of(context).padding.top), duration: Duration(milliseconds: 300), @@ -637,10 +609,10 @@ class _ClassDetails extends State with WidgetsBindingObserver { ///删除评论 delComment(memberComment) async { - BaseData baseData = await apiService.delComment(memberComment.id); - if (baseData != null && baseData.isSuccess) { - CommentListState state = commentKey.currentState; - state.queryMemberCommentList(); + BaseData? baseData = await apiService?.delComment(memberComment.id); + if (baseData?.isSuccess ?? false) { + CommentListState? state = commentKey.currentState as CommentListState?; + state?.queryMemberCommentList(); } } @@ -654,16 +626,12 @@ class _ClassDetails extends State with WidgetsBindingObserver { share() async { SSDKMap params = SSDKMap() ..setGeneral( - course.subject != null ? course.subject : "", - course != null ? course.introduce : "", + course?.subject ?? "", + course?.introduce ?? "", [ - chapterList[chapterIndex].content.coverImg != null - ? chapterList[chapterIndex].content.coverImg - : "", + chapterList[chapterIndex].content?.coverImg ?? "", ], - chapterList[chapterIndex].content.fileUrl != null - ? chapterList[chapterIndex].content.fileUrl - : "", + chapterList[chapterIndex].content?.fileUrl ?? "", "", buildShareUrl(), "", @@ -681,7 +649,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { if (platform == ShareSDKPlatforms.line) { params.map["type"] = SSDKContentTypes.text.value; params.map["text"] = - "${course.subject ?? ""} ${buildShareUrl()}"; + "${course?.subject} ${buildShareUrl()}"; } SharesdkPlugin.share(platform, params, (state, userData, contentEntity, error) { diff --git a/lib/community/community_view/class_details_video.dart b/lib/community/community_view/class_details_video.dart index e34f7516..e94cc065 100644 --- a/lib/community/community_view/class_details_video.dart +++ b/lib/community/community_view/class_details_video.dart @@ -7,23 +7,22 @@ import 'package:video_player/video_player.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ClassDetailsVideo extends StatefulWidget { - final Function(bool isShowImg) changeShowImg; - final Function(double height) heightFun; - final bool isShowImg; - final Function exitFull; - final String coverImg; - final String videoUrl; + final Function(bool isShowImg)? changeShowImg; + final Function(double height)? heightFun; + final bool? isShowImg; + final Function? exitFull; + final String? coverImg; + final String? videoUrl; ClassDetailsVideo( - { - Key key, - this.changeShowImg, - this.isShowImg, - this.exitFull, - this.heightFun, - this.coverImg, - this.videoUrl - }) : super(key: key); + {Key? key, + this.changeShowImg, + this.isShowImg, + this.exitFull, + this.heightFun, + this.coverImg, + this.videoUrl}) + : super(key: key); @override State createState() { @@ -32,9 +31,9 @@ class ClassDetailsVideo extends StatefulWidget { } class ClassDetailsVideoState extends State { - VideoPlayerController videoPlayerController; - ChewieController chewieAudioController; - Chewie chewies; + late VideoPlayerController videoPlayerController; + late ChewieController chewieAudioController; + late Chewie chewies; GlobalKey globalKey = GlobalKey(); double height = 0; @@ -44,118 +43,114 @@ class ClassDetailsVideoState extends State { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, ]); - if(widget.videoUrl != null){ - initVideo(widget.videoUrl); - } + initVideo(widget.videoUrl); } @override void didChangeDependencies() { - if (widget.heightFun != null) - WidgetsBinding.instance.addPostFrameCallback(_getContainerHeight); + WidgetsBinding.instance.addPostFrameCallback(_getContainerHeight); super.didChangeDependencies(); } _getContainerHeight(_) { if (globalKey.currentContext != null) - height = globalKey.currentContext.size.height; - if (widget.heightFun != null) widget.heightFun(height); + height = globalKey.currentContext!.size?.height ?? 0; + widget.heightFun?.call(height); print("height: $height"); } initVideo(videoUrl) async { - if (videoPlayerController != null) { - videoPlayerController.pause(); - videoPlayerController.dispose(); - } - videoPlayerController = VideoPlayerController.network( - videoUrl, + videoPlayerController.pause(); + videoPlayerController.dispose(); + videoPlayerController = VideoPlayerController.networkUrl( + Uri.parse(videoUrl), )..initialize().then((value) { - chewieAudioController = ChewieController( - videoPlayerController: videoPlayerController, - aspectRatio: videoPlayerController.value.aspectRatio, - // aspectRatio: 1.44, - //宽高比 - autoPlay: false, - //自动播放 - looping: false, - //循环播放 - allowFullScreen: true, - // 允许全屏 - allowedScreenSleep: false, - //允许屏幕休眠 - materialProgressColors: chewie.ChewieProgressColors( - playedColor: Colors.white, - handleColor: Colors.white, - backgroundColor: Colors.grey, - bufferedColor: Colors.transparent, - ), - // 拖动条样式颜色 - autoInitialize: true, - ); - chewieAudioController.addListener(_fullScreenListener); - if (mounted) setState(() {}); - }); + chewieAudioController = ChewieController( + videoPlayerController: videoPlayerController, + aspectRatio: videoPlayerController.value.aspectRatio, + // aspectRatio: 1.44, + //宽高比 + autoPlay: false, + //自动播放 + looping: false, + //循环播放 + allowFullScreen: true, + // 允许全屏 + allowedScreenSleep: false, + //允许屏幕休眠 + materialProgressColors: chewie.ChewieProgressColors( + playedColor: Colors.white, + handleColor: Colors.white, + backgroundColor: Colors.grey, + bufferedColor: Colors.transparent, + ), + // 拖动条样式颜色 + autoInitialize: true, + ); + chewieAudioController.addListener(_fullScreenListener); + if (mounted) setState(() {}); + }); } @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.only(top: (Theme.of(context).platform == TargetPlatform.android) ? 0 : 70.h), + padding: EdgeInsets.only( + top: + (Theme.of(context).platform == TargetPlatform.android) ? 0 : 70.h, + ), color: Colors.black, - key: globalKey,child:(videoPlayerController?.value?.isInitialized ?? false) ? videoWidget( - MediaQuery.of(context).size.height, - (MediaQuery.of(context).size.height/1.44)-43, - widget.coverImg, - ):Container()); + key: globalKey, + child: (videoPlayerController.value.isInitialized ?? false) + ? videoWidget( + MediaQuery.of(context).size.height, + (MediaQuery.of(context).size.height / 1.44) - 43, + widget.coverImg, + ) + : Container(), + ); } @override void dispose() { super.dispose(); - if (chewieAudioController != null) { - chewieAudioController.pause(); - chewieAudioController.dispose(); - chewieAudioController = null; - } - - if (videoPlayerController != null) { - videoPlayerController.pause(); - videoPlayerController.dispose(); - } + chewieAudioController.pause(); + chewieAudioController.dispose(); + videoPlayerController.pause(); + videoPlayerController.dispose(); } Widget videoWidget(double width, double height, src) { print("src : $src"); return MediaQuery( data: MediaQuery.of(context).copyWith( - textScaleFactor: 0.9, + textScaler: TextScaler.linear(0.9), ), - child: Stack(children: [ + child: Stack( + children: [ (chewieAudioController != null ? Container( - color: Colors.black, - width: width, - height:MediaQuery.of(context).size.width / 1.5, - // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), - child: chewies = Chewie( - controller: chewieAudioController, - ), - ) + color: Colors.black, + width: width, + height: MediaQuery.of(context).size.width / 1.5, + // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), + child: chewies = Chewie( + controller: chewieAudioController, + ), + ) : Container( - width: width, - height:MediaQuery.of(context).size.width / 1.5, - // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), - )), - if (widget.isShowImg) + width: width, + height: MediaQuery.of(context).size.width / 1.5, + // margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top), + )), + if (widget.isShowImg ?? false) GestureDetector( onTap: () { setState(() { - widget.changeShowImg(false); - if (chewieAudioController != null) - chewieAudioController.play(); + widget.changeShowImg?.call(false); + chewieAudioController.play(); }); }, child: Container( @@ -188,14 +183,16 @@ class ClassDetailsVideoState extends State { ), ), ), - ])); + ], + ), + ); } Future _fullScreenListener() async { if (!chewieAudioController.isFullScreen) { Future.delayed(Duration(seconds: 1), () { - widget.exitFull(); + widget.exitFull?.call(); }); } } -} \ No newline at end of file +} diff --git a/lib/community/community_view/class_list_view.dart b/lib/community/community_view/class_list_view.dart index 7d3c1982..9d3ee953 100644 --- a/lib/community/community_view/class_list_view.dart +++ b/lib/community/community_view/class_list_view.dart @@ -1,14 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; -import 'package:huixiang/retrofit/data/course_list.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/data/course.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; class ClassListView extends StatefulWidget { - final List classList; + final List classList; ClassListView(this.classList); @@ -21,73 +20,67 @@ class ClassListView extends StatefulWidget { class _ClassListView extends State { @override Widget build(BuildContext context) { - return (widget.classList == null || widget.classList.length == 0) + return (widget.classList.length == 0) ? NoDataView( - src: "assets/image/xiao_fei.webp", - isShowBtn: false, - text: "当前分类暂无精彩内容", - fontSize: 16.sp, - margin: EdgeInsets.only( left: 60.w, right: 60.w,bottom: 30), - ): - // GridView.builder( - // itemCount:widget.classList == null ? 0 : widget.classList.length, - // padding: EdgeInsets.only( - // left: 16.w, - // right: 16.w, - // top: 13.h, - // bottom: 16.h, - // ), - // shrinkWrap: true, - // physics: NeverScrollableScrollPhysics(), - // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - // //一行的Widget数量 - // crossAxisCount:2, - // //水平子Widget之间间距 - // crossAxisSpacing: 11.w, - // //垂直子Widget之间间距 - // mainAxisSpacing: 16.w, - // //子Widget宽高比例 0.59 - // childAspectRatio: - // 225 / (281 / 2 + (281 / 2) * AppUtils.textScale(context)), - // ), - // itemBuilder: (context, index) { - // return GestureDetector( - // onTap: () { - // Navigator.of(context).pushNamed('/router/class_details', - // arguments: {"id": widget.classList[index].id}) - // .then((value) => {widget.classList[index].viewers = value != null?value:widget.classList[index].viewers+1}); - // }, - // child: classListItem(widget.classList[index]), - // ); - // }, - // ); - StaggeredGridView.countBuilder( - crossAxisCount: 2, - shrinkWrap: true, - itemCount: widget.classList.length, - mainAxisSpacing: 8, - crossAxisSpacing: 8, - padding: EdgeInsets.all(16), - physics: BouncingScrollPhysics(), - // scrollDirection: Axis.vertical, - itemBuilder: (context, position) { - return GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed('/router/class_details', - arguments: {"id": widget.classList[position].id}) - .then((value) => {widget.classList[position].viewers = value != null?value:widget.classList[position].viewers+1}); - }, - child: classListItem(widget.classList[position]), - ); - }, - staggeredTileBuilder: (position) { - // return StaggeredTile.count(1,position==0?1:1.2); - return StaggeredTile.fit(1); - }, - ); + src: "assets/image/xiao_fei.webp", + isShowBtn: false, + text: "当前分类暂无精彩内容", + fontSize: 16.sp, + margin: EdgeInsets.only(left: 60.w, right: 60.w, bottom: 30), + ) + : + // GridView.builder( + // itemCount:widget.classList == null ? 0 : widget.classList.length, + // padding: EdgeInsets.only( + // left: 16.w, + // right: 16.w, + // top: 13.h, + // bottom: 16.h, + // ), + // shrinkWrap: true, + // physics: NeverScrollableScrollPhysics(), + // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + // //一行的Widget数量 + // crossAxisCount:2, + // //水平子Widget之间间距 + // crossAxisSpacing: 11.w, + // //垂直子Widget之间间距 + // mainAxisSpacing: 16.w, + // //子Widget宽高比例 0.59 + // childAspectRatio: + // 225 / (281 / 2 + (281 / 2) * AppUtils.textScale(context)), + // ), + // itemBuilder: (context, index) { + // return GestureDetector( + // onTap: () { + // Navigator.of(context).pushNamed('/router/class_details', + // arguments: {"id": widget.classList[index].id}) + // .then((value) => {widget.classList[index].viewers = value != null?value:widget.classList[index].viewers+1}); + // }, + // child: classListItem(widget.classList[index]), + // ); + // }, + // ); + StaggeredGrid.count( + crossAxisCount: 2, + mainAxisSpacing: 8, + crossAxisSpacing: 8, + children: widget.classList.map((e) { + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed( + '/router/class_details', + arguments: {"id": e.id}, + ).then((value) => + {e.viewers = (value as int?) ?? (e.viewers ?? 0) + 1}); + }, + child: classListItem(e), + ); + }).toList(), + ); } - Widget classListItem(CourseList classList) { + Widget classListItem(Course classList) { return Container( decoration: BoxDecoration( borderRadius: BorderRadius.vertical( @@ -110,89 +103,88 @@ class _ClassListView extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Stack( - alignment: Alignment(0.9, 0.9), - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(10), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - color: Color.fromARGB(90, 0, 0, 0), - ), - child: ClipRRect( - child: - Opacity( - opacity: 0.7, - child:MImage( - classList.coverImg, - width: double.infinity, - height: 220.h, - fit: BoxFit.cover, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ), - ), - borderRadius: BorderRadius.vertical( - top: Radius.circular(4), - ), - ), - ), - Container( - padding: EdgeInsets.only(left: 4), - child: Row( + alignment: Alignment(0.9, 0.9), children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - "assets/image/ketang_play.webp", - width: 16.w, - height: 16.h, - color: Colors.white, - ), - SizedBox(width: 5), - Text( - classList.viewers.toString(), - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(10), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + color: Color.fromARGB(90, 0, 0, 0), + ), + child: ClipRRect( + child: Opacity( + opacity: 0.7, + child: MImage( + classList.coverImg ?? "", + width: double.infinity, + height: 220.h, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", ), ), - ], + borderRadius: BorderRadius.vertical( + top: Radius.circular(4), + ), + ), + ), + Container( + padding: EdgeInsets.only(left: 4), + child: Row( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/image/ketang_play.webp", + width: 16.w, + height: 16.h, + color: Colors.white, + ), + SizedBox(width: 5), + Text( + classList.viewers.toString(), + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Colors.white, + ), + ), + ], + ), + SizedBox(width: 8), + // Row( + // children: [ + // Image.asset( + // "assets/image/ketang_message.webp", + // width: 16.w, + // height: 16.h, + // color: Colors.white, + // ), + // SizedBox(width: 5), + // Text( + // classList.viewers.toString(), + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.regular, + // color: Colors.white, + // ), + // ), + // ], + // ), + ], + ), ), - SizedBox(width: 8), - // Row( - // children: [ - // Image.asset( - // "assets/image/ketang_message.webp", - // width: 16.w, - // height: 16.h, - // color: Colors.white, - // ), - // SizedBox(width: 5), - // Text( - // classList.viewers.toString(), - // style: TextStyle( - // fontSize: 12.sp, - // fontWeight: MyFontWeight.regular, - // color: Colors.white, - // ), - // ), - // ], - // ), ], ), - ), - ], - ), Container( padding: EdgeInsets.all(5), child: Column( @@ -200,7 +192,7 @@ class _ClassListView extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - classList.subject, + classList.subject ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -210,7 +202,7 @@ class _ClassListView extends State { color: Colors.black, ), ), - SizedBox(height:5.h), + SizedBox(height: 5.h), Text( "简介 : ${classList.introduce}", overflow: TextOverflow.ellipsis, @@ -222,10 +214,10 @@ class _ClassListView extends State { color: Colors.black, ), ), - SizedBox(height:7.h), - if(classList.author.name != "") + SizedBox(height: 7.h), + if (classList.author?.name?.isNotEmpty ?? false) Text( - "讲师:${classList.author.name}", + "讲师:${classList.author?.name}", // overflow: TextOverflow.ellipsis, // maxLines: 2, style: TextStyle( @@ -234,8 +226,8 @@ class _ClassListView extends State { color: Color(0xFF32A060), ), ), - if(classList.author.name != "") - SizedBox(height:5.h), + if (classList.author?.name?.isNotEmpty ?? false) + SizedBox(height: 5.h), ], ), ), diff --git a/lib/community/community_view/class_title_tab.dart b/lib/community/community_view/class_title_tab.dart index 7394b1f9..824a7b32 100644 --- a/lib/community/community_view/class_title_tab.dart +++ b/lib/community/community_view/class_title_tab.dart @@ -1,13 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/category_select_list.dart'; -import 'package:huixiang/retrofit/data/goods_category.dart'; +import 'package:huixiang/data/category_select.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_tab.dart'; class ClassTitleTab extends StatefulWidget { - final List classSelectList; + final List classSelectList; final Function notifyClassSelectList; ClassTitleTab(this.classSelectList,this.notifyClassSelectList); @@ -20,12 +18,12 @@ class ClassTitleTab extends StatefulWidget { class _ClassTitleTab extends State with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin { - TabController tabController; + TabController? tabController; @override void initState() { super.initState(); - if (widget.classSelectList != null && widget.classSelectList.length > 0) + if (widget.classSelectList.length > 0) tabController = TabController(length: widget.classSelectList.length, vsync: this ); } @@ -34,9 +32,7 @@ class _ClassTitleTab extends State return Container( alignment: Alignment.centerLeft, child: DefaultTabController( - length:widget.classSelectList == null - ? 0 - : widget.classSelectList.length, + length: widget.classSelectList?.length ?? 0, child: TabBar( isScrollable: true, //可滚动 @@ -58,11 +54,7 @@ class _ClassTitleTab extends State widget.notifyClassSelectList(index); }, //指示器与文字等宽 - tabs:widget.classSelectList == null - ? [] - : widget.classSelectList - .map((e) => MyTab(text: e.name)) - .toList(), + tabs: widget.classSelectList?.map((e) => MyTab(text: "${e.name}")).toList() ?? [], ), ), ); diff --git a/lib/community/community_view/community_comment.dart b/lib/community/community_view/community_comment.dart index b364973f..1245629a 100644 --- a/lib/community/community_view/community_comment.dart +++ b/lib/community/community_view/community_comment.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/member_comment_list.dart'; +import 'package:huixiang/data/member_comment.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:like_button/like_button.dart'; @@ -8,7 +8,7 @@ import 'package:like_button/like_button.dart'; class CommunityComment extends StatefulWidget { - final MemberCommentList memberList; + final MemberComment memberList; final Function(String id) queryCommentLike; final int footType; CommunityComment(this.memberList, this.queryCommentLike,this.footType); @@ -72,7 +72,7 @@ class _CommunityComment extends State { height: 3.h, ), Text( - widget.memberList.createTime, + widget.memberList.createTime ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -116,13 +116,13 @@ class _CommunityComment extends State { }, isLiked: widget.memberList.liked ?? false, onTap: (isLiked) async { - widget.queryCommentLike(widget.memberList.id); - return (widget.memberList == null || widget.memberList.liked == null) + widget.queryCommentLike("${widget.memberList?.id}"); + return (widget.memberList.liked == null) ? false : widget.memberList.liked; }, likeCount: widget.memberList.likes, - countBuilder: (int count, bool isLiked, String text) { + countBuilder: (int? count, bool isLiked, String text) { return Text( text, style: TextStyle( @@ -147,7 +147,7 @@ class _CommunityComment extends State { child: Align( alignment: Alignment.centerLeft, child: Text( - widget.memberList.content, + widget.memberList.content ?? "", style: TextStyle( fontSize: 12, color: Color(0xff1A1A1A), @@ -158,40 +158,39 @@ class _CommunityComment extends State { SizedBox( height: 12.h, ), - if (widget.memberList.parentContent != null) - Container( - margin: EdgeInsets.only(left: 68.w, right: 16.w), - decoration: BoxDecoration( - color: Color(0xffF2F2F2), - borderRadius: BorderRadius.circular(2.0), - ), - child: Padding( - padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "${widget.memberList.parentUserName}:" ?? "", + Container( + margin: EdgeInsets.only(left: 68.w, right: 16.w), + decoration: BoxDecoration( + color: Color(0xffF2F2F2), + borderRadius: BorderRadius.circular(2.0), + ), + child: Padding( + padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "${widget.memberList.parentUserName}:" ?? "", + style: TextStyle( + fontSize: 14, + color: Color(0xff808080), + ), + ), + Expanded( + flex: 1, + child: Text( + widget.memberList.parentContent ?? "", style: TextStyle( fontSize: 14, color: Color(0xff808080), ), ), - Expanded( - flex: 1, - child: Text( - widget.memberList.parentContent ?? "", - style: TextStyle( - fontSize: 14, - color: Color(0xff808080), - ), - ), - ), - ], - ), + ), + ], ), ), + ), if (widget.footType == 1) Container( decoration: BoxDecoration( diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index d145363f..aacb5888 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -1,13 +1,11 @@ import 'dart:convert'; -import 'dart:ui'; import 'package:chewie/chewie.dart'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_svg/svg.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:chewie/src/chewie_progress_colors.dart' as chewie; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -16,7 +14,6 @@ import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/share_dialog.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:sharesdk_plugin/sharesdk_defines.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart'; import 'package:sharesdk_plugin/sharesdk_map.dart'; @@ -26,19 +23,19 @@ import '../photo_view_gallery_screen.dart'; class CommunityDynamic extends StatefulWidget { final int itemCount; - final Function(double height) heightFun; + final Function(double height)? heightFun; final bool isDetails; final int commentType; - final Function removalDynamic; - final Function exitFull; + final Function? removalDynamic; + final Function? exitFull; final bool isList; - final Article article; - final String userId; + final Article? article; + final String? userId; CommunityDynamic( this.article, this.commentType, { - Key key, + Key? key, this.itemCount = 9, this.heightFun, this.isDetails = false, @@ -57,11 +54,11 @@ class CommunityDynamic extends StatefulWidget { class _CommunityDynamic extends State { GlobalKey globalKey = GlobalKey(); double height = 0; - ApiService apiService; + ApiService? apiService; - VideoPlayerController videoPlayerController; - ChewieController chewieAudioController; - Chewie chewies; + late VideoPlayerController videoPlayerController; + late ChewieController chewieAudioController; + late Chewie chewies; @override void initState() { @@ -69,19 +66,18 @@ class _CommunityDynamic extends State { initVideo(); } - String filePath; + String? filePath; initVideo() async { - if (widget?.article?.content == null) return; - var cnt = jsonDecode(widget.article.content); + var cnt = jsonDecode(widget.article?.content ?? ""); if (cnt["type"] == "video" && cnt["video"] != null) { if (widget.isList) { - videoPlayerController = VideoPlayerController.network( - cnt["video"], + videoPlayerController = VideoPlayerController.networkUrl( + Uri.parse(cnt["video"]), )..initialize().then((value) {}); } else { - videoPlayerController = VideoPlayerController.network( - cnt["video"], + videoPlayerController = VideoPlayerController.networkUrl( + Uri.parse(cnt["video"]), )..initialize().then((value) { chewieAudioController = ChewieController( videoPlayerController: videoPlayerController, @@ -110,38 +106,22 @@ class _CommunityDynamic extends State { ///关注/取关会员 _vipFollow(followId, isFollow) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.follow(followId ?? ""); - if (baseData != null && baseData.isSuccess) { - widget.exitFull(); + BaseData? baseData = await apiService?.follow(followId ?? ""); + if (baseData?.isSuccess ?? false) { + widget.exitFull?.call(); SmartDialog.showToast(isFollow ? "关注成功" : "取关成功", alignment: Alignment.center); setState(() {}); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } ///删除动态 _deleteDynamic(id) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.deleteTrend(id); - if (baseData != null && baseData.isSuccess) { - widget.exitFull(); + BaseData? baseData = await apiService?.deleteTrend(id); + if (baseData?.isSuccess ?? false) { + widget.exitFull?.call(); SmartDialog.showToast("删除成功", alignment: Alignment.center); setState(() {}); } else { @@ -151,30 +131,22 @@ class _CommunityDynamic extends State { ///给文章/活动点赞 _queryInformationLikes(isLikes) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService - .informationLikes(widget.article.id) + BaseData? baseData = await apiService + ?.informationLikes("${widget.article?.id}") .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - widget.exitFull(); + if (baseData?.isSuccess ?? false) { + widget.exitFull?.call(); setState(() {}); } } goPersonalPage() async { await Navigator.of(context).pushNamed('/router/personal_page', arguments: { - "memberId": (widget.article.author == widget.userId) + "memberId": (widget.article?.author == widget.userId) ? "0" - : widget.article.author, + : widget.article?.author, }); - widget.exitFull(); + widget.exitFull?.call(); } @override @@ -185,7 +157,11 @@ class _CommunityDynamic extends State { margin: EdgeInsets.only(top: 2.h), key: globalKey, alignment: Alignment.topCenter, - padding: EdgeInsets.only(left: 16.w, top: 16.h, right: 16.w), + padding: EdgeInsets.only( + left: 16.w, + top: 16.h, + right: 16.w, + ), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -225,8 +201,7 @@ class _CommunityDynamic extends State { goPersonalPage(); }, child: MImage( - (widget?.article?.authorHeadImg ?? - ""), + (widget.article?.authorHeadImg ?? ""), width: 44, height: 44, isCircle: true, @@ -243,7 +218,7 @@ class _CommunityDynamic extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - widget?.article?.authorName ?? "", + widget.article?.authorName ?? "", style: TextStyle( fontSize: MediaQuery.of(context).size.width >= 650 @@ -254,7 +229,7 @@ class _CommunityDynamic extends State { ), ), Text( - widget?.article?.createTime ?? "", + widget.article?.createTime ?? "", style: TextStyle( fontSize: MediaQuery.of(context).size.width >= 650 @@ -269,16 +244,16 @@ class _CommunityDynamic extends State { ], ), ), - if (widget?.article?.author != widget.userId ?? "") + if (widget.article?.author != (widget.userId ?? "")) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { setState(() { if (widget.commentType == 0) { - widget.article.followed = - !(widget.article.followed ?? false); - _vipFollow(widget.article.author, - widget.article.followed ?? false); + widget.article?.followed = + !(widget.article?.followed ?? false); + _vipFollow(widget.article?.author, + widget.article?.followed ?? false); } else { showDeleteDialog(); } @@ -291,21 +266,21 @@ class _CommunityDynamic extends State { alignment: Alignment.center, child: RoundButton( height: 25.h, - backgroup: (widget?.article?.followed ?? false) + backgroup: (widget.article?.followed ?? false) ? Color(0xFFE6E6E6) : Color(0xFF32A060), - textColor: (widget?.article?.followed ?? false) + textColor: (widget.article?.followed ?? false) ? Color(0xFF808080) : Colors.white, - text: (widget?.article?.followed ?? false) + text: (widget.article?.followed ?? false) ? S.of(context).yiguanzhu : S.of(context).guanzhu, radius: 20, icons: Icon( - (widget?.article?.followed ?? false) + (widget.article?.followed ?? false) ? Icons.check : Icons.add, - color: (widget?.article?.followed ?? false) + color: (widget.article?.followed ?? false) ? Color(0xFF808080) : Colors.white, size: 15, @@ -327,7 +302,7 @@ class _CommunityDynamic extends State { ), widget.isList ? Text( - widget?.article?.mainTitle ?? "", + widget.article?.mainTitle ?? "", maxLines: 5, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -337,18 +312,18 @@ class _CommunityDynamic extends State { ), ) : Text( - widget?.article?.mainTitle ?? "", + widget.article?.mainTitle ?? "", style: TextStyle( color: Color(0xFF1A1A1A), fontWeight: MyFontWeight.regular, fontSize: 15.sp, ), ), - buildMedia(widget?.article?.content), + buildMedia(widget.article?.content), SizedBox( height: 8.h, ), - if (widget.article.location != "") + if (widget.article?.location != "") Padding( padding: EdgeInsets.only(bottom: 7), child: Row( @@ -362,16 +337,17 @@ class _CommunityDynamic extends State { width: 2, ), Expanded( - child: Text( - widget?.article?.location ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFB3B2B2), + child: Text( + widget.article?.location ?? "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFFB3B2B2), + ), ), - )), + ), ], ), ), @@ -388,30 +364,29 @@ class _CommunityDynamic extends State { children: [ Expanded( child: Container( - padding: EdgeInsets.only(bottom: 16.h), - child: Row( - children: [ - SvgPicture.asset( - "assets/svg/liulanliang.svg", - width: 16, - height: 16, - ), - SizedBox( - width: 5.w, - ), - Text( - (widget.article != null) - ? "${widget.article.viewers}" - : "", - style: TextStyle( - fontSize: 14.sp, - fontFamily: 'JDZhengHT', - fontWeight: MyFontWeight.regular, - color: Color(0xFF1A1A1A), - ), + padding: EdgeInsets.only(bottom: 16.h), + child: Row( + children: [ + SvgPicture.asset( + "assets/svg/liulanliang.svg", + width: 16, + height: 16, + ), + SizedBox( + width: 5.w, + ), + Text( + "${widget.article?.viewers}", + style: TextStyle( + fontSize: 14.sp, + fontFamily: 'JDZhengHT', + fontWeight: MyFontWeight.regular, + color: Color(0xFF1A1A1A), ), - ], - )), + ), + ], + ), + ), ), Expanded( child: Container( @@ -427,7 +402,7 @@ class _CommunityDynamic extends State { width: 5.w, ), Text( - "${widget.article.comments ?? 0}", + "${widget.article?.comments ?? 0}", style: TextStyle( fontSize: 14.sp, fontFamily: 'JDZhengHT', @@ -438,21 +413,21 @@ class _CommunityDynamic extends State { ], ))), Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - widget.article.liked = - !(widget.article.liked ?? false); - _queryInformationLikes( - widget.article.liked ?? false); - }); - }, - child: Container( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + widget.article?.liked = + !(widget.article?.liked ?? false); + _queryInformationLikes( + widget.article?.liked ?? false); + }); + }, + child: Container( padding: EdgeInsets.only(bottom: 16.h), child: Row( children: [ - (widget.article.liked ?? false) + (widget.article?.liked ?? false) ? Image.asset( "assets/image/icon_like.webp", width: 16, @@ -467,7 +442,7 @@ class _CommunityDynamic extends State { width: 5.w, ), Text( - "${widget.article.likes ?? 0}", + "${widget.article?.likes ?? 0}", style: TextStyle( fontSize: 14.sp, fontFamily: 'JDZhengHT', @@ -476,28 +451,34 @@ class _CommunityDynamic extends State { ), ), ], - )), - )), - if ((widget?.article?.author != widget.userId ?? "") && + ), + ), + ), + ), + if ((widget.article?.author != (widget.userId ?? "")) && widget.commentType == 0) Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - choiceShowBottomSheet(); - }); - }, - child: Container( - padding: - EdgeInsets.only(top: 3.h, bottom: 16.h), - alignment: Alignment.center, - // color: Colors.red, - child: Icon( - Icons.more_horiz, - color: Colors.black, - ), - ))), + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + choiceShowBottomSheet(); + }); + }, + child: Container( + padding: EdgeInsets.only( + top: 3.h, + bottom: 16.h, + ), + alignment: Alignment.center, + // color: Colors.red, + child: Icon( + Icons.more_horiz, + color: Colors.black, + ), + ), + ), + ), ], ), ), @@ -515,25 +496,21 @@ class _CommunityDynamic extends State { share() async { SSDKMap params = SSDKMap() ..setGeneral( - widget?.article?.mainTitle ?? "", + widget.article?.mainTitle ?? "", "", [ - widget?.article?.content != null && - widget.article.content.contains("images\":[\"") - ? jsonDecode(widget.article.content)["images"][0] + (widget.article?.content?.contains("images\":[\"") ?? false) + ? jsonDecode("${widget.article?.content}")["images"][0] : "", - widget?.article?.content != null && - widget.article.content.contains("video\":[\"") - ? jsonDecode(widget.article.content)["video"][0] + (widget.article?.content?.contains("video\":[\"") ?? false) + ? jsonDecode("${widget.article?.content}")["video"][0] : "", ], - widget?.article?.content != null && - widget.article.content.contains("images\":[\"") - ? jsonDecode(widget.article.content)["images"][0] + (widget.article?.content?.contains("images\":[\"") ?? false) + ? jsonDecode("${widget.article?.content}")["images"][0] : "", - widget?.article?.content != null && - widget.article.content.contains("video\":[\"") - ? jsonDecode(widget.article.content)["video"][0] + (widget.article?.content?.contains("video\":[\"") ?? false) + ? jsonDecode("${widget.article?.content}")["video"][0] : "", buildShareUrl(), "", @@ -550,8 +527,7 @@ class _CommunityDynamic extends State { return ShareDialog((platform) { if (platform == ShareSDKPlatforms.line) { params.map["type"] = SSDKContentTypes.text.value; - params.map["text"] = - "${widget?.article?.mainTitle ?? ""} ${buildShareUrl()}"; + params.map["text"] = "${widget.article?.mainTitle} ${buildShareUrl()}"; } SharesdkPlugin.share(platform, params, (state, userData, contentEntity, error) { @@ -562,15 +538,15 @@ class _CommunityDynamic extends State { } String buildShareUrl() { - return "https://hx.lotus-wallet.com/communityShare.html?id=${widget.article.id}"; + return "https://hx.lotus-wallet.com/communityShare.html?id=${widget.article?.id}"; } ///动态内容 - Widget buildMedia(String subjectInfo) { - if (subjectInfo == null || !subjectInfo.startsWith("{")) { + Widget buildMedia(String? subjectInfo) { + if (!(subjectInfo?.startsWith("{") ?? false)) { return Container(); } - var cnt = jsonDecode(subjectInfo); + var cnt = jsonDecode(subjectInfo!); Widget itemWidget = Container(); if (cnt["type"] == "image" && cnt["images"] != null && @@ -670,23 +646,17 @@ class _CommunityDynamic extends State { @override void dispose() { super.dispose(); + chewieAudioController.pause(); + chewieAudioController.dispose(); - if (chewieAudioController != null) { - chewieAudioController.pause(); - chewieAudioController.dispose(); - chewieAudioController = null; - } - - if (videoPlayerController != null) { - videoPlayerController.pause(); - videoPlayerController.dispose(); - } + videoPlayerController.pause(); + videoPlayerController.dispose(); } Widget videoWidget(double width, double height, src) { return MediaQuery( data: MediaQuery.of(context).copyWith( - textScaleFactor: 0.9, + textScaler: TextScaler.linear(0.9), ), child: !widget.isList ? (chewieAudioController != null @@ -736,7 +706,7 @@ class _CommunityDynamic extends State { Future _fullScreenListener() async { if (!chewieAudioController.isFullScreen) { Future.delayed(Duration(seconds: 1), () { - widget.exitFull(); + widget.exitFull?.call(); }); } } @@ -800,7 +770,7 @@ class _CommunityDynamic extends State { fontWeight: FontWeight.bold, ), onTap: () { - _deleteDynamic(widget.article.id); + _deleteDynamic(widget.article?.id); Navigator.of(context).pop(); }, ), @@ -887,8 +857,8 @@ class _CommunityDynamic extends State { setState(() { Navigator.of(context) .popAndPushNamed('/router/report_page', arguments: { - "userName": widget?.article?.authorName ?? "", - "authorId": widget?.article?.author ?? "", + "userName": widget.article?.authorName ?? "", + "authorId": widget.article?.author ?? "", }); }); }, @@ -918,23 +888,24 @@ class _CommunityDynamic extends State { ), ], ), - )) + ), + ) ], ), - )); + ), + ); } @override void didChangeDependencies() { - if (widget.heightFun != null) - WidgetsBinding.instance.addPostFrameCallback(_getContainerHeight); + WidgetsBinding.instance.addPostFrameCallback(_getContainerHeight); super.didChangeDependencies(); } _getContainerHeight(_) { if (globalKey.currentContext != null) - height = globalKey.currentContext.size.height; - if (widget.heightFun != null) widget.heightFun(height); + height = globalKey.currentContext!.size?.height ?? 0; + widget.heightFun?.call(height); print("height: $height"); } } diff --git a/lib/community/community_view/course_banner.dart b/lib/community/community_view/course_banner.dart index 20665357..786c115f 100644 --- a/lib/community/community_view/course_banner.dart +++ b/lib/community/community_view/course_banner.dart @@ -2,10 +2,8 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/banner.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; @@ -24,7 +22,7 @@ class CourseBanner extends StatefulWidget { } class _CourseBanner extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); List bannerData = []; @@ -57,8 +55,8 @@ class _CourseBanner extends State { bannerClick(widget.bannerData[position]); }, child: MImage( - (widget.bannerData != null && position < widget.bannerData.length) - ? widget.bannerData[position].imgUrl + (position < widget.bannerData.length) + ? "${widget.bannerData[position].imgUrl}" : "", fit: BoxFit.fill, radius: BorderRadius.circular(8), @@ -67,7 +65,7 @@ class _CourseBanner extends State { ), ); }, - itemCount: (widget.bannerData != null && widget.bannerData.length > 0) + itemCount: (widget.bannerData.isNotEmpty) ? widget.bannerData.length : 1), ), @@ -94,8 +92,11 @@ class _CourseBanner extends State { }); break; case 4: - String router = bannerData.content; - if (router.contains("?")) { + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + if (router!.contains("?")) { String params = router.substring(router.indexOf("?")); params = params.replaceAll("?", ""); Map map = jsonDecode(params); @@ -111,9 +112,13 @@ class _CourseBanner extends State { }); break; case 7: - String params = bannerData.content.substring(bannerData.content.indexOf("?")+1); + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?")+1); Map map = jsonDecode(params); - Navigator.of(context).pushNamed(bannerData.content.substring(0,bannerData.content.indexOf("?")), arguments: map); + Navigator.of(context).pushNamed(router.substring(0, router.indexOf("?")), arguments: map); break; } } diff --git a/lib/community/community_view/home_class.dart b/lib/community/community_view/home_class.dart index d8f8c2ad..607e0b67 100644 --- a/lib/community/community_view/home_class.dart +++ b/lib/community/community_view/home_class.dart @@ -1,17 +1,16 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/collect_class_list.dart'; -import 'package:huixiang/retrofit/data/course_list.dart'; +import 'package:huixiang/data/collect_class.dart'; +import 'package:huixiang/data/course.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class HomeClass extends StatefulWidget { - final Map> collectMap; - final List collectList; + final Map> collectMap; + final List collectList; HomeClass(this.collectMap, this.collectList); @@ -22,8 +21,8 @@ class HomeClass extends StatefulWidget { } class _HomeClass extends State { - ApiService apiService; - BMFCoordinate latLng; + ApiService? apiService; + BMFCoordinate? latLng; final TextEditingController editingController = TextEditingController(); @@ -36,7 +35,7 @@ class _HomeClass extends State { Widget build(BuildContext context) { return ListView.builder( padding: EdgeInsets.zero, - itemCount: widget.collectList == null ? 0 : widget.collectList.length, + itemCount: widget.collectList?.length ?? 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), @@ -46,7 +45,7 @@ class _HomeClass extends State { ); } - Widget collectItem(CollectClassList collectList) { + Widget collectItem(CollectClass collectList) { return Container( margin: EdgeInsets.symmetric( horizontal: 6.w, @@ -58,7 +57,7 @@ class _HomeClass extends State { Padding( padding: EdgeInsets.only(left: 16.w, top: 5.h), child: Text( - collectList.name, + collectList.name ?? "", style: TextStyle( fontSize: 15.sp, fontWeight: MyFontWeight.medium, @@ -73,25 +72,20 @@ class _HomeClass extends State { scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), padding: EdgeInsets.symmetric(horizontal: 10.w), - itemCount: widget.collectMap[collectList.id] == null - ? 0 - : widget.collectMap[collectList.id].length, + itemCount: widget.collectMap[collectList.id]?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { - Navigator.of(context).pushNamed('/router/class_details', + Navigator.of(context).pushNamed( + '/router/class_details', arguments: { - "id": widget.collectMap[collectList.id][position].id - }).then((value) => { - widget.collectMap[collectList.id][position].viewers = - value != null - ? value - : widget.collectMap[collectList.id][position] - .viewers + - 1 + "id": widget.collectMap[collectList.id]![position].id + }).then((value) { + int viewer = widget.collectMap[collectList.id]![position].viewers ?? 0; + widget.collectMap[collectList.id]![position].viewers = value != null ? int.parse("${value}") : (viewer + 1); }); }, - child: classItem(widget.collectMap[collectList.id][position]), + child: classItem(widget.collectMap[collectList.id]![position]), ); }, ), @@ -101,7 +95,7 @@ class _HomeClass extends State { ); } - Widget classItem(CourseList collect) { + Widget classItem(Course collect) { return Container( width: 168.w, decoration: BoxDecoration( @@ -114,7 +108,7 @@ class _HomeClass extends State { offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], color: Colors.white, ), @@ -149,7 +143,7 @@ class _HomeClass extends State { child: Opacity( opacity: 0.7, child: MImage( - collect.coverImg, + collect.coverImg ?? "", width: double.infinity, height: 120.h, fit: BoxFit.cover, @@ -225,9 +219,7 @@ class _HomeClass extends State { color: Color(0xFFFFCD00), ), child: Text( - (collect?.tags != null && collect.tags.length > 0) - ? collect.tags[0] - : "", + collect.tags?[0] ?? "", overflow:TextOverflow.ellipsis, style: TextStyle( fontSize: 11.sp, @@ -253,7 +245,7 @@ class _HomeClass extends State { children: [ Expanded( child: Text( - collect.subject, + collect.subject ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -267,7 +259,7 @@ class _HomeClass extends State { ), SizedBox(height: 2.h), Text( - "${S.of(context).jiangshi}:${collect.author.name}", + "${S.of(context).jiangshi}:${collect.author?.name}", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( diff --git a/lib/community/headlines/activity_top_list.dart b/lib/community/headlines/activity_top_list.dart index 257f61b6..8deaef5a 100644 --- a/lib/community/headlines/activity_top_list.dart +++ b/lib/community/headlines/activity_top_list.dart @@ -1,9 +1,7 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; +import 'package:huixiang/data/article.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -21,8 +19,8 @@ class ActivityTopList extends StatefulWidget { } class _ActivityTopList extends State { - ApiService apiService; - BMFCoordinate latLng; + ApiService? apiService; + BMFCoordinate? latLng; final TextEditingController editingController = TextEditingController(); @@ -40,14 +38,14 @@ class _ActivityTopList extends State { scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), padding: EdgeInsets.symmetric(horizontal: 10), - itemCount: widget.articleTop == null ? 0 : widget.articleTop.length, + itemCount: widget.articleTop?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { Navigator.of(context).pushNamed('/router/web_page', arguments: {"articleId": widget.articleTop[position].id}); - widget.articleTop[position].viewers = - (widget.articleTop[position].viewers + 1); + int viewer = widget.articleTop[position].viewers ?? 0; + widget.articleTop[position].viewers = (viewer + 1); setState(() {}); }, child: headlinesCollectionItem(widget.articleTop[position], position), @@ -87,7 +85,7 @@ class _ActivityTopList extends State { child: Opacity( opacity: 0.8, child: MImage( - widget?.articleTop[index]?.coverImg ?? "", + widget.articleTop[index].coverImg ?? "", width: 340.w, height: 220.h, fit: BoxFit.cover, @@ -135,7 +133,7 @@ class _ActivityTopList extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - widget?.articleTop[index]?.mainTitle ?? "", + widget.articleTop[index].mainTitle ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -147,7 +145,7 @@ class _ActivityTopList extends State { SizedBox(height: 5.h), Opacity(opacity:0.8, child: Text( - widget?.articleTop[index]?.viceTitle ?? "", + widget.articleTop[index].viceTitle ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( diff --git a/lib/community/headlines/article_list.dart b/lib/community/headlines/article_list.dart index dac1dec3..5bb5c71c 100644 --- a/lib/community/headlines/article_list.dart +++ b/lib/community/headlines/article_list.dart @@ -1,8 +1,7 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; +import 'package:huixiang/data/article.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -23,7 +22,7 @@ class ArticleList extends StatefulWidget { } class _ArticleList extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -46,7 +45,7 @@ class _ArticleList extends State { Padding( padding: EdgeInsets.only(bottom: 12.h), child: Text( - S.of(context).zuixinwenzhang, + S.of(context).zuixinwenzhang, overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -64,10 +63,12 @@ class _ArticleList extends State { itemBuilder: (context, position) { return GestureDetector( onTap: () { - Navigator.of(context).pushNamed('/router/web_page', - arguments: {"articleId": widget.articles[position].id}); - widget.articles[position].viewers = - (widget.articles[position].viewers + 1); + Navigator.of(context).pushNamed( + '/router/web_page', + arguments: {"articleId": widget.articles[position].id}, + ); + int viewer = widget.articles[position].viewers ?? 0; + widget.articles[position].viewers = (viewer + 1); setState(() {}); }, child: articleItem(widget.articles[position], position), @@ -89,88 +90,95 @@ class _ArticleList extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Expanded( - child: Container( - height: MediaQuery.of(context).size.width >= 650 ? 133.h :100.h, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - widget?.articles[position]?.mainTitle ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 14.sp, - height: 1.4.h, - fontWeight: MyFontWeight.semi_bold, - color: Colors.black, - ), - ), - SizedBox(height:8.h), - Expanded(child: Text( - widget?.articles[position]?.viceTitle ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 12.sp, - height: 1.2.h, - fontWeight: MyFontWeight.regular, - color: Color(0xFF353535), + child: Container( + height: MediaQuery.of(context).size.width >= 650 ? 133.h : 100.h, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + widget.articles[position].mainTitle ?? "", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 14.sp, + height: 1.4.h, + fontWeight: MyFontWeight.semi_bold, + color: Colors.black, + ), ), - )), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Expanded( - // child: Text( - // widget.articles != null - // ? widget.articles[position]?.author?.name ?? "" - // : "", - // overflow: TextOverflow.ellipsis, - // maxLines: 1, - // style: TextStyle( - // fontSize: 12.sp, - // fontWeight: MyFontWeight.medium, - // color: Color(0xFF8E8E8E), - // ), - // ), - // ), - // SizedBox(width: 8.w), - Image.asset( - "assets/image/browse.webp", - width: 14, - height: 14, - color: Color(0xFF808080), + SizedBox(height: 8.h), + Expanded( + child: Text( + widget.articles[position].viceTitle ?? "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontSize: 12.sp, + height: 1.2.h, + fontWeight: MyFontWeight.regular, + color: Color(0xFF353535), + ), ), - SizedBox(width: 6.w,), - Expanded( + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Expanded( + // child: Text( + // widget.articles != null + // ? widget.articles[position]?.author?.name ?? "" + // : "", + // overflow: TextOverflow.ellipsis, + // maxLines: 1, + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.medium, + // color: Color(0xFF8E8E8E), + // ), + // ), + // ), + // SizedBox(width: 8.w), + Image.asset( + "assets/image/browse.webp", + width: 14, + height: 14, + color: Color(0xFF808080), + ), + SizedBox( + width: 6.w, + ), + Expanded( child: Text( - "${widget?.articles[position]?.viewers}" ?? "", + "${widget.articles[position].viewers}" ?? "", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, color: Color(0xFF8D8D8D), ), - )), - Expanded(child:Text( - widget?.articles[position]?.createTime?.split(" ")[0] ?? - "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), + ), ), - )), - - ], - ) - ], + Expanded( + child: Text( + widget.articles[position].createTime?.split(" ")[0] ?? + "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), + ), + ), + ], + ) + ], + ), ), - )), + ), SizedBox(width: 12), MImage( - widget?.articles[position]?.coverImg ?? "", + widget.articles[position].coverImg ?? "", fit: BoxFit.cover, radius: BorderRadius.all(Radius.circular(2)), width: 100, diff --git a/lib/community/headlines/article_page.dart b/lib/community/headlines/article_page.dart index 355fb429..af7b6313 100644 --- a/lib/community/headlines/article_page.dart +++ b/lib/community/headlines/article_page.dart @@ -1,17 +1,14 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/community/headlines/headlines_collection.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/brand.dart'; -import 'package:huixiang/retrofit/data/headlines_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/brand.dart'; +import 'package:huixiang/data/headlines.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -20,7 +17,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/store_title_tab.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'activity_top_list.dart'; import 'article_list.dart'; @@ -41,13 +37,13 @@ class _ArticlePage extends State final RefreshController refreshController = RefreshController(); ScrollController sc = ScrollController(); - ApiService apiService; + ApiService? apiService; List globaKeys = []; List brands = []; List bannerData = []; List
articles = []; List
articleTop = []; - List headlines = []; + List headlines = []; int pageNum = 1; bool isLoading = false; @@ -77,22 +73,14 @@ class _ArticlePage extends State ///banner queryHeadlinesBanner() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.queryBanner({ + BaseData>? baseData = await apiService?.queryBanner({ "model": {"type": "INFORMATION"}, }).catchError((onError) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { bannerData.clear(); - bannerData.addAll(baseData.data.records); + bannerData.addAll(baseData?.data?.records ?? []); refreshController.refreshCompleted(); } else { refreshController.refreshFailed(); @@ -108,15 +96,7 @@ class _ArticlePage extends State }else if(!isHot && !isLoading){ isLoading = true; } - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.queryArticle({ + BaseData>? baseData = await apiService?.queryArticle({ "pageNum": pageNum, "pageSize": 10, "searchKey": "", @@ -128,7 +108,7 @@ class _ArticlePage extends State refreshController.refreshFailed(); refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { refreshController.refreshCompleted(); refreshController.loadComplete(); if (pageNum == 1) { @@ -137,11 +117,12 @@ class _ArticlePage extends State else articleTop.clear(); } - if(!isHot) - articles.addAll(baseData.data.list); - else - articleTop.addAll(baseData.data.list); - if (baseData.data.pageNum == baseData.data.pages && !isHot) { + if(!isHot) { + articles.addAll(baseData?.data?.list ?? []); + } else { + articleTop.addAll(baseData?.data?.list ?? []); + } + if (baseData?.data?.pageNum == baseData?.data?.pages && !isHot) { refreshController.loadNoData(); } else { pageNum += 1; @@ -157,20 +138,11 @@ class _ArticlePage extends State ///文章合集列表 queryHeadlinesList() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.headlinesList().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.headlinesList().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { headlines.clear(); - headlines.addAll(baseData.data); + headlines.addAll(baseData!.data ?? []); headlines.forEach((element) { // collectCourse(element.id); }); @@ -230,7 +202,7 @@ class _ArticlePage extends State left: 0, right: 0, ), - if (brands != null && brands.length > 0) + if (brands.length > 0) Positioned( child: Container( color: Colors.white, diff --git a/lib/community/headlines/headlines_banner.dart b/lib/community/headlines/headlines_banner.dart index 0e98e26f..6a5f1b10 100644 --- a/lib/community/headlines/headlines_banner.dart +++ b/lib/community/headlines/headlines_banner.dart @@ -2,10 +2,8 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/banner.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; @@ -24,7 +22,7 @@ class HeadlinesBanner extends StatefulWidget { } class _HeadlinesBanner extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); List bannerData = []; @@ -54,8 +52,8 @@ class _HeadlinesBanner extends State { bannerClick(widget.bannerData[position]); }, child: MImage( - (widget.bannerData != null && position < widget.bannerData.length) - ? widget.bannerData[position].imgUrl + (position < widget.bannerData.length) + ? "${widget.bannerData[position].imgUrl}" : "", fit: BoxFit.cover, radius: BorderRadius.circular(8), @@ -64,7 +62,7 @@ class _HeadlinesBanner extends State { ), ); }, - itemCount: (widget.bannerData != null && widget.bannerData.length > 0) + itemCount: (widget.bannerData.length > 0) ? widget.bannerData.length : 1), ), @@ -91,8 +89,11 @@ class _HeadlinesBanner extends State { }); break; case 4: - String router = bannerData.content; - if (router.contains("?")) { + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + if (router!.contains("?")) { String params = router.substring(router.indexOf("?")); params = params.replaceAll("?", ""); Map map = jsonDecode(params); @@ -108,9 +109,13 @@ class _HeadlinesBanner extends State { }); break; case 7: - String params = bannerData.content.substring(bannerData.content.indexOf("?")+1); + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?")+1); Map map = jsonDecode(params); - Navigator.of(context).pushNamed(bannerData.content.substring(0,bannerData.content.indexOf("?")), arguments: map); + Navigator.of(context).pushNamed(router.substring(0, router.indexOf("?")), arguments: map); break; } } diff --git a/lib/community/headlines/headlines_collection.dart b/lib/community/headlines/headlines_collection.dart index a485fded..b1559c8c 100644 --- a/lib/community/headlines/headlines_collection.dart +++ b/lib/community/headlines/headlines_collection.dart @@ -1,19 +1,15 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/collect_class_list.dart'; -import 'package:huixiang/retrofit/data/course_list.dart'; -import 'package:huixiang/retrofit/data/headlines_list.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/headlines.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/new_people_reward.dart'; class HeadlinesCollection extends StatefulWidget { - final List headlines; + final List headlines; final List
articles; HeadlinesCollection(this.headlines, this.articles); @@ -25,8 +21,8 @@ class HeadlinesCollection extends StatefulWidget { } class _HeadlinesCollection extends State { - ApiService apiService; - BMFCoordinate latLng; + ApiService? apiService; + BMFCoordinate? latLng; final TextEditingController editingController = TextEditingController(); @@ -59,7 +55,7 @@ class _HeadlinesCollection extends State { ); } - Widget headlinesCollectionItem(HeadlinesList headlines) { + Widget headlinesCollectionItem(Headlines headlines) { return Container( width: 225.w, height:100.h, @@ -84,7 +80,7 @@ class _HeadlinesCollection extends State { child: Opacity( opacity: 0.8, child: MImage( - headlines?.coverImg ?? "", + headlines.coverImg ?? "", width: 225.w, height: 100.h, fit: BoxFit.cover, @@ -122,7 +118,7 @@ class _HeadlinesCollection extends State { ), ), Expanded(child:Text( - headlines?.name ?? "", + headlines.name ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( diff --git a/lib/community/headlines/headlines_column_details.dart b/lib/community/headlines/headlines_column_details.dart index 215a38aa..0bd6ebc6 100644 --- a/lib/community/headlines/headlines_column_details.dart +++ b/lib/community/headlines/headlines_column_details.dart @@ -1,12 +1,10 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:huixiang/data/headlines_details.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/headlines_list.dart'; -import 'package:huixiang/retrofit/data/headlines_list_details.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/headlines.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -14,10 +12,9 @@ import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class HeadlinesColumnDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; HeadlinesColumnDetails({this.arguments}); @@ -29,10 +26,10 @@ class HeadlinesColumnDetails extends StatefulWidget { class _HeadlinesColumnDetails extends State with WidgetsBindingObserver { - ApiService apiService; + ApiService? apiService; List
articles = []; - HeadlinesListDetails headlinesListDetails; - List headlines = []; + HeadlinesDetails? headlinesListDetails; + List headlines = []; final RefreshController refreshController = RefreshController(); final ScrollController scrollController = ScrollController(); int pageNum = 1; @@ -47,34 +44,18 @@ class _HeadlinesColumnDetails extends State ///文章合集详情 queryHeadlinesDetails(id) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = - await apiService.headlinesDetails(id).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = + await apiService?.headlinesDetails(id).catchError((error) {}); + if (baseData?.isSuccess ?? false) { setState(() { - headlinesListDetails = baseData.data; + headlinesListDetails = baseData!.data; }); } } ///文章列表 queryArticleList(categoryId) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.queryArticle({ + BaseData>? baseData = await apiService?.queryArticle({ "pageNum": pageNum, "pageSize": 10, "searchKey": "", @@ -86,14 +67,14 @@ class _HeadlinesColumnDetails extends State refreshController.refreshFailed(); refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { refreshController.refreshCompleted(); refreshController.loadComplete(); if (pageNum == 1) { articles.clear(); } - articles.addAll(baseData.data.list); - if (baseData.data.pageNum == baseData.data.pages) { + articles.addAll(baseData?.data?.list ?? []); + if (baseData?.data?.pageNum == baseData?.data?.pages) { refreshController.loadNoData(); } else { pageNum += 1; @@ -106,8 +87,8 @@ class _HeadlinesColumnDetails extends State } _onRefresh() { - queryHeadlinesDetails(widget.arguments["id"]); - queryArticleList(widget.arguments["id"]); + queryHeadlinesDetails(widget.arguments?["id"]); + queryArticleList(widget.arguments?["id"]); } @override @@ -146,24 +127,27 @@ class _HeadlinesColumnDetails extends State Stack( children: [ Positioned( - child: Container( - color: Colors.black, - child: Opacity( - opacity: 0.75, - child: MImage( - headlinesListDetails?.bannerImg ?? - "", - width: double.infinity, - height: 260.h, - fit: BoxFit.cover, - errorSrc: - "assets/image/default_1.webp", - fadeSrc: - "assets/image/default_1.webp", - )))), + child: Container( + color: Colors.black, + child: Opacity( + opacity: 0.75, + child: MImage( + headlinesListDetails?.bannerImg ?? "", + width: double.infinity, + height: 260.h, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + ), + ), + ), Container( margin: EdgeInsets.only( - top: 50.h, left: 16.w, right: 16.w), + top: 50.h, + left: 16.w, + right: 16.w, + ), decoration: BoxDecoration( color: Colors.transparent, ), @@ -198,7 +182,9 @@ class _HeadlinesColumnDetails extends State Container( margin: EdgeInsets.only(right: 4), padding: EdgeInsets.only( - left: 2, right: 2), + left: 2, + right: 2, + ), height: 20.h, alignment: Alignment.center, decoration: BoxDecoration( @@ -231,7 +217,7 @@ class _HeadlinesColumnDetails extends State ), ), flex: 1, - ) + ), ], ), ), @@ -254,9 +240,9 @@ class _HeadlinesColumnDetails extends State children: [ Row( mainAxisAlignment: - MainAxisAlignment.start, + MainAxisAlignment.start, crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ Text( "简介:", @@ -269,21 +255,24 @@ class _HeadlinesColumnDetails extends State color: Colors.black, ), ), - Expanded(child:Text( - headlinesListDetails - ?.introduce ?? - "", - overflow: isShowMore - ? TextOverflow.visible - : TextOverflow.ellipsis, - maxLines: isShowMore ? 10 : 2, - style: TextStyle( - fontSize: 14.sp, - height: 1.2.h, - fontWeight: MyFontWeight.medium, - color: Colors.black, + Expanded( + child: Text( + headlinesListDetails + ?.introduce ?? + "", + overflow: isShowMore + ? TextOverflow.visible + : TextOverflow.ellipsis, + maxLines: isShowMore ? 10 : 2, + style: TextStyle( + fontSize: 14.sp, + height: 1.2.h, + fontWeight: + MyFontWeight.medium, + color: Colors.black, + ), ), - ),) + ) ], ), SizedBox(height: 3.h), @@ -294,20 +283,23 @@ class _HeadlinesColumnDetails extends State }); }, child: Row( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.end, + crossAxisAlignment: + CrossAxisAlignment.center, mainAxisSize: MainAxisSize.max, children: [ Text( S.of(context).gengduo, style: TextStyle( fontSize: 12.sp, - fontWeight: MyFontWeight.regular, + fontWeight: + MyFontWeight.regular, color: Colors.black, ), ), Icon( - (isShowMore != null && !isShowMore) + (!isShowMore) ? Icons.chevron_right : Icons.keyboard_arrow_up, color: Colors.black, @@ -326,7 +318,7 @@ class _HeadlinesColumnDetails extends State ), ListView.builder( padding: EdgeInsets.zero, - itemCount: articles == null ? 0 : articles.length, + itemCount: articles?.length ?? 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), @@ -337,8 +329,8 @@ class _HeadlinesColumnDetails extends State .pushNamed('/router/web_page', arguments: { "articleId": articles[position].id }); - articles[position].viewers = - (articles[position].viewers + 1); + int viewers = articles[position].viewers ?? 0; + articles[position].viewers = (viewers + 1); setState(() {}); }, child: articleColumnItem(articles[position]), @@ -381,11 +373,11 @@ class _HeadlinesColumnDetails extends State color: Color(0xFFF5F5F5), ), Padding( - padding: EdgeInsets.all(16), - child: Row( - children: [ - Expanded( - child: Container( + padding: EdgeInsets.all(16), + child: Row( + children: [ + Expanded( + child: Container( height: MediaQuery.of(context).size.width >= 650 ? 133.h : 105, child: Column( @@ -393,7 +385,7 @@ class _HeadlinesColumnDetails extends State mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - articles?.mainTitle ?? "", + articles.mainTitle ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -406,7 +398,7 @@ class _HeadlinesColumnDetails extends State SizedBox(height: 6.h), Expanded( child: Text( - articles?.viceTitle ?? "", + articles.viceTitle ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -441,37 +433,40 @@ class _HeadlinesColumnDetails extends State ), Expanded( child: Text( - "${articles?.viewers}" ?? "", + "${articles.viewers}" ?? "", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, color: Color(0xFF8D8D8D), ), )), - Expanded(child: - Text( - articles?.createTime?.split(":")[0] ?? "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), + Expanded( + child: Text( + articles.createTime?.split(":")[0] ?? "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), ), - ),) + ) ], ), ], ), - )), - SizedBox(width: 12.w), - MImage( - articles?.coverImg ?? "", - fit: BoxFit.cover, - radius: BorderRadius.all(Radius.circular(2)), - width: 100, - height: 100, ), - ], - )), + ), + SizedBox(width: 12.w), + MImage( + articles.coverImg ?? "", + fit: BoxFit.cover, + radius: BorderRadius.all(Radius.circular(2)), + width: 100, + height: 100, + ), + ], + ), + ), ], ), ); diff --git a/lib/community/new_community_details.dart b/lib/community/new_community_details.dart index 993222af..7ead84be 100644 --- a/lib/community/new_community_details.dart +++ b/lib/community/new_community_details.dart @@ -1,17 +1,15 @@ import 'dart:ui'; import 'dart:convert'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/photo_view_gallery_screen.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/member_comment_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/member_comment.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -22,12 +20,11 @@ import 'package:huixiang/web/web_view/comment_list.dart'; import 'package:huixiang/web/web_view/input_comment.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'dart:ui'; import 'community_view/class_details_video.dart'; class NewCommunityDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; NewCommunityDetails({this.arguments}); @@ -38,7 +35,7 @@ class NewCommunityDetails extends StatefulWidget { } class _NewCommunityDetails extends State with WidgetsBindingObserver { - ApiService apiService; + ApiService? apiService; final GlobalKey commentKey = GlobalKey(); final GlobalKey videoKey = GlobalKey(); double height = 0; @@ -51,11 +48,11 @@ class _NewCommunityDetails extends State with WidgetsBindin final GlobalKey inputKey = GlobalKey(); final TextEditingController commentTextController = TextEditingController(); int commentTotal = 0; - List memberList = []; + List memberList = []; bool isShowImg = true; - Article article; - String commentsId; - String userId; + Article? article; + String? commentsId; + String? userId; bool emojiShowing =false; double keyboard = -1; bool needShowSmiley = false; @@ -64,8 +61,8 @@ class _NewCommunityDetails extends State with WidgetsBindin @override void initState() { super.initState(); - commentsId = widget.arguments["commentsId"]; - userId = widget.arguments["userId"]; + commentsId = widget.arguments?["commentsId"]; + userId = widget.arguments?["userId"]; WidgetsBinding.instance.addObserver(this); commentFocus.addListener(_focusNodeListener); queryDetails(commentsId); @@ -74,27 +71,21 @@ class _NewCommunityDetails extends State with WidgetsBindin ///详情接口 queryDetails(id) async { SharedPreferences value = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - BaseData
baseData = await apiService.informationInfo(id) + BaseData
? baseData = await apiService?.informationInfo(id) .catchError((onError) { debugPrint(onError.toString()); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - article = baseData.data; + article = baseData!.data; }); } } ///关注/取关会员 _vipFollow(followId, isFollow) async { - BaseData baseData = await apiService.follow(followId); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.follow(followId); + if (baseData?.isSuccess ?? false) { SmartDialog.showToast(isFollow ? "关注成功" : "取关成功", alignment: Alignment.center); setState(() {}); @@ -226,18 +217,17 @@ class _NewCommunityDetails extends State with WidgetsBindin MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen( images: [ - (article?.authorHeadImg ?? "") - .isEmpty + (article?.authorHeadImg?.isEmpty ?? true) ? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg" - : article?.authorHeadImg + : article!.authorHeadImg ], //传入图片list index: 0, //传入当前点击的图片的index ), - )); + ), + ); }, child: MImage( - (article?.authorHeadImg ?? - ""), + (article?.authorHeadImg ?? ""), width: 44, height: 44, isCircle: true, @@ -278,10 +268,10 @@ class _NewCommunityDetails extends State with WidgetsBindin GestureDetector( onTap: () { setState(() { - article.liked = - !(article.liked ?? false); - _vipFollow(article.author, - article.liked ?? false); + article?.liked = + !(article?.liked ?? false); + _vipFollow(article?.author, + article?.liked ?? false); }); }, child: @@ -344,7 +334,7 @@ class _NewCommunityDetails extends State with WidgetsBindin commentTotal = total; });}, ), - if (memberList == null || memberList.length == 0) + if (memberList.length == 0) Container( width: double.infinity, alignment: Alignment.topCenter, @@ -389,11 +379,11 @@ class _NewCommunityDetails extends State with WidgetsBindin } ///动态内容 - Widget buildMedia(String subjectInfo) { - if (subjectInfo == null || !subjectInfo.startsWith("{")) { + Widget buildMedia(String? subjectInfo) { + if (!(subjectInfo?.startsWith("{") ?? false)) { return Container(); } - var cnt = jsonDecode(subjectInfo); + var cnt = jsonDecode(subjectInfo!); Widget itemWidget = Container(); if (cnt["type"] == "image" && cnt["images"] != null && @@ -503,32 +493,33 @@ class _NewCommunityDetails extends State with WidgetsBindin ///给文章/活动点赞 _queryInformationLikes() async { - BaseData baseData = await apiService.informationLikes(commentsId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - commentKey.currentState.setState(() {}); + BaseData? baseData = await apiService?.informationLikes("${commentsId}").catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + commentKey.currentState?.setState(() {}); setState(() { + int likes = article?.likes ?? 0; if (article?.liked ?? false) - article?.likes -= 1; + article?.likes = likes - 1; else - article?.likes += 1; - article?.liked = !(article.liked ?? false); + article?.likes = likes + 1; + article?.liked = !(article?.liked ?? false); }); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } ///动态发布评论 _queryMemberComment(String content) async { - BaseData baseData = await apiService.memberComment({ + BaseData? baseData = await apiService?.memberComment({ "content": content, "parentId": parenId, "relationalId": commentsId, "relationalType":4 }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - CommentListState state = commentKey.currentState; - state.queryMemberCommentList(); + if (baseData?.isSuccess ?? false) { + CommentListState? state = commentKey.currentState as CommentListState?; + state?.queryMemberCommentList(); commentTextController.text = ""; FocusScope.of(context).unfocus(); _queryMemberCommentList(); @@ -538,10 +529,10 @@ class _NewCommunityDetails extends State with WidgetsBindin ///滑动到评论列表 _toComment() { if (commentKey.currentContext == null) return; - RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); - Offset first = firstRenderBox.localToGlobal(Offset.zero); + RenderBox? firstRenderBox = commentKey.currentContext!.findRenderObject() as RenderBox?; + Offset? first = firstRenderBox?.localToGlobal(Offset.zero); scrollController.animateTo( - first.dy + + (first?.dy ?? 0) + scrollController.offset - (kToolbarHeight + MediaQuery .of(context) @@ -577,10 +568,10 @@ class _NewCommunityDetails extends State with WidgetsBindin ///删除评论 delComment(memberComment) async { - BaseData baseData = await apiService.delComment(memberComment.id); - if (baseData != null && baseData.isSuccess) { - CommentListState state = commentKey.currentState; - state.queryMemberCommentList(); + BaseData? baseData = await apiService?.delComment(memberComment.id); + if (baseData?.isSuccess ?? false) { + CommentListState? state = commentKey.currentState as CommentListState?; + state?.queryMemberCommentList(); } } @@ -594,23 +585,15 @@ class _NewCommunityDetails extends State with WidgetsBindin ///评论列表 _queryMemberCommentList() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: sharedPreferences.getString("token"), - showLoading: false, - ); - BaseData> baseData = - await apiService.memberCommentList({ + BaseData>? baseData = await apiService?.memberCommentList({ "pageNum": 1, "pageSize": 100, "relationalId": commentsId, "relationalType":4, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - commentTotal = baseData.data.size; - memberList = baseData.data.list; + if (baseData?.isSuccess ?? false) { + commentTotal = baseData?.data?.size; + memberList = baseData?.data?.list ?? []; contentHeight(); if (mounted) setState(() {}); } diff --git a/lib/community/order_page.dart b/lib/community/order_page.dart index c73789ee..6aa68f58 100644 --- a/lib/community/order_page.dart +++ b/lib/community/order_page.dart @@ -1,12 +1,9 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/order/order_history_page.dart'; -import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_tab.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class OrderPage extends StatefulWidget { @override @@ -17,7 +14,7 @@ class OrderPage extends StatefulWidget { class _OrderPage extends State with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin { - TabController tabcontroller; + TabController? tabcontroller; List lables = [ "全部", @@ -29,9 +26,6 @@ class _OrderPage extends State @override void initState() { super.initState(); - - if (tabcontroller == null) - tabcontroller = TabController(length: lables.length, vsync: this, initialIndex: 1); } @override diff --git a/lib/community/photo_view_gallery_screen.dart b/lib/community/photo_view_gallery_screen.dart index 1ae25e9d..2fad2c08 100644 --- a/lib/community/photo_view_gallery_screen.dart +++ b/lib/community/photo_view_gallery_screen.dart @@ -7,13 +7,13 @@ import 'package:photo_view/photo_view_gallery.dart'; import 'package:path/path.dart' as p; class PhotoViewGalleryScreen extends StatefulWidget { - List images=[]; + List? images=[]; int index=0; - String heroTag; - PageController controller; + String? heroTag; + PageController? controller; - PhotoViewGalleryScreen({Key key,@required this.images,this.index,this.controller,this.heroTag}) : super(key: key){ - controller=PageController(initialPage: index); + PhotoViewGalleryScreen({Key? key, this.images, this.index = 0, this.controller, this.heroTag}) : super(key: key){ + controller = PageController(initialPage: index); } @override @@ -54,8 +54,8 @@ class _PhotoViewGalleryScreenState extends State { builder: (BuildContext context, int index) { return PhotoViewGalleryPageOptions( imageProvider: NetworkToFileImage( - url: widget.images[index], - file: fileFromDocsDir(widget.images[index].toString() + url: widget.images![index], + file: fileFromDocsDir(widget.images![index].toString() .replaceAll("https://pos.upload.gznl.top/", "").replaceAll("/", "")), debug: true, ), @@ -64,16 +64,15 @@ class _PhotoViewGalleryScreenState extends State { minScale: PhotoViewComputedScale.contained *1, ); }, - itemCount: widget.images.length, + itemCount: widget.images?.length ?? 0, loadingBuilder: (context, progress) => Center( child: Container( width: 20.0, height: 20.0, child: CircularProgressIndicator( - value: progress == null + value: progress == null || (progress.expectedTotalBytes == null && progress.expectedTotalBytes! > 0) ? null - : progress.cumulativeBytesLoaded / - progress.expectedTotalBytes, + : progress.cumulativeBytesLoaded / progress.expectedTotalBytes!, ), ), ), @@ -93,7 +92,13 @@ class _PhotoViewGalleryScreenState extends State { top: MediaQuery.of(context).padding.top+15, width: MediaQuery.of(context).size.width, child: Center( - child: Text("${currentIndex+1}/${widget.images.length}",style: TextStyle(color: Colors.white,fontSize: 16)), + child: Text( + "${currentIndex+1}/${widget.images?.length ?? 0}", + style: TextStyle( + color: Colors.white, + fontSize: 16, + ), + ), ), ), Positioned(//右上角关闭按钮 diff --git a/lib/community/release_dynamic.dart b/lib/community/release_dynamic.dart index 496d24e6..1a04c0f6 100644 --- a/lib/community/release_dynamic.dart +++ b/lib/community/release_dynamic.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; @@ -6,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/address.dart'; +import 'package:huixiang/data/address.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -31,9 +30,9 @@ class _ReleaseDynamic extends State { TextEditingController addressController = TextEditingController(); // TextEditingController houseNumberController = TextEditingController(); - ApiService apiService; - Map addressMap; - Address preAddress; + ApiService? apiService; + Map? addressMap; + Address? preAddress; @override void initState() { @@ -164,12 +163,12 @@ class _ReleaseDynamic extends State { releaseDynamic() async { String dynamicText = textController.text; - if (dynamicText == null || dynamicText == "") { + if (dynamicText == "") { SmartDialog.showToast("请输入您此刻的想法!"); return; } - UploadAsync.upload(dynamicType, mediaPaths, addressController.text, dynamicText); + UploadAsync.upload(dynamicType, mediaPaths, addressController.text, dynamicText, context); Navigator.of(context).pop(); } @@ -187,8 +186,8 @@ class _ReleaseDynamic extends State { borderRadius: BorderRadius.circular(4), child: Image.file( File(media.galleryMode == GalleryMode.video - ? media.thumbPath - : media.path), + ? "${media.thumbPath}" + : "${media.path}"), fit: BoxFit.cover, width: double.infinity, height: double.infinity, @@ -348,12 +347,10 @@ class _ReleaseDynamic extends State { (value) => { setState(() { if (value != null) { - addressMap = value; + addressMap = value as Map; addressController.text = "${(value as Map)['cityInfo']}"; - if (preAddress != null) { - preAddress.cityInfo = addressMap['cityInfo']; - } - // houseNumberController.text = "${(value as Map)['address']}"; + preAddress?.cityInfo = addressMap?['cityInfo']; + // houseNumberController.text = "${(value as Map)['address']}"; } }) }, @@ -387,7 +384,7 @@ class _ReleaseDynamic extends State { color: Color(0xFF4C4C4C), ), onChanged: (text) { - bool release = text != "" && text != null; + bool release = text != ""; if (release != isRelease) { isRelease = release; setState(() {}); @@ -485,8 +482,8 @@ class Medias { this.galleryMode = media.galleryMode; } - String thumbPath; - String path; - GalleryMode galleryMode; - String remotePath; + String? thumbPath; + String? path; + GalleryMode? galleryMode; + String? remotePath; } diff --git a/lib/community/report/report_notice.dart b/lib/community/report/report_notice.dart index 85622864..499279c1 100644 --- a/lib/community/report/report_notice.dart +++ b/lib/community/report/report_notice.dart @@ -1,12 +1,9 @@ -import 'dart:ui'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ReportNotice extends StatefulWidget { @@ -17,7 +14,7 @@ class ReportNotice extends StatefulWidget { } class _ReportNotice extends State { - ApiService apiService; + ApiService? apiService; int checkIndex = 0; @override diff --git a/lib/community/report/report_page.dart b/lib/community/report/report_page.dart index a5fbdab0..8e2040cf 100644 --- a/lib/community/report/report_page.dart +++ b/lib/community/report/report_page.dart @@ -1,20 +1,15 @@ -import 'dart:ui'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class ReportPage extends StatefulWidget { - final Map arguments; + final Map? arguments; ReportPage({this.arguments}); @@ -25,37 +20,29 @@ class ReportPage extends StatefulWidget { } class _ReportPage extends State { - ApiService apiService; + ApiService? apiService; int textLength = 0; final TextEditingController editingController = TextEditingController(); - String textCon; - String userName; - String authorId; + String? textCon; + String? userName; + String? authorId; @override void initState() { super.initState(); - userName = widget.arguments['userName']; - authorId = widget.arguments['authorId']; + userName = widget.arguments?['userName']; + authorId = widget.arguments?['authorId']; } report() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.complaint({ + BaseData? baseData = await apiService?.complaint({ "content": checkIndex == 9 ? editingController.text : textCon, "informationId": authorId, }).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { Navigator.of(context).popAndPushNamed('/router/report_success'); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } diff --git a/lib/community/report/report_success.dart b/lib/community/report/report_success.dart index 6d6bd085..e76f70e2 100644 --- a/lib/community/report/report_success.dart +++ b/lib/community/report/report_success.dart @@ -1,13 +1,10 @@ -import 'dart:ui'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ReportSuccess extends StatefulWidget { @@ -18,7 +15,7 @@ class ReportSuccess extends StatefulWidget { } class _ReportSuccess extends State { - ApiService apiService; + ApiService? apiService; int checkIndex = 0; @override diff --git a/lib/data/achivement_detail_list.dart b/lib/data/achivement_detail_list.dart new file mode 100644 index 00000000..1a0b905c --- /dev/null +++ b/lib/data/achivement_detail_list.dart @@ -0,0 +1,64 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/achivement_detail_list.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/achivement_detail_list.g.dart'; + +@JsonSerializable() +class AchivementDetailList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? categoryId = ''; + String? name = ''; + int? level = 0; + String? icon = ''; + int? score = 0; + bool? actived = false; + int? sort = 0; + int? isDelete = 0; + String? lessScore = ''; + List? rewardList = []; + bool? max = false; + bool? get = false; + + AchivementDetailList(); + + factory AchivementDetailList.fromJson(Map json) => $AchivementDetailListFromJson(json); + + Map toJson() => $AchivementDetailListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class RewardList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? categoryId = ''; + String? achievementId = ''; + int? rewardType = 0; + String? refId = ''; + int? isDelete = 0; + dynamic achievementCategoryName; + dynamic achievementName; + dynamic couponName; + + RewardList(); + + factory RewardList.fromJson(Map json) => $RewardListFromJson(json); + + Map toJson() => $RewardListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/act_info.dart b/lib/data/act_info.dart new file mode 100644 index 00000000..6ec70f2c --- /dev/null +++ b/lib/data/act_info.dart @@ -0,0 +1,22 @@ + +import 'package:huixiang/generated/json/act_info.g.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; + +@JsonSerializable() +class ActInfo { + ActInfo(); + + + String? couponDiscountAmount; + int? couponDiscountRate; + String? couponId; + int? couponType; + String? discountAmount; + int? discountRate; + String? promotionId; + int? promotionType; + + factory ActInfo.fromJson(Map json) => $ActInfoFromJson(json); + + Map toJson() => $ActInfoToJson(this); +} diff --git a/lib/data/act_product.dart b/lib/data/act_product.dart new file mode 100644 index 00000000..879f0201 --- /dev/null +++ b/lib/data/act_product.dart @@ -0,0 +1,42 @@ +import 'package:huixiang/data/sku_json.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/act_product.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/act_product.g.dart'; + +@JsonSerializable() +class ActProduct { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? templateId = ''; + String? timeId = ''; + String? productId = ''; + String? productName = ''; + String? productImg = ''; + String? productPrice = ''; + String? promotionPrice = ''; + int? productStock = 0; + int? sellCount = 0; + List? skuJson = []; + int? isDelete = 0; + String? shortName = ''; + String? supplierName = ''; + String? detail = ''; + String? details = ''; + String? rightImg = ''; + + ActProduct(); + + factory ActProduct.fromJson(Map json) => $ActProductFromJson(json); + + Map toJson() => $ActProductToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/act_record.dart b/lib/data/act_record.dart new file mode 100644 index 00000000..6ed35a98 --- /dev/null +++ b/lib/data/act_record.dart @@ -0,0 +1,40 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/act_record.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/act_record.g.dart'; + +@JsonSerializable() +class ActRecord { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + int? type = 0; + String? actTemplateId = ''; + String? actTimeId = ''; + String? actProductId = ''; + String? mid = ''; + int? joinNum = 0; + String? startTime = ''; + String? endTime = ''; + int? state = 0; + int? isDelete = 0; + + int? tempDay = 0; + int? tempHour = 0; + int? tempM = 0; + int? tempS = 0; + + ActRecord(); + + factory ActRecord.fromJson(Map json) => $ActRecordFromJson(json); + + Map toJson() => $ActRecordToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/act_record_and_join_dto_list.dart b/lib/data/act_record_and_join_dto_list.dart new file mode 100644 index 00000000..d2579bb5 --- /dev/null +++ b/lib/data/act_record_and_join_dto_list.dart @@ -0,0 +1,22 @@ +import 'package:huixiang/data/act_record.dart'; +import 'package:huixiang/data/act_record_join_list.dart'; +import 'package:huixiang/generated/json/act_record_and_join_dto_list.g.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'dart:convert'; + +@JsonSerializable() +class ActRecordAndJoinlDTOList { + ActRecord? actRecord; + List? actRecordJoinList = []; + + ActRecordAndJoinlDTOList(); + + factory ActRecordAndJoinlDTOList.fromJson(Map json) => $ActRecordAndJoinlDTOListFromJson(json); + + Map toJson() => $ActRecordAndJoinlDTOListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/act_record_join_list.dart b/lib/data/act_record_join_list.dart new file mode 100644 index 00000000..7bd777d4 --- /dev/null +++ b/lib/data/act_record_join_list.dart @@ -0,0 +1,37 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/act_record_join_list.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/act_record_join_list.g.dart'; + +@JsonSerializable() +class ActRecordJoinList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? actTemplateId = ''; + String? actTimeId = ''; + String? actRecordId = ''; + String? mid = ''; + String? orderId = ''; + bool? isLeader = false; + String? memberAvatar = ''; + String? memberNickname = ''; + String? productId = ''; + String? actPrice = ''; + bool? state = false; + int? isDelete = 0; + + ActRecordJoinList(); + + factory ActRecordJoinList.fromJson(Map json) => $ActRecordJoinListFromJson(json); + + Map toJson() => $ActRecordJoinListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/activity.dart b/lib/data/activity.dart new file mode 100644 index 00000000..1549d42a --- /dev/null +++ b/lib/data/activity.dart @@ -0,0 +1,32 @@ +import 'package:huixiang/generated/json/activity.g.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; + +@JsonSerializable() +class Activity { + Activity(); + + String? id; + String? createTime; + dynamic createUser; + String? updateTime; + dynamic updateUser; + String? storeId; + String? mainTitle; + String? viceTitle; + String? content; + String? coverImg; + String? startTime; + String? endTime; + String? categoryId; + int? state; + int? isDelete; + int? likes; + bool? liked; + int? viewers; + String? storeName; + + factory Activity.fromJson(Map json) => + $ActivityFromJson(json); + + Map toJson() => $ActivityToJson(this); +} diff --git a/lib/data/activity_act_record_details.dart b/lib/data/activity_act_record_details.dart new file mode 100644 index 00000000..d3e32081 --- /dev/null +++ b/lib/data/activity_act_record_details.dart @@ -0,0 +1,30 @@ +import 'package:huixiang/data/act_product.dart'; +import 'package:huixiang/data/act_record.dart'; +import 'package:huixiang/data/act_record_join_list.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/activity_act_record_details.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/activity_act_record_details.g.dart'; + +@JsonSerializable() +class ActivityActRecordDetails { + + ActRecord? actRecord; + List? actRecordJoinList = []; + ActProduct? actProduct; + dynamic skuName; + String? skuId = ''; + bool? isBargain = false; + int? successNumber = 0; + + ActivityActRecordDetails(); + + factory ActivityActRecordDetails.fromJson(Map json) => $ActivityActRecordDetailsFromJson(json); + + Map toJson() => $ActivityActRecordDetailsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/activity_area_list.dart b/lib/data/activity_area_list.dart new file mode 100644 index 00000000..c1de3d63 --- /dev/null +++ b/lib/data/activity_area_list.dart @@ -0,0 +1,101 @@ +import 'package:huixiang/data/shoping_home_config.dart'; +import 'package:huixiang/data/sku_json.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/activity_area_list.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/activity_area_list.g.dart'; + +@JsonSerializable() +class ActivityAreaList { + ActTemplate? actTemplate; + List? timeProductList = []; + + ActivityAreaList(); + + factory ActivityAreaList.fromJson(Map json) => $ActivityAreaListFromJson(json); + + Map toJson() => $ActivityAreaListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ActTemplate { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? actName = ''; + String? actDesc = ''; + int? type = 0; + int? limitTime = 0; + int? limitNumber = 0; + String? coverImg = ''; + String? shareImg = ''; + String? bannerImg = ''; + int? state = 0; + bool? allDay = false; + String? startTime = ''; + String? endTime = ''; + int? isDelete = 0; + + ActTemplate(); + + factory ActTemplate.fromJson(Map json) => $ActTemplateFromJson(json); + + Map toJson() => $ActTemplateToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class TimeProductList { + ActTime? actTime; + List? productList = []; + + TimeProductList(); + + factory TimeProductList.fromJson(Map json) => $TimeProductListFromJson(json); + + Map toJson() => $TimeProductListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ActTime { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? templateId = ''; + bool? allDay = false; + dynamic startHour; + dynamic endHour; + int? isDelete = 0; + + ActTime(); + + factory ActTime.fromJson(Map json) => $ActTimeFromJson(json); + + Map toJson() => $ActTimeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/activity_details.dart b/lib/data/activity_details.dart new file mode 100644 index 00000000..43242b45 --- /dev/null +++ b/lib/data/activity_details.dart @@ -0,0 +1,32 @@ +import 'package:huixiang/data/act_product.dart'; +import 'package:huixiang/data/act_record_and_join_dto_list.dart'; +import 'package:huixiang/generated/json/activity_details.g.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; + + + +/// actProduct : {"id":"1479377402042777600","createTime":"2022-01-07 17:00:33","createUser":"1364043181062094848","updateTime":"2022-01-07 17:00:33","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1479377328797646848","timeId":"1479377329099636736","productId":"1460886580993458176","productName":"无花果礼盒","productImg":"https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png","productPrice":"88.00","promotionPrice":"88.00","productStock":0,"sellCount":0,"skuJson":[{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}],"isDelete":0} +/// actRecordAndJoinlDTOList : [{"actRecord":{"id":"1479399513473941504","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1478548720785031168","joinNum":0,"startTime":"2022-01-07 18:28:25","endTime":"2022-01-08 16:28:25","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479399514073726976","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479399513473941504","mid":"1478548720785031168","orderId":"1479399514677706752","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]},{"actRecord":{"id":"1479401111025614848","createTime":"2022-01-07 18:34:45","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:45","updateUser":"1468903135782109184","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1468903135782109184","joinNum":0,"startTime":"2022-01-07 18:34:45","endTime":"2022-01-08 16:34:45","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479401111688314880","createTime":"2022-01-07 18:34:46","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:46","updateUser":"1468903135782109184","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479401111025614848","mid":"1468903135782109184","orderId":"1479401112292294656","isLeader":true,"memberAvatar":"https://pos.upload.gznl.top/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg","memberNickname":"哈哈哈","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]}] + +@JsonSerializable() +class ActivityDetails { + + String? endTime; + ActProduct? actProduct; + List? actRecordAndJoinlDTOList; + + ActivityDetails({ + this.endTime, + this.actProduct, + this.actRecordAndJoinlDTOList, + }); + + factory ActivityDetails.fromJson(Map json) => $ActivityDetailsFromJson(json); + + Map toJson() => $ActivityDetailsToJson(this); + +} + + + + diff --git a/lib/data/activity_order.dart b/lib/data/activity_order.dart new file mode 100644 index 00000000..62382e46 --- /dev/null +++ b/lib/data/activity_order.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/activity_order.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/activity_order.g.dart'; + +@JsonSerializable() +class ActivityOrder { + String? storeId = ''; + String? storeName = ''; + String? joinTime = ''; + String? productImg = ''; + String? productName = ''; + String? productSkuName = ''; + String? actRecordId = ''; + int? actRecordState = 0; + bool? actRecordJoinState = false; + int? howManyMore = 0; + int? successNumber = 0; + dynamic orderSum; + dynamic bargainMoney; + dynamic howManyMoney; + + ActivityOrder(); + + factory ActivityOrder.fromJson(Map json) => $ActivityOrderFromJson(json); + + Map toJson() => $ActivityOrderToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/activity_pos.dart b/lib/data/activity_pos.dart new file mode 100644 index 00000000..39b99d1c --- /dev/null +++ b/lib/data/activity_pos.dart @@ -0,0 +1,24 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/activity_pos.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/activity_pos.g.dart'; + +@JsonSerializable() +class ActivityPos { + bool? enabled = false; + String? code = ''; + String? showImage = ''; + int? jumpType = 0; + String? jumpUrl = ''; + + ActivityPos(); + + factory ActivityPos.fromJson(Map json) => $ActivityPosFromJson(json); + + Map toJson() => $ActivityPosToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/add_vip_info.dart b/lib/data/add_vip_info.dart new file mode 100644 index 00000000..83ea18c3 --- /dev/null +++ b/lib/data/add_vip_info.dart @@ -0,0 +1,52 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/add_vip_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/add_vip_info.g.dart'; + +@JsonSerializable() +class AddVipInfo { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + dynamic masterId; + String? openid = ''; + dynamic aliOpenid; + dynamic douyinOpenid; + dynamic nickname; + dynamic headimg; + dynamic rankId; + dynamic rankExpireTime; + dynamic balance; + dynamic realRecharge; + dynamic sex; + dynamic status; + dynamic onCredit; + String? loginTime = ''; + dynamic loginNum; + dynamic tenantCode; + dynamic source; + dynamic expendAmount; + dynamic buyTimes; + dynamic lastBuyTime; + @JSONField(name: "vip_no") + String? vipNo = ''; + String? expireTime = ''; + dynamic integral; + dynamic level; + dynamic vipRegStore; + dynamic certification; + + AddVipInfo(); + + factory AddVipInfo.fromJson(Map json) => $AddVipInfoFromJson(json); + + Map toJson() => $AddVipInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/additional_comment.dart b/lib/data/additional_comment.dart new file mode 100644 index 00000000..7c72251d --- /dev/null +++ b/lib/data/additional_comment.dart @@ -0,0 +1,33 @@ + +import 'package:huixiang/generated/json/additional_comment.g.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; + +@JsonSerializable() +class AdditionalComment { + AdditionalComment(); + + int? bizType; + String? commentImgs; + bool? commentImgsFlag; + int? commentStar; + String? commentText; + int? descStar; + bool? hideFlag; + int? id; + bool? isDelete; + int? likeNum; + int? logisticsStar; + int? mid; + int? orderProductId; + int? parentId; + int? productId; + bool? sensitiveFlag; + int? serviceStar; + int? storeId; + + factory AdditionalComment.fromJson(Map json) => + $AdditionalCommentFromJson(json); + + Map toJson() => $AdditionalCommentToJson(this); +} + diff --git a/lib/data/address.dart b/lib/data/address.dart new file mode 100644 index 00000000..b0ac3e2a --- /dev/null +++ b/lib/data/address.dart @@ -0,0 +1,27 @@ + +import 'package:huixiang/generated/json/address.g.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; + +@JsonSerializable() +class Address { + Address(); + + @JSONField(name: "address") + String? addressStr; + String? area; + String? city; + String? cityInfo; + String? id; + bool? isDefault; + String? latitude; + String? longitude; + String? mid; + String? phone; + String? province; + String? tag; + String? username; + + factory Address.fromJson(Map json) => $AddressFromJson(json); + + Map toJson() => $AddressToJson(this); +} diff --git a/lib/data/app_update.dart b/lib/data/app_update.dart new file mode 100644 index 00000000..cbeaf823 --- /dev/null +++ b/lib/data/app_update.dart @@ -0,0 +1,23 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/app_update.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/app_update.g.dart'; + +@JsonSerializable() +class AppUpdate { + String? appLastVersion = ''; + String? appLastVersionUrl = ''; + String? appLastVersionUp = ''; + String? appLastVersionExplain = ''; + + AppUpdate(); + + factory AppUpdate.fromJson(Map json) => $AppUpdateFromJson(json); + + Map toJson() => $AppUpdateToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/article.dart b/lib/data/article.dart new file mode 100644 index 00000000..86e5f036 --- /dev/null +++ b/lib/data/article.dart @@ -0,0 +1,51 @@ +import 'package:huixiang/data/author.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/article.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/article.g.dart'; + +@JsonSerializable() +class Article { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? categoryId = ''; + String? mainTitle = ''; + dynamic viceTitle; + String? content = ''; + String? coverImg = ''; + Author? author; + int? type = 0; + int? likes = 0; + int? viewers = 0; + String? startTime = ''; + String? endTime = ''; + bool? isHot = false; + int? state = 0; + String? location = ''; + String? longitude = ''; + String? latitude = ''; + String? remark = ''; + int? isDelete = 0; + String? tenantCode = ''; + dynamic storeName; + bool? liked = false; + bool? followed = false; + dynamic comments; + String? authorName = ''; + String? authorHeadImg = ''; + + Article(); + + factory Article.fromJson(Map json) => $ArticleFromJson(json); + + Map toJson() => $ArticleToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/author.dart b/lib/data/author.dart new file mode 100644 index 00000000..f10503a8 --- /dev/null +++ b/lib/data/author.dart @@ -0,0 +1,21 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/author.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/author.g.dart'; + +@JsonSerializable() +class Author { + String? name = ''; + String? avatar = ''; + + Author(); + + factory Author.fromJson(Map json) => $AuthorFromJson(json); + + Map toJson() => $AuthorToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/balance_change_list.dart b/lib/data/balance_change_list.dart new file mode 100644 index 00000000..743dcde0 --- /dev/null +++ b/lib/data/balance_change_list.dart @@ -0,0 +1,43 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/balance_change_list.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/balance_change_list.g.dart'; + +@JsonSerializable() +class BalanceChangeRecords { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? linkId = ''; + int? pm = 0; + String? title = ''; + String? category = ''; + String? type = ''; + String? number = ''; + String? realNumber = ''; + String? balance = ''; + String? mark = ''; + bool? status = false; + bool? isDeleted = false; + String? storeName = ''; + String? nickname = ''; + String? phone = ''; + dynamic startTime; + dynamic endTime; + dynamic tenantCode; + dynamic storeId; + + BalanceChangeRecords(); + + factory BalanceChangeRecords.fromJson(Map json) => $BalanceChangeRecordsFromJson(json); + + Map toJson() => $BalanceChangeRecordsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/balance_consumption_ranking.dart b/lib/data/balance_consumption_ranking.dart new file mode 100644 index 00000000..5857efb0 --- /dev/null +++ b/lib/data/balance_consumption_ranking.dart @@ -0,0 +1,23 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/balance_consumption_ranking.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/balance_consumption_ranking.g.dart'; + +@JsonSerializable() +class BalanceConsumptionRanking { + String? id = ''; + String? name = ''; + String? phone = ''; + String? money = ''; + + BalanceConsumptionRanking(); + + factory BalanceConsumptionRanking.fromJson(Map json) => $BalanceConsumptionRankingFromJson(json); + + Map toJson() => $BalanceConsumptionRankingToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/banner.dart b/lib/data/banner.dart new file mode 100644 index 00000000..7f17ede9 --- /dev/null +++ b/lib/data/banner.dart @@ -0,0 +1,28 @@ +import 'package:huixiang/generated/json/banner.g.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; + +@JsonSerializable() +class BannerData { + String? content; + String? createTime; + int? contentType; + String? createUser; + String? id; + String? imgUrl; + bool? isDelete; + String? storeId; + String? tenantCode; + String? type; + String? updateTime; + String? updateUser; + + BannerData({this.content, this.createTime, this.contentType, this.createUser, this.id, this.imgUrl, this.isDelete, this.storeId, this.tenantCode, this.type, this.updateTime, this.updateUser}); + + factory BannerData.fromJson(Map json) => + $BannerDataFromJson(json); + + Map toJson() => $BannerDataToJson(this); + + +} + diff --git a/lib/data/base_data.dart b/lib/data/base_data.dart new file mode 100644 index 00000000..5253300c --- /dev/null +++ b/lib/data/base_data.dart @@ -0,0 +1,31 @@ + +import 'package:huixiang/generated/json/base_data.g.dart'; +import 'package:json_annotation/json_annotation.dart'; + +@JsonSerializable() +class BaseData { + + BaseData({ + this.code, + this.data, + this.extra, + this.isSuccess, + this.msg, + this.path, + this.timestamp, +}); + + int? code; + T? data; + dynamic extra; + bool? isError; + bool? isSuccess; + String? msg; + String? path; + String? timestamp; + + factory BaseData.fromJson(Map json) => $BaseDataFromJson(json); + + Map toJson() => $BaseDataToJson(this); + +} diff --git a/lib/data/brand.dart b/lib/data/brand.dart new file mode 100644 index 00000000..c81aeffa --- /dev/null +++ b/lib/data/brand.dart @@ -0,0 +1,27 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/brand.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/brand.g.dart'; + +@JsonSerializable() +class Brand { + String? name = ''; + String? image = ''; + String? video = ''; + String? desc = ''; + String? content = ''; + String? icon = ''; + int? sort = 0; + String? storeId = ''; + + Brand(); + + factory Brand.fromJson(Map json) => $BrandFromJson(json); + + Map toJson() => $BrandToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/brand_data.dart b/lib/data/brand_data.dart new file mode 100644 index 00000000..cdbcfd30 --- /dev/null +++ b/lib/data/brand_data.dart @@ -0,0 +1,26 @@ + +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/brand_data.g.dart'; + +@JsonSerializable() +class BrandData { + + BrandData(); + + List? bannerList; + String? company; + String? companyDesc; + String? originAvatar; + String? originDesc; + String? originator; + bool? inviteNewShow; + + dynamic contents; + dynamic ideals; + + factory BrandData.fromJson(Map json) => + $BrandDataFromJson(json); + + Map toJson() => $BrandDataToJson(this); +} \ No newline at end of file diff --git a/lib/data/bus_recharge.dart b/lib/data/bus_recharge.dart new file mode 100644 index 00000000..6816c341 --- /dev/null +++ b/lib/data/bus_recharge.dart @@ -0,0 +1,36 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/bus_recharge.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/bus_recharge.g.dart'; + +@JsonSerializable() +class BusRecharge { + String? id = ''; + String? rechargeMoney = ''; + String? giftdMoney = ''; + int? limitNum = 0; + dynamic gitfdCouponId; + dynamic startDate; + dynamic endDate; + dynamic startTime; + dynamic endTime; + String? tenantCode = ''; + String? createTime = ''; + int? isDeleted = 0; + int? rechargeType = 0; + String? remark = ''; + int? sortValue = 0; + int? useNum = 0; + dynamic mid; + + BusRecharge(); + + factory BusRecharge.fromJson(Map json) => $BusRechargeFromJson(json); + + Map toJson() => $BusRechargeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/category_select.dart b/lib/data/category_select.dart new file mode 100644 index 00000000..bb4c7308 --- /dev/null +++ b/lib/data/category_select.dart @@ -0,0 +1,28 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/category_select.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/category_select.g.dart'; + +@JsonSerializable() +class CategorySelect { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? name = ''; + bool? isTop = false; + int? sort = 0; + int? isDelete = 0; + + CategorySelect(); + + factory CategorySelect.fromJson(Map json) => $CategorySelectFromJson(json); + + Map toJson() => $CategorySelectToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/channels.dart b/lib/data/channels.dart new file mode 100644 index 00000000..64e9de4a --- /dev/null +++ b/lib/data/channels.dart @@ -0,0 +1,25 @@ +import 'package:huixiang/data/preferential.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/channels.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/channels.g.dart'; + +@JsonSerializable() +class Channels { + + @JSONField(name: "channels") + List? channel = []; + bool? isOpen = false; + List? preferentialList = []; + + Channels(); + + factory Channels.fromJson(Map json) => $ChannelsFromJson(json); + + Map toJson() => $ChannelsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/chapter.dart b/lib/data/chapter.dart new file mode 100644 index 00000000..611c5908 --- /dev/null +++ b/lib/data/chapter.dart @@ -0,0 +1,47 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/chapter.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/chapter.g.dart'; + +@JsonSerializable() +class Chapter { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? courseId = ''; + String? name = ''; + Content? content; + int? sort = 0; + int? isDelete = 0; + + Chapter(); + + factory Chapter.fromJson(Map json) => $ChapterFromJson(json); + + Map toJson() => $ChapterToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Content { + String? coverImg = ''; + String? remark = ''; + String? fileUrl = ''; + + Content(); + + factory Content.fromJson(Map json) => $ContentFromJson(json); + + Map toJson() => $ContentToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/clerk_manage.dart b/lib/data/clerk_manage.dart new file mode 100644 index 00000000..64c3ec4d --- /dev/null +++ b/lib/data/clerk_manage.dart @@ -0,0 +1,111 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/clerk_manage.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/clerk_manage.g.dart'; + +@JsonSerializable() +class ClerkManage { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? account = ''; + String? name = ''; + dynamic org; + dynamic station; + int? type = 0; + String? email = ''; + String? mobile = ''; + Sex? sex; + bool? status = false; + String? avatar = ''; + Nation? nation; + Education? education; + PositionStatus? positionStatus; + String? workDescribe = ''; + dynamic passwordErrorLastTime; + int? passwordErrorNum = 0; + dynamic passwordExpireTime; + String? password = ''; + dynamic lastLoginTime; + + ClerkManage(); + + factory ClerkManage.fromJson(Map json) => $ClerkManageFromJson(json); + + Map toJson() => $ClerkManageToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Sex { + String? desc = ''; + String? code = ''; + + Sex(); + + factory Sex.fromJson(Map json) => $SexFromJson(json); + + Map toJson() => $SexToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Nation { + dynamic key; + String? data = ''; + + Nation(); + + factory Nation.fromJson(Map json) => $NationFromJson(json); + + Map toJson() => $NationToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Education { + dynamic key; + String? data = ''; + + Education(); + + factory Education.fromJson(Map json) => $EducationFromJson(json); + + Map toJson() => $EducationToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class PositionStatus { + dynamic key; + String? data = ''; + + PositionStatus(); + + factory PositionStatus.fromJson(Map json) => $PositionStatusFromJson(json); + + Map toJson() => $PositionStatusToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/collect_class.dart b/lib/data/collect_class.dart new file mode 100644 index 00000000..d7ccfc78 --- /dev/null +++ b/lib/data/collect_class.dart @@ -0,0 +1,28 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/collect_class.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/collect_class.g.dart'; + +@JsonSerializable() +class CollectClass { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? name = ''; + int? sort = 0; + bool? enabled = false; + int? isDelete = 0; + + CollectClass(); + + factory CollectClass.fromJson(Map json) => $CollectClassFromJson(json); + + Map toJson() => $CollectClassToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/comment.dart b/lib/data/comment.dart new file mode 100644 index 00000000..6b6dc2eb --- /dev/null +++ b/lib/data/comment.dart @@ -0,0 +1,38 @@ + +import 'dart:convert'; + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/comment.g.dart'; + +@JsonSerializable() +class Comment { + int? bizType = 0; + String? commentImgs = ''; + bool? commentImgsFlag = false; + int? commentStar = 0; + String? commentText = ''; + int? descStar = 0; + bool? hideFlag = false; + int? id = 0; + bool? isDelete = false; + int? likeNum = 0; + int? logisticsStar = 0; + int? mid = 0; + int? orderProductId = 0; + int? parentId = 0; + int? productId = 0; + bool? sensitiveFlag = false; + int? serviceStar = 0; + int? storeId = 0; + + Comment(); + + factory Comment.fromJson(Map json) => $CommentFromJson(json); + + Map toJson() => $CommentToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/comunity_comment.dart b/lib/data/comunity_comment.dart new file mode 100644 index 00000000..eb086785 --- /dev/null +++ b/lib/data/comunity_comment.dart @@ -0,0 +1,66 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/comunity_comment.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/comunity_comment.g.dart'; + +@JsonSerializable() +class ComunityComment { + String? id = ''; + String? subject = ''; + String? location = ''; + SubjectInfo? subjectInfo; + ComunityMemberInfo? memberInfo; + int? likes = 0; + int? viewers = 0; + int? comments = 0; + bool? selfLike = false; + bool? selfFollow = false; + String? createTime = ''; + + ComunityComment(); + + factory ComunityComment.fromJson(Map json) => $ComunityCommentFromJson(json); + + Map toJson() => $ComunityCommentToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class SubjectInfo { + String? type = ''; + List? images = []; + String? video = ''; + + SubjectInfo(); + + factory SubjectInfo.fromJson(Map json) => $SubjectInfoFromJson(json); + + Map toJson() => $SubjectInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ComunityMemberInfo { + dynamic mid; + dynamic nickname; + String? avatar = ''; + + ComunityMemberInfo(); + + factory ComunityMemberInfo.fromJson(Map json) => $ComunityMemberInfoFromJson(json); + + Map toJson() => $ComunityMemberInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/coupon.dart b/lib/data/coupon.dart new file mode 100644 index 00000000..49dbd1e2 --- /dev/null +++ b/lib/data/coupon.dart @@ -0,0 +1,46 @@ +import 'package:huixiang/data/store.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/coupon.g.dart'; + +@JsonSerializable() +class Coupon { + Coupon(); + + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + int? bizType; + String? fullAmount; + String? discountAmount; + int? discountPercent; + String? bizId; + String? publishStartTime; + String? publishEndTime; + String? useStartTime; + String? useEndTime; + String? promotionId; + bool? centreDisplay; + bool? allProduct; + String? tenantCode; + String? remark; + String? tenantName; + int? isDelete; + String? couponName; + String? limitAmount; + String? couponImg; + String? couponDescription; + String? memberCouponId; + String? receiveTime; + String? storeId; + dynamic useTime; + int? status; + List? storeList; + @JSONField(serialize: false, deserialize: false) + bool isEx = false; + + factory Coupon.fromJson(Map json) => $CouponFromJson(json); + + Map toJson() => $CouponToJson(this); +} \ No newline at end of file diff --git a/lib/data/coupon_detail.dart b/lib/data/coupon_detail.dart new file mode 100644 index 00000000..71f3e633 --- /dev/null +++ b/lib/data/coupon_detail.dart @@ -0,0 +1,34 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/coupon_detail.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/coupon_detail.g.dart'; + +@JsonSerializable() +class CouponDetail { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? couponId = ''; + String? receiveTime = ''; + dynamic useTime; + String? useTimeStart = ''; + String? useTimeEnd = ''; + int? status = 0; + bool? isDeleted = false; + String? tenantCode = ''; + String? couponCode = ''; + + CouponDetail(); + + factory CouponDetail.fromJson(Map json) => $CouponDetailFromJson(json); + + Map toJson() => $CouponDetailToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/coupon_list.dart b/lib/data/coupon_list.dart new file mode 100644 index 00000000..9782732e --- /dev/null +++ b/lib/data/coupon_list.dart @@ -0,0 +1,44 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/coupon_list.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/coupon_list.g.dart'; + +@JsonSerializable() +class CouponList { + String? id = ''; + String? storeId = ''; + int? bizType = 0; + String? fullAmount = ''; + String? discountAmount = ''; + int? fullNumber = 0; + int? discountPercent = 0; + String? bizId = ''; + String? publishStartTime = ''; + String? publishEndTime = ''; + String? useStartTime = ''; + String? useEndTime = ''; + String? promotionId = ''; + String? mid = ''; + String? couponId = ''; + String? receiveTime = ''; + dynamic useTime; + int? status = 0; + String? tenantCode = ''; + int? type = 0; + String? promotionName = ''; + bool? usable = false; + bool? allProduct = false; + bool? isMaxCoupon = false; + dynamic productList; + + CouponList(); + + factory CouponList.fromJson(Map json) => $CouponListFromJson(json); + + Map toJson() => $CouponListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/coupon_vo.dart b/lib/data/coupon_vo.dart new file mode 100644 index 00000000..86738611 --- /dev/null +++ b/lib/data/coupon_vo.dart @@ -0,0 +1,40 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/coupon_vo.g.dart'; + +@JsonSerializable() +class CouponVo { + String? bizId; + num? bizType; + bool? centreDisplay; + String? couponDescription; + String? couponImg; + String? couponName; + String? createTime; + String? createUser; + String? discountAmount; + num? discountPercent; + String? fullAmount; + String? id; + num? isDelete; + String? memberCouponId; + String? promotionId; + String? publishEndTime; + String? publishStartTime; + String? receiveTime; + bool? received; + num? status; + String? tenantCode; + String? updateTime; + String? updateUser; + String? useEndTime; + String? useStartTime; + String? useTime; + + CouponVo({this.bizId, this.bizType, this.centreDisplay, this.couponDescription, this.couponImg, this.couponName, this.createTime, this.createUser, this.discountAmount, this.discountPercent, this.fullAmount, this.id, this.isDelete, this.memberCouponId, this.promotionId, this.publishEndTime, this.publishStartTime, this.receiveTime, this.received, this.status, this.tenantCode, this.updateTime, this.updateUser, this.useEndTime, this.useStartTime, this.useTime}); + + factory CouponVo.fromJson(Map json) => + $CouponVoFromJson(json); + + Map toJson() => $CouponVoToJson(this); +} + diff --git a/lib/data/course.dart b/lib/data/course.dart new file mode 100644 index 00000000..8048f4fa --- /dev/null +++ b/lib/data/course.dart @@ -0,0 +1,35 @@ +import 'package:huixiang/data/author.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/course.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/course.g.dart'; + +@JsonSerializable() +class Course { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? categoryId = ''; + String? subject = ''; + List? tags = []; + String? coverImg = ''; + Author? author; + String? introduce = ''; + int? viewers = 0; + int? likes = 0; + bool? state = false; + int? isDelete = 0; + + Course(); + + factory Course.fromJson(Map json) => $CourseFromJson(json); + + Map toJson() => $CourseToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/course_details.dart b/lib/data/course_details.dart new file mode 100644 index 00000000..b94b3b2a --- /dev/null +++ b/lib/data/course_details.dart @@ -0,0 +1,37 @@ +import 'package:huixiang/data/author.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/course_details.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/course_details.g.dart'; + +@JsonSerializable() +class CourseDetails { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? categoryId = ''; + String? subject = ''; + List? tags = []; + String? coverImg = ''; + Author? author; + String? introduce = ''; + int? viewers = 0; + int? likes = 0; + bool? selfLiked = false; + bool? state = false; + int? isDelete = 0; + + CourseDetails(); + + factory CourseDetails.fromJson(Map json) => $CourseDetailsFromJson(json); + + Map toJson() => $CourseDetailsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/dat_count.dart b/lib/data/dat_count.dart new file mode 100644 index 00000000..9af572c2 --- /dev/null +++ b/lib/data/dat_count.dart @@ -0,0 +1,37 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/dat_count.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/dat_count.g.dart'; + +@JsonSerializable() +class DatCount { + String? summaryDate = ''; + String? dayMoney = ''; + String? discountSum = ''; + String? paySum = ''; + String? rechargeMoney = ''; + String? refundMoney = ''; + int? orderNum = 0; + int? rechargeOrderNum = 0; + int? refundOrderNum = 0; + int? payOrderNum = 0; + int? discountOrderNum = 0; + dynamic startDate; + dynamic endDate; + dynamic tablePerConsumption; + int? numberOfPeople = 0; + String? peoplePerConsumption = ''; + dynamic realDiscountPer; + dynamic tableRate; + + DatCount(); + + factory DatCount.fromJson(Map json) => $DatCountFromJson(json); + + Map toJson() => $DatCountToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/data_type.dart b/lib/data/data_type.dart new file mode 100644 index 00000000..75e54c46 --- /dev/null +++ b/lib/data/data_type.dart @@ -0,0 +1,15 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/data_type.g.dart'; + +@JsonSerializable() +class DataType { + DataType(); + + String? desc; + String? code; + + factory DataType.fromJson(Map json) => + $DataTypeFromJson(json); + + Map toJson() => $DataTypeToJson(this); +} diff --git a/lib/data/day_flow.dart b/lib/data/day_flow.dart new file mode 100644 index 00000000..47c435aa --- /dev/null +++ b/lib/data/day_flow.dart @@ -0,0 +1,27 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/day_flow.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/day_flow.g.dart'; + +@JsonSerializable() +class DayFlow { + dynamic localDate; + String? localDateTime = ''; + int? count = 0; + String? amount = ''; + String? refundAmount = ''; + String? storeName = ''; + dynamic nickname; + dynamic phone; + + DayFlow(); + + factory DayFlow.fromJson(Map json) => $DayFlowFromJson(json); + + Map toJson() => $DayFlowToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/delivery_info.dart b/lib/data/delivery_info.dart new file mode 100644 index 00000000..2323aaca --- /dev/null +++ b/lib/data/delivery_info.dart @@ -0,0 +1,21 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/delivery_info.g.dart'; + +@JsonSerializable() +class DeliveryInfo { + bool? dadaRegStatus; + String? dadaSourceId; + bool? dadaStatus; + bool? dianwodaRegStatus; + bool? dianwodaStatus; + bool? meituanRegStatus; + bool? meituanStatus; + + DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus}); + + factory DeliveryInfo.fromJson(Map json) => + $DeliveryInfoFromJson(json); + + Map toJson() => $DeliveryInfoToJson(this); +} + diff --git a/lib/data/down_order.dart b/lib/data/down_order.dart new file mode 100644 index 00000000..bf80bdc3 --- /dev/null +++ b/lib/data/down_order.dart @@ -0,0 +1,60 @@ +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/down_order.g.dart'; + +@JsonSerializable() +class DownOrder { + DownOrder({ + this.id, + this.orderCode, + this.storeId, + this.storeName, + this.orderStatus, + this.returnType, + this.shipperCode, + this.logisticsNum, + this.orderSum, + this.accountPay, + this.discountAmount, + this.postFee, + this.paySum, + this.overTime, + this.orderProductVOList, + this.moneyReturnList, + this.goodsReturnList, + this.tablePrice, + this.parentCode, + this.parentId, + this.peopleNum, + this.orderSource, + }); + + String? id; + String? orderCode; + dynamic storeId; + dynamic storeName; + dynamic orderStatus; + dynamic returnType; + dynamic shipperCode; + dynamic logisticsNum; + String? orderSum; + dynamic accountPay; + dynamic discountAmount; + dynamic postFee; + dynamic paySum; + dynamic overTime; + List? orderProductVOList; + dynamic moneyReturnList; + dynamic goodsReturnList; + dynamic tablePrice; + dynamic parentCode; + String? parentId; + dynamic peopleNum; + int? orderSource; + + factory DownOrder.fromJson(Map json) => + $DownOrderFromJson(json); + + Map toJson() => $DownOrderToJson(this); +} + diff --git a/lib/retrofit/data/examine_instance.dart b/lib/data/examine_instance.dart similarity index 61% rename from lib/retrofit/data/examine_instance.dart rename to lib/data/examine_instance.dart index 63954b33..8b582c56 100644 --- a/lib/retrofit/data/examine_instance.dart +++ b/lib/data/examine_instance.dart @@ -5,12 +5,11 @@ class ExamineInstance{ static ExamineInstance get instance => _getInstance(); - static ExamineInstance _instance; + static ExamineInstance? _instance; - bool _isExamine; + late bool _isExamine; - bool get isExamine => - _isExamine; + bool get isExamine => _isExamine; set isExamine(bool value) { this._isExamine = value; @@ -22,10 +21,10 @@ class ExamineInstance{ } static ExamineInstance _getInstance(){ - if(_instance == null){ - _instance = ExamineInstance._internal(); - } - return _instance; + if (_instance == null) { + _instance = ExamineInstance._internal(); + } + return _instance!; } } \ No newline at end of file diff --git a/lib/data/exchange_order.dart b/lib/data/exchange_order.dart new file mode 100644 index 00000000..a353780b --- /dev/null +++ b/lib/data/exchange_order.dart @@ -0,0 +1,34 @@ +import 'package:huixiang/data/exchange_order_goods.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/exchange_order.g.dart'; + +@JsonSerializable() +class ExchangeOrder { + ExchangeOrder(); + + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + String? storeId; + String? mid; + String? orderCode; + String? amount; + String? money; + int? payStatus; + int? payType; + int? sendStatus; + String? address; + String? storeName; + String? recAddress; + int? state; + int? useTyped; + int? isDelete; + List? creditOrderDetailList; + + factory ExchangeOrder.fromJson(Map json) => + $ExchangeOrderFromJson(json); + + Map toJson() => $ExchangeOrderToJson(this); +} diff --git a/lib/data/exchange_order_goods.dart b/lib/data/exchange_order_goods.dart new file mode 100644 index 00000000..37ce8c1b --- /dev/null +++ b/lib/data/exchange_order_goods.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/exchange_order_goods.g.dart'; + +@JsonSerializable() +class ExchangeOrderGoods { + ExchangeOrderGoods(); + + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + String? orderId; + String? goodsId; + String? categoryId; + String? name; + String? description; + String? worth; + String? price; + String? money; + String? couponId; + bool? canPick; + bool? canDelivery; + String? goodsMainImg; + String? goodsViceImg; + int? goodsNumber; + int? isDelete; + + factory ExchangeOrderGoods.fromJson(Map json) => + $ExchangeOrderGoodsFromJson(json); + + Map toJson() => $ExchangeOrderGoodsToJson(this); +} diff --git a/lib/data/farmers.dart b/lib/data/farmers.dart new file mode 100644 index 00000000..842b86af --- /dev/null +++ b/lib/data/farmers.dart @@ -0,0 +1,25 @@ +import 'package:huixiang/data/good_list.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/farmers.g.dart'; +import 'dart:convert'; + +export 'package:huixiang/generated/json/farmers.g.dart'; + +@JsonSerializable() +class Farmers { + List? goodList = []; + String? typeName = ''; + String? agriculturaListImg = ''; + + Farmers(); + + factory Farmers.fromJson(Map json) => $FarmersFromJson(json); + + Map toJson() => $FarmersToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/find_mini_group.dart b/lib/data/find_mini_group.dart new file mode 100644 index 00000000..46bad667 --- /dev/null +++ b/lib/data/find_mini_group.dart @@ -0,0 +1,74 @@ +import 'package:huixiang/data/subscribe_param.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/find_mini_group.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/find_mini_group.g.dart'; + +@JsonSerializable() +class FindMiniGroup { + String? id = ''; + String? storeId = ''; + String? groupName = ''; + String? groupImg = ''; + int? sort = 0; + int? goodsIndex = 0; + int? height = 0; + List? productList = []; + dynamic productPageVO; + + FindMiniGroup(); + + factory FindMiniGroup.fromJson(Map json) => $FindMiniGroupFromJson(json); + + Map toJson() => $FindMiniGroupToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductListBean { + String? id = ''; + String? supplierName = ''; + String? storeId = ''; + String? categoryId = ''; + String? groupId = ''; + String? shortName = ''; + String? productName = ''; + String? sellDesc = ''; + String? productCode = ''; + String? weight = ''; + String? applyPrice = ''; + String? price = ''; + int? stock = 0; + int? sellCount = 0; + int? needLogistics = 0; + int? oversold = 0; + int? status = 0; + bool? posShow = false; + int? attrStyle = 0; + int? isDelete = 0; + dynamic productAttrValues; + dynamic skuList; + dynamic imgPathList; + int? buyNum = 0; + String? imgPath = ''; + int? setMeal = 0; + String? printerFlag = ''; + dynamic markProductNone; + SubscribeParam? subscribeParam; + bool? isSetMeal; + + ProductListBean(); + + factory ProductListBean.fromJson(Map json) => $ProductListBeanFromJson(json); + + Map toJson() => $ProductListBeanToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/follow.dart b/lib/data/follow.dart new file mode 100644 index 00000000..568c35d1 --- /dev/null +++ b/lib/data/follow.dart @@ -0,0 +1,23 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/follow.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/follow.g.dart'; + +@JsonSerializable() +class Follow { + String? mid = ''; + String? nickname = ''; + String? avatar = ''; + bool? isFollow = false; + + Follow(); + + factory Follow.fromJson(Map json) => $FollowFromJson(json); + + Map toJson() => $FollowToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/founder.dart b/lib/data/founder.dart new file mode 100644 index 00000000..487fad62 --- /dev/null +++ b/lib/data/founder.dart @@ -0,0 +1,24 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/founder.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/founder.g.dart'; + +@JsonSerializable() +class Founder { + String? name = ''; + String? position = ''; + String? description = ''; + String? imgUrl = ''; + String? profile = ''; + + Founder(); + + factory Founder.fromJson(Map json) => $FounderFromJson(json); + + Map toJson() => $FounderToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/good_list.dart b/lib/data/good_list.dart new file mode 100644 index 00000000..35e8bf15 --- /dev/null +++ b/lib/data/good_list.dart @@ -0,0 +1,35 @@ +import 'dart:convert'; + +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/good_list.g.dart'; + +@JsonSerializable() +class GoodList { + String? productImg = ''; + List? productSkuVOList = []; + String? thumbnailImg = ''; + String? tenantCode = ''; + String? storeId = ''; + String? productName = ''; + bool? posShow = false; + String? price = ''; + int? sellCount = 0; + String? details = ''; + String? id = ''; + String? applyPrice = ''; + int? stock = 0; + int? status = 0; + String? info = ''; + + GoodList(); + + factory GoodList.fromJson(Map json) => $GoodListFromJson(json); + + Map toJson() => $GoodListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/goods.dart b/lib/data/goods.dart new file mode 100644 index 00000000..3d323449 --- /dev/null +++ b/lib/data/goods.dart @@ -0,0 +1,46 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/goods.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/goods.g.dart'; + +@JsonSerializable() +class Goods { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? categoryId = ''; + String? storeId = ''; + String? name = ''; + String? description = ''; + String? detail = ''; + String? worth = ''; + String? price = ''; + String? money = ''; + String? onePrice = ''; + String? oneMoney = ''; + int? stock = 0; + int? sales = 0; + bool? isHot = false; + int? sortOrder = 0; + int? state = 0; + bool? canPick = false; + bool? canDelivery = false; + int? isDelete = 0; + dynamic categoryName; + String? mainImgPath = ''; + String? oneBean = ''; + List? viceImgPaths = []; + + Goods(); + + factory Goods.fromJson(Map json) => $GoodsFromJson(json); + + Map toJson() => $GoodsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/goods_category.dart b/lib/data/goods_category.dart new file mode 100644 index 00000000..fbeea11b --- /dev/null +++ b/lib/data/goods_category.dart @@ -0,0 +1,29 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/goods_category.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/goods_category.g.dart'; + +@JsonSerializable() +class GoodsCategory { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? parentId = ''; + String? name = ''; + int? miniShow = 0; + int? sortOrder = 0; + int? isDelete = 0; + + GoodsCategory(); + + factory GoodsCategory.fromJson(Map json) => $GoodsCategoryFromJson(json); + + Map toJson() => $GoodsCategoryToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/goods_category_list.dart b/lib/data/goods_category_list.dart new file mode 100644 index 00000000..1cecb61a --- /dev/null +++ b/lib/data/goods_category_list.dart @@ -0,0 +1,31 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/goods_category_list.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/goods_category_list.g.dart'; + +@JsonSerializable() +class GoodsCategoryList { + String? id = ''; + String? categoryName = ''; + String? categoryPath = ''; + dynamic categoryImg; + int? depth = 0; + dynamic parentName; + dynamic parentId; + int? sortOrder = 0; + int? status = 0; + int? isDelete = 0; + dynamic childs; + dynamic posType; + + GoodsCategoryList(); + + factory GoodsCategoryList.fromJson(Map json) => $GoodsCategoryListFromJson(json); + + Map toJson() => $GoodsCategoryListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/goods_type_sales.dart b/lib/data/goods_type_sales.dart new file mode 100644 index 00000000..f1d1941f --- /dev/null +++ b/lib/data/goods_type_sales.dart @@ -0,0 +1,23 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/goods_type_sales.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/goods_type_sales.g.dart'; + +@JsonSerializable() +class GoodsTypeSales { + String? name = ''; + String? value = ''; + String? sale = ''; + String? percentage = ''; + + GoodsTypeSales(); + + factory GoodsTypeSales.fromJson(Map json) => $GoodsTypeSalesFromJson(json); + + Map toJson() => $GoodsTypeSalesToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/headlines.dart b/lib/data/headlines.dart new file mode 100644 index 00000000..193a83b9 --- /dev/null +++ b/lib/data/headlines.dart @@ -0,0 +1,31 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/headlines.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/headlines.g.dart'; + +@JsonSerializable() +class Headlines { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? name = ''; + String? introduce = ''; + String? coverImg = ''; + String? bannerImg = ''; + int? sort = 0; + int? isDelete = 0; + String? tenantCode = ''; + + Headlines(); + + factory Headlines.fromJson(Map json) => $HeadlinesFromJson(json); + + Map toJson() => $HeadlinesToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/headlines_details.dart b/lib/data/headlines_details.dart new file mode 100644 index 00000000..9bc19869 --- /dev/null +++ b/lib/data/headlines_details.dart @@ -0,0 +1,31 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/headlines_details.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/headlines_details.g.dart'; + +@JsonSerializable() +class HeadlinesDetails { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? name = ''; + String? introduce = ''; + String? coverImg = ''; + String? bannerImg = ''; + int? sort = 0; + int? isDelete = 0; + String? tenantCode = ''; + + HeadlinesDetails(); + + factory HeadlinesDetails.fromJson(Map json) => $HeadlinesDetailsFromJson(json); + + Map toJson() => $HeadlinesDetailsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/home_rank.dart b/lib/data/home_rank.dart new file mode 100644 index 00000000..3c095189 --- /dev/null +++ b/lib/data/home_rank.dart @@ -0,0 +1,76 @@ +import 'package:huixiang/data/good_list.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/home_rank.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/home_rank.g.dart'; + +@JsonSerializable() +class HomeRank { + @JSONField(name: "CommodityList") + List? commodityList = []; + @JSONField(name: "CommodityZone") + List? commodityZone = []; + @JSONField(name: "CommodityListImg") + String? commodityListImg = ''; + + HomeRank(); + + factory HomeRank.fromJson(Map json) => $HomeRankFromJson(json); + + Map toJson() => $HomeRankToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class CommodityList { + List? goodList = []; + String? typeName = ''; + + CommodityList(); + + factory CommodityList.fromJson(Map json) => $CommodityListFromJson(json); + + Map toJson() => $CommodityListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + + +@JsonSerializable() +class CommodityZone { + String? productImg = ''; + List? productSkuVOList = []; + String? thumbnailImg = ''; + String? productName = ''; + bool? posShow = false; + String? price = ''; + int? sellCount = 0; + String? details = ''; + String? id = ''; + String? applyPrice = ''; + int? stock = 0; + int? status = 0; + String? info = ''; + String? storeId = ''; + String? tenantCode = ''; + + CommodityZone(); + + factory CommodityZone.fromJson(Map json) => $CommodityZoneFromJson(json); + + Map toJson() => $CommodityZoneToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/home_recommend_list.dart b/lib/data/home_recommend_list.dart new file mode 100644 index 00000000..780a770c --- /dev/null +++ b/lib/data/home_recommend_list.dart @@ -0,0 +1,56 @@ +import 'package:huixiang/data/product_sku_list.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/home_recommend_list.g.dart'; +import 'dart:convert'; + +import 'package:huixiang/generated/json/product_show.g.dart'; +export 'package:huixiang/generated/json/home_recommend_list.g.dart'; + +@JsonSerializable() +class HomeRecommendList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? supplierName = ''; + String? storeId = ''; + String? categoryId = ''; + String? groupId = ''; + String? shortName = ''; + String? productName = ''; + String? sellDesc = ''; + String? productCode = ''; + String? weight = ''; + String? applyPrice = ''; + String? price = ''; + int? stock = 0; + int? sellCount = 0; + int? needLogistics = 0; + int? oversold = 0; + int? organic = 0; + int? status = 0; + bool? posShow = false; + int? productType = 0; + int? productNumber = 0; + int? setMeal = 0; + int? attrStyle = 0; + String? detail = ''; + int? isDelete = 0; + String? printerFlag = ''; + dynamic materialId; + List? imgs = []; + List? productSkuList = []; + + HomeRecommendList(); + + factory HomeRecommendList.fromJson(Map json) => $HomeRecommendListFromJson(json); + + Map toJson() => $HomeRecommendListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/invitation.dart b/lib/data/invitation.dart new file mode 100644 index 00000000..b8d8f8c7 --- /dev/null +++ b/lib/data/invitation.dart @@ -0,0 +1,25 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/invitation.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/invitation.g.dart'; + +@JsonSerializable() +class Invitation { + String? mid = ''; + String? nickname = ''; + String? avatar = ''; + String? phone = ''; + dynamic isFollow; + String? createTime = ''; + + Invitation(); + + factory Invitation.fromJson(Map json) => $InvitationFromJson(json); + + Map toJson() => $InvitationToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/ip_data.dart b/lib/data/ip_data.dart new file mode 100644 index 00000000..a5bea0f4 --- /dev/null +++ b/lib/data/ip_data.dart @@ -0,0 +1,29 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/ip_data.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/ip_data.g.dart'; + +@JsonSerializable() +class IpData { + String? ip = ''; + String? pro = ''; + String? proCode = ''; + String? city = ''; + String? cityCode = ''; + String? region = ''; + String? regionCode = ''; + String? addr = ''; + String? regionNames = ''; + String? err = ''; + + IpData(); + + factory IpData.fromJson(Map json) => $IpDataFromJson(json); + + Map toJson() => $IpDataToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/launch_join_act.dart b/lib/data/launch_join_act.dart new file mode 100644 index 00000000..a6cd06fc --- /dev/null +++ b/lib/data/launch_join_act.dart @@ -0,0 +1,38 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/launch_join_act.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/launch_join_act.g.dart'; + +@JsonSerializable() +class LaunchJoinAct { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + int? type = 0; + String? actTemplateId = ''; + String? actTimeId = ''; + String? actRecordId = ''; + String? mid = ''; + String? orderId = ''; + bool? isLeader = false; + String? memberAvatar = ''; + String? memberNickname = ''; + String? productId = ''; + String? actPrice = ''; + bool? state = false; + dynamic isDelete; + + LaunchJoinAct(); + + factory LaunchJoinAct.fromJson(Map json) => $LaunchJoinActFromJson(json); + + Map toJson() => $LaunchJoinActToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/login_info.dart b/lib/data/login_info.dart new file mode 100644 index 00000000..968c6bdb --- /dev/null +++ b/lib/data/login_info.dart @@ -0,0 +1,142 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/login_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/login_info.g.dart'; + +@JsonSerializable() +class LoginInfo { + AuthInfo? authInfo; + List? interviewCouponList = []; + dynamic newUserCouponList; + List? firstLoginCouponList = []; + + LoginInfo(); + + factory LoginInfo.fromJson(Map json) => $LoginInfoFromJson(json); + + Map toJson() => $LoginInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class AuthInfo { + String? token = ''; + String? tokenType = ''; + String? refreshToken = ''; + String? name = ''; + String? account = ''; + dynamic avatar; + dynamic workDescribe; + String? userId = ''; + String? userType = ''; + String? expire = ''; + String? expiration = ''; + String? mobile = ''; + + AuthInfo(); + + factory AuthInfo.fromJson(Map json) => $AuthInfoFromJson(json); + + Map toJson() => $AuthInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class InterviewCouponList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? couponName = ''; + int? bizType = 0; + bool? allProduct = false; + List? productSkuId = []; + String? fullAmount = ''; + String? discountAmount = ''; + int? fullNumber = 0; + int? discountPercent = 0; + String? sellPrice = ''; + int? sellCount = 0; + String? bizId = ''; + String? publishStartTime = ''; + String? publishEndTime = ''; + String? useStartTime = ''; + String? useEndTime = ''; + String? promotionId = ''; + bool? dateOrDay = false; + int? startAfterDays = 0; + int? daysValidate = 0; + int? businessType = 0; + bool? centreDisplay = false; + String? tenantCode = ''; + int? isDelete = 0; + String? storeName = ''; + int? number = 0; + + InterviewCouponList(); + + factory InterviewCouponList.fromJson(Map json) => $InterviewCouponListFromJson(json); + + Map toJson() => $InterviewCouponListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class FirstLoginCouponList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? couponName = ''; + int? bizType = 0; + bool? allProduct = false; + List? productSkuId = []; + String? fullAmount = ''; + String? discountAmount = ''; + int? fullNumber = 0; + int? discountPercent = 0; + String? sellPrice = ''; + int? sellCount = 0; + String? bizId = ''; + String? publishStartTime = ''; + String? publishEndTime = ''; + String? useStartTime = ''; + String? useEndTime = ''; + String? promotionId = ''; + bool? dateOrDay = false; + int? startAfterDays = 0; + int? daysValidate = 0; + int? businessType = 0; + bool? centreDisplay = false; + String? tenantCode = ''; + int? isDelete = 0; + String? storeName = ''; + int? number = 0; + + FirstLoginCouponList(); + + factory FirstLoginCouponList.fromJson(Map json) => $FirstLoginCouponListFromJson(json); + + Map toJson() => $FirstLoginCouponListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/logistics.dart b/lib/data/logistics.dart new file mode 100644 index 00000000..a160bb2e --- /dev/null +++ b/lib/data/logistics.dart @@ -0,0 +1,41 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/logistics.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/logistics.g.dart'; + +@JsonSerializable() +class Logistics { + String? logisticCode = ''; + String? shipperCode = ''; + int? state = 0; + bool? success = false; + List? traces = []; + + Logistics(); + + factory Logistics.fromJson(Map json) => $LogisticsFromJson(json); + + Map toJson() => $LogisticsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Traces { + String? acceptStation = ''; + String? acceptTime = ''; + + Traces(); + + factory Traces.fromJson(Map json) => $TracesFromJson(json); + + Map toJson() => $TracesToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/member_comment.dart b/lib/data/member_comment.dart new file mode 100644 index 00000000..bd65f494 --- /dev/null +++ b/lib/data/member_comment.dart @@ -0,0 +1,39 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/member_comment.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/member_comment.g.dart'; + +@JsonSerializable() +class MemberComment { + String? content = ''; + String? createTime = ''; + String? createUser = ''; + bool? hidden = false; + String? id = ''; + int? isDelete = 0; + int? likes = 0; + String? mid = ''; + String? parentContent = ''; + String? parentId = ''; + String? parentMid = ''; + String? parentUserAvatarUrl = ''; + String? parentUserName = ''; + String? relationalId = ''; + int? relationalType = 0; + String? updateTime = ''; + String? updateUser = ''; + String? userAvatarUrl = ''; + String? username = ''; + bool? liked = false; + + MemberComment(); + + factory MemberComment.fromJson(Map json) => $MemberCommentFromJson(json); + + Map toJson() => $MemberCommentToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/member_info.dart b/lib/data/member_info.dart new file mode 100644 index 00000000..03f05937 --- /dev/null +++ b/lib/data/member_info.dart @@ -0,0 +1,36 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/member_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/member_info.g.dart'; + +@JsonSerializable() +class MemberInfo { + String? id = ''; + String? nickname = ''; + String? headimg = ''; + bool? userType = false; + String? sex = ''; + int? level = 0; + String? remark = ''; + String? createTime = ''; + String? birth = ''; + int? organic = 0; + int? age = 0; + String? signature = ''; + String? background = ''; + int? follow = 0; + int? fans = 0; + int? trendTotal = 0; + int? gainLikeTotal = 0; + + MemberInfo(); + + factory MemberInfo.fromJson(Map json) => $MemberInfoFromJson(json); + + Map toJson() => $MemberInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/member_infor.dart b/lib/data/member_infor.dart new file mode 100644 index 00000000..94be4893 --- /dev/null +++ b/lib/data/member_infor.dart @@ -0,0 +1,36 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/member_infor.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/member_infor.g.dart'; + +@JsonSerializable() +class MemberInfor { + String? id = ''; + String? nickname = ''; + String? headimg = ''; + bool? userType = false; + String? sex = ''; + int? level = 0; + String? remark = ''; + String? createTime = ''; + String? birth = ''; + int? organic = 0; + int? age = 0; + String? signature = ''; + String? background = ''; + int? follow = 0; + int? fans = 0; + int? trendTotal = 0; + int? gainLikeTotal = 0; + + MemberInfor(); + + factory MemberInfor.fromJson(Map json) => $MemberInforFromJson(json); + + Map toJson() => $MemberInforToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/member_rank.dart b/lib/data/member_rank.dart new file mode 100644 index 00000000..1fecd5c9 --- /dev/null +++ b/lib/data/member_rank.dart @@ -0,0 +1,22 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/member_rank.g.dart'; + +@JsonSerializable() +class MemberRank { + MemberRank(); + + String? id; + String? nextId; + String? nextName; + int? nextOrigin; + String? rankContent; + String? rankImg; + String? rankName; + int? rankOrigin; + bool? status; + + factory MemberRank.fromJson(Map json) => + $MemberRankFromJson(json); + + Map toJson() => $MemberRankToJson(this); +} diff --git a/lib/data/member_recharge.dart b/lib/data/member_recharge.dart new file mode 100644 index 00000000..70fe4a68 --- /dev/null +++ b/lib/data/member_recharge.dart @@ -0,0 +1,35 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/member_recharge.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/member_recharge.g.dart'; + +@JsonSerializable() +class MemberRecharge { + String? id = ''; + String? rechargeMoney = ''; + String? giftdMoney = ''; + int? limitNum = 0; + dynamic gitfdCouponId; + dynamic startDate; + dynamic endDate; + dynamic startTime; + dynamic endTime; + String? tenantCode = ''; + String? createTime = ''; + int? isDeleted = 0; + int? rechargeType = 0; + String? remark = ''; + int? sortValue = 0; + int? useNum = 0; + + MemberRecharge(); + + factory MemberRecharge.fromJson(Map json) => $MemberRechargeFromJson(json); + + Map toJson() => $MemberRechargeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/member_source.dart b/lib/data/member_source.dart new file mode 100644 index 00000000..dfe37d0c --- /dev/null +++ b/lib/data/member_source.dart @@ -0,0 +1,46 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/member_source.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/member_source.g.dart'; + +@JsonSerializable() +class MemberSource { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? openid = ''; + String? nickname = ''; + String? headimg = ''; + String? balance = ''; + String? realRecharge = ''; + String? sex = ''; + bool? status = false; + bool? onCredit = false; + String? loginTime = ''; + int? loginNum = 0; + String? tenantCode = ''; + int? source = 0; + String? expendAmount = ''; + int? buyTimes = 0; + String? lastBuyTime = ''; + @JSONField(name: "vip_no") + dynamic vipNo; + dynamic expireTime; + int? integral = 0; + int? level = 0; + dynamic vipRegStore; + + MemberSource(); + + factory MemberSource.fromJson(Map json) => $MemberSourceFromJson(json); + + Map toJson() => $MemberSourceToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/member_vo.dart b/lib/data/member_vo.dart new file mode 100644 index 00000000..41194413 --- /dev/null +++ b/lib/data/member_vo.dart @@ -0,0 +1,55 @@ +import 'package:huixiang/data/member_rank.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/member_vo.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/member_vo.g.dart'; + +@JsonSerializable() +class MemberVo { + dynamic masterId; + dynamic masterCardRankName; + String? vipNo = ''; + String? nickname = ''; + String? headimg = ''; + bool? userType = false; + String? sex = ''; + int? level = 0; + dynamic addressId; + dynamic remark; + String? phone = ''; + String? createTime = ''; + String? birth = ''; + String? balance = ''; + String? money = ''; + String? activityMoney = ''; + String? greenMoney = ''; + String? expendAmount = ''; + dynamic organic; + String? points = ''; + bool? isBind = false; + MemberRank? memberRankVo; + int? age = 0; + dynamic inviteCode; + dynamic inviteNumber; + dynamic todayInviteNumber; + dynamic signature; + dynamic background; + bool? certification = false; + dynamic hasPayPassword; + dynamic isVip; + dynamic vipExpire; + dynamic isVipSubscribe; + dynamic vipDuration; + + MemberVo(); + + factory MemberVo.fromJson(Map json) => $MemberVoFromJson(json); + + Map toJson() => $MemberVoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/message.dart b/lib/data/message.dart new file mode 100644 index 00000000..3182b83e --- /dev/null +++ b/lib/data/message.dart @@ -0,0 +1,32 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/message.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/message.g.dart'; + +@JsonSerializable() +class Message { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? title = ''; + String? content = ''; + int? typed = 0; + String? relational = ''; + int? state = 0; + int? isDelete = 0; + bool? followed = false; + + Message(); + + factory Message.fromJson(Map json) => $MessageFromJson(json); + + Map toJson() => $MessageToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/min_order_info.dart b/lib/data/min_order_info.dart new file mode 100644 index 00000000..ad0ef5cd --- /dev/null +++ b/lib/data/min_order_info.dart @@ -0,0 +1,356 @@ +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/min_order_info.g.dart'; + +@JsonSerializable() +class MinOrderInfo { + MinOrderInfo({ + this.id, + this.createTime, + this.createUser, + this.updateTime, + this.updateUser, + this.tenantCode, + this.storeId, + this.storeName, + this.tableId, + this.orderType, + this.clearTable, + this.mid, + this.parentId, + this.parentCode, + this.orderCode, + this.dayFlowCode, + this.orderStatus, + this.sendStatus, + this.payStatus, + this.memberAccount, + this.logisticsId, + this.shipperCode, + this.logisticsName, + this.logisticsNum, + this.logisticsCase, + this.refundStatus, + this.addressExt, + this.postFee, + this.orderSum, + this.paySum, + this.paySumSub, + this.accountPay, + this.couponSubPrice, + this.customPrice, + this.removeDecimal, + this.isSubscribe, + this.subcribeTime, + this.sendTime, + this.confirmTime, + this.returnMoneyTime, + this.notes, + this.prepayId, + this.payTime, + this.payChannel, + this.payNum, + this.promotionId, + this.couponId, + this.couponName, + this.isDelete, + this.isTakeOut, + this.batch, + this.orderDiscountPrice, + this.dishesDiscountPrice, + this.orderPercentPrice, + this.finalPayPrice, + this.activityNoPrice, + this.activityDiscountPrice, + this.totalDiscountPrice, + this.totalPackagingFee, + this.benefitDiscountAmount, + this.orderSource, + this.address, + this.discountPercent, + this.discountAmount, + this.discountType, + this.uniqueDiscountType, + this.discountMoney, + this.overTime, + this.orderProductVOList, + this.moneyReturnList, + this.goodsReturnList, + this.moneyReturnVOList, + this.goodsReturnVOList, + this.moneyReturnActionHistoryList, + this.goodsReturnActionHistoryList, + this.currentTime, + this.tablePrice, + this.tableName, + this.balance, + this.money, + this.prodNum, + this.onCredit, + this.orderInfoVo, + this.endPayTime, + this.orderSumPrice, + this.isRaise,}); + + + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + String? tenantCode; + String? storeId; + String? storeName; + String? tableId; + int? orderType; + bool? clearTable; + String? mid; + String? parentId; + String? parentCode; + String? orderCode; + String? dayFlowCode; + int? orderStatus; + int? sendStatus; + int? payStatus; + String? memberAccount; + String? logisticsId; + String? shipperCode; + String? logisticsName; + String? logisticsNum; + dynamic logisticsCase; + int? refundStatus; + dynamic addressExt; + String? postFee; + String? orderSum; + String? paySum; + String? paySumSub; + String? accountPay; + String? couponSubPrice; + String? customPrice; + String? removeDecimal; + bool? isSubscribe; + dynamic subcribeTime; + dynamic sendTime; + dynamic confirmTime; + dynamic returnMoneyTime; + String? notes; + dynamic prepayId; + dynamic payTime; + int? payChannel; + dynamic payNum; + String? promotionId; + String? couponId; + String? couponName; + int? isDelete; + int? isTakeOut; + int? batch; + String? orderDiscountPrice; + String? dishesDiscountPrice; + String? orderPercentPrice; + String? finalPayPrice; + String? activityNoPrice; + String? activityDiscountPrice; + String? totalDiscountPrice; + String? totalPackagingFee; + String? benefitDiscountAmount; + int? orderSource; + dynamic address; + dynamic discountPercent; + String? discountAmount; + dynamic discountType; + dynamic uniqueDiscountType; + dynamic discountMoney; + dynamic overTime; + List? orderProductVOList; + dynamic moneyReturnList; + dynamic goodsReturnList; + dynamic moneyReturnVOList; + dynamic goodsReturnVOList; + dynamic moneyReturnActionHistoryList; + dynamic goodsReturnActionHistoryList; + String? currentTime; + dynamic tablePrice; + String? tableName; + String? balance; + String? money; + dynamic prodNum; + bool? onCredit; + OrderInfoVo? orderInfoVo; + String? endPayTime; + String? orderSumPrice; + bool? isRaise; + + factory MinOrderInfo.fromJson(Map json) => + $MinOrderInfoFromJson(json); + + Map toJson() => $MinOrderInfoToJson(this); +} + +/// orderNum : 0 +/// productNum : 0 +/// mins : 1 +/// memberVO : {"vipNo":"1406879717390286848","nickname":"","headimg":"","userType":true,"sex":"0","level":1,"addressId":null,"remark":null,"phone":"15827991714","createTime":"2021-07-10 15:44:23","birth":"1993-02-19","balance":"0.00","money":"9999608.09","points":"1147","isBind":true,"memberRankVo":{"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null},"age":28} +/// postAge : "0.00" +/// price : "208.00" +/// orderSum : "208.00" +/// discountAmount : null +/// promotionInfoList : null +/// couponList : null +/// threshold : "0" +/// freePostAge : "0" +/// orderProductList : null + +@JsonSerializable() +class OrderInfoVo { + OrderInfoVo({ + this.orderNum, + this.productNum, + this.mins, + this.memberVO, + this.postAge, + this.price, + this.orderSum, + this.discountAmount, + this.promotionInfoList, + this.couponList, + this.threshold, + this.freePostAge, + this.orderProductList,}){ + this.orderNum = orderNum; + this.productNum = productNum; + this.mins = mins; + this.memberVO = memberVO; + this.postAge = postAge; + this.price = price; + this.orderSum = orderSum; + this.discountAmount = discountAmount; + this.promotionInfoList = promotionInfoList; + this.couponList = couponList; + this.threshold = threshold; + this.freePostAge = freePostAge; + this.orderProductList = orderProductList; +} + + int? orderNum; + int? productNum; + int? mins; + MemberVO? memberVO; + String? postAge; + String? price; + String? orderSum; + String? discountAmount; + dynamic promotionInfoList; + dynamic couponList; + String? threshold; + String? freePostAge; + dynamic orderProductList; + + factory OrderInfoVo.fromJson(Map json) => + $OrderInfoVoFromJson(json); + + Map toJson() => $OrderInfoVoToJson(this); +} + +/// vipNo : "1406879717390286848" +/// nickname : "" +/// headimg : "" +/// userType : true +/// sex : "0" +/// level : 1 +/// addressId : null +/// remark : null +/// phone : "15827991714" +/// createTime : "2021-07-10 15:44:23" +/// birth : "1993-02-19" +/// balance : "0.00" +/// money : "9999608.09" +/// points : "1147" +/// isBind : true +/// memberRankVo : {"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null} +/// age : 28 + +@JsonSerializable() +class MemberVO { + MemberVO({ + this.vipNo, + this.nickname, + this.headimg, + this.userType, + this.sex, + this.level, + this.addressId, + this.remark, + this.phone, + this.createTime, + this.birth, + this.balance, + this.money, + this.points, + this.isBind, + this.memberRankVo, + this.age,}); + + + String? vipNo; + String? nickname; + String? headimg; + bool? userType; + String? sex; + int? level; + dynamic addressId; + dynamic remark; + String? phone; + String? createTime; + String? birth; + String? balance; + String? money; + String? points; + bool? isBind; + MemberRankVo? memberRankVo; + int? age; + + factory MemberVO.fromJson(Map json) => + $MemberVOFromJson(json); + + Map toJson() => $MemberVOToJson(this); +} + +/// id : "1402947503522840576" +/// rankName : "黄金会员" +/// rankOrigin : 8888 +/// rankContent : "" +/// rankImg : "" +/// status : true +/// nextId : "1402947503522840577" +/// nextName : "钻石会员" +/// nextOrigin : null + +@JsonSerializable() +class MemberRankVo { + MemberRankVo({ + String? id, + String? rankName, + int? rankOrigin, + String? rankContent, + String? rankImg, + bool? status, + String? nextId, + String? nextName, + dynamic nextOrigin,}); + + + String? id; + String? rankName; + int? rankOrigin; + String? rankContent; + String? rankImg; + bool? status; + String? nextId; + String? nextName; + dynamic nextOrigin; + + factory MemberRankVo.fromJson(Map json) => + $MemberRankVoFromJson(json); + + Map toJson() => $MemberRankVoToJson(this); +} diff --git a/lib/data/mini.dart b/lib/data/mini.dart new file mode 100644 index 00000000..8f0e6b51 --- /dev/null +++ b/lib/data/mini.dart @@ -0,0 +1,22 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/mini.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/mini.g.dart'; + +@JsonSerializable() +class Mini { + String? miniDownloadUrl = ''; + String? miniVersion = ''; + String? miniAppId = ''; + + Mini(); + + factory Mini.fromJson(Map json) => $MiniFromJson(json); + + Map toJson() => $MiniToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/mini_detail.dart b/lib/data/mini_detail.dart new file mode 100644 index 00000000..76c2fcfa --- /dev/null +++ b/lib/data/mini_detail.dart @@ -0,0 +1,178 @@ +import 'package:huixiang/data/product_set_meals.dart'; +import 'package:huixiang/data/sku_attr_list.dart'; +import 'package:huixiang/data/subscribe_param.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/mini_detail.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/mini_detail.g.dart'; + +@JsonSerializable() +class MiniDetail { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? supplierName = ''; + String? storeId = ''; + String? categoryId = ''; + String? groupId = ''; + String? shortName = ''; + String? productName = ''; + String? sellDesc = ''; + String? productCode = ''; + String? weight = ''; + String? applyPrice = ''; + String? price = ''; + int? stock = 0; + int? sellCount = 0; + int? needLogistics = 0; + int? oversold = 0; + int? status = 0; + bool? posShow = false; + int? productType = 0; + int? productNumber = 0; + int? setMeal = 0; + int? attrStyle = 0; + String? detail; + String? details; + int? isDelete = 0; + String? printerFlag = ''; + String? thumbnailImg; + dynamic materialId; + List? imgs = []; + StoreDTO? storeDTO; + List? attrList = []; + List? productSkuVOList = []; + String? shipAddress = ''; + int? buyCount = 0; + List? promotionShowVOList = []; + int? buyNum = 0; + dynamic productPlatterInfos; + dynamic markProductNone; + dynamic namePinyin; + dynamic nameInitials; + SubscribeParam? subscribeParam; + + MiniDetail(); + + factory MiniDetail.fromJson(Map json) => $MiniDetailFromJson(json); + + Map toJson() => $MiniDetailToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class StoreDTO { + String? id = ''; + String? storeName = ''; + String? nickName = ''; + String? logo = ''; + int? productCount = 0; + int? soldNum = 0; + + StoreDTO(); + + factory StoreDTO.fromJson(Map json) => $StoreDTOFromJson(json); + + Map toJson() => $StoreDTOToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class AttrList { + String? productId = ''; + String? attrName = ''; + int? sortOrder = 0; + bool? needImg = false; + int? isDelete = 0; + dynamic attrCode; + String? id = ''; + List? attrValueList = []; + + AttrList(); + + factory AttrList.fromJson(Map json) => $AttrListFromJson(json); + + Map toJson() => $AttrListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class AttrValueList { + String? id = ''; + String? attrId = ''; + String? attrValue = ''; + String? attrName = ''; + String? attrValueImg = ''; + dynamic sortOrder; + int? isDelete = 0; + + @JSONField(name: "attr_value_list") + dynamic attrValues; + dynamic attrValueCode; + + AttrValueList(); + + factory AttrValueList.fromJson(Map json) => $AttrValueListFromJson(json); + + Map toJson() => $AttrValueListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductSkuVOList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? skuCode = ''; + String? skuNameStr = ''; + String? productId = ''; + String? skuPrice = ''; + String? applyPrice = ''; + dynamic vipPrice; + dynamic skuImg; + int? skuStock = 0; + dynamic sort; + String? setMeal = ''; + double? weight; + double? volume; + int? isDelete = 0; + dynamic material; + dynamic version; + dynamic skuAttrCodeDTOList; + List? skuAttrList = []; + List? productSetMeals; + dynamic setMealDTOList; + + ProductSkuVOList(); + + factory ProductSkuVOList.fromJson(Map json) => $ProductSkuVOListFromJson(json); + + Map toJson() => $ProductSkuVOListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/msg_stats.dart b/lib/data/msg_stats.dart new file mode 100644 index 00000000..f152c4ad --- /dev/null +++ b/lib/data/msg_stats.dart @@ -0,0 +1,21 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/msg_stats.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/msg_stats.g.dart'; + +@JsonSerializable() +class MsgStats { + String? name = ''; + int? number = 0; + + MsgStats(); + + factory MsgStats.fromJson(Map json) => $MsgStatsFromJson(json); + + Map toJson() => $MsgStatsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/order_info.dart b/lib/data/order_info.dart new file mode 100644 index 00000000..388d1235 --- /dev/null +++ b/lib/data/order_info.dart @@ -0,0 +1,217 @@ +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/order_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/order_info.g.dart'; + +@JsonSerializable() +class OrderInfo { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? tenantCode = ''; + String? storeId = ''; + String? storeName = ''; + String? tableId = ''; + String? mid = ''; + String? parentId = ''; + String? parentCode = ''; + String? orderCode = ''; + String? dayFlowCode = ''; + int? orderStatus = 0; + int? sendStatus = 0; + int? payStatus = 0; + String? memberAccount = ''; + String? logisticsId = ''; + String? shipperCode = ''; + String? logisticsName = ''; + String? logisticsNum = ''; + dynamic logisticsCase; + int? refundStatus = 0; + AddressExt? addressExt; + String? postFee = ''; + String? orderSum = ''; + String? paySum = ''; + String? paySumSub = ''; + String? accountPay = ''; + String? couponSubPrice = ''; + String? customPrice = ''; + String? removeDecimal = ''; + bool? isSubscribe = false; + String? subcribeTime; + dynamic sendTime; + dynamic confirmTime; + dynamic returnMoneyTime; + String? notes = ''; + dynamic prepayId; + String? payTime = ''; + int? payChannel = 0; + String? payNum = ''; + String? promotionId = ''; + String? couponId = ''; + int? isDelete = 0; + int? isTakeOut = 0; + int? batch = 0; + String? orderDiscountPrice = ''; + String? dishesDiscountPrice = ''; + String? orderPercentPrice = ''; + String? finalPayPrice = ''; + String? activityNoPrice = ''; + String? activityDiscountPrice = ''; + String? benefitDiscountAmount = ''; + String? totalDiscountPrice = ''; + String? totalPackagingFee = ''; + String? vipDiscountPrice = ''; + int? orderSource = 0; + int? orderType = 0; + StoreVO? storeVO; + OrderDetail? orderDetail; + List? productList = []; + + OrderInfo(); + + factory OrderInfo.fromJson(Map json) => $OrderInfoFromJson(json); + + Map toJson() => $OrderInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class AddressExt { + dynamic addressId; + dynamic country; + dynamic countryId; + String? province = ''; + dynamic provinceId; + String? city = ''; + dynamic cityId; + String? district = ''; + dynamic districtId; + String? address = ''; + dynamic recName; + dynamic recMobile; + String? longitude = ''; + String? latitude = ''; + + AddressExt(); + + factory AddressExt.fromJson(Map json) => $AddressExtFromJson(json); + + Map toJson() => $AddressExtToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class StoreVO { + String? id = ''; + String? storeName = ''; + String? nickName = ''; + String? businessService = ''; + String? businessType = ''; + String? logo = ''; + String? openStartTime = ''; + String? openEndTime = ''; + String? shipAddress = ''; + dynamic remark; + String? mobile = ''; + dynamic refundAddress; + dynamic refundTel; + dynamic refundContact; + int? isAutoSendRefundAddress = 0; + dynamic soldNum; + dynamic storeTemplateConfig; + dynamic storeTable; + dynamic threshold; + dynamic freePostAge; + dynamic logisticsThreshold; + dynamic logisticsFreePostAge; + String? longitude = ''; + String? latitude = ''; + dynamic deliveryDistance; + dynamic couponVO; + StoreVOPosType? posType; + dynamic banners; + dynamic tips; + dynamic storeBrandImg; + dynamic defaultPostAge; + + StoreVO(); + + factory StoreVO.fromJson(Map json) => $StoreVOFromJson(json); + + Map toJson() => $StoreVOToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class StoreVOPosType { + String? desc = ''; + String? code = ''; + + StoreVOPosType(); + + factory StoreVOPosType.fromJson(Map json) => $StoreVOPosTypeFromJson(json); + + Map toJson() => $StoreVOPosTypeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class OrderDetail { + List? orderProductList = []; + dynamic discountName; + dynamic discountMoney; + dynamic discountNumber; + dynamic activityName; + dynamic couponDTO; + String? orderSumPrice = ''; + String? paySumPrice = ''; + String? activityNoPrice = ''; + String? activityPrice = ''; + List? dishesList = []; + String? customPrice = ''; + String? nextPerson = ''; + int? isTakeOut = 0; + dynamic memberRec; + dynamic isSubscribe; + dynamic subcribeTime; + String? postFee = ''; + String? shipperCode = ''; + String? logisticsName = ''; + String? logisticsNum = ''; + String? promotionName = ''; + int? orderNum = 0; + int? productNum = 0; + int? mins = 0; + dynamic predictTime; + + OrderDetail(); + + factory OrderDetail.fromJson(Map json) => $OrderDetailFromJson(json); + + Map toJson() => $OrderDetailToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + diff --git a/lib/data/order_product_vo.dart b/lib/data/order_product_vo.dart new file mode 100644 index 00000000..dae90aaf --- /dev/null +++ b/lib/data/order_product_vo.dart @@ -0,0 +1,48 @@ +import 'package:huixiang/data/act_info.dart'; +import 'package:huixiang/data/additional_comment.dart'; +import 'package:huixiang/data/comment.dart'; +import 'package:huixiang/data/set_meal_data.dart'; + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/order_product_vo.g.dart'; + +@JsonSerializable() +class OrderProductVO { + OrderProductVO(); + + ActInfo? actInfo; + AdditionalComment? additionalComment; + int? buyNum; + String? canApplyIntervention; + Comment? comment; + String? commentStatus; + String? discountAmount; + String? id; + String? productId; + String? productName; + String? returnCode; + String? returnStatus; + String? returnType; + String? sellPrice; + String? skuId; + String? skuImg; + String? skuNameStr; + List? setMealDataList; + String? packagingFee; + + factory OrderProductVO.fromJson(Map json) => + $OrderProductVOFromJson(json); + + Map toJson() => $OrderProductVOToJson(this); +} + +/// couponDiscountAmount : 0 +/// couponDiscountRate : 0 +/// couponId : 0 +/// couponType : 0 +/// discountAmount : 0 +/// discountRate : 0 +/// promotionId : 0 +/// promotionType : 0 + + diff --git a/lib/data/order_trend.dart b/lib/data/order_trend.dart new file mode 100644 index 00000000..8c7a8102 --- /dev/null +++ b/lib/data/order_trend.dart @@ -0,0 +1,21 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/order_trend.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/order_trend.g.dart'; + +@JsonSerializable() +class OrderTrend { + String? date = ''; + int? number = 0; + + OrderTrend(); + + factory OrderTrend.fromJson(Map json) => $OrderTrendFromJson(json); + + Map toJson() => $OrderTrendToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/order_user_detail.dart b/lib/data/order_user_detail.dart new file mode 100644 index 00000000..c9a71193 --- /dev/null +++ b/lib/data/order_user_detail.dart @@ -0,0 +1,52 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/order_user_detail.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/order_user_detail.g.dart'; + +@JsonSerializable() +class OrderUserDetail { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? masterId = ''; + String? openid = ''; + dynamic aliOpenid; + dynamic douyinOpenid; + String? nickname = ''; + String? headimg = ''; + String? rankId = ''; + dynamic rankExpireTime; + String? balance = ''; + String? realRecharge = ''; + String? sex = ''; + bool? status = false; + bool? onCredit = false; + String? loginTime = ''; + int? loginNum = 0; + String? tenantCode = ''; + int? source = 0; + String? expendAmount = ''; + int? buyTimes = 0; + String? lastBuyTime = ''; + @JSONField(name: "vip_no") + dynamic vipNo; + String? expireTime = ''; + int? integral = 0; + int? level = 0; + dynamic vipRegStore; + bool? certification = false; + + OrderUserDetail(); + + factory OrderUserDetail.fromJson(Map json) => $OrderUserDetailFromJson(json); + + Map toJson() => $OrderUserDetailToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/page.dart b/lib/data/page.dart new file mode 100644 index 00000000..24f0c97a --- /dev/null +++ b/lib/data/page.dart @@ -0,0 +1,36 @@ + + +import 'package:huixiang/generated/json/page.g.dart'; +import 'package:json_annotation/json_annotation.dart'; + + +@JsonSerializable() +class PageInfo { + PageInfo({ + this.pageNum, + this.current, + this.pageSize, + this.size, + this.pages, + this.hasPreviousPage, + this.hasNextPage, + this.total, + this.list, + this.records, +}); + + int? pageNum; + dynamic current; + int? pageSize; + dynamic size; + dynamic pages; + bool? hasPreviousPage; + bool? hasNextPage; + String? total; + List? list; + List? records; + + factory PageInfo.fromJson(Map json) => $PageInfoFromJson(json); + Map toJson() => $PageInfoToJson(this); + +} diff --git a/lib/data/page_list.dart b/lib/data/page_list.dart new file mode 100644 index 00000000..fe636937 --- /dev/null +++ b/lib/data/page_list.dart @@ -0,0 +1,45 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/page_list.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/page_list.g.dart'; + +@JsonSerializable() +class PageList { + List? records = []; + String? total = ''; + String? size = ''; + String? current = ''; + List? orders = []; + bool? hitCount = false; + bool? searchCount = false; + String? pages = ''; + + PageList(); + + factory PageList.fromJson(Map json) => $PageListFromJson(json); + + Map toJson() => $PageListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + + +@JsonSerializable() +class Orders { + String? column = ''; + bool? asc = false; + + Orders(); + + factory Orders.fromJson(Map json) => $OrdersFromJson(json); + + Map toJson() => $OrdersToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/phone_query_member_info.dart b/lib/data/phone_query_member_info.dart new file mode 100644 index 00000000..442d4953 --- /dev/null +++ b/lib/data/phone_query_member_info.dart @@ -0,0 +1,151 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/phone_query_member_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/phone_query_member_info.g.dart'; + +@JsonSerializable() +class PhoneQueryMemberInfo { + String? mid = ''; + String? sid = ''; + String? phoneNum = ''; + String? nickName = ''; + String? headimg = ''; + String? sex = ''; + String? balance = ''; + String? realBalance = ''; + String? giftBalance = ''; + bool? memberSourceCredit = false; + String? money = ''; + bool? memberCredit = false; + String? greenMoney = ''; + String? raiseMoney = ''; + String? payPassword = ''; + List? useableConponList = []; + + PhoneQueryMemberInfo(); + + factory PhoneQueryMemberInfo.fromJson(Map json) => $PhoneQueryMemberInfoFromJson(json); + + Map toJson() => $PhoneQueryMemberInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class UseableConponList { + String? id = ''; + List? storeIds = []; + List? stores = []; + int? bizType = 0; + String? fullType = ''; + String? fullAmount = ''; + String? discountAmount = ''; + int? fullNumber = 0; + bool? dateOrDay = false; + int? startAfterDays = 0; + int? daysValidate = 0; + int? discountPercent = 0; + String? limitAmount = ''; + String? bizId = ''; + String? publishStartTime = ''; + String? publishEndTime = ''; + String? useStartTime = ''; + String? useEndTime = ''; + String? doStartTime = ''; + String? doEndTime = ''; + String? promotionId = ''; + String? couponId = ''; + String? receiveTime = ''; + dynamic useTime; + int? status = 0; + String? tenantCode = ''; + int? type = 0; + String? promotionName = ''; + bool? usable = false; + String? usableReason = ''; + bool? allProduct = false; + List? productSkuId = []; + List? productGroupIds = []; + List? productList = []; + bool? isMaxCoupon = false; + List? productGroupList = []; + String? remark = ''; + bool? canUseBalance = false; + + UseableConponList(); + + factory UseableConponList.fromJson(Map json) => $UseableConponListFromJson(json); + + Map toJson() => $UseableConponListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? supplierName = ''; + String? storeId = ''; + String? categoryId = ''; + String? groupId = ''; + String? shortName = ''; + String? productName = ''; + String? sellDesc = ''; + dynamic attribute; + String? productCode = ''; + String? weight = ''; + String? applyPrice = ''; + String? price = ''; + String? vipPrice = ''; + int? stock = 0; + int? sellCount = 0; + int? needLogistics = 0; + int? oversold = 0; + int? organic = 0; + int? status = 0; + bool? posShow = false; + dynamic subscribeParam; + bool? isRaise = false; + int? productType = 0; + int? productNumber = 0; + int? setMeal = 0; + int? attrStyle = 0; + String? detail = ''; + int? isDelete = 0; + String? printerFlag = ''; + dynamic materials; + dynamic materialId; + String? details = ''; + String? thumbnailImg = ''; + String? info = ''; + int? buyCount = 0; + int? sellCountLimit = 0; + String? stockRecoveryTime = ''; + dynamic isAddPurchase; + int? limitNum = 0; + String? rankId = ''; + int? happyBean = 0; + int? sort = 0; + dynamic salesRules; + + ProductList(); + + factory ProductList.fromJson(Map json) => $ProductListFromJson(json); + + Map toJson() => $ProductListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/pickup_type.dart b/lib/data/pickup_type.dart new file mode 100644 index 00000000..ed0390e7 --- /dev/null +++ b/lib/data/pickup_type.dart @@ -0,0 +1,22 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/pickup_type.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/pickup_type.g.dart'; + +@JsonSerializable() +class PickupType { + bool? dineInTakeStatus = false; + dynamic takeawayStatus; + dynamic expressDeliveryStatus; + + PickupType(); + + factory PickupType.fromJson(Map json) => $PickupTypeFromJson(json); + + Map toJson() => $PickupTypeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/place_order_first.dart b/lib/data/place_order_first.dart new file mode 100644 index 00000000..101e8734 --- /dev/null +++ b/lib/data/place_order_first.dart @@ -0,0 +1,78 @@ +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/place_order_first.g.dart'; + +@JsonSerializable() +class PlaceOrderFirst { + int? cartNum; + dynamic cartSum; + dynamic addressId; + bool? isSubscribe; + int? isTakeOut; + dynamic notes; + dynamic id; + dynamic numberOfPeople; + int? orderSource; + dynamic orderType; + int? orderTypeId; + dynamic parentCode; + dynamic parentId; + int? payChannel; + PromotionInfoDTOBean? promotionInfoDTO; + String? recMobile; + List? orderProductVOList; + List? shoppingCartSkuItemList; + List? skuItemDTOList; + int? source; + String? storeId; + String? subcribeTime; + String? tableId; + + PlaceOrderFirst( + { + this.cartNum, + this.cartSum, + this.addressId, + this.isSubscribe, + this.isTakeOut, + this.notes, + this.id, + this.numberOfPeople, + this.orderSource, + this.orderType, + this.orderTypeId, + this.parentCode, + this.parentId, + this.payChannel, + this.promotionInfoDTO, + this.recMobile, + this.orderProductVOList, + this.shoppingCartSkuItemList, + this.skuItemDTOList, + this.source, + this.storeId, + this.subcribeTime, + this.tableId}); + + factory PlaceOrderFirst.fromJson(Map json) => + $PlaceOrderFirstFromJson(json); + + Map toJson() => $PlaceOrderFirstToJson(this); +} + + +@JsonSerializable() +class PromotionInfoDTOBean { + String? couponId; + String? promotionId; + bool? useVipPrice; + bool? useBenefit; + String? discountType; + + PromotionInfoDTOBean({this.couponId, this.promotionId,this.useVipPrice,this.useBenefit,this.discountType}); + + factory PromotionInfoDTOBean.fromJson(Map json) => + $PromotionInfoDTOBeanFromJson(json); + + Map toJson() => $PromotionInfoDTOBeanToJson(this); +} diff --git a/lib/data/platter.dart b/lib/data/platter.dart new file mode 100644 index 00000000..82c4a35d --- /dev/null +++ b/lib/data/platter.dart @@ -0,0 +1,24 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/platter.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/platter.g.dart'; + +@JsonSerializable() +class Platter { + bool? deleted = false; + int? id = 0; + int? productId = 0; + bool? required = false; + int? skuId = 0; + + Platter(); + + factory Platter.fromJson(Map json) => $PlatterFromJson(json); + + Map toJson() => $PlatterToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/popular_sales.dart b/lib/data/popular_sales.dart new file mode 100644 index 00000000..ea091708 --- /dev/null +++ b/lib/data/popular_sales.dart @@ -0,0 +1,91 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/popular_sales.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/popular_sales.g.dart'; + +@JsonSerializable() +class PopularSales { + List? dashMemberList = []; + List? saleProductList = []; + String? avgPrice = ''; + int? orderNum = 0; + List? storeDailyStatistics = []; + String? orderSum = ''; + ChangeData? changeData; + String? paySum = ''; + + PopularSales(); + + factory PopularSales.fromJson(Map json) => $PopularSalesFromJson(json); + + Map toJson() => $PopularSalesToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class DashMemberList { + String? id = ''; + String? name = ''; + String? phone = ''; + String? balance = ''; + + DashMemberList(); + + factory DashMemberList.fromJson(Map json) => $DashMemberListFromJson(json); + + Map toJson() => $DashMemberListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class SaleProductList { + @JSONField(name: "product_id") + String? productId = ''; + int? saleNum = 0; + @JSONField(name: "product_name") + String? productName = ''; + + SaleProductList(); + + factory SaleProductList.fromJson(Map json) => $SaleProductListFromJson(json); + + Map toJson() => $SaleProductListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ChangeData { + double? addCartChangeRate; + double? payCountChangeRate; + String? sumAddCartCount = ''; + String? sumSettleCount = ''; + String? sumPaySuccessCount = ''; + String? sumPV = ''; + double? totalChangeRate; + String? sumPayCount = ''; + double? settleChangeRate; + double? paySuccessChangeRate; + + ChangeData(); + + factory ChangeData.fromJson(Map json) => $ChangeDataFromJson(json); + + Map toJson() => $ChangeDataToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/preferential.dart b/lib/data/preferential.dart new file mode 100644 index 00000000..3b10c234 --- /dev/null +++ b/lib/data/preferential.dart @@ -0,0 +1,30 @@ + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'dart:convert'; + +import 'package:huixiang/generated/json/preferential.g.dart'; + +@JsonSerializable() +class PreferentialList { + String? id = ''; + String? rechargeMoney = ''; + String? giftdMoney = ''; + dynamic gitfdCouponId; + String? tenantCode = ''; + String? createTime = ''; + int? isDeleted = 0; + int? rechargeType = 0; + String? remark = ''; + int? sortValue = 0; + + PreferentialList(); + + factory PreferentialList.fromJson(Map json) => $PreferentialListFromJson(json); + + Map toJson() => $PreferentialListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/product.dart b/lib/data/product.dart new file mode 100644 index 00000000..222e804b --- /dev/null +++ b/lib/data/product.dart @@ -0,0 +1,64 @@ + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/product.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/product.g.dart'; + +@JsonSerializable() +class Product { + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + dynamic tenantCode; + String? storeId; + String? orderId; + String? productId; + String? productName; + String? skuId; + String? skuNameStr; + String? skuImg; + int? buyNum; + int? refundNum; + double? weight; + String? applyPrice; + String? sellPrice; + String? postPay; + int? isDelete; + String? discountAmount; + int? discountPercent; + bool? status; + int? batch; + + Product( + {this.id, + this.createTime, + this.createUser, + this.updateTime, + this.updateUser, + this.tenantCode, + this.storeId, + this.orderId, + this.productId, + this.productName, + this.skuId, + this.skuNameStr, + this.skuImg, + this.buyNum, + this.refundNum, + this.weight, + this.applyPrice, + this.sellPrice, + this.postPay, + this.isDelete, + this.discountAmount, + this.discountPercent, + this.status, + this.batch}); + + factory Product.fromJson(Map json) => $ProductFromJson(json); + + Map toJson() => $ProductToJson(this); + +} diff --git a/lib/data/product_group.dart b/lib/data/product_group.dart new file mode 100644 index 00000000..934c9921 --- /dev/null +++ b/lib/data/product_group.dart @@ -0,0 +1,54 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/product_group.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/product_group.g.dart'; + +@JsonSerializable() +class ProductGroup { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? groupName = ''; + String? groupImg = ''; + int? sort = 0; + int? kitchenGroup = 0; + List? printerId = []; + dynamic attachPrinterIds; + int? isDelete = 0; + int? isCharge = 0; + dynamic useVipDiscount; + ProductGroupProfitSharing? profitSharing; + + ProductGroup(); + + factory ProductGroup.fromJson(Map json) => $ProductGroupFromJson(json); + + Map toJson() => $ProductGroupToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductGroupProfitSharing { + String? type = ''; + String? mchName = ''; + String? mchCode = ''; + int? ratio = 0; + + ProductGroupProfitSharing(); + + factory ProductGroupProfitSharing.fromJson(Map json) => $ProductGroupProfitSharingFromJson(json); + + Map toJson() => $ProductGroupProfitSharingToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/product_set_meals.dart b/lib/data/product_set_meals.dart new file mode 100644 index 00000000..d21ca253 --- /dev/null +++ b/lib/data/product_set_meals.dart @@ -0,0 +1,113 @@ +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/product_set_meals.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/product_set_meals.g.dart'; + +@JsonSerializable() +class ProductSetMeals { + String? groupName = ''; + int? totalNumber = 0; + int? optionalNumber = 0; + List? productInfoList = []; + + ProductSetMeals(); + + factory ProductSetMeals.fromJson(Map json) => $ProductSetMealsFromJson(json); + + Map toJson() => $ProductSetMealsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class SetMealsProductInfoList { + String? productId = ''; + String? productName = ''; + String? productImg = ''; + bool? allSku = false; + List? skuInfoList = []; + List? productAttrInfoList = []; + int? number = 0; + + int count = 0; + + SetMealsProductInfoList(); + + factory SetMealsProductInfoList.fromJson(Map json) => $SetMealsProductInfoListFromJson(json); + + Map toJson() => $SetMealsProductInfoListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class SkuInfoList { + String? id = ''; + String? skuName = ''; + List? productSkuAttrList = []; + + bool isSelected = false; + + SkuInfoList(); + + factory SkuInfoList.fromJson(Map json) => $SkuInfoListFromJson(json); + + Map toJson() => $SkuInfoListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductSkuAttrList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? skuId = ''; + String? attrId = ''; + String? attrValueId = ''; + dynamic sortOrder; + int? isDelete = 0; + + ProductSkuAttrList(); + + factory ProductSkuAttrList.fromJson(Map json) => $ProductSkuAttrListFromJson(json); + + Map toJson() => $ProductSkuAttrListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductAttrInfoList { + String? attrId = ''; + String? attrName = ''; + List? attrValueList = []; + + String? selectSku = ''; + + ProductAttrInfoList(); + + factory ProductAttrInfoList.fromJson(Map json) => $ProductAttrInfoListFromJson(json); + + Map toJson() => $ProductAttrInfoListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/product_show.dart b/lib/data/product_show.dart new file mode 100644 index 00000000..25167a18 --- /dev/null +++ b/lib/data/product_show.dart @@ -0,0 +1,67 @@ +import 'package:huixiang/data/product_sku_list.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/product_show.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/product_show.g.dart'; + +@JsonSerializable() +class ProductShow { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? supplierName = ''; + String? storeId = ''; + String? categoryId = ''; + String? groupId = ''; + String? shortName = ''; + String? productName = ''; + String? sellDesc = ''; + String? productCode = ''; + String? weight = ''; + String? applyPrice = ''; + String? price = ''; + dynamic vipPrice; + int? stock = 0; + int? sellCount = 0; + int? needLogistics = 0; + int? oversold = 0; + int? organic = 0; + int? status = 0; + bool? posShow = false; + dynamic subscribeParam; + bool? isRaise = false; + int? productType = 0; + int? productNumber = 0; + int? setMeal = 0; + int? attrStyle = 0; + String? detail = ''; + int? isDelete = 0; + String? printerFlag = ''; + dynamic materials; + dynamic materialId; + String? details = ''; + String? thumbnailImg = ''; + String? info = ''; + int? buyCount = 0; + int? sellCountLimit = 0; + dynamic stockRecoveryTime; + dynamic isAddPurchase; + int? limitNum = 0; + String? rankId = ''; + int? happyBean = 0; + List? imgs = []; + List? productSkuList = []; + + ProductShow(); + + factory ProductShow.fromJson(Map json) => $ProductShowFromJson(json); + + Map toJson() => $ProductShowToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/product_sku_list.dart b/lib/data/product_sku_list.dart new file mode 100644 index 00000000..590fff11 --- /dev/null +++ b/lib/data/product_sku_list.dart @@ -0,0 +1,53 @@ +import 'dart:convert'; + +import 'package:huixiang/generated/json/base/json_field.dart'; + +import 'package:huixiang/generated/json/product_sku_list.g.dart'; +export 'package:huixiang/generated/json/product_sku_list.g.dart'; + +@JsonSerializable() +class ProductSkuList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? skuCode = ''; + String? skuNameStr = ''; + String? productId = ''; + String? skuPrice = ''; + String? applyPrice = ''; + String? vipPrice = ''; + String? packagingFee = ''; + dynamic skuImg; + int? skuStock = 0; + int? autoRenewSkuStock = 0; + int? deliveries = 0; + String? ticketType = ''; + dynamic ticketWipedTimeTemplateId; + dynamic takeType; + String? ticketDays = ''; + String? ticketExpireTime = ''; + int? sort = 0; + String? setMeal = ''; + dynamic productSetMeals; + double? weight; + double? volume; + int? isDelete = 0; + dynamic material; + int? version = 0; + dynamic skuTickets; + String? ticketStyle = ''; + + ProductSkuList(); + + factory ProductSkuList.fromJson(Map json) => $ProductSkuListFromJson(json); + + Map toJson() => $ProductSkuListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/promotion.dart b/lib/data/promotion.dart new file mode 100644 index 00000000..0df75411 --- /dev/null +++ b/lib/data/promotion.dart @@ -0,0 +1,46 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/promotion.g.dart'; + +@JsonSerializable() +class Promotion { + + String? activityEndTime; + String? activityStartTime; + String? applyEndTime; + String? applyStartTime; + String? createTime; + String? createUser; + String? description; + String? id; + String? image; + num? isDelete; + num? isNeedSecurityDeposit; + String? name; + List? promotionDetail; + num? promotionPlan; + num? promotionType; + String? securityDeposit; + num? status; + String? tag; + String? updateTime; + String? updateUser; + + Promotion({this.activityEndTime, this.activityStartTime, this.applyEndTime, this.applyStartTime, this.createTime, this.createUser, this.description, this.id, this.image, this.isDelete, this.isNeedSecurityDeposit, this.name, this.promotionDetail, this.promotionPlan, this.promotionType, this.securityDeposit, this.status, this.tag, this.updateTime, this.updateUser}); + + factory Promotion.fromJson(Map json) => + $PromotionFromJson(json); + + Map toJson() => $PromotionToJson(this); +} + + +@JsonSerializable() +class DetailBean { + + DetailBean(); + + factory DetailBean.fromJson(Map json) => DetailBean(); + Map toJson() => {}; + +} + diff --git a/lib/data/promotion_info.dart b/lib/data/promotion_info.dart new file mode 100644 index 00000000..c46ff325 --- /dev/null +++ b/lib/data/promotion_info.dart @@ -0,0 +1,69 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/promotion_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/promotion_info.g.dart'; + +@JsonSerializable() +class PromotionInfo { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + String? name = ''; + String? image = ''; + String? description = ''; + int? status = 0; + String? applyStartTime = ''; + String? applyEndTime = ''; + String? activityStartTime = ''; + String? activityEndTime = ''; + dynamic doStartTime; + dynamic doEndTime; + int? isNeedSecurityDeposit = 0; + String? securityDeposit = ''; + String? tag = ''; + int? promotionType = 0; + int? promotionPlan = 0; + List? promotionDetail = []; + List? channels = []; + bool? isVip = false; + int? isDelete = 0; + String? tenantCode = ''; + bool? canPartake = false; + bool? isMaxPromotion = false; + dynamic promotionProuctList; + + PromotionInfo(); + + factory PromotionInfo.fromJson(Map json) => $PromotionInfoFromJson(json); + + Map toJson() => $PromotionInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class PromotionInfoPromotionDetail { + String? limitTime = ''; + String? discountRate = ''; + String? discountAmount = ''; + String? fullAmount = ''; + String? collageNumber = ''; + String? fullNumber = ''; + + PromotionInfoPromotionDetail(); + + factory PromotionInfoPromotionDetail.fromJson(Map json) => $PromotionInfoPromotionDetailFromJson(json); + + Map toJson() => $PromotionInfoPromotionDetailToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/rank.dart b/lib/data/rank.dart new file mode 100644 index 00000000..f27fa2fa --- /dev/null +++ b/lib/data/rank.dart @@ -0,0 +1,35 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/rank.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/rank.g.dart'; + +@JsonSerializable() +class Rank { + String? createTime = ''; + int? createUser = 0; + int? id = 0; + int? price = 0; + String? rankContent = ''; + String? rankImg = ''; + String? rankName = ''; + int? rankOrigin = 0; + bool? status = false; + String? updateTime = ''; + int? updateUser = 0; + int? level = 0; + String? color = ''; + String? textColor = ''; + int? originScore = 0; + int? demotionScore = 0; + + Rank(); + + factory Rank.fromJson(Map json) => $RankFromJson(json); + + Map toJson() => $RankToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/recharge.dart b/lib/data/recharge.dart new file mode 100644 index 00000000..671487de --- /dev/null +++ b/lib/data/recharge.dart @@ -0,0 +1,28 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/recharge.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/recharge.g.dart'; + +@JsonSerializable() +class Recharge { + String? id = ''; + String? rechargeMoney = ''; + String? giftdMoney = ''; + dynamic gitfdCouponId; + String? tenantCode = ''; + String? createTime = ''; + int? isDeleted = 0; + int? rechargeType = 0; + String? remark = ''; + + Recharge(); + + factory Recharge.fromJson(Map json) => $RechargeFromJson(json); + + Map toJson() => $RechargeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/recharge_act.dart b/lib/data/recharge_act.dart new file mode 100644 index 00000000..6a9e66e8 --- /dev/null +++ b/lib/data/recharge_act.dart @@ -0,0 +1,24 @@ +import 'package:huixiang/data/preferential.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/recharge_act.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/recharge_act.g.dart'; + +@JsonSerializable() +class RechargeAct { + + List? preferentialList = []; + List? channels = []; + bool? isOpen = false; + + RechargeAct(); + + factory RechargeAct.fromJson(Map json) => $RechargeActFromJson(json); + + Map toJson() => $RechargeActToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/recharge_flow.dart b/lib/data/recharge_flow.dart new file mode 100644 index 00000000..5a5557fe --- /dev/null +++ b/lib/data/recharge_flow.dart @@ -0,0 +1,38 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/recharge_flow.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/recharge_flow.g.dart'; + +@JsonSerializable() +class RechargeFlow { + String? id = ''; + int? rechargeType = 0; + String? rechargeName = ''; + int? source = 0; + String? createTime = ''; + dynamic createTimeFormat; + String? createPerson = ''; + String? phone = ''; + String? tenantCode = ''; + String? storeName = ''; + String? rechargeMoney = ''; + String? giftdMoney = ''; + String? sumMoney = ''; + dynamic createMemberId; + dynamic rechargePreferentialId; + int? rechargeStatus = 0; + dynamic refuseReason; + String? balance = ''; + String? realRecharge = ''; + + RechargeFlow(); + + factory RechargeFlow.fromJson(Map json) => $RechargeFlowFromJson(json); + + Map toJson() => $RechargeFlowToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/refund_reason.dart b/lib/data/refund_reason.dart new file mode 100644 index 00000000..46972514 --- /dev/null +++ b/lib/data/refund_reason.dart @@ -0,0 +1,28 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/refund_reason.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/refund_reason.g.dart'; + +@JsonSerializable() +class RefundReason { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? storeId = ''; + int? type = 0; + String? reason = ''; + int? isDelete = 0; + + RefundReason(); + + factory RefundReason.fromJson(Map json) => $RefundReasonFromJson(json); + + Map toJson() => $RefundReasonToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/second_card.dart b/lib/data/second_card.dart new file mode 100644 index 00000000..17a68e12 --- /dev/null +++ b/lib/data/second_card.dart @@ -0,0 +1,24 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/second_card.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/second_card.g.dart'; + +@JsonSerializable() +class SecondCard { + String? id = ''; + String? phone = ''; + String? nickname = ''; + String? headimg = ''; + bool? isAdd = false; + + SecondCard(); + + factory SecondCard.fromJson(Map json) => $SecondCardFromJson(json); + + Map toJson() => $SecondCardToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/service_bug.dart b/lib/data/service_bug.dart new file mode 100644 index 00000000..04ba45d4 --- /dev/null +++ b/lib/data/service_bug.dart @@ -0,0 +1,37 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/service_bug.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/service_bug.g.dart'; + +@JsonSerializable() +class ServiceBug { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? tenantId = ''; + String? tenantCode = ''; + String? packageId = ''; + String? oldPackageId = ''; + String? packagePrice = ''; + int? packageNum = 0; + int? packageDiscount = 0; + String? expirationTime = ''; + dynamic upgradeTime; + int? status = 0; + int? payChannel = 0; + int? isDelete = 0; + String? packageName = ''; + + ServiceBug(); + + factory ServiceBug.fromJson(Map json) => $ServiceBugFromJson(json); + + Map toJson() => $ServiceBugToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/set_meal_data.dart b/lib/data/set_meal_data.dart new file mode 100644 index 00000000..e3cf5e64 --- /dev/null +++ b/lib/data/set_meal_data.dart @@ -0,0 +1,42 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/set_meal_data.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/set_meal_data.g.dart'; + +@JsonSerializable() +class SetMealData { + String? groupName = ''; + List? productInfoList = []; + + SetMealData(); + + factory SetMealData.fromJson(Map json) => $SetMealDataFromJson(json); + + Map toJson() => $SetMealDataToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductInfoList { + String? skuId = ''; + String? skuName = ''; + int? buyNumber = 0; + String? productId = ''; + double? sellPrice; + String? productName = ''; + + ProductInfoList(); + + factory ProductInfoList.fromJson(Map json) => $ProductInfoListFromJson(json); + + Map toJson() => $ProductInfoListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/settle_order_info.dart b/lib/data/settle_order_info.dart new file mode 100644 index 00000000..843f731b --- /dev/null +++ b/lib/data/settle_order_info.dart @@ -0,0 +1,179 @@ + +import 'package:huixiang/data/member_vo.dart'; +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/data/settlement.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/settle_order_info.g.dart'; + +@JsonSerializable() +class SettleOrderInfo { + int? orderNum; + int? productNum; + int? mins; + MemberVo? memberVO; + String? postAge; + String? price; + String? benefitDiscountAmount; + String? orderSum; + String? discountAmount; + List? promotionInfoList; + List? couponList; + String? threshold; + String? freePostAge; + List? orderProductList; + String? promotionId; + String? memberCouponId; + bool? usePlateMoney; + bool? isRaise; + bool? isVipDay; + int? selectDiscount; + bool? useVipPriceSelect = false; + String? vipDiscountAmount; + String? totalDiscountAmount; + String? vipDayDiscountAmount; + String? discountType; + String? totalPackagingFee; + + SettleOrderInfo(); + + factory SettleOrderInfo.fromJson(Map json) => + $SettleOrderInfoFromJson(json); + + Map toJson() => $SettleOrderInfoToJson(this); +} + + +@JsonSerializable() +class CouponListBean { + String? id; + String? storeId; + int? bizType; + String? fullAmount; + String? discountAmount; + int? fullNumber; + int? discountPercent; + String? bizId; + String? limitAmount; + String? publishStartTime; + String? publishEndTime; + String? useStartTime; + String? useEndTime; + String? promotionId; + dynamic mid; + String? couponId; + String? receiveTime; + dynamic useTime; + int? status; + String? tenantCode; + int? type; + String? promotionName; + bool? usable; + bool? allProduct; + bool? isMaxCoupon; + dynamic productList; + bool? isEx; + String? usableReason; + + CouponListBean(); + + factory CouponListBean.fromJson(Map json) => $CouponListBeanFromJson(json); + + Map toJson() => $CouponListBeanToJson(this); + +} + +/// id : "1437254523520286720" +/// createTime : "2021-09-13 11:19:16" +/// createUser : "1333246101196636160" +/// updateTime : "2021-09-13 17:30:00" +/// updateUser : "0" +/// storeId : "1433719074906439680" +/// name : "�����ŵ�" +/// image : "https://pos.upload.gznl.top/1175/2021/09/44d60dab-0ae3-4d07-b624-50b8ab99d0fc.jpg" +/// description : "1" +/// status : 4 +/// applyStartTime : "2021-09-13 11:19:16" +/// applyEndTime : "2021-09-13 11:19:16" +/// activityStartTime : "2021-09-01 00:00:00" +/// activityEndTime : "2021-10-30 00:00:00" +/// doStartTime : null +/// doEndTime : null +/// isNeedSecurityDeposit : 0 +/// securityDeposit : "0" +/// tag : "11" +/// promotionType : 1 +/// promotionPlan : 0 +/// promotionDetail : [{"limitTime":"0","discountRate":"0","discountAmount":"0","fullAmount":"0","collageNumber":"0","fullNumber":"1"}] +/// channels : ["MINI","POS"] +/// isVip : false +/// isDelete : 0 +/// tenantCode : "1175" +/// canPartake : true +/// isMaxPromotion : true +/// promotionProuctList : null + +@JsonSerializable() +class PromotionInfoListBean { + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + String? storeId; + String? name; + String? image; + String? description; + int? status; + String? applyStartTime; + String? applyEndTime; + String? activityStartTime; + String? activityEndTime; + dynamic doStartTime; + dynamic doEndTime; + int? isNeedSecurityDeposit; + String? securityDeposit; + String? tag; + int? promotionType; + int? promotionPlan; + List? promotionDetail; + List? channels; + bool? isVip; + int? isDelete; + String? tenantCode; + bool? canPartake; + bool? isMaxPromotion; + dynamic promotionProuctList; + + PromotionInfoListBean(); + + factory PromotionInfoListBean.fromJson(Map json) => + $PromotionInfoListBeanFromJson(json); + + Map toJson() => $PromotionInfoListBeanToJson(this); +} + +/// limitTime : "0" +/// discountRate : "0" +/// discountAmount : "0" +/// fullAmount : "0" +/// collageNumber : "0" +/// fullNumber : "1" + +@JsonSerializable() +class PromotionDetailBean { + String? limitTime; + String? discountRate; + String? discountAmount; + String? fullAmount; + String? collageNumber; + String? fullNumber; + + PromotionDetailBean(); + + factory PromotionDetailBean.fromJson(Map json) => + $PromotionDetailBeanFromJson(json); + + Map toJson() => $PromotionDetailBeanToJson(this); + +} + diff --git a/lib/data/settlement.dart b/lib/data/settlement.dart new file mode 100644 index 00000000..60f41806 --- /dev/null +++ b/lib/data/settlement.dart @@ -0,0 +1,81 @@ +import 'package:huixiang/data/act_info.dart'; +import 'package:huixiang/data/additional_comment.dart'; +import 'package:huixiang/data/comment.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/settlement.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/settlement.g.dart'; + +@JsonSerializable() +class Settlement { + int? addressId = 0; + int? buyNum = 0; + int? id = 0; + @JSONField(name: "is_logistics") + bool? isLogistics = false; + List? orderProductVOList = []; + int? payChannel = 0; + PromotionInfoDTO? promotionInfoDTO; + + Settlement(); + + factory Settlement.fromJson(Map json) => $SettlementFromJson(json); + + Map toJson() => $SettlementToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class OrderProductVOList { + ActInfo? actInfo; + AdditionalComment? additionalComment; + int? buyNum = 0; + int? canApplyIntervention = 0; + Comment? comment; + int? commentStatus = 0; + int? discountAmount = 0; + int? id = 0; + int? productId = 0; + String? productName = ''; + String? returnCode = ''; + int? returnStatus = 0; + int? returnType = 0; + int? sellPrice = 0; + int? skuId = 0; + String? skuImg = ''; + String? skuNameStr = ''; + + OrderProductVOList(); + + factory OrderProductVOList.fromJson(Map json) => $OrderProductVOListFromJson(json); + + Map toJson() => $OrderProductVOListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + + + +@JsonSerializable() +class PromotionInfoDTO { + int? couponId = 0; + int? promotionId = 0; + + PromotionInfoDTO(); + + factory PromotionInfoDTO.fromJson(Map json) => $PromotionInfoDTOFromJson(json); + + Map toJson() => $PromotionInfoDTOToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/shoping_home_config.dart b/lib/data/shoping_home_config.dart new file mode 100644 index 00000000..a0ca4055 --- /dev/null +++ b/lib/data/shoping_home_config.dart @@ -0,0 +1,211 @@ +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/sku_attr_list.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/shoping_home_config.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/shoping_home_config.g.dart'; + +@JsonSerializable() +class ShopingHomeConfig { + List? specialArea = []; + List? quickEntry = []; + List? hotSearch = []; + List? categoryGroup = []; + + ShopingHomeConfig(); + + factory ShopingHomeConfig.fromJson(Map json) => $ShopingHomeConfigFromJson(json); + + Map toJson() => $ShopingHomeConfigToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class SpecialArea { + String? img = ''; + String? id = ''; + List? productList = []; + + SpecialArea(); + + factory SpecialArea.fromJson(Map json) => $SpecialAreaFromJson(json); + + Map toJson() => $SpecialAreaToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ShopHomeProductList { + String? productImg = ''; + List? productSkuVOList = []; + String? productName = ''; + bool? posShow = false; + List? attrList = []; + String? price = ''; + String? productPrice = ''; + String? promotionPrice = ''; + int? sellCount = 0; + String? id = ''; + String? applyPrice = ''; + String? productId = ''; + int? productStock = 0; + int? stock = 0; + int? status = 0; + + ShopHomeProductList(); + + factory ShopHomeProductList.fromJson(Map json) => $ShopHomeProductListFromJson(json); + + Map toJson() => $ShopHomeProductListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ShopHomeProductSkuVOList { + String? productId = ''; + int? isDelete = 0; + String? setMeal = ''; + String? updateUser = ''; + String? skuPrice = ''; + int? skuStock = 0; + int? weight = 0; + String? updateTime = ''; + String? storeId = ''; + int? volume = 0; + String? skuNameStr = ''; + String? createTime = ''; + String? createUser = ''; + String? id = ''; + String? applyPrice = ''; + List? skuAttrList = []; + String? skuCode = ''; + + ShopHomeProductSkuVOList(); + + factory ShopHomeProductSkuVOList.fromJson(Map json) => $ShopHomeProductSkuVOListFromJson(json); + + Map toJson() => $ShopHomeProductSkuVOListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + + +@JsonSerializable() +class ShopHomeAttrList { + String? productId = ''; + int? isDelete = 0; + bool? needImg = false; + List? attrValueList = []; + String? id = ''; + String? attrName = ''; + + ShopHomeAttrList(); + + factory ShopHomeAttrList.fromJson(Map json) => $ShopHomeAttrListFromJson(json); + + Map toJson() => $ShopHomeAttrListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ShopHomeAttrValueList { + int? isDelete = 0; + String? attrId = ''; + String? id = ''; + String? attrValue = ''; + String? attrValueImg = ''; + + ShopHomeAttrValueList(); + + factory ShopHomeAttrValueList.fromJson(Map json) => $ShopHomeAttrValueListFromJson(json); + + Map toJson() => $ShopHomeAttrValueListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class QuickEntry { + String? img = ''; + String? url = ''; + String? id = ''; + + QuickEntry(); + + factory QuickEntry.fromJson(Map json) => $QuickEntryFromJson(json); + + Map toJson() => $QuickEntryToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class CategoryGroup { + List? groupList = []; + String? groupCommodityName = ''; + String? name = ''; + + CategoryGroup(); + + factory CategoryGroup.fromJson(Map json) => $CategoryGroupFromJson(json); + + Map toJson() => $CategoryGroupToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class GroupList { + int? isDelete = 0; + String? updateUser = ''; + String? updateTime = ''; + String? groupImg = ''; + int? sort = 0; + String? storeId = ''; + String? groupName = ''; + String? createTime = ''; + int? kitchenGroup = 0; + String? printerId = ''; + String? createUser = ''; + int? isCharge = 0; + String? id = ''; + + GroupList(); + + factory GroupList.fromJson(Map json) => $GroupListFromJson(json); + + Map toJson() => $GroupListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/shopping_cart.dart b/lib/data/shopping_cart.dart new file mode 100644 index 00000000..e079bd2b --- /dev/null +++ b/lib/data/shopping_cart.dart @@ -0,0 +1,82 @@ +import 'package:huixiang/data/coupon_list.dart'; +import 'package:huixiang/data/promotion_info.dart'; +import 'package:huixiang/data/set_meal_data.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/shopping_cart.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/shopping_cart.g.dart'; + +@JsonSerializable() +class ShoppingCart { + int? cartSum = 0; + int? selectDiscount = 0; + int? numberOfPeople = 0; + int? selected = 0; + List? shoppingCartSkuItemList = []; + int? storeId = 0; + String? storeName = ''; + String? tableId = ''; + List? promotionInfoList; + List? couponList; + + ShoppingCart(); + + factory ShoppingCart.fromJson(Map json) => $ShoppingCartFromJson(json); + + Map toJson() => $ShoppingCartToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class SkuItemList { + int? buyNum = 0; + String? createTime = ''; + int? groupId = 0; + int? id = 0; + List? platterList = []; + List? setMealDataList = []; + String? productId = ''; + String? productName = ''; + int? selected = 0; + String? skuImg = ''; + String? skuName = ''; + String? skuPrice = ''; + int? skuStock = 0; + int? storeId = 0; + int? tableId = 0; + + SkuItemList(); + + factory SkuItemList.fromJson(Map json) => $SkuItemListFromJson(json); + + Map toJson() => $SkuItemListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class PlatterList { + bool? deleted = false; + int? id = 0; + int? productId = 0; + bool? required = false; + int? skuId = 0; + + PlatterList(); + + factory PlatterList.fromJson(Map json) => $PlatterListFromJson(json); + + Map toJson() => $PlatterListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/sign_in.dart b/lib/data/sign_in.dart new file mode 100644 index 00000000..71c7e695 --- /dev/null +++ b/lib/data/sign_in.dart @@ -0,0 +1,27 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/sign_in.g.dart'; + +@JsonSerializable() +class SignIn { + SignIn(); + String? balance; + String? category; + String? createTime; + String? createUser; + String? id; + bool? isDeleted; + String? linkId; + String? mark; + String? mid; + String? number; + int? pm; + bool? status; + String? title; + String? type; + String? updateTime; + String? updateUser; + + factory SignIn.fromJson(Map json) => $SignInFromJson(json); + + Map toJson() => $SignInToJson(this); +} \ No newline at end of file diff --git a/lib/data/sign_info.dart b/lib/data/sign_info.dart new file mode 100644 index 00000000..1f77f91a --- /dev/null +++ b/lib/data/sign_info.dart @@ -0,0 +1,21 @@ +import 'package:huixiang/data/member_rank.dart'; +import 'package:huixiang/data/sign_in.dart'; +import 'package:huixiang/data/task.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/sign_info.g.dart'; + +@JsonSerializable() +class SignInfo { + SignInfo(); + String? point; + bool? todayHasSignin; + MemberRank? rank; + List? signInList; + List? taskList; + List? rewardList; + + factory SignInfo.fromJson(Map json) => + $SignInfoFromJson(json); + + Map toJson() => $SignInfoToJson(this); +} diff --git a/lib/data/single_sales.dart b/lib/data/single_sales.dart new file mode 100644 index 00000000..2a8c6ac4 --- /dev/null +++ b/lib/data/single_sales.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/single_sales.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/single_sales.g.dart'; + +@JsonSerializable() +class SingleSales { + dynamic productId; + int? saleNum = 0; + String? productName = ''; + dynamic productType; + String? productGroupName = ''; + String? sumPrice = ''; + String? sellPrict = ''; + String? productSkuName = ''; + dynamic productSkuList; + dynamic platterLsit; + int? giveNum = 0; + int? refundNum = 0; + double? productCountPercent; + double? productSellPricePercent; + + SingleSales(); + + factory SingleSales.fromJson(Map json) => $SingleSalesFromJson(json); + + Map toJson() => $SingleSalesToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/sku_attr_list.dart b/lib/data/sku_attr_list.dart new file mode 100644 index 00000000..4f2d43ba --- /dev/null +++ b/lib/data/sku_attr_list.dart @@ -0,0 +1,31 @@ + +import 'dart:convert'; + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/sku_attr_list.g.dart'; + + +@JsonSerializable() +class SkuAttrList { + String? attrValueId = ''; + int? isDelete = 0; + String? updateUser = ''; + String? updateTime = ''; + String? attrId = ''; + String? createTime = ''; + dynamic sortOrder; + String? createUser = ''; + String? id = ''; + String? skuId = ''; + + SkuAttrList(); + + factory SkuAttrList.fromJson(Map json) => $SkuAttrListFromJson(json); + + Map toJson() => $SkuAttrListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/sku_json.dart b/lib/data/sku_json.dart new file mode 100644 index 00000000..51287149 --- /dev/null +++ b/lib/data/sku_json.dart @@ -0,0 +1,25 @@ + + + +import 'dart:convert'; + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/sku_json.g.dart'; + +@JsonSerializable() +class SkuJson { + String? skuId = ''; + int? skuPrice = 0; + int? skuStock = 0; + + SkuJson(); + + factory SkuJson.fromJson(Map json) => $SkuJsonFromJson(json); + + Map toJson() => $SkuJsonToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/social_info.dart b/lib/data/social_info.dart new file mode 100644 index 00000000..4e5e37aa --- /dev/null +++ b/lib/data/social_info.dart @@ -0,0 +1,22 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/social_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/social_info.g.dart'; + +@JsonSerializable() +class SocialInfo { + int? fans = 0; + int? follow = 0; + int? achievementNumber = 0; + + SocialInfo(); + + factory SocialInfo.fromJson(Map json) => $SocialInfoFromJson(json); + + Map toJson() => $SocialInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/store.dart b/lib/data/store.dart new file mode 100644 index 00000000..46409c3e --- /dev/null +++ b/lib/data/store.dart @@ -0,0 +1,56 @@ + + +import 'package:huixiang/data/coupon_vo.dart'; +import 'package:huixiang/data/product_show.dart'; +import 'package:huixiang/data/store_type.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/store.g.dart'; + +@JsonSerializable() +class Store { + Store(); + + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + String? tenantCode; + bool? useErp; + String? openStartTime; + String? openEndTime; + String? perCapitaConsumption; + String? storeName; + double? distance; + String? logo; + String? facade; + String? shipAddress; + dynamic remark; + String? mobile; + String? longitude; + String? latitude; + dynamic refundAddress; + dynamic refundTel; + dynamic refundContact; + int? isAutoSendRefundAddress; + String? province; + String? city; + String? district; + String? address; + String? headName; + String? headMobile; + CouponVo? couponVO; + dynamic deliveryInfo; + String? businessType; + String? businessService; + List? productShow; + StoreType? posType; + + factory Store.fromJson(Map json) => $StoreFromJson(json); + + Map toJson() => $StoreToJson(this); +} + + + + diff --git a/lib/data/store_info.dart b/lib/data/store_info.dart new file mode 100644 index 00000000..ccb9c34c --- /dev/null +++ b/lib/data/store_info.dart @@ -0,0 +1,112 @@ +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/coupon_vo.dart'; +import 'package:huixiang/data/delivery_info.dart'; +import 'package:huixiang/data/member_source.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/pickup_type.dart'; +import 'package:huixiang/data/promotion.dart'; +import 'package:huixiang/data/store_type.dart'; +import 'package:huixiang/data/mini.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/store_info.g.dart'; + +@JsonSerializable() +class StoreInfo { + String? address; + List? bannerList; + String? city; + List? couponVOList; + String? createTime; + String? createUser; + DeliveryInfo? deliveryInfo; + PickupType? pickupType; + String? district; + String? headMobile; + String? tel; + String? headName; + String? id; + num? isAutoSendRefundAddress; + String? latitude; + String? logo; + bool? isVip; + String? longitude; + String? mobile; + String? openEndTime; + String? openStartTime; + String? perCapitaConsumption; + StoreType? posType; + List? promotionList; + String? province; + String? refundAddress; + String? refundContact; + String? refundTel; + String? remark; + String? shipAddress; + String? storeName; + StoreTable? storeTable; + String? tenantCode; + String? updateTime; + String? updateUser; + String? businessService; + Mini? mini; + bool? useErp; + bool? usePlatformVip; + bool? usePlatformPay; + String? expireTime; + String? vipFee; + MemberSource? memberSource; + PageInfo? informationVOPageVO; + + StoreInfo(); + + factory StoreInfo.fromJson(Map json) => + $StoreInfoFromJson(json); + + Map toJson() => $StoreInfoToJson(this); +} + +class StoreTable { + + StoreTable(); + + String? areaId; + String? id; + int? isDelete; + int? numberOfPeople; + String? remark; + String? storeId; + int? tableCapacity; + String? tableName; + int? tableSort; + int? tableType; + String? tenantCode; + + factory StoreTable.fromJson(Map json) => StoreTable() + ..areaId = json["areaId"] + ..id = json["id"] + ..isDelete = json["isDelete"] + ..numberOfPeople = json["numberOfPeople"] + ..remark = json["remark"] + ..storeId = json["storeId"] + ..tableCapacity = json["tableCapacity"] + ..tableName = json["tableName"] + ..tableSort = json["tableSort"] + ..tableType = json["tableType"] + ..tenantCode = json["tenantCode"]; + + Map toJson() => { + "areaId": this.areaId, + "id": this.id, + "isDelete": this.isDelete, + "numberOfPeople": this.numberOfPeople, + "remark": this.remark, + "storeId": this.storeId, + "tableCapacity": this.tableCapacity, + "tableName": this.tableName, + "tableSort": this.tableSort, + "tableType": this.tableType, + "tenantCode": this.tenantCode, + }; + +} + diff --git a/lib/data/store_time_info.dart b/lib/data/store_time_info.dart new file mode 100644 index 00000000..d13a65fa --- /dev/null +++ b/lib/data/store_time_info.dart @@ -0,0 +1,22 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/store_time_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/store_time_info.g.dart'; + +@JsonSerializable() +class StoreTimeInfo { + String? openEndTime = ''; + String? openStartTime = ''; + String? posType = ''; + + StoreTimeInfo(); + + factory StoreTimeInfo.fromJson(Map json) => $StoreTimeInfoFromJson(json); + + Map toJson() => $StoreTimeInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/store_total_money_info.dart b/lib/data/store_total_money_info.dart new file mode 100644 index 00000000..b36faca1 --- /dev/null +++ b/lib/data/store_total_money_info.dart @@ -0,0 +1,23 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/store_total_money_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/store_total_money_info.g.dart'; + +@JsonSerializable() +class StoreTotalMoneyInfo { + String? storeTotalMoney = ''; + int? paySumCount = 0; + int? memberCount = 0; + String? memberTotalBalance = ''; + + StoreTotalMoneyInfo(); + + factory StoreTotalMoneyInfo.fromJson(Map json) => $StoreTotalMoneyInfoFromJson(json); + + Map toJson() => $StoreTotalMoneyInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/store_type.dart b/lib/data/store_type.dart new file mode 100644 index 00000000..f0b1d0de --- /dev/null +++ b/lib/data/store_type.dart @@ -0,0 +1,15 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/store_type.g.dart'; + +@JsonSerializable() +class StoreType { + StoreType(); + + String? desc; + String? code; + + factory StoreType.fromJson(Map json) => + $StoreTypeFromJson(json); + + Map toJson() => $StoreTypeToJson(this); +} \ No newline at end of file diff --git a/lib/data/subscribe_param.dart b/lib/data/subscribe_param.dart new file mode 100644 index 00000000..2664bd3e --- /dev/null +++ b/lib/data/subscribe_param.dart @@ -0,0 +1,26 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/subscribe_param.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/subscribe_param.g.dart'; + +@JsonSerializable() +class SubscribeParam { + bool? isEnableSubscribe = false; + int? dayOrDate = 0; + dynamic startAfterDays; + dynamic daysValidate; + String? subscribeStartTime = ''; + String? subscribeEndTime = ''; + List? stores = []; + + SubscribeParam(); + + factory SubscribeParam.fromJson(Map json) => $SubscribeParamFromJson(json); + + Map toJson() => $SubscribeParamToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/task.dart b/lib/data/task.dart new file mode 100644 index 00000000..fb0be8e2 --- /dev/null +++ b/lib/data/task.dart @@ -0,0 +1,25 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/task.g.dart'; + +@JsonSerializable() +class Task { + Task(); + String? aspects; + int? complateNum; + int? conplateNum; + String? createTime; + String? createUser; + String? id; + int? limitDay; + String? name; + int? rewardType; + String? rewardValue; + bool? status; + String? type; + String? updateTime; + String? updateUser; + + factory Task.fromJson(Map json) => $TaskFromJson(json); + + Map toJson() => $TaskToJson(this); +} \ No newline at end of file diff --git a/lib/data/tenant_info.dart b/lib/data/tenant_info.dart new file mode 100644 index 00000000..6cae7f9b --- /dev/null +++ b/lib/data/tenant_info.dart @@ -0,0 +1,98 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/tenant_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/tenant_info.g.dart'; + +@JsonSerializable() +class TenantInfo { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? code = ''; + String? name = ''; + Type? type; + Status? status; + bool? readonly = false; + bool? usePlatformPay = false; + bool? usePlatformVip = false; + String? money = ''; + String? duty = ''; + String? address = ''; + int? expireLimitYear = 0; + String? startTime = ''; + String? expirationTime = ''; + String? contactTel = ''; + String? logo = ''; + String? describe = ''; + dynamic account; + String? dianwodaId = ''; + String? dadaId = ''; + bool? showVipCard = false; + String? packageId = ''; + String? packageName = ''; + PosType? posType; + + TenantInfo(); + + factory TenantInfo.fromJson(Map json) => $TenantInfoFromJson(json); + + Map toJson() => $TenantInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Type { + String? desc = ''; + String? code = ''; + + Type(); + + factory Type.fromJson(Map json) => $TypeFromJson(json); + + Map toJson() => $TypeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Status { + String? desc = ''; + String? code = ''; + + Status(); + + factory Status.fromJson(Map json) => $StatusFromJson(json); + + Map toJson() => $StatusToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class PosType { + String? desc = ''; + String? code = ''; + + PosType(); + + factory PosType.fromJson(Map json) => $PosTypeFromJson(json); + + Map toJson() => $PosTypeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/tenant_package.dart b/lib/data/tenant_package.dart new file mode 100644 index 00000000..f7535ae5 --- /dev/null +++ b/lib/data/tenant_package.dart @@ -0,0 +1,57 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/tenant_package.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/tenant_package.g.dart'; + +@JsonSerializable() +class TenantPackage { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? name = ''; + int? status = 0; + String? remark = ''; + dynamic packagePrice; + dynamic packageDiscount; + dynamic duration; + bool? enableSale = false; + int? sort = 0; + bool? isDefault = false; + int? isDelete = 0; + List? tenantPackageSale = []; + + TenantPackage(); + + factory TenantPackage.fromJson(Map json) => $TenantPackageFromJson(json); + + Map toJson() => $TenantPackageToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class TenantPackageSale { + String? packagePrice = ''; + String? originalPackagePrice = ''; + int? duration = 0; + int? packageDiscount = 0; + bool? isRecommend = false; + String? saleName = ''; + bool? canDiscount = false; + + TenantPackageSale(); + + factory TenantPackageSale.fromJson(Map json) => $TenantPackageSaleFromJson(json); + + Map toJson() => $TenantPackageSaleToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/tenant_package_calculate_details.dart b/lib/data/tenant_package_calculate_details.dart new file mode 100644 index 00000000..8500bcdc --- /dev/null +++ b/lib/data/tenant_package_calculate_details.dart @@ -0,0 +1,23 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/tenant_package_calculate_details.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/tenant_package_calculate_details.g.dart'; + +@JsonSerializable() +class TenantPackageCalculateDetails { + String? totalFee = ''; + String? expirationTime = ''; + int? duration = 0; + String? packageId = ''; + + TenantPackageCalculateDetails(); + + factory TenantPackageCalculateDetails.fromJson(Map json) => $TenantPackageCalculateDetailsFromJson(json); + + Map toJson() => $TenantPackageCalculateDetailsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/ticket.dart b/lib/data/ticket.dart new file mode 100644 index 00000000..63eeeb8f --- /dev/null +++ b/lib/data/ticket.dart @@ -0,0 +1,48 @@ + +import 'dart:convert'; + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/ticket.g.dart'; + + +@JsonSerializable() +class Ticket { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? storeId = ''; + String? orderId = ''; + String? orderProductId = ''; + String? productId = ''; + String? productSkuId = ''; + String? ticketWipedTimeTemplateId = ''; + String? amount = ''; + String? name = ''; + String? code = ''; + String? useStartTime = ''; + String? useEndTime = ''; + String? finishTime = ''; + String? type = ''; + dynamic source; + dynamic takeType; + String? style = ''; + int? state = 0; + bool? canSettlement = false; + bool? canSubscribe = false; + int? isDelete = 0; + String? tenantCode = ''; + + Ticket(); + + factory Ticket.fromJson(Map json) => $TicketFromJson(json); + + Map toJson() => $TicketToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/ticket_details.dart b/lib/data/ticket_details.dart new file mode 100644 index 00000000..e72df03e --- /dev/null +++ b/lib/data/ticket_details.dart @@ -0,0 +1,82 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/ticket_details.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/ticket_details.g.dart'; + +@JsonSerializable() +class TicketDetails { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? storeId = ''; + String? orderId = ''; + String? orderProductId = ''; + String? productId = ''; + String? productSkuId = ''; + String? ticketWipedTimeTemplateId = ''; + String? amount = ''; + String? name = ''; + String? code = ''; + String? useStartTime = ''; + String? useEndTime = ''; + dynamic finishTime; + String? type = ''; + dynamic source; + dynamic takeType; + String? style = ''; + int? state = 0; + bool? canSettlement = false; + bool? canSubscribe = false; + int? isDelete = 0; + String? tenantCode = ''; + List? ticketItemList = []; + String? userName = ''; + String? userAvatar = ''; + int? isogenyNumber = 0; + dynamic businessStartDate; + dynamic businessEndDate; + + TicketDetails(); + + factory TicketDetails.fromJson(Map json) => $TicketDetailsFromJson(json); + + Map toJson() => $TicketDetailsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class TicketItemList { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? ticketId = ''; + String? relationType = ''; + String? relationId = ''; + String? name = ''; + String? showImage = ''; + int? state = 0; + dynamic finishTime; + int? isDelete = 0; + String? tenantCode = ''; + int? canWipedNumber = 0; + + TicketItemList(); + + factory TicketItemList.fromJson(Map json) => $TicketItemListFromJson(json); + + Map toJson() => $TicketItemListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/ticket_item.dart b/lib/data/ticket_item.dart new file mode 100644 index 00000000..efc16aa7 --- /dev/null +++ b/lib/data/ticket_item.dart @@ -0,0 +1,35 @@ + +import 'dart:convert'; + +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/ticket_item.g.dart'; + +@JsonSerializable() +class TicketItems { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? ticketId = ''; + String? relationType = ''; + String? relationId = ''; + String? name = ''; + String? showImage = ''; + int? state = 0; + String? finishTime = ''; + int? isDelete = 0; + String? tenantCode = ''; + int? canWipedNumber = 0; + + TicketItems(); + + factory TicketItems.fromJson(Map json) => $TicketItemsFromJson(json); + + Map toJson() => $TicketItemsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/ticket_record.dart b/lib/data/ticket_record.dart new file mode 100644 index 00000000..6bf156f4 --- /dev/null +++ b/lib/data/ticket_record.dart @@ -0,0 +1,41 @@ +import 'package:huixiang/data/ticket.dart'; +import 'package:huixiang/data/ticket_item.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/ticket_record.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/ticket_record.g.dart'; + +@JsonSerializable() +class TicketRecord { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? ticketId = ''; + String? ticketCode = ''; + String? ticketName = ''; + List? ticketItemIds = []; + String? finishTime = ''; + String? wipedUserId = ''; + String? wipedUserName = ''; + String? wipedStoreId = ''; + int? isDelete = 0; + String? tenantCode = ''; + Ticket? ticket; + List? ticketItems = []; + dynamic userName; + dynamic userAvatar; + dynamic userPhone; + + TicketRecord(); + + factory TicketRecord.fromJson(Map json) => $TicketRecordFromJson(json); + + Map toJson() => $TicketRecordToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/ticket_show.dart b/lib/data/ticket_show.dart new file mode 100644 index 00000000..330c6bfc --- /dev/null +++ b/lib/data/ticket_show.dart @@ -0,0 +1,49 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/ticket_show.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/ticket_show.g.dart'; + +@JsonSerializable() +class TicketShow { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? storeId = ''; + String? orderId = ''; + String? orderProductId = ''; + String? productId = ''; + String? productSkuId = ''; + String? ticketWipedTimeTemplateId = ''; + String? amount = ''; + String? name = ''; + String? code = ''; + String? useStartTime = ''; + String? useEndTime = ''; + dynamic finishTime; + String? type = ''; + dynamic source; + dynamic takeType; + String? style = ''; + int? state = 0; + bool? canSettlement = false; + bool? canSubscribe = false; + int? isDelete = 0; + String? tenantCode = ''; + dynamic nickName; + dynamic userAvatar; + dynamic userPhone; + + TicketShow(); + + factory TicketShow.fromJson(Map json) => $TicketShowFromJson(json); + + Map toJson() => $TicketShowToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/ticket_stats.dart b/lib/data/ticket_stats.dart new file mode 100644 index 00000000..3c8cc14e --- /dev/null +++ b/lib/data/ticket_stats.dart @@ -0,0 +1,39 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/ticket_stats.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/ticket_stats.g.dart'; + +@JsonSerializable() +class TicketStats { + String? wipedDate = ''; + List? infoList = []; + + TicketStats(); + + factory TicketStats.fromJson(Map json) => $TicketStatsFromJson(json); + + Map toJson() => $TicketStatsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class InfoList { + String? ticketName = ''; + String? ticketItemName = ''; + int? wipedNumber = 0; + + InfoList(); + + factory InfoList.fromJson(Map json) => $InfoListFromJson(json); + + Map toJson() => $InfoListToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/trade_summary.dart b/lib/data/trade_summary.dart new file mode 100644 index 00000000..32f9732a --- /dev/null +++ b/lib/data/trade_summary.dart @@ -0,0 +1,42 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/trade_summary.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/trade_summary.g.dart'; + +@JsonSerializable() +class TradeSummary { + List? saleBusinessAnalysisVOS = []; + String? collectionAmount = ''; + int? collectionCount = 0; + String? refundAmount = ''; + int? refundCount = 0; + + TradeSummary(); + + factory TradeSummary.fromJson(Map json) => $TradeSummaryFromJson(json); + + Map toJson() => $TradeSummaryToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class SaleBusinessAnalysisVOS { + String? localDateTime = ''; + String? localDateBigDecimal = ''; + String? localDateCount = ''; + + SaleBusinessAnalysisVOS(); + + factory SaleBusinessAnalysisVOS.fromJson(Map json) => $SaleBusinessAnalysisVOSFromJson(json); + + Map toJson() => $SaleBusinessAnalysisVOSToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/upload_result.dart b/lib/data/upload_result.dart new file mode 100644 index 00000000..be3ab888 --- /dev/null +++ b/lib/data/upload_result.dart @@ -0,0 +1,38 @@ +import 'package:huixiang/data/data_type.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/upload_result.g.dart'; + +@JsonSerializable() +class UploadResult { + UploadResult(); + String? id; + String? createTime; + String? createUser; + String? updateTime; + String? updateUser; + DataType? dataType; + String? submittedFileName; + String? treePath; + int? grade; + bool? isDelete; + String? folderId; + String? url; + String? size; + String? folderName; + dynamic group; + String? path; + String? relativePath; + dynamic fileMd5; + String? contextType; + String? filename; + String? ext; + String? icon; + String? createMonth; + String? createWeek; + String? createDay; + + factory UploadResult.fromJson(Map json) => + $UploadResultFromJson(json); + + Map toJson() => $UploadResultToJson(this); +} diff --git a/lib/data/user_bill.dart b/lib/data/user_bill.dart new file mode 100644 index 00000000..146e08ac --- /dev/null +++ b/lib/data/user_bill.dart @@ -0,0 +1,41 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/user_bill.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/user_bill.g.dart'; + +@JsonSerializable() +class UserBill { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? linkId = ''; + int? pm = 0; + String? title = ''; + String? category = ''; + String? type = ''; + String? number = ''; + String? realNumber = ''; + String? activityMoney = ''; + String? surplusActivityMoney = ''; + String? greenMoney = ''; + String? surplusGreenMoney = ''; + String? balance = ''; + String? mark = ''; + bool? status = false; + bool? isDeleted = false; + String? name = ''; + + UserBill(); + + factory UserBill.fromJson(Map json) => $UserBillFromJson(json); + + Map toJson() => $UserBillToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/user_entity.dart b/lib/data/user_entity.dart new file mode 100644 index 00000000..fd5a5599 --- /dev/null +++ b/lib/data/user_entity.dart @@ -0,0 +1,25 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/user_entity.g.dart'; + +@JsonSerializable() +class UserEntity { + UserEntity(); + + String? account; + String? avatar; + String? expiration; + String? expire; + String? mobile; + String? name; + String? refreshToken; + String? token; + String? tokenType; + String? userId; + String? userType; + String? workDescribe; + + factory UserEntity.fromJson(Map json) => + $UserEntityFromJson(json); + + Map toJson() => $UserEntityToJson(this); +} diff --git a/lib/data/user_info.dart b/lib/data/user_info.dart new file mode 100644 index 00000000..178ffb67 --- /dev/null +++ b/lib/data/user_info.dart @@ -0,0 +1,63 @@ +/// vipNo : null +/// nickname : "回乡_019921" +/// headimg : "" +/// userType : true +/// sex : "" +/// level : 1 +/// addressId : "0" +/// remark : "" +/// phone : "15827991714" +/// createTime : "2021-06-21 15:40:38" +/// birth : "" +/// balance : null +/// money : "0.00" +/// points : "0" +/// isBind : null +/// memberRankVo : null +import 'package:huixiang/data/member_rank.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/user_info.g.dart'; + +@JsonSerializable() +class UserInfo { + UserInfo(); + + String? vipNo; + String? vipScanNo; + String? nickname; + String? headimg; + bool? userType; + String? sex; + int? level; + String? addressId; + String? remark; + String? phone; + String? createTime; + String? birth; + dynamic balance; + String? money; + String? activityMoney; + String? expendAmount; + String? points; + String? greenMoney; + String? raiseMoney; + String? raiseExpireTime; + bool? isBind; + String? masterId; + dynamic inviteNumber; + dynamic todayInviteNumber; + String? masterCardRankName; + MemberRank? memberRankVo; + String? inviteCode; + String? signature; + String? background; + bool? hasPayPassword; + String? happyBean; + bool? isVip; + + factory UserInfo.fromJson(Map json) => + $UserInfoFromJson(json); + + Map toJson() => $UserInfoToJson(this); + +} diff --git a/lib/data/user_info_edit.dart b/lib/data/user_info_edit.dart new file mode 100644 index 00000000..6bf67c71 --- /dev/null +++ b/lib/data/user_info_edit.dart @@ -0,0 +1,60 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/user_info_edit.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/user_info_edit.g.dart'; + +@JsonSerializable() +class UserInfoEdit { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? account = ''; + String? name = ''; + dynamic org; + dynamic station; + dynamic type; + dynamic email; + dynamic mobile; + UserInfoEditSex? sex; + dynamic status; + dynamic avatar; + dynamic nation; + dynamic education; + dynamic positionStatus; + dynamic workDescribe; + dynamic passwordErrorLastTime; + int? passwordErrorNum = 0; + dynamic passwordExpireTime; + String? password = ''; + dynamic lastLoginTime; + + UserInfoEdit(); + + factory UserInfoEdit.fromJson(Map json) => $UserInfoEditFromJson(json); + + Map toJson() => $UserInfoEditToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class UserInfoEditSex { + String? desc = ''; + String? code = ''; + + UserInfoEditSex(); + + factory UserInfoEditSex.fromJson(Map json) => $UserInfoEditSexFromJson(json); + + Map toJson() => $UserInfoEditSexToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/verify_code.dart b/lib/data/verify_code.dart new file mode 100644 index 00000000..02b20c17 --- /dev/null +++ b/lib/data/verify_code.dart @@ -0,0 +1,21 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/verify_code.g.dart'; + +@JsonSerializable() +class VerifyCode { + VerifyCode(); + int? code; + Map? data; + dynamic extra; + bool? isError; + bool? isSuccess; + String? msg; + String? path; + String? timestamp; + + factory VerifyCode.fromJson(Map json) => + $VerifyCodeFromJson(json); + + Map toJson() => $VerifyCodeToJson(this); +} + diff --git a/lib/data/vip_badges.dart b/lib/data/vip_badges.dart new file mode 100644 index 00000000..9f488a26 --- /dev/null +++ b/lib/data/vip_badges.dart @@ -0,0 +1,31 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/vip_badges.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/vip_badges.g.dart'; + +@JsonSerializable() +class VipBadges { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? name = ''; + int? eachReward = 0; + String? code = ''; + String? icon = ''; + bool? actived = false; + int? sort = 0; + int? isDelete = 0; + + VipBadges(); + + factory VipBadges.fromJson(Map json) => $VipBadgesFromJson(json); + + Map toJson() => $VipBadgesToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/vip_benefit.dart b/lib/data/vip_benefit.dart new file mode 100644 index 00000000..7054427b --- /dev/null +++ b/lib/data/vip_benefit.dart @@ -0,0 +1,35 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/vip_benefit.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/vip_benefit.g.dart'; + +@JsonSerializable() +class VipBenefit { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? code = ''; + String? name = ''; + String? icon = ''; + String? iconGrey = ''; + String? introduce = ''; + String? describes = ''; + bool? actived = false; + int? sort = 0; + int? isDelete = 0; + bool? have = false; + String? config = ''; + + VipBenefit(); + + factory VipBenefit.fromJson(Map json) => $VipBenefitFromJson(json); + + Map toJson() => $VipBenefitToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/vip_card.dart b/lib/data/vip_card.dart new file mode 100644 index 00000000..f269db0d --- /dev/null +++ b/lib/data/vip_card.dart @@ -0,0 +1,50 @@ +import 'package:huixiang/data/store.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/vip_card.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/vip_card.g.dart'; + +@JsonSerializable() +class VipCard { + String? id = ''; + String? createTime = ''; + dynamic createUser; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? openid = ''; + String? nickname = ''; + String? headimg = ''; + String? balance = ''; + String? realRecharge = ''; + String? sex = ''; + bool? status = false; + bool? onCredit = false; + String? loginTime = ''; + int? loginNum = 0; + String? tenantCode = ''; + int? source = 0; + String? expendAmount = ''; + int? buyTimes = 0; + dynamic lastBuyTime; + @JSONField(name: "vip_no") + dynamic vipNo; + dynamic expireTime; + int? integral = 0; + int? level = 0; + dynamic vipRegStore; + String? tenantName = ''; + String? tenantLogo = ''; + List? storeList = []; + + VipCard(); + + factory VipCard.fromJson(Map json) => $VipCardFromJson(json); + + Map toJson() => $VipCardToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} diff --git a/lib/data/vip_card_home.dart b/lib/data/vip_card_home.dart new file mode 100644 index 00000000..174ccd12 --- /dev/null +++ b/lib/data/vip_card_home.dart @@ -0,0 +1,154 @@ +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/vip_card_home.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/vip_card_home.g.dart'; + +@JsonSerializable() +class VipCardHome { + Member? member; + List? cards = []; + List? coupons = []; + List? productVips = []; + + VipCardHome(); + + factory VipCardHome.fromJson(Map json) => $VipCardHomeFromJson(json); + + Map toJson() => $VipCardHomeToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Member { + String? masterId = ''; + dynamic masterCardRankName; + String? vipNo = ''; + String? nickname = ''; + String? headimg = ''; + bool? userType = false; + String? sex = ''; + int? level = 0; + String? addressId = ''; + String? remark = ''; + String? phone = ''; + String? createTime = ''; + String? birth = ''; + dynamic balance; + String? money = ''; + String? activityMoney = ''; + String? greenMoney = ''; + String? expendAmount = ''; + int? organic = 0; + String? points = ''; + bool? isBind = false; + MemberRankVo? memberRankVo; + int? age = 0; + String? inviteCode = ''; + int? inviteNumber = 0; + int? todayInviteNumber = 0; + String? signature = ''; + String? background = ''; + dynamic certification; + bool? hasPayPassword = false; + bool? isVip = false; + dynamic vipExpire; + bool? isVipSubscribe = false; + int? vipDuration = 0; + + Member(); + + factory Member.fromJson(Map json) => $MemberFromJson(json); + + Map toJson() => $MemberToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class Cards { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? name = ''; + int? duration = 0; + String? price = ''; + bool? autoSubscribe = false; + bool? isDelete = false; + + Cards(); + + factory Cards.fromJson(Map json) => $CardsFromJson(json); + + Map toJson() => $CardsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} + +@JsonSerializable() +class ProductVips { + String? id = ''; + String? tenantCode = ''; + String? createTime = ''; + String? createUser = ''; + String? image = ''; + String? updateTime = ''; + String? updateUser = ''; + String? supplierName = ''; + String? storeId = ''; + String? categoryId = ''; + String? groupId = ''; + String? shortName = ''; + String? productName = ''; + String? sellDesc = ''; + String? productCode = ''; + String? weight = ''; + String? applyPrice = ''; + String? price = ''; + String? vipPrice = ''; + int? stock = 0; + int? sellCount = 0; + int? needLogistics = 0; + int? oversold = 0; + int? organic = 0; + int? status = 0; + bool? posShow = false; + int? productType = 0; + int? productNumber = 0; + int? setMeal = 0; + int? attrStyle = 0; + String? detail = ''; + int? isDelete = 0; + String? printerFlag = ''; + dynamic materials; + dynamic materialId; + String? details = ''; + String? thumbnailImg = ''; + String? info = ''; + int? buyCount = 0; + int? sellCountLimit = 0; + String? vipDiscount = ''; + + ProductVips(); + + factory ProductVips.fromJson(Map json) => $ProductVipsFromJson(json); + + Map toJson() => $ProductVipsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/vip_counts_info.dart b/lib/data/vip_counts_info.dart new file mode 100644 index 00000000..a3e1df86 --- /dev/null +++ b/lib/data/vip_counts_info.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/vip_counts_info.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/vip_counts_info.g.dart'; + +@JsonSerializable() +class VipCountsInfo { + String? dayMoney = ''; + String? yesterdayMoney = ''; + String? paySum = ''; + String? yesterdayPaySum = ''; + String? rechargeMoney = ''; + String? weekRechargeMoney = ''; + String? lastWeekRechargeMoney = ''; + int? orderNum = 0; + int? yesterdayOrderNum = 0; + int? memberNum = 0; + int? lastWeekMemberNum = 0; + int? weekMemberNum = 0; + int? newMemberNum = 0; + int? yesterdayNewMemberNum = 0; + + VipCountsInfo(); + + factory VipCountsInfo.fromJson(Map json) => $VipCountsInfoFromJson(json); + + Map toJson() => $VipCountsInfoToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/vip_record_details.dart b/lib/data/vip_record_details.dart new file mode 100644 index 00000000..e42c67a7 --- /dev/null +++ b/lib/data/vip_record_details.dart @@ -0,0 +1,41 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/vip_record_details.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/vip_record_details.g.dart'; + +@JsonSerializable() +class VipRecordDetails { + String? id = ''; + String? createTime = ''; + String? createUser = ''; + String? updateTime = ''; + String? updateUser = ''; + String? mid = ''; + String? linkId = ''; + int? pm = 0; + String? title = ''; + String? category = ''; + String? type = ''; + String? number = ''; + String? realNumber = ''; + String? balance = ''; + String? mark = ''; + bool? status = false; + bool? isDeleted = false; + String? tenantName = ''; + String? rechargeMoney = ''; + String? giftMoney = ''; + String? totalMoney = ''; + String? balanceMoney = ''; + + VipRecordDetails(); + + factory VipRecordDetails.fromJson(Map json) => $VipRecordDetailsFromJson(json); + + Map toJson() => $VipRecordDetailsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/vip_rule_details.dart b/lib/data/vip_rule_details.dart new file mode 100644 index 00000000..b1bc9301 --- /dev/null +++ b/lib/data/vip_rule_details.dart @@ -0,0 +1,23 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/vip_rule_details.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/vip_rule_details.g.dart'; + +@JsonSerializable() +class VipRuleDetails { + String? rule = ''; + String? contrast = ''; + String? qa = ''; + String? recharge = ''; + + VipRuleDetails(); + + factory VipRuleDetails.fromJson(Map json) => $VipRuleDetailsFromJson(json); + + Map toJson() => $VipRuleDetailsToJson(this); + + @override + String toString() { + return jsonEncode(this); + } +} \ No newline at end of file diff --git a/lib/data/wx_pay.dart b/lib/data/wx_pay.dart new file mode 100644 index 00000000..b72f3d15 --- /dev/null +++ b/lib/data/wx_pay.dart @@ -0,0 +1,36 @@ +import 'package:huixiang/generated/json/base/json_field.dart'; +import 'package:huixiang/generated/json/wx_pay.g.dart'; +import 'dart:convert'; +export 'package:huixiang/generated/json/wx_pay.g.dart'; + +@JsonSerializable() +class WxPay { + String? appId = ''; + String? nonceStr = ''; + String? packageValue = ''; + String? partnerId = ''; + String? prepayId = ''; + String? sign = ''; + String? timeStamp = ''; + + WxPay(); + + factory WxPay.fromJson(Map json) => $WxPayFromJson(json); + + Map toJson() => $WxPayToJson(this); + + @override + String toString() { + return jsonEncode(this); + } + + bool isAnyEmpty() { + return (appId?.isEmpty ?? true) + && (nonceStr?.isEmpty ?? true) + && (packageValue?.isEmpty ?? true) + && (partnerId?.isEmpty ?? true) + && (prepayId?.isEmpty ?? true) + && (sign?.isEmpty ?? true) + && (timeStamp?.isEmpty ?? true); + } +} \ No newline at end of file diff --git a/lib/generated/intl/messages_all.dart b/lib/generated/intl/messages_all.dart index b6e31c3e..0feda714 100644 --- a/lib/generated/intl/messages_all.dart +++ b/lib/generated/intl/messages_all.dart @@ -11,6 +11,7 @@ import 'dart:async'; +import 'package:flutter/foundation.dart'; import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; import 'package:intl/src/intl_helpers.dart'; @@ -24,15 +25,15 @@ import 'messages_zh_TW.dart' as messages_zh_tw; typedef Future LibraryLoader(); Map _deferredLibraries = { - 'en': () => new Future.value(null), - 'en_US': () => new Future.value(null), - 'zh_CN': () => new Future.value(null), - 'zh_Hans_CN': () => new Future.value(null), - 'zh_Hant_CN': () => new Future.value(null), - 'zh_TW': () => new Future.value(null), + 'en': () => new SynchronousFuture(null), + 'en_US': () => new SynchronousFuture(null), + 'zh_CN': () => new SynchronousFuture(null), + 'zh_Hans_CN': () => new SynchronousFuture(null), + 'zh_Hant_CN': () => new SynchronousFuture(null), + 'zh_TW': () => new SynchronousFuture(null), }; -MessageLookupByLibrary _findExact(String localeName) { +MessageLookupByLibrary? _findExact(String localeName) { switch (localeName) { case 'en': return messages_en.messages; @@ -52,19 +53,18 @@ MessageLookupByLibrary _findExact(String localeName) { } /// User programs should call this before using [localeName] for messages. -Future initializeMessages(String localeName) async { +Future initializeMessages(String localeName) { var availableLocale = Intl.verifiedLocale( - localeName, - (locale) => _deferredLibraries[locale] != null, - onFailure: (_) => null); + localeName, (locale) => _deferredLibraries[locale] != null, + onFailure: (_) => null); if (availableLocale == null) { - return new Future.value(false); + return new SynchronousFuture(false); } var lib = _deferredLibraries[availableLocale]; - await (lib == null ? new Future.value(false) : lib()); + lib == null ? new SynchronousFuture(false) : lib(); initializeInternalMessageLookup(() => new CompositeMessageLookup()); messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor); - return new Future.value(true); + return new SynchronousFuture(true); } bool _messagesExistFor(String locale) { @@ -75,9 +75,9 @@ bool _messagesExistFor(String locale) { } } -MessageLookupByLibrary _findGeneratedMessagesFor(String locale) { - var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, - onFailure: (_) => null); +MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) { + var actualLocale = + Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); if (actualLocale == null) return null; return _findExact(actualLocale); } diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 6b620565..03f416b1 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,814 +20,908 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'en'; - static m0(version) => "版本:${version}"; + static String m0(version) => "版本:${version}"; - static m1(yuan) => "充值金额最小是${yuan}元"; + static String m1(yuan) => "充值金额最小是${yuan}元"; - static m2(time) => "创建时间${time}"; + static String m2(time) => "创建时间${time}"; - static m3(xihuan) => "点赞喜欢${xihuan}"; + static String m3(xihuan) => "点赞喜欢${xihuan}"; - static m4(shijian) => "发行开始时间 ${shijian}"; + static String m4(shijian) => "发行开始时间 ${shijian}"; - static m5(ge) => "${ge}g/个"; + static String m5(ge) => "${ge}g/个"; - static m6(jian) => "共${jian}件"; + static String m6(jian) => "共${jian}件"; - static m7(jian) => "共${jian}件商品"; + static String m7(jian) => "共${jian}件商品"; - static m8(km) => "${km}公里"; + static String m8(km) => "${km}公里"; - static m9(huifu) => "回复@${huifu}:"; + static String m9(huifu) => "回复@${huifu}:"; - static m10(yuan) => "活动减免${yuan}元配送费"; + static String m10(yuan) => "活动减免${yuan}元配送费"; - static m11(yue) => "活动余额 ${yue}"; + static String m11(yue) => "活动余额 ${yue}"; - static m12(jifen) => "+ ${jifen} 积分"; + static String m12(jifen) => "+ ${jifen} 积分"; - static m13(jianjie) => "简介:${jianjie}"; + static String m13(jianjie) => "简介:${jianjie}"; - static m14(jifen) => "${jifen}积分"; + static String m14(jifen) => "${jifen}积分"; - static m15(jifen) => "${jifen}积分 到下一个等级"; + static String m15(jifen) => "${jifen}积分 到下一个等级"; - static m16(date) => "开通日期:${date}"; + static String m16(date) => "开通日期:${date}"; - static m17(shijian) => "领取时间 ${shijian}"; + static String m17(shijian) => "领取时间 ${shijian}"; - static m18(yue) => "绿币 ${yue}"; + static String m18(yue) => "绿币 ${yue}"; - static m19(man, jian) => "满${man}元立减${jian}元代金券"; + static String m19(man, jian) => "满${man}元立减${jian}元代金券"; - static m20(yuan) => "满${yuan}可用"; + static String m20(yuan) => "满${yuan}可用"; - static m21(mi) => "${mi}米"; + static String m21(mi) => "${mi}米"; - static m22(tian) => "您已连续签到${tian}天"; + static String m22(tian) => "您已连续签到${tian}天"; - static m23(pinglun) => "评论(${pinglun})"; + static String m23(pinglun) => "评论(${pinglun})"; - static m24(zongyue) => "余额:${zongyue}"; + static String m24(zongyue) => "余额:${zongyue}"; - static m25(zhe) => "全场${zhe}折"; + static String m25(zhe) => "全场${zhe}折"; - static m26(num) => "取单号${num}"; + static String m26(num) => "取单号${num}"; - static m27(ren) => "¥${ren}/人"; + static String m27(ren) => "¥${ren}/人"; - static m28(second) => "${second}s后重新发送"; + static String m28(second) => "${second}s后重新发送"; - static m29(jifen) => "商品积分 ${jifen}积分"; + static String m29(jifen) => "商品积分 ${jifen}积分"; - static m30(jifen) => "实付积分 ${jifen}积分"; + static String m30(jifen) => "实付积分 ${jifen}积分"; - static m31(jihuanka) => "实付集换卡 ${jihuanka}集换卡"; + static String m31(jihuanka) => "实付集换卡 ${jihuanka}集换卡"; - static m32(sui) => "${sui}岁"; + static String m32(sui) => "${sui}岁"; - static m33(num) => "完成${num}"; + static String m33(num) => "完成${num}"; - static m34(time) => "下单时间:${time}"; + static String m34(time) => "下单时间:${time}"; - static m35(xihuan) => "喜欢(${xihuan})"; + static String m35(xihuan) => "喜欢(${xihuan})"; - static m36(shoujihao) => "邀请人手机号:${shoujihao}"; + static String m36(shoujihao) => "邀请人手机号:${shoujihao}"; - static m37(jian) => "已兑换${jian}件"; + static String m37(jian) => "已兑换${jian}件"; - static m38(time) => "营业时间: ${time}"; + static String m38(time) => "营业时间: ${time}"; - static m39(date) => "有效期:${date}"; + static String m39(date) => "有效期:${date}"; - static m40(date) => "有效期至${date}"; + static String m40(date) => "有效期至${date}"; - static m41(yuan) => "${yuan}元"; + static String m41(yuan) => "${yuan}元"; - static m42(yue) => "余额${yue}"; + static String m42(yue) => "余额${yue}"; - static m43(yue) => "余额 ${yue}"; + static String m43(yue) => "余额 ${yue}"; - static m44(zuozhe) => "作者:${zuozhe}"; + static String m44(zuozhe) => "作者:${zuozhe}"; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "bainianchuanjiao" : MessageLookupByLibrary.simpleMessage("百年川椒"), - "baiyin" : MessageLookupByLibrary.simpleMessage("白银"), - "baiyinhuiyuan" : MessageLookupByLibrary.simpleMessage("白银会员"), - "banben" : m0, - "bangdingfuka" : MessageLookupByLibrary.simpleMessage("绑定副卡"), - "bangdingshouji" : MessageLookupByLibrary.simpleMessage("绑定手机"), - "bangong" : MessageLookupByLibrary.simpleMessage("办公"), - "bangzhuyufankui" : MessageLookupByLibrary.simpleMessage("帮助与反馈"), - "baocun" : MessageLookupByLibrary.simpleMessage("保存"), - "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), - "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), - "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), - "beizhu" : MessageLookupByLibrary.simpleMessage("备注"), - "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("备注信息"), - "benzhouquanbao" : MessageLookupByLibrary.simpleMessage("本周券包"), - "bianjidizhi" : MessageLookupByLibrary.simpleMessage("编辑地址"), - "bianjigerenziliao" : MessageLookupByLibrary.simpleMessage("编辑个人资料"), - "biaojiweiyidu" : MessageLookupByLibrary.simpleMessage("标为已读"), - "biaoweiyidu" : MessageLookupByLibrary.simpleMessage("标为已读"), - "bodadianhua" : MessageLookupByLibrary.simpleMessage("拨打电话"), - "bofangcishu" : MessageLookupByLibrary.simpleMessage("播放次数"), - "bojin" : MessageLookupByLibrary.simpleMessage("铂金"), - "brand_yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "buzhichikaipiao" : MessageLookupByLibrary.simpleMessage("不支持开票"), - "canyingfuwu" : MessageLookupByLibrary.simpleMessage("餐饮服务"), - "chakan" : MessageLookupByLibrary.simpleMessage("查看"), - "chakangengduo" : MessageLookupByLibrary.simpleMessage("查看更多"), - "chakanhexiaoma" : MessageLookupByLibrary.simpleMessage("查看核销码"), - "chakanquanyi" : MessageLookupByLibrary.simpleMessage("查看权益"), - "chakanshixiaoquan" : MessageLookupByLibrary.simpleMessage("查看失效券"), - "chakanwodekabao" : MessageLookupByLibrary.simpleMessage("查看我的卡包"), - "chakanwodekaquan" : MessageLookupByLibrary.simpleMessage("查看我的卡券"), - "chakanwuliu" : MessageLookupByLibrary.simpleMessage("查看物流"), - "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"), - "changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"), - "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"), - "chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"), - "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"), - "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), - "chengjiu" : MessageLookupByLibrary.simpleMessage("成就"), - "chengjiuhuizhang" : MessageLookupByLibrary.simpleMessage("成就徽章"), - "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"), - "chengweidianpuzhuanshuhuiyuan" : MessageLookupByLibrary.simpleMessage("成为店铺专属会员,享专属权益"), - "chi" : MessageLookupByLibrary.simpleMessage("吃"), - "chijiankang" : MessageLookupByLibrary.simpleMessage("吃健康"), - "chongzhi" : MessageLookupByLibrary.simpleMessage("充值"), - "chongzhichenggong" : MessageLookupByLibrary.simpleMessage("充值成功"), - "chongzhifuliduo" : MessageLookupByLibrary.simpleMessage("充值福利多"), - "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), - "chongzhizuixiaojine" : m1, - "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"), - "chuangshirendegushi1" : MessageLookupByLibrary.simpleMessage("创始人的故事"), - "chuzhiyouhui" : MessageLookupByLibrary.simpleMessage("储值优惠"), - "code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"), - "cunchu" : MessageLookupByLibrary.simpleMessage("存储"), - "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), - "dabaodaodianqu" : MessageLookupByLibrary.simpleMessage("打包到店取"), - "daifukuan" : MessageLookupByLibrary.simpleMessage("待付款"), - "daipeisong" : MessageLookupByLibrary.simpleMessage("待配送"), - "daiqucan" : MessageLookupByLibrary.simpleMessage("待取餐"), - "daiqueren" : MessageLookupByLibrary.simpleMessage("待确认"), - "daizhifu" : MessageLookupByLibrary.simpleMessage("待支付"), - "daizhizuo" : MessageLookupByLibrary.simpleMessage("待制作"), - "dajiadouzaiduihuan" : MessageLookupByLibrary.simpleMessage("大家都在兑换"), - "dakaidingwei" : MessageLookupByLibrary.simpleMessage("打开定位"), - "dangqianbanben" : MessageLookupByLibrary.simpleMessage("当前版本"), - "dangqiandengji" : MessageLookupByLibrary.simpleMessage("当前等级"), - "dangqianjifen" : MessageLookupByLibrary.simpleMessage("当前积分:"), - "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), - "dangqianzhukadengji" : MessageLookupByLibrary.simpleMessage("当前主卡等级"), - "daodianziqu" : MessageLookupByLibrary.simpleMessage("到店自取"), - "daopinglunliebiaodingbu" : MessageLookupByLibrary.simpleMessage("到评论列表顶部"), - "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等级"), - "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家确认"), - "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"), - "denglu" : MessageLookupByLibrary.simpleMessage("登录"), - "diancan" : MessageLookupByLibrary.simpleMessage("点餐"), - "diandan" : MessageLookupByLibrary.simpleMessage("点单"), - "dianhua" : MessageLookupByLibrary.simpleMessage("电话"), - "dianjidenglu" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), - "dianneiyongcan" : MessageLookupByLibrary.simpleMessage("店内用餐"), - "dianpuchongzhi" : MessageLookupByLibrary.simpleMessage("店铺充值"), - "dianputuijian" : MessageLookupByLibrary.simpleMessage("店铺推荐"), - "dianpuyue" : MessageLookupByLibrary.simpleMessage("店铺余额"), - "dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"), - "dianzan" : MessageLookupByLibrary.simpleMessage("点赞"), - "dianzanxihuan_" : m3, - "dingdan" : MessageLookupByLibrary.simpleMessage("订单"), - "dingdanbianhao" : MessageLookupByLibrary.simpleMessage("订单编号"), - "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("订单待发货"), - "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("订单待支付"), - "dingdangenzong" : MessageLookupByLibrary.simpleMessage("订单跟踪"), - "dingdanhao" : MessageLookupByLibrary.simpleMessage("订单号"), - "dingdanjiesuan" : MessageLookupByLibrary.simpleMessage("订单结算"), - "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), - "dingdantongzhi" : MessageLookupByLibrary.simpleMessage("订单通知"), - "dingdanxiaoxi" : MessageLookupByLibrary.simpleMessage("订单消息"), - "dingdanyisongda" : MessageLookupByLibrary.simpleMessage("订单送达"), - "dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("订单已退款"), - "dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("订单已完成"), - "dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单已支付"), - "dingwei" : MessageLookupByLibrary.simpleMessage("定位"), - "dizhi" : MessageLookupByLibrary.simpleMessage("地址"), - "dongtai" : MessageLookupByLibrary.simpleMessage("动态"), - "dongtaitishi" : MessageLookupByLibrary.simpleMessage("用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示"), - "dongtaixiangqing" : MessageLookupByLibrary.simpleMessage("动态详情"), - "duihuan" : MessageLookupByLibrary.simpleMessage("兑换"), - "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), - "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), - "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), - "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), - "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), - "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), - "duihuanquan" : MessageLookupByLibrary.simpleMessage("兑换券"), - "duihuanshangpinxiangqing" : MessageLookupByLibrary.simpleMessage("兑换商品详情"), - "duihuanxinxi" : MessageLookupByLibrary.simpleMessage("兑换信息"), - "duozhongyouhui" : MessageLookupByLibrary.simpleMessage("多种优惠券等你拿"), - "fabu" : MessageLookupByLibrary.simpleMessage("发布"), - "fangshier" : MessageLookupByLibrary.simpleMessage("方式二"), - "fangshiyi" : MessageLookupByLibrary.simpleMessage("方式一"), - "fanhuiduihuanlishi" : MessageLookupByLibrary.simpleMessage("返回兑换历史"), - "fanhuishequn" : MessageLookupByLibrary.simpleMessage("返回社群"), - "fanhuishouye" : MessageLookupByLibrary.simpleMessage("返回首页"), - "fankui" : MessageLookupByLibrary.simpleMessage("反馈"), - "fankuilizi" : MessageLookupByLibrary.simpleMessage("您可以在这里输入反馈内容,例如产品建议,功能异常等"), - "fantizhongwen" : MessageLookupByLibrary.simpleMessage("繁体中文"), - "fapiao" : MessageLookupByLibrary.simpleMessage("发票"), - "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"), - "fasong" : MessageLookupByLibrary.simpleMessage("发送"), - "fasongduanxin" : MessageLookupByLibrary.simpleMessage("发送短信"), - "faxingshijian" : m4, - "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换码"), - "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), - "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), - "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), - "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), - "fenxiangjiankang" : MessageLookupByLibrary.simpleMessage("分享健康"), - "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), - "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("将邀请码分享给好友,对方在海峡姐妹App登录页输入邀请码,即可邀请成功。"), - "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), - "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手机号"), - "fuliduihuan" : MessageLookupByLibrary.simpleMessage("福利兑换"), - "fulizhongxin" : MessageLookupByLibrary.simpleMessage("福利中心"), - "ge" : m5, - "geiwopingfen" : MessageLookupByLibrary.simpleMessage("给我评分"), - "gengduo" : MessageLookupByLibrary.simpleMessage("更多"), - "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), - "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), - "genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改绑定手机号"), - "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"), - "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), - "gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"), - "gerenxinxi" : MessageLookupByLibrary.simpleMessage("个人信息"), - "gexingqianming" : MessageLookupByLibrary.simpleMessage("个性签名"), - "gong" : MessageLookupByLibrary.simpleMessage("共"), - "gongchuanghuiyuan" : MessageLookupByLibrary.simpleMessage("共创会员"), - "gongjijian" : m6, - "gongjijianshangpin" : m7, - "gongli" : m8, - "gongxinchengwei" : MessageLookupByLibrary.simpleMessage("恭喜您成为"), - "gongxinichengweibendianhuiyuan" : MessageLookupByLibrary.simpleMessage("恭喜您,成为本店的会员,快去享受超多会员权益吧。"), - "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和海峡姐妹服务协议"), - "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), - "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), - "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"), - "guanyuhuixiang" : MessageLookupByLibrary.simpleMessage("关于回乡"), - "guanzhu" : MessageLookupByLibrary.simpleMessage("关注"), - "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), - "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), - "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), - "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "haowu" : MessageLookupByLibrary.simpleMessage("好物"), - "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友奖励规则"), - "he" : MessageLookupByLibrary.simpleMessage("喝"), - "heji" : MessageLookupByLibrary.simpleMessage("合计:"), - "hejiankang" : MessageLookupByLibrary.simpleMessage("喝健康"), - "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), - "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), - "huangjin" : MessageLookupByLibrary.simpleMessage("黄金"), - "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"), - "huifu" : MessageLookupByLibrary.simpleMessage("回复"), - "huifu_" : m9, - "huixiangVIPka" : MessageLookupByLibrary.simpleMessage("回乡VIP卡"), - "huixiangqianbao" : MessageLookupByLibrary.simpleMessage("海峡钱包"), - "huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), - "huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"), - "huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"), - "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"), - "huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"), - "huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"), - "huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"), - "huiyuanhuodejifen" : MessageLookupByLibrary.simpleMessage("会员如何获得积分"), - "huiyuanjia" : MessageLookupByLibrary.simpleMessage("会员价"), - "huiyuanjibieduizhao" : MessageLookupByLibrary.simpleMessage("会员级别对照表"), - "huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"), - "huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"), - "huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"), - "huiyuanma" : MessageLookupByLibrary.simpleMessage("会员码"), - "huiyuanquanyi" : MessageLookupByLibrary.simpleMessage("会员权益"), - "huiyuanyue" : MessageLookupByLibrary.simpleMessage("会员余额"), - "huiyuanzhongxin" : MessageLookupByLibrary.simpleMessage("会员中心"), - "huiyuanzhuanxiangjiage" : MessageLookupByLibrary.simpleMessage("会员专享价格"), - "huode" : MessageLookupByLibrary.simpleMessage("获得"), - "huodequanyi" : MessageLookupByLibrary.simpleMessage("获得权益"), - "huodong" : MessageLookupByLibrary.simpleMessage("活动"), - "huodongguize" : MessageLookupByLibrary.simpleMessage("活动规则"), - "huodongjianmianpeisongfei" : m10, - "huodongjinxingzhong" : MessageLookupByLibrary.simpleMessage("活动进行中"), - "huodongliebiao" : MessageLookupByLibrary.simpleMessage("活动列表"), - "huodongyue" : MessageLookupByLibrary.simpleMessage("活动余额"), - "huodongyue_" : m11, - "huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"), - "huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"), - "huozan" : MessageLookupByLibrary.simpleMessage("获赞"), - "input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"), - "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), - "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"), - "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), - "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), - "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀请码输入错误"), - "jiajifen" : m12, - "jian" : MessageLookupByLibrary.simpleMessage("件"), - "jiangli" : MessageLookupByLibrary.simpleMessage("奖励"), - "jiangshi" : MessageLookupByLibrary.simpleMessage("讲师"), - "jianjie" : m13, - "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"), - "jiesuan" : MessageLookupByLibrary.simpleMessage("结算"), - "jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"), - "jifen" : MessageLookupByLibrary.simpleMessage("积分"), - "jifen_" : m14, - "jifenbuzu" : MessageLookupByLibrary.simpleMessage("您的积分不足"), - "jifendaoxiayidengji" : m15, - "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("积分的计算说明"), - "jifendidaogao" : MessageLookupByLibrary.simpleMessage("积分从低到高"), - "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("积分从高到低"), - "jifenhuanquan" : MessageLookupByLibrary.simpleMessage("积分换券"), - "jifenmingxi" : MessageLookupByLibrary.simpleMessage("积分明细"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("积分商城"), - "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("积分详情"), - "jihuanka" : MessageLookupByLibrary.simpleMessage("集换卡"), - "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), - "jingxuanhaowen" : MessageLookupByLibrary.simpleMessage("精选好文"), - "jingxuanhuodong" : MessageLookupByLibrary.simpleMessage("精选活动"), - "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), - "jinrihuiyuanrenwu" : MessageLookupByLibrary.simpleMessage("今日会员任务"), - "jinrushangdian" : MessageLookupByLibrary.simpleMessage("进入商店"), - "jinruzhuanqu" : MessageLookupByLibrary.simpleMessage("进入专区"), - "jinxingbangdingfuka" : MessageLookupByLibrary.simpleMessage("进行绑定副卡"), - "jinxingfukabangding" : MessageLookupByLibrary.simpleMessage("进行副卡绑定"), - "jinxingzhanghaozhuxiao" : MessageLookupByLibrary.simpleMessage("进行账号注销"), - "jinxingzhongdedingdan" : MessageLookupByLibrary.simpleMessage("进行中的订单"), - "jituanchuangbanren" : MessageLookupByLibrary.simpleMessage("集团创办人"), - "jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集团创始人"), - "jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"), - "jixuzhifu" : MessageLookupByLibrary.simpleMessage("继续支付"), - "jubao" : MessageLookupByLibrary.simpleMessage("举报"), - "jubaogaineirong" : MessageLookupByLibrary.simpleMessage("举报该内容"), - "jubaotishi" : MessageLookupByLibrary.simpleMessage("您的举报正在等待人工审核,我们会在7~15个工作日处理,处理结果可在"), - "jubaoyuanyin" : MessageLookupByLibrary.simpleMessage("请输入举报原因,以便我们更快定位问题,快速处理"), - "jujue" : MessageLookupByLibrary.simpleMessage("拒绝"), - "kabao" : MessageLookupByLibrary.simpleMessage("卡包"), - "kabaokeshiyong" : MessageLookupByLibrary.simpleMessage("卡包-可使用"), - "kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("开启权限"), - "kaitonghuixianghuoququanyi" : MessageLookupByLibrary.simpleMessage("开通回乡VIP卡获取更多权益"), - "kaitongriqi" : m16, - "kaquan" : MessageLookupByLibrary.simpleMessage("卡券"), - "kelingqudeyouhuiquan" : MessageLookupByLibrary.simpleMessage("可领取的优惠券"), - "keshiyong" : MessageLookupByLibrary.simpleMessage("可使用"), - "keyongjifen" : MessageLookupByLibrary.simpleMessage("可用积分"), - "keyongquan" : MessageLookupByLibrary.simpleMessage("可用券"), - "keyongyouhuiquan" : MessageLookupByLibrary.simpleMessage("可用优惠券"), - "keyongyue" : MessageLookupByLibrary.simpleMessage("可用余额"), - "kongtiao" : MessageLookupByLibrary.simpleMessage("空调"), - "kuaidi" : MessageLookupByLibrary.simpleMessage("快递"), - "kuaidiwuliu" : MessageLookupByLibrary.simpleMessage("快递物流"), - "kuailezhunong" : MessageLookupByLibrary.simpleMessage("快乐助农"), - "lianxikefu" : MessageLookupByLibrary.simpleMessage("联系客服"), - "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("联系手机号"), - "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), - "liaojie" : MessageLookupByLibrary.simpleMessage("了解"), - "liaojiejiankang" : MessageLookupByLibrary.simpleMessage("了解健康"), - "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即参加"), - "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), - "lijigengxin" : MessageLookupByLibrary.simpleMessage("立即更新"), - "lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"), - "lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"), - "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"), - "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"), - "lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"), - "lijiyuyue" : MessageLookupByLibrary.simpleMessage("立即预约"), - "likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"), - "likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"), - "likezhifu" : MessageLookupByLibrary.simpleMessage("立刻支付"), - "lingqu" : MessageLookupByLibrary.simpleMessage("领取"), - "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("领券中心"), - "lingquchenggong" : MessageLookupByLibrary.simpleMessage("领取成功"), - "lingqudaokabao" : MessageLookupByLibrary.simpleMessage("领取到卡包"), - "lingqufangshi" : MessageLookupByLibrary.simpleMessage("领取方式"), - "lingqushijian" : m17, - "linian" : MessageLookupByLibrary.simpleMessage("理念"), - "lishijilu" : MessageLookupByLibrary.simpleMessage("历史记录"), - "liuxianinjingcaidepinglunba" : MessageLookupByLibrary.simpleMessage("留下您精彩的评论吧"), - "login" : MessageLookupByLibrary.simpleMessage("登录"), - "login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到海峡姐妹"), - "lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"), - "lvbiyue_" : m18, - "lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"), - "main_menu1" : MessageLookupByLibrary.simpleMessage("首页"), - "main_menu2" : MessageLookupByLibrary.simpleMessage("门店"), - "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"), - "main_menu4" : MessageLookupByLibrary.simpleMessage("我的"), - "main_menu5" : MessageLookupByLibrary.simpleMessage("hi"), - "manlijiandaijinquan" : m19, - "manyuankeyong" : m20, - "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), - "meiyougengduohuiyuanka" : MessageLookupByLibrary.simpleMessage("没有更多会员卡"), - "meiyougengduoshujule" : MessageLookupByLibrary.simpleMessage("没有更多的数据了"), - "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), - "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"), - "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"), - "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"), - "menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"), - "mi" : m21, - "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), - "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), - "muqianwujilu" : MessageLookupByLibrary.simpleMessage("目前暂未记录哦"), - "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), - "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), - "nincunchuquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), - "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), - "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), - "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), - "ninxiangjiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), - "ninxiaoxiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), - "ninyichenggonglingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("您已成功领取优惠劵,请在"), - "ninyilianxuqiandaotian" : m22, - "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), - "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"), - "paizhao" : MessageLookupByLibrary.simpleMessage("拍照"), - "peisong" : MessageLookupByLibrary.simpleMessage("配送"), - "peisongfangshi" : MessageLookupByLibrary.simpleMessage("配送方式"), - "peisongfei" : MessageLookupByLibrary.simpleMessage("配送费"), - "peisongfuwu" : MessageLookupByLibrary.simpleMessage("配送服务"), - "peisongzhong" : MessageLookupByLibrary.simpleMessage("配送中"), - "phone_error" : MessageLookupByLibrary.simpleMessage("手机格式错误"), - "pinglun" : MessageLookupByLibrary.simpleMessage("评论"), - "pinglun_" : m23, - "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平台余额"), - "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平台支付密码"), - "pingtaizongyue" : m24, - "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), - "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介绍"), - "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登录既同意"), - "privacy_policy2" : MessageLookupByLibrary.simpleMessage("《海峡姐妹服务协议》"), - "privacy_policy3" : MessageLookupByLibrary.simpleMessage("《隐私服务》"), - "privacy_policy4" : MessageLookupByLibrary.simpleMessage("并使用本机号码登录"), - "qianbao" : MessageLookupByLibrary.simpleMessage("钱包"), - "qiandao" : MessageLookupByLibrary.simpleMessage("签到"), - "qiandaodejifen" : MessageLookupByLibrary.simpleMessage("签到得积分"), - "qiandaolingjifen" : MessageLookupByLibrary.simpleMessage("签到领积分"), - "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"), - "qiandaowancheng" : MessageLookupByLibrary.simpleMessage("签到完成"), - "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"), - "qianshou" : MessageLookupByLibrary.simpleMessage("已签收"), - "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), - "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"), - "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"), - "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("请输入充值金额"), - "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), - "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("请输入验证码"), - "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("请输入邀请码"), - "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), - "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("请输入支付密码"), - "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), - "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), - "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), - "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), - "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"), - "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), - "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), - "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), - "qingxuanzeyuyeushijian" : MessageLookupByLibrary.simpleMessage("请选择预约时间"), - "qingxuanzeyuyuemendian" : MessageLookupByLibrary.simpleMessage("请选择预约门店"), - "qingxuanzhemendian" : MessageLookupByLibrary.simpleMessage("请选择门店"), - "qingxuanzheninxiangshezhideyuyan" : MessageLookupByLibrary.simpleMessage("请选择您想设置的语言"), - "qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"), - "qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"), - "qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"), - "qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"), - "qita" : MessageLookupByLibrary.simpleMessage("其他"), - "qiyetuanjian" : MessageLookupByLibrary.simpleMessage("企业团建"), - "quanbao" : MessageLookupByLibrary.simpleMessage("券包"), - "quanbu" : MessageLookupByLibrary.simpleMessage("全部"), - "quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"), - "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"), - "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全场通用"), - "quanchangzhe" : m25, - "quantian" : MessageLookupByLibrary.simpleMessage("全天"), - "quanxian" : MessageLookupByLibrary.simpleMessage("权限"), - "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"), - "quanyijishao" : MessageLookupByLibrary.simpleMessage("权益介绍"), - "quanyishuoming" : MessageLookupByLibrary.simpleMessage("权益说明"), - "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), - "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), - "qudanhao" : m26, - "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"), - "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), - "queding" : MessageLookupByLibrary.simpleMessage("确定"), - "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), - "queren" : MessageLookupByLibrary.simpleMessage("确认"), - "querenbangding" : MessageLookupByLibrary.simpleMessage("确认绑定"), - "querenchongzhi" : MessageLookupByLibrary.simpleMessage("确认充值"), - "querenduihuan" : MessageLookupByLibrary.simpleMessage("确认兑换"), - "querenshouhuo" : MessageLookupByLibrary.simpleMessage("确认收货"), - "querenyaoshanchudangqianpinglunma" : MessageLookupByLibrary.simpleMessage("确认要删除当前评论?"), - "querenzhuxiao" : MessageLookupByLibrary.simpleMessage("确认注销"), - "quhexiao" : MessageLookupByLibrary.simpleMessage("去核销"), - "quhuozhong" : MessageLookupByLibrary.simpleMessage("取货中"), - "qujianma" : MessageLookupByLibrary.simpleMessage("取件码"), - "quqiandao" : MessageLookupByLibrary.simpleMessage("去签到"), - "qushiyong" : MessageLookupByLibrary.simpleMessage("去使用"), - "quwancheng" : MessageLookupByLibrary.simpleMessage(" 去完成 "), - "quxiao" : MessageLookupByLibrary.simpleMessage("取消"), - "quxiaodingdan" : MessageLookupByLibrary.simpleMessage("取消订单"), - "quxiaozhifu" : MessageLookupByLibrary.simpleMessage("取消支付"), - "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), - "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"), - "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"), - "ren" : m27, - "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任务中心"), - "resend_in_seconds" : m28, - "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), - "ruhedihuanjifen" : MessageLookupByLibrary.simpleMessage("如何兑换积分"), - "ruhedihuanjifen1" : MessageLookupByLibrary.simpleMessage("点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~"), - "ruhelingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("如何领取优惠券?"), - "ruhelingquyouhuiquan1" : MessageLookupByLibrary.simpleMessage("点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~"), - "ruheqiandao" : MessageLookupByLibrary.simpleMessage("如何签到?"), - "ruheqiandao1" : MessageLookupByLibrary.simpleMessage("1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。"), - "ruxutuikuanqingyumendianlianxi" : MessageLookupByLibrary.simpleMessage("如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系"), - "saoma" : MessageLookupByLibrary.simpleMessage("扫码"), - "saomadiancan" : MessageLookupByLibrary.simpleMessage("您即将进行扫码点餐"), - "saomashibieguanzhugongzonghao" : MessageLookupByLibrary.simpleMessage("扫码识别,关注公众号"), - "send_code" : MessageLookupByLibrary.simpleMessage("发送验证码"), - "shanchu" : MessageLookupByLibrary.simpleMessage("删除"), - "shanchudingdan" : MessageLookupByLibrary.simpleMessage("删除一单"), - "shanghuruzhu" : MessageLookupByLibrary.simpleMessage("商户入驻"), - "shangjiaquan" : MessageLookupByLibrary.simpleMessage("商家券"), - "shangjiaqueren" : MessageLookupByLibrary.simpleMessage("商家确认"), - "shangjiayifahuo" : MessageLookupByLibrary.simpleMessage("商家已发货"), - "shangjiazhengzaipeican" : MessageLookupByLibrary.simpleMessage("商家正在配餐"), - "shanglajiazai" : MessageLookupByLibrary.simpleMessage("上拉加载"), - "shangpincaigou" : MessageLookupByLibrary.simpleMessage("商品采购"), - "shangpinjifen" : m29, - "shangpinxiangqing" : MessageLookupByLibrary.simpleMessage("商品详情"), - "shangyidengji" : MessageLookupByLibrary.simpleMessage("上一等级"), - "shenghuoyule" : MessageLookupByLibrary.simpleMessage("生活娱乐"), - "shengxianzhaipei" : MessageLookupByLibrary.simpleMessage("生鲜宅配"), - "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘积分大礼"), - "shenqingtuikuan" : MessageLookupByLibrary.simpleMessage("申请退款"), - "shezhi" : MessageLookupByLibrary.simpleMessage("设置"), - "shifangjiazaigengduo" : MessageLookupByLibrary.simpleMessage("释放加载更多"), - "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("释放刷新"), - "shifujifen" : m30, - "shifujihuanka" : m31, - "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("实名认证"), - "shixiaoquan" : MessageLookupByLibrary.simpleMessage("失效券"), - "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongbangzhu" : MessageLookupByLibrary.simpleMessage("使用帮助"), - "shiyongmendian" : MessageLookupByLibrary.simpleMessage("适用门店"), - "shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"), - "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), - "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), - "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"), - "shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"), - "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"), - "shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"), - "shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("请输入收货人手机号"), - "shouhuorenxiangxidizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人详细地址"), - "shouhuorenxingming" : MessageLookupByLibrary.simpleMessage("请输入收货人姓名"), - "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), - "shouqi" : MessageLookupByLibrary.simpleMessage("收起"), - "shouye" : MessageLookupByLibrary.simpleMessage("首页"), - "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), - "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), - "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), - "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), - "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), - "shuliang" : MessageLookupByLibrary.simpleMessage("数量"), - "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), - "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), - "sui" : m32, - "tangshi" : MessageLookupByLibrary.simpleMessage("堂食"), - "tebieshengming" : MessageLookupByLibrary.simpleMessage("特别声明"), - "tehuizhuanqu" : MessageLookupByLibrary.simpleMessage("特惠专区"), - "tianjiaxinfuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tianjifuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tiantiandefuli" : MessageLookupByLibrary.simpleMessage("天天得福利"), - "tiantianlingjifen" : MessageLookupByLibrary.simpleMessage("天天领积分"), - "tijiao" : MessageLookupByLibrary.simpleMessage("提交"), - "tijiaochenggong" : MessageLookupByLibrary.simpleMessage("提交成功"), - "tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"), - "tixian" : MessageLookupByLibrary.simpleMessage("提现"), - "tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"), - "tongzhi" : MessageLookupByLibrary.simpleMessage("通知"), - "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), - "toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投书须知"), - "touxiang" : MessageLookupByLibrary.simpleMessage("头像"), - "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), - "tuiguangma" : MessageLookupByLibrary.simpleMessage("推广码"), - "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), - "waidai" : MessageLookupByLibrary.simpleMessage("外带"), - "waimai" : MessageLookupByLibrary.simpleMessage("外卖"), - "waimaipeisong" : MessageLookupByLibrary.simpleMessage("外卖配送"), - "waisong" : MessageLookupByLibrary.simpleMessage("外送"), - "wan" : MessageLookupByLibrary.simpleMessage("玩"), - "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m33, - "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"), - "wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"), - "wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"), - "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), - "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), - "weidenglu" : MessageLookupByLibrary.simpleMessage("未登录"), - "weidengluxinxi" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), - "weihexiao" : MessageLookupByLibrary.simpleMessage("未核销"), - "weikaiqi" : MessageLookupByLibrary.simpleMessage("未开启"), - "weilegeiningenghaodefuwu" : MessageLookupByLibrary.simpleMessage("为了给您提供更好的服务,以及享受更加精彩的信息内容,请您在使用期间,进行登录"), - "weilejishishoudaohuodongxiaoxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), - "weilekaipaizhaoxuanzhetouxiang" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), - "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), - "weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), - "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), - "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), - "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), - "wentijian" : MessageLookupByLibrary.simpleMessage("问题件"), - "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), - "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"), - "wenzhangzhuanlan" : MessageLookupByLibrary.simpleMessage("文章专栏"), - "weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"), - "wodechengjiu" : MessageLookupByLibrary.simpleMessage("我的成就"), - "wodedingdan" : MessageLookupByLibrary.simpleMessage("我的订单"), - "wodedongtai" : MessageLookupByLibrary.simpleMessage("我的动态"), - "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), - "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"), - "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"), - "wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍价"), - "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), - "wodenianling" : MessageLookupByLibrary.simpleMessage("我的年龄"), - "wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼团"), - "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"), - "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), - "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), - "wodeyaoqing" : MessageLookupByLibrary.simpleMessage("我的邀请"), - "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀请码"), - "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀请码"), - "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流单号:"), - "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), - "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), - "wuliuzhuangtai" : MessageLookupByLibrary.simpleMessage("物流状态:"), - "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"), - "xiadanshijian_" : m34, - "xiadanzhuanjifen" : MessageLookupByLibrary.simpleMessage("下单赚积分"), - "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), - "xiangce" : MessageLookupByLibrary.simpleMessage("相册"), - "xiangji" : MessageLookupByLibrary.simpleMessage("相机"), - "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), - "xiangqing" : MessageLookupByLibrary.simpleMessage("详情"), - "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("详细地址"), - "xianshangfafang" : MessageLookupByLibrary.simpleMessage("线上发放"), - "xianshangshiyong" : MessageLookupByLibrary.simpleMessage("线上使用"), - "xianxiashiyong" : MessageLookupByLibrary.simpleMessage("线下使用"), - "xiaofei" : MessageLookupByLibrary.simpleMessage("消费"), - "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), - "xiaofeijihuanka" : MessageLookupByLibrary.simpleMessage("消费集换卡"), - "xiaofeijilu" : MessageLookupByLibrary.simpleMessage("消费记录"), - "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), - "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等级"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加载完成"), - "xiedongtai" : MessageLookupByLibrary.simpleMessage("写动态"), - "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("海峡姐妹用户隐私政策"), - "xihuan_" : m35, - "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活动"), - "xingming" : MessageLookupByLibrary.simpleMessage("姓名"), - "xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系统通知"), - "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"), - "xiugai" : MessageLookupByLibrary.simpleMessage("修改"), - "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), - "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), - "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), - "xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"), - "xuanji" : MessageLookupByLibrary.simpleMessage("选集"), - "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), - "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), - "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"), - "xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"), - "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"), - "xuni" : MessageLookupByLibrary.simpleMessage("虚拟"), - "yanzhengma" : MessageLookupByLibrary.simpleMessage("验证码"), - "yaoqinghaoyou" : MessageLookupByLibrary.simpleMessage("邀请好友"), - "yaoqinghaoyoudefen" : MessageLookupByLibrary.simpleMessage("邀请好友得分"), - "yaoqingrenshoujihao_" : m36, - "yaoqingwancheng" : MessageLookupByLibrary.simpleMessage("邀请完成"), - "yibangfuka" : MessageLookupByLibrary.simpleMessage("已绑副卡"), - "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"), - "yiduihuanjian" : m37, - "yifahuo" : MessageLookupByLibrary.simpleMessage("已发货"), - "yiguanzhu" : MessageLookupByLibrary.simpleMessage("已关注"), - "yihouzaishuo" : MessageLookupByLibrary.simpleMessage("以后再说"), - "yihuide" : MessageLookupByLibrary.simpleMessage("已获得"), - "yihujiaoqishou" : MessageLookupByLibrary.simpleMessage("已呼叫骑手"), - "yikaitongzidongxufei" : MessageLookupByLibrary.simpleMessage("已开通自动续费"), - "yikexiao" : MessageLookupByLibrary.simpleMessage("已核销"), - "yilingqu" : MessageLookupByLibrary.simpleMessage("已领取"), - "yindao1" : MessageLookupByLibrary.simpleMessage("新增多项功能,海量优惠资讯实时推送"), - "yindao2" : MessageLookupByLibrary.simpleMessage("新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停"), - "yindao3" : MessageLookupByLibrary.simpleMessage("新增会员任务得积分,消费可得绿金、积分商城换购"), - "yindao4" : MessageLookupByLibrary.simpleMessage("传递友爱纯净健康有机环保智慧理念"), - "yindaoye1" : MessageLookupByLibrary.simpleMessage("会员最新资讯抢先看"), - "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), - "yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"), - "yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), - "yingwen" : MessageLookupByLibrary.simpleMessage("英文"), - "yingyeshijian" : m38, - "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), - "yinshi" : MessageLookupByLibrary.simpleMessage("饮食"), - "yinsishengming" : MessageLookupByLibrary.simpleMessage("隐私声明"), - "yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隐私协议》"), - "yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感谢您使用海峡姐妹APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读海峡姐妹"), - "yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"), - "yinzhang" : MessageLookupByLibrary.simpleMessage("印章"), - "yiqiandao" : MessageLookupByLibrary.simpleMessage("已签到"), - "yiqianshou" : MessageLookupByLibrary.simpleMessage("已签收"), - "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), - "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), - "yishixiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiyong" : MessageLookupByLibrary.simpleMessage("已使用"), - "yishouquan" : MessageLookupByLibrary.simpleMessage("已授权"), - "yisongda" : MessageLookupByLibrary.simpleMessage("已送达"), - "yituikuan" : MessageLookupByLibrary.simpleMessage("已退款"), - "yiwancheng" : MessageLookupByLibrary.simpleMessage(" 已完成 "), - "yiwanchengdingdan" : MessageLookupByLibrary.simpleMessage("已完成订单"), - "yixianghuiyuanquanyi" : MessageLookupByLibrary.simpleMessage("已享会员权益"), - "yixiansquanbupinglun" : MessageLookupByLibrary.simpleMessage("-已显示全部评论-"), - "yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "yiyoujifen" : MessageLookupByLibrary.simpleMessage("已有积分"), - "yizhifu" : MessageLookupByLibrary.simpleMessage("已支付"), - "yonghuming" : MessageLookupByLibrary.simpleMessage("用户名"), - "yonghuxiaofeijifen" : MessageLookupByLibrary.simpleMessage("用户每消费1元可获得1个积分。"), - "youhuiquan" : MessageLookupByLibrary.simpleMessage("优惠券"), - "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), - "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), - "youkedenglu" : MessageLookupByLibrary.simpleMessage("游客登录"), - "youxiaoqi" : m39, - "youxiaoqixian" : MessageLookupByLibrary.simpleMessage("有效期限:"), - "youxiaoqizhi" : m40, - "yuan" : MessageLookupByLibrary.simpleMessage("元"), - "yuan_" : m41, - "yuanjia" : MessageLookupByLibrary.simpleMessage("原价"), - "yue" : MessageLookupByLibrary.simpleMessage("余额"), - "yue_" : m42, - "yue__" : m43, - "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), - "yuliudianhua" : MessageLookupByLibrary.simpleMessage("预留电话"), - "yunfei" : MessageLookupByLibrary.simpleMessage("运费"), - "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), - "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"), - "zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"), - "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"), - "zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"), - "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("暂未解锁"), - "zanweikaifang" : MessageLookupByLibrary.simpleMessage("暂未开放"), - "zanweikaitong" : MessageLookupByLibrary.simpleMessage("暂未开通"), - "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), - "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"), - "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), - "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("账号安全"), - "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), - "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("账号信息"), - "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("账号与安全"), - "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("账号注销说明"), - "zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"), - "zhankai" : MessageLookupByLibrary.simpleMessage("展开"), - "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), - "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"), - "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加载中..."), - "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致电门店"), - "zhifubao" : MessageLookupByLibrary.simpleMessage("支付宝"), - "zhifubaozhifu" : MessageLookupByLibrary.simpleMessage("支付宝支付"), - "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), - "zhifuxiangqing" : MessageLookupByLibrary.simpleMessage("支付详情"), - "zhizunhuiyuan" : MessageLookupByLibrary.simpleMessage("至尊会员"), - "zhizuowancheng" : MessageLookupByLibrary.simpleMessage("制作完成"), - "zhongchakan" : MessageLookupByLibrary.simpleMessage("中查看"), - "zhongwenjianti" : MessageLookupByLibrary.simpleMessage("简体中文"), - "zhuanlan" : MessageLookupByLibrary.simpleMessage("专栏"), - "zhuanxiangyouhuiquan" : MessageLookupByLibrary.simpleMessage("专享优惠券"), - "zhunong1" : MessageLookupByLibrary.simpleMessage("爱在回乡 快乐助农"), - "zhunongjifen" : MessageLookupByLibrary.simpleMessage("助农积分"), - "zhunongzhuanqu" : MessageLookupByLibrary.simpleMessage("助农专区"), - "zhuxiaotixing" : MessageLookupByLibrary.simpleMessage("再次提醒:注销帐号后不可恢复,相关数据和信息会永久删除。"), - "zhuxiaozhanghao" : MessageLookupByLibrary.simpleMessage("注销账号"), - "ziqu" : MessageLookupByLibrary.simpleMessage("自取"), - "ziti" : MessageLookupByLibrary.simpleMessage("自提"), - "zitidizhi" : MessageLookupByLibrary.simpleMessage("自提地址"), - "zitiduihuanquan" : MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), - "zitishijian" : MessageLookupByLibrary.simpleMessage("自提时间"), - "zongzichan" : MessageLookupByLibrary.simpleMessage("总资产"), - "zongzichanyuan" : MessageLookupByLibrary.simpleMessage("总资产(元)"), - "zuanshihuiyuan" : MessageLookupByLibrary.simpleMessage("钻石会员"), - "zuixinwenzhang" : MessageLookupByLibrary.simpleMessage("最新文章"), - "zuorenwudejifen" : MessageLookupByLibrary.simpleMessage("做任务得积分"), - "zuozhe" : m44 - }; + static Map _notInlinedMessages(_) => { + "bainianchuanjiao": MessageLookupByLibrary.simpleMessage("百年川椒"), + "baiyin": MessageLookupByLibrary.simpleMessage("白银"), + "baiyinhuiyuan": MessageLookupByLibrary.simpleMessage("白银会员"), + "banben": m0, + "bangdingfuka": MessageLookupByLibrary.simpleMessage("绑定副卡"), + "bangdingshouji": MessageLookupByLibrary.simpleMessage("绑定手机"), + "bangong": MessageLookupByLibrary.simpleMessage("办公"), + "bangzhuyufankui": MessageLookupByLibrary.simpleMessage("帮助与反馈"), + "baocun": MessageLookupByLibrary.simpleMessage("保存"), + "baocunchenggong": MessageLookupByLibrary.simpleMessage("保存成功"), + "baocunsaoma": MessageLookupByLibrary.simpleMessage( + "截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), + "beiyaoqingdejiangli": MessageLookupByLibrary.simpleMessage( + "每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), + "beizhu": MessageLookupByLibrary.simpleMessage("备注"), + "beizhuxinxi": MessageLookupByLibrary.simpleMessage("备注信息"), + "benzhouquanbao": MessageLookupByLibrary.simpleMessage("本周券包"), + "bianjidizhi": MessageLookupByLibrary.simpleMessage("编辑地址"), + "bianjigerenziliao": MessageLookupByLibrary.simpleMessage("编辑个人资料"), + "biaojiweiyidu": MessageLookupByLibrary.simpleMessage("标为已读"), + "biaoweiyidu": MessageLookupByLibrary.simpleMessage("标为已读"), + "bodadianhua": MessageLookupByLibrary.simpleMessage("拨打电话"), + "bofangcishu": MessageLookupByLibrary.simpleMessage("播放次数"), + "bojin": MessageLookupByLibrary.simpleMessage("铂金"), + "brand_yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "buzhichikaipiao": MessageLookupByLibrary.simpleMessage("不支持开票"), + "canyingfuwu": MessageLookupByLibrary.simpleMessage("餐饮服务"), + "chakan": MessageLookupByLibrary.simpleMessage("查看"), + "chakangengduo": MessageLookupByLibrary.simpleMessage("查看更多"), + "chakanhexiaoma": MessageLookupByLibrary.simpleMessage("查看核销码"), + "chakanquanyi": MessageLookupByLibrary.simpleMessage("查看权益"), + "chakanshixiaoquan": MessageLookupByLibrary.simpleMessage("查看失效券"), + "chakanwodekabao": MessageLookupByLibrary.simpleMessage("查看我的卡包"), + "chakanwodekaquan": MessageLookupByLibrary.simpleMessage("查看我的卡券"), + "chakanwuliu": MessageLookupByLibrary.simpleMessage("查看物流"), + "chakanxiangqing": MessageLookupByLibrary.simpleMessage("查看详情"), + "changjianwenti": MessageLookupByLibrary.simpleMessage("常见问题"), + "changqiyouxiao": MessageLookupByLibrary.simpleMessage("长期有效"), + "chaojiyouhuiquan": MessageLookupByLibrary.simpleMessage("超值优惠券"), + "chaungshirengushi": MessageLookupByLibrary.simpleMessage("创始人故事"), + "chenggongdengluzhuce": + MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), + "chengjiu": MessageLookupByLibrary.simpleMessage("成就"), + "chengjiuhuizhang": MessageLookupByLibrary.simpleMessage("成就徽章"), + "chengshixuanze": MessageLookupByLibrary.simpleMessage("城市选择"), + "chengweidianpuzhuanshuhuiyuan": + MessageLookupByLibrary.simpleMessage("成为店铺专属会员,享专属权益"), + "chi": MessageLookupByLibrary.simpleMessage("吃"), + "chijiankang": MessageLookupByLibrary.simpleMessage("吃健康"), + "chongzhi": MessageLookupByLibrary.simpleMessage("充值"), + "chongzhichenggong": MessageLookupByLibrary.simpleMessage("充值成功"), + "chongzhifuliduo": MessageLookupByLibrary.simpleMessage("充值福利多"), + "chongzhixiaoxi": MessageLookupByLibrary.simpleMessage("充值消息"), + "chongzhizuixiaojine": m1, + "chuangjianshijian": m2, + "chuangshirendegushi": MessageLookupByLibrary.simpleMessage("创始人的故事-"), + "chuangshirendegushi1": MessageLookupByLibrary.simpleMessage("创始人的故事"), + "chuzhiyouhui": MessageLookupByLibrary.simpleMessage("储值优惠"), + "code_error": MessageLookupByLibrary.simpleMessage("验证码输入错误"), + "cunchu": MessageLookupByLibrary.simpleMessage("存储"), + "cunchutishixinxi": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), + "dabaodaodianqu": MessageLookupByLibrary.simpleMessage("打包到店取"), + "daifukuan": MessageLookupByLibrary.simpleMessage("待付款"), + "daipeisong": MessageLookupByLibrary.simpleMessage("待配送"), + "daiqucan": MessageLookupByLibrary.simpleMessage("待取餐"), + "daiqueren": MessageLookupByLibrary.simpleMessage("待确认"), + "daizhifu": MessageLookupByLibrary.simpleMessage("待支付"), + "daizhizuo": MessageLookupByLibrary.simpleMessage("待制作"), + "dajiadouzaiduihuan": MessageLookupByLibrary.simpleMessage("大家都在兑换"), + "dakaidingwei": MessageLookupByLibrary.simpleMessage("打开定位"), + "dangqianbanben": MessageLookupByLibrary.simpleMessage("当前版本"), + "dangqiandengji": MessageLookupByLibrary.simpleMessage("当前等级"), + "dangqianjifen": MessageLookupByLibrary.simpleMessage("当前积分:"), + "dangqianshangpinduihuanhexiaoma": + MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), + "dangqianzhukadengji": MessageLookupByLibrary.simpleMessage("当前主卡等级"), + "daodianziqu": MessageLookupByLibrary.simpleMessage("到店自取"), + "daopinglunliebiaodingbu": + MessageLookupByLibrary.simpleMessage("到评论列表顶部"), + "daoxiayidengji": MessageLookupByLibrary.simpleMessage("到下一等级"), + "dengdaishangjiaqueren": MessageLookupByLibrary.simpleMessage("等待商家确认"), + "dengdaiyonghuqucan": MessageLookupByLibrary.simpleMessage("等待用户取餐"), + "denglu": MessageLookupByLibrary.simpleMessage("登录"), + "diancan": MessageLookupByLibrary.simpleMessage("点餐"), + "diandan": MessageLookupByLibrary.simpleMessage("点单"), + "dianhua": MessageLookupByLibrary.simpleMessage("电话"), + "dianjidenglu": MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), + "dianneiyongcan": MessageLookupByLibrary.simpleMessage("店内用餐"), + "dianpuchongzhi": MessageLookupByLibrary.simpleMessage("店铺充值"), + "dianputuijian": MessageLookupByLibrary.simpleMessage("店铺推荐"), + "dianpuyue": MessageLookupByLibrary.simpleMessage("店铺余额"), + "dianwolingqu": MessageLookupByLibrary.simpleMessage("点我领取"), + "dianzan": MessageLookupByLibrary.simpleMessage("点赞"), + "dianzanxihuan_": m3, + "dingdan": MessageLookupByLibrary.simpleMessage("订单"), + "dingdanbianhao": MessageLookupByLibrary.simpleMessage("订单编号"), + "dingdandaifahuo": MessageLookupByLibrary.simpleMessage("订单待发货"), + "dingdandaizhifu": MessageLookupByLibrary.simpleMessage("订单待支付"), + "dingdangenzong": MessageLookupByLibrary.simpleMessage("订单跟踪"), + "dingdanhao": MessageLookupByLibrary.simpleMessage("订单号"), + "dingdanjiesuan": MessageLookupByLibrary.simpleMessage("订单结算"), + "dingdanqueren": MessageLookupByLibrary.simpleMessage("订单确认"), + "dingdantongzhi": MessageLookupByLibrary.simpleMessage("订单通知"), + "dingdanxiaoxi": MessageLookupByLibrary.simpleMessage("订单消息"), + "dingdanyisongda": MessageLookupByLibrary.simpleMessage("订单送达"), + "dingdanyituikuan": MessageLookupByLibrary.simpleMessage("订单已退款"), + "dingdanyiwancheng": MessageLookupByLibrary.simpleMessage("订单已完成"), + "dingdanyizhifu": MessageLookupByLibrary.simpleMessage("订单已支付"), + "dingwei": MessageLookupByLibrary.simpleMessage("定位"), + "dizhi": MessageLookupByLibrary.simpleMessage("地址"), + "dongtai": MessageLookupByLibrary.simpleMessage("动态"), + "dongtaitishi": MessageLookupByLibrary.simpleMessage( + "用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示"), + "dongtaixiangqing": MessageLookupByLibrary.simpleMessage("动态详情"), + "duihuan": MessageLookupByLibrary.simpleMessage("兑换"), + "duihuanchenggong": MessageLookupByLibrary.simpleMessage("兑换成功"), + "duihuanguize": MessageLookupByLibrary.simpleMessage("兑换规则"), + "duihuanhoufahuo": MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), + "duihuanhouwugegongzuori": + MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), + "duihuanliangdidaogao": MessageLookupByLibrary.simpleMessage("兑换量从低到高"), + "duihuanlianggaodaodi": MessageLookupByLibrary.simpleMessage("兑换量从高到低"), + "duihuanlishi": MessageLookupByLibrary.simpleMessage("兑换历史"), + "duihuanquan": MessageLookupByLibrary.simpleMessage("兑换券"), + "duihuanshangpinxiangqing": + MessageLookupByLibrary.simpleMessage("兑换商品详情"), + "duihuanxinxi": MessageLookupByLibrary.simpleMessage("兑换信息"), + "duozhongyouhui": MessageLookupByLibrary.simpleMessage("多种优惠券等你拿"), + "fabu": MessageLookupByLibrary.simpleMessage("发布"), + "fangshier": MessageLookupByLibrary.simpleMessage("方式二"), + "fangshiyi": MessageLookupByLibrary.simpleMessage("方式一"), + "fanhuiduihuanlishi": MessageLookupByLibrary.simpleMessage("返回兑换历史"), + "fanhuishequn": MessageLookupByLibrary.simpleMessage("返回社群"), + "fanhuishouye": MessageLookupByLibrary.simpleMessage("返回首页"), + "fankui": MessageLookupByLibrary.simpleMessage("反馈"), + "fankuilizi": + MessageLookupByLibrary.simpleMessage("您可以在这里输入反馈内容,例如产品建议,功能异常等"), + "fantizhongwen": MessageLookupByLibrary.simpleMessage("繁体中文"), + "fapiao": MessageLookupByLibrary.simpleMessage("发票"), + "fapiaozhushou": MessageLookupByLibrary.simpleMessage("发票助手"), + "fasong": MessageLookupByLibrary.simpleMessage("发送"), + "fasongduanxin": MessageLookupByLibrary.simpleMessage("发送短信"), + "faxingshijian": m4, + "feishiwuduihuanma": MessageLookupByLibrary.simpleMessage("非实物兑换码"), + "feishiwushangpin": + MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), + "fensi": MessageLookupByLibrary.simpleMessage("粉丝"), + "fenxiang": MessageLookupByLibrary.simpleMessage("分享"), + "fenxiangdao": MessageLookupByLibrary.simpleMessage("分享到"), + "fenxiangjiankang": MessageLookupByLibrary.simpleMessage("分享健康"), + "fenxiangyaoqing": + MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), + "fenxiangyaoqingma": MessageLookupByLibrary.simpleMessage( + "将邀请码分享给好友,对方在海峡姐妹App登录页输入邀请码,即可邀请成功。"), + "fenxiangzhiweixin": MessageLookupByLibrary.simpleMessage("分享至微信"), + "fukashoujihao": MessageLookupByLibrary.simpleMessage("副卡手机号"), + "fuliduihuan": MessageLookupByLibrary.simpleMessage("福利兑换"), + "fulizhongxin": MessageLookupByLibrary.simpleMessage("福利中心"), + "ge": m5, + "geiwopingfen": MessageLookupByLibrary.simpleMessage("给我评分"), + "gengduo": MessageLookupByLibrary.simpleMessage("更多"), + "gengduohaoquan": MessageLookupByLibrary.simpleMessage("更多好券"), + "gengduoyouhuiquan": MessageLookupByLibrary.simpleMessage("更多优惠券"), + "genggaibangdingshoujihao": + MessageLookupByLibrary.simpleMessage("更改绑定手机号"), + "genghuanbeijing": MessageLookupByLibrary.simpleMessage("更换背景"), + "genghuantouxiang": MessageLookupByLibrary.simpleMessage("更换头像"), + "gengyouhui": MessageLookupByLibrary.simpleMessage("更优惠"), + "gerenxinxi": MessageLookupByLibrary.simpleMessage("个人信息"), + "gexingqianming": MessageLookupByLibrary.simpleMessage("个性签名"), + "gong": MessageLookupByLibrary.simpleMessage("共"), + "gongchuanghuiyuan": MessageLookupByLibrary.simpleMessage("共创会员"), + "gongjijian": m6, + "gongjijianshangpin": m7, + "gongli": m8, + "gongxinchengwei": MessageLookupByLibrary.simpleMessage("恭喜您成为"), + "gongxinichengweibendianhuiyuan": + MessageLookupByLibrary.simpleMessage("恭喜您,成为本店的会员,快去享受超多会员权益吧。"), + "gouxuanxieyi": + MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和海峡姐妹服务协议"), + "guanlidizhi": MessageLookupByLibrary.simpleMessage("管理地址"), + "guanyu": MessageLookupByLibrary.simpleMessage("关于"), + "guanyuchuangshiren": MessageLookupByLibrary.simpleMessage("关于创始人"), + "guanyuhuixiang": MessageLookupByLibrary.simpleMessage("关于回乡"), + "guanzhu": MessageLookupByLibrary.simpleMessage("关注"), + "guojiankangyoujishenghuo": + MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "haimeiyouxiaoxi": MessageLookupByLibrary.simpleMessage("还没有消息~"), + "haimeiyouyouhuiquankeyilingqu": + MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), + "haixiajiemei": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "haowu": MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize": MessageLookupByLibrary.simpleMessage("好友奖励规则"), + "he": MessageLookupByLibrary.simpleMessage("喝"), + "heji": MessageLookupByLibrary.simpleMessage("合计:"), + "hejiankang": MessageLookupByLibrary.simpleMessage("喝健康"), + "hexiaochenggong": MessageLookupByLibrary.simpleMessage("核销成功"), + "hexiaomaxiangqing": MessageLookupByLibrary.simpleMessage("核销码详情"), + "huangjin": MessageLookupByLibrary.simpleMessage("黄金"), + "huangjinhuiyuan": MessageLookupByLibrary.simpleMessage("黄金会员"), + "huifu": MessageLookupByLibrary.simpleMessage("回复"), + "huifu_": m9, + "huixiangVIPka": MessageLookupByLibrary.simpleMessage("回乡VIP卡"), + "huixiangqianbao": MessageLookupByLibrary.simpleMessage("海峡钱包"), + "huixiangrenyimendian": + MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), + "huixiangtoutiao": MessageLookupByLibrary.simpleMessage("回乡头条"), + "huixiangvipkazhuanxiang": + MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"), + "huixiangxieyi": MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"), + "huiyuandengji": MessageLookupByLibrary.simpleMessage("会员等级"), + "huiyuandengjishuoming": MessageLookupByLibrary.simpleMessage("会员等级说明"), + "huiyuanguize": MessageLookupByLibrary.simpleMessage("会员规则说明"), + "huiyuanhuodejifen": MessageLookupByLibrary.simpleMessage("会员如何获得积分"), + "huiyuanjia": MessageLookupByLibrary.simpleMessage("会员价"), + "huiyuanjibieduizhao": MessageLookupByLibrary.simpleMessage("会员级别对照表"), + "huiyuanjifen": MessageLookupByLibrary.simpleMessage("会员积分"), + "huiyuanka": MessageLookupByLibrary.simpleMessage("会员卡"), + "huiyuankaxiangqing": MessageLookupByLibrary.simpleMessage("会员卡详情"), + "huiyuanma": MessageLookupByLibrary.simpleMessage("会员码"), + "huiyuanquanyi": MessageLookupByLibrary.simpleMessage("会员权益"), + "huiyuanyue": MessageLookupByLibrary.simpleMessage("会员余额"), + "huiyuanzhongxin": MessageLookupByLibrary.simpleMessage("会员中心"), + "huiyuanzhuanxiangjiage": + MessageLookupByLibrary.simpleMessage("会员专享价格"), + "huode": MessageLookupByLibrary.simpleMessage("获得"), + "huodequanyi": MessageLookupByLibrary.simpleMessage("获得权益"), + "huodong": MessageLookupByLibrary.simpleMessage("活动"), + "huodongguize": MessageLookupByLibrary.simpleMessage("活动规则"), + "huodongjianmianpeisongfei": m10, + "huodongjinxingzhong": MessageLookupByLibrary.simpleMessage("活动进行中"), + "huodongliebiao": MessageLookupByLibrary.simpleMessage("活动列表"), + "huodongyue": MessageLookupByLibrary.simpleMessage("活动余额"), + "huodongyue_": m11, + "huodongzixun": MessageLookupByLibrary.simpleMessage("活动资讯"), + "huopinyisongda": MessageLookupByLibrary.simpleMessage("货品已送达"), + "huozan": MessageLookupByLibrary.simpleMessage("获赞"), + "input_code": MessageLookupByLibrary.simpleMessage("手机验证码"), + "input_code_hide": MessageLookupByLibrary.simpleMessage("请输入验证码"), + "input_invite_code_hide": MessageLookupByLibrary.simpleMessage("填写邀请码"), + "input_phone": MessageLookupByLibrary.simpleMessage("输入手机号"), + "input_phone_hide": MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "invite_code_error": MessageLookupByLibrary.simpleMessage("邀请码输入错误"), + "jiajifen": m12, + "jian": MessageLookupByLibrary.simpleMessage("件"), + "jiangli": MessageLookupByLibrary.simpleMessage("奖励"), + "jiangshi": MessageLookupByLibrary.simpleMessage("讲师"), + "jianjie": m13, + "jiazaishibai": MessageLookupByLibrary.simpleMessage("加载失败"), + "jiesuan": MessageLookupByLibrary.simpleMessage("结算"), + "jiesuanjine": MessageLookupByLibrary.simpleMessage("结算金额"), + "jifen": MessageLookupByLibrary.simpleMessage("积分"), + "jifen_": m14, + "jifenbuzu": MessageLookupByLibrary.simpleMessage("您的积分不足"), + "jifendaoxiayidengji": m15, + "jifendejisuanshuoming": + MessageLookupByLibrary.simpleMessage("积分的计算说明"), + "jifendidaogao": MessageLookupByLibrary.simpleMessage("积分从低到高"), + "jifengaodaodi": MessageLookupByLibrary.simpleMessage("积分从高到低"), + "jifenhuanquan": MessageLookupByLibrary.simpleMessage("积分换券"), + "jifenmingxi": MessageLookupByLibrary.simpleMessage("积分明细"), + "jifenshangcheng": MessageLookupByLibrary.simpleMessage("积分商城"), + "jifenxiangqing": MessageLookupByLibrary.simpleMessage("积分详情"), + "jihuanka": MessageLookupByLibrary.simpleMessage("集换卡"), + "jingbilianmenghuiyuandian": + MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), + "jingxuanhaowen": MessageLookupByLibrary.simpleMessage("精选好文"), + "jingxuanhuodong": MessageLookupByLibrary.simpleMessage("精选活动"), + "jinkahuiyuan": MessageLookupByLibrary.simpleMessage("金卡会员"), + "jinrihuiyuanrenwu": MessageLookupByLibrary.simpleMessage("今日会员任务"), + "jinrushangdian": MessageLookupByLibrary.simpleMessage("进入商店"), + "jinruzhuanqu": MessageLookupByLibrary.simpleMessage("进入专区"), + "jinxingbangdingfuka": MessageLookupByLibrary.simpleMessage("进行绑定副卡"), + "jinxingfukabangding": MessageLookupByLibrary.simpleMessage("进行副卡绑定"), + "jinxingzhanghaozhuxiao": + MessageLookupByLibrary.simpleMessage("进行账号注销"), + "jinxingzhongdedingdan": MessageLookupByLibrary.simpleMessage("进行中的订单"), + "jituanchuangbanren": MessageLookupByLibrary.simpleMessage("集团创办人"), + "jituanchuangshiren": MessageLookupByLibrary.simpleMessage("集团创始人"), + "jixuduihuan": MessageLookupByLibrary.simpleMessage("继续兑换"), + "jixuzhifu": MessageLookupByLibrary.simpleMessage("继续支付"), + "jubao": MessageLookupByLibrary.simpleMessage("举报"), + "jubaogaineirong": MessageLookupByLibrary.simpleMessage("举报该内容"), + "jubaotishi": MessageLookupByLibrary.simpleMessage( + "您的举报正在等待人工审核,我们会在7~15个工作日处理,处理结果可在"), + "jubaoyuanyin": + MessageLookupByLibrary.simpleMessage("请输入举报原因,以便我们更快定位问题,快速处理"), + "jujue": MessageLookupByLibrary.simpleMessage("拒绝"), + "kabao": MessageLookupByLibrary.simpleMessage("卡包"), + "kabaokeshiyong": MessageLookupByLibrary.simpleMessage("卡包-可使用"), + "kaiqiquanxian": MessageLookupByLibrary.simpleMessage("开启权限"), + "kaitonghuixianghuoququanyi": + MessageLookupByLibrary.simpleMessage("开通回乡VIP卡获取更多权益"), + "kaitongriqi": m16, + "kaquan": MessageLookupByLibrary.simpleMessage("卡券"), + "kelingqudeyouhuiquan": MessageLookupByLibrary.simpleMessage("可领取的优惠券"), + "keshiyong": MessageLookupByLibrary.simpleMessage("可使用"), + "keyongjifen": MessageLookupByLibrary.simpleMessage("可用积分"), + "keyongquan": MessageLookupByLibrary.simpleMessage("可用券"), + "keyongyouhuiquan": MessageLookupByLibrary.simpleMessage("可用优惠券"), + "keyongyue": MessageLookupByLibrary.simpleMessage("可用余额"), + "kongtiao": MessageLookupByLibrary.simpleMessage("空调"), + "kuaidi": MessageLookupByLibrary.simpleMessage("快递"), + "kuaidiwuliu": MessageLookupByLibrary.simpleMessage("快递物流"), + "kuailezhunong": MessageLookupByLibrary.simpleMessage("快乐助农"), + "lianxikefu": MessageLookupByLibrary.simpleMessage("联系客服"), + "lianxishoujihao": MessageLookupByLibrary.simpleMessage("联系手机号"), + "lianxuqiandaolingqushuangbeijifen": + MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), + "liaojie": MessageLookupByLibrary.simpleMessage("了解"), + "liaojiejiankang": MessageLookupByLibrary.simpleMessage("了解健康"), + "lijicanjia": MessageLookupByLibrary.simpleMessage("立即参加"), + "lijichongzhi": MessageLookupByLibrary.simpleMessage("立即充值"), + "lijigengxin": MessageLookupByLibrary.simpleMessage("立即更新"), + "lijikaitong": MessageLookupByLibrary.simpleMessage("立即开通"), + "lijilingqu": MessageLookupByLibrary.simpleMessage("立即领取"), + "lijiqiandao": MessageLookupByLibrary.simpleMessage("立即签到"), + "lijishiyong": MessageLookupByLibrary.simpleMessage("立即使用"), + "lijitiyan": MessageLookupByLibrary.simpleMessage("立即体验"), + "lijiyuyue": MessageLookupByLibrary.simpleMessage("立即预约"), + "likekaitong": MessageLookupByLibrary.simpleMessage("立刻开通"), + "likexufei": MessageLookupByLibrary.simpleMessage("立刻续费"), + "likezhifu": MessageLookupByLibrary.simpleMessage("立刻支付"), + "lingqu": MessageLookupByLibrary.simpleMessage("领取"), + "lingquanzhongxin": MessageLookupByLibrary.simpleMessage("领券中心"), + "lingquchenggong": MessageLookupByLibrary.simpleMessage("领取成功"), + "lingqudaokabao": MessageLookupByLibrary.simpleMessage("领取到卡包"), + "lingqufangshi": MessageLookupByLibrary.simpleMessage("领取方式"), + "lingqushijian": m17, + "linian": MessageLookupByLibrary.simpleMessage("理念"), + "lishijilu": MessageLookupByLibrary.simpleMessage("历史记录"), + "liuxianinjingcaidepinglunba": + MessageLookupByLibrary.simpleMessage("留下您精彩的评论吧"), + "login": MessageLookupByLibrary.simpleMessage("登录"), + "login_splash": MessageLookupByLibrary.simpleMessage("欢迎来到海峡姐妹"), + "lvbiyue": MessageLookupByLibrary.simpleMessage("绿币余额"), + "lvbiyue_": m18, + "lvbizhifu": MessageLookupByLibrary.simpleMessage("绿币支付"), + "main_menu1": MessageLookupByLibrary.simpleMessage("首页"), + "main_menu2": MessageLookupByLibrary.simpleMessage("门店"), + "main_menu3": MessageLookupByLibrary.simpleMessage("社群"), + "main_menu4": MessageLookupByLibrary.simpleMessage("我的"), + "main_menu5": MessageLookupByLibrary.simpleMessage("hi"), + "manlijiandaijinquan": m19, + "manyuankeyong": m20, + "meiriqiandao": MessageLookupByLibrary.simpleMessage("每日签到"), + "meiyougengduohuiyuanka": + MessageLookupByLibrary.simpleMessage("没有更多会员卡"), + "meiyougengduoshujule": + MessageLookupByLibrary.simpleMessage("没有更多的数据了"), + "meiyougengduoyouhuiquan": + MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), + "meizhousangengxin": MessageLookupByLibrary.simpleMessage("每周三更新"), + "meizhousanquanbao": MessageLookupByLibrary.simpleMessage("每周三更新劵包"), + "mendianxuanzhe": MessageLookupByLibrary.simpleMessage("门店选择"), + "mendianyue": MessageLookupByLibrary.simpleMessage("门店余额"), + "menpaihao": MessageLookupByLibrary.simpleMessage("请输入门牌号"), + "mi": m21, + "mingxi": MessageLookupByLibrary.simpleMessage("明细"), + "morenpaixu": MessageLookupByLibrary.simpleMessage("默认排序"), + "muqianwujilu": MessageLookupByLibrary.simpleMessage("目前暂未记录哦"), + "muqianzanwuxingdianhuodong": + MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), + "nihaimeiyouchongzhihuoxiaofeijilu": + MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), + "nincunchuquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), + "nindingweigongnengweikaiqi": + MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), + "nindingweiquanxianweiyunxu": + MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), + "ninweidenglu": MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), + "ninxiangjiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), + "ninxiaoxiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), + "ninyichenggonglingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("您已成功领取优惠劵,请在"), + "ninyilianxuqiandaotian": m22, + "ninyouyigedingdanyaolingqu": + MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), + "ninyouyigexindedingdan": + MessageLookupByLibrary.simpleMessage("您有一个新的订单"), + "paizhao": MessageLookupByLibrary.simpleMessage("拍照"), + "peisong": MessageLookupByLibrary.simpleMessage("配送"), + "peisongfangshi": MessageLookupByLibrary.simpleMessage("配送方式"), + "peisongfei": MessageLookupByLibrary.simpleMessage("配送费"), + "peisongfuwu": MessageLookupByLibrary.simpleMessage("配送服务"), + "peisongzhong": MessageLookupByLibrary.simpleMessage("配送中"), + "phone_error": MessageLookupByLibrary.simpleMessage("手机格式错误"), + "pinglun": MessageLookupByLibrary.simpleMessage("评论"), + "pinglun_": m23, + "pingtaiyue": MessageLookupByLibrary.simpleMessage("平台余额"), + "pingtaizhifumima": MessageLookupByLibrary.simpleMessage("平台支付密码"), + "pingtaizongyue": m24, + "pinpai": MessageLookupByLibrary.simpleMessage("品牌"), + "pinpaijieshao": MessageLookupByLibrary.simpleMessage("品牌介绍"), + "privacy_policy1": MessageLookupByLibrary.simpleMessage("登录既同意"), + "privacy_policy2": MessageLookupByLibrary.simpleMessage("《海峡姐妹服务协议》"), + "privacy_policy3": MessageLookupByLibrary.simpleMessage("《隐私服务》"), + "privacy_policy4": MessageLookupByLibrary.simpleMessage("并使用本机号码登录"), + "qianbao": MessageLookupByLibrary.simpleMessage("钱包"), + "qiandao": MessageLookupByLibrary.simpleMessage("签到"), + "qiandaodejifen": MessageLookupByLibrary.simpleMessage("签到得积分"), + "qiandaolingjifen": MessageLookupByLibrary.simpleMessage("签到领积分"), + "qiandaolingqujinfen": MessageLookupByLibrary.simpleMessage("签到领取积分"), + "qiandaowancheng": MessageLookupByLibrary.simpleMessage("签到完成"), + "qianjinmaiwei": MessageLookupByLibrary.simpleMessage("前进麦味"), + "qianshou": MessageLookupByLibrary.simpleMessage("已签收"), + "qianwanghuixiangmendianduihuanhexiao": + MessageLookupByLibrary.simpleMessage( + "前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun": MessageLookupByLibrary.simpleMessage("清理缓存"), + "qingshurubeizhuyaoqiu": + MessageLookupByLibrary.simpleMessage("请输入备注要求"), + "qingshuruchongzhijine": + MessageLookupByLibrary.simpleMessage("请输入充值金额"), + "qingshurushoujihao": MessageLookupByLibrary.simpleMessage("请输入手机号"), + "qingshuruyanzhengma": MessageLookupByLibrary.simpleMessage("请输入验证码"), + "qingshuruyaoqingma": MessageLookupByLibrary.simpleMessage("请输入邀请码"), + "qingshuruyouxiaoshoujihaoma": + MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), + "qingshuruzhifumima": MessageLookupByLibrary.simpleMessage("请输入支付密码"), + "qingtianxieshoujihao": + MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), + "qingtianxiexingming": MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), + "qingtong": MessageLookupByLibrary.simpleMessage("青铜"), + "qingtonghuiyuan": MessageLookupByLibrary.simpleMessage("青铜会员"), + "qingxianxuanguige": MessageLookupByLibrary.simpleMessage("请先选规格"), + "qingxuanzeshiyongmendian": + MessageLookupByLibrary.simpleMessage("请选择使用门店"), + "qingxuanzeshouhuodizhi": + MessageLookupByLibrary.simpleMessage("请选择收货地址"), + "qingxuanzeyigemendian": + MessageLookupByLibrary.simpleMessage("请选择一个门店"), + "qingxuanzeyuyeushijian": + MessageLookupByLibrary.simpleMessage("请选择预约时间"), + "qingxuanzeyuyuemendian": + MessageLookupByLibrary.simpleMessage("请选择预约门店"), + "qingxuanzhemendian": MessageLookupByLibrary.simpleMessage("请选择门店"), + "qingxuanzheninxiangshezhideyuyan": + MessageLookupByLibrary.simpleMessage("请选择您想设置的语言"), + "qingzaiguidingshijianneizhifu": + MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"), + "qingzhuo": MessageLookupByLibrary.simpleMessage("清桌"), + "qishoupeisongzhongyujisongdashijian": + MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"), + "qishouyijiedanquhuozhong": + MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"), + "qita": MessageLookupByLibrary.simpleMessage("其他"), + "qiyetuanjian": MessageLookupByLibrary.simpleMessage("企业团建"), + "quanbao": MessageLookupByLibrary.simpleMessage("券包"), + "quanbu": MessageLookupByLibrary.simpleMessage("全部"), + "quanbudingdan": MessageLookupByLibrary.simpleMessage("全部订单"), + "quanbuduihuan": MessageLookupByLibrary.simpleMessage("全部兑换"), + "quanchangtongyong": MessageLookupByLibrary.simpleMessage("全场通用"), + "quanchangzhe": m25, + "quantian": MessageLookupByLibrary.simpleMessage("全天"), + "quanxian": MessageLookupByLibrary.simpleMessage("权限"), + "quanxianshezhi": MessageLookupByLibrary.simpleMessage("权限设置"), + "quanyijishao": MessageLookupByLibrary.simpleMessage("权益介绍"), + "quanyishuoming": MessageLookupByLibrary.simpleMessage("权益说明"), + "quanyixiangqing": MessageLookupByLibrary.simpleMessage("权益详情"), + "qucanhao": MessageLookupByLibrary.simpleMessage("取餐号"), + "qudanhao": m26, + "qudaolaiyuan": MessageLookupByLibrary.simpleMessage("渠道来源"), + "qudenglu": MessageLookupByLibrary.simpleMessage("去登录"), + "queding": MessageLookupByLibrary.simpleMessage("确定"), + "quedingyaoshanchudongtai": + MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), + "queren": MessageLookupByLibrary.simpleMessage("确认"), + "querenbangding": MessageLookupByLibrary.simpleMessage("确认绑定"), + "querenchongzhi": MessageLookupByLibrary.simpleMessage("确认充值"), + "querenduihuan": MessageLookupByLibrary.simpleMessage("确认兑换"), + "querenshouhuo": MessageLookupByLibrary.simpleMessage("确认收货"), + "querenyaoshanchudangqianpinglunma": + MessageLookupByLibrary.simpleMessage("确认要删除当前评论?"), + "querenzhuxiao": MessageLookupByLibrary.simpleMessage("确认注销"), + "quhexiao": MessageLookupByLibrary.simpleMessage("去核销"), + "quhuozhong": MessageLookupByLibrary.simpleMessage("取货中"), + "qujianma": MessageLookupByLibrary.simpleMessage("取件码"), + "quqiandao": MessageLookupByLibrary.simpleMessage("去签到"), + "qushiyong": MessageLookupByLibrary.simpleMessage("去使用"), + "quwancheng": MessageLookupByLibrary.simpleMessage(" 去完成 "), + "quxiao": MessageLookupByLibrary.simpleMessage("取消"), + "quxiaodingdan": MessageLookupByLibrary.simpleMessage("取消订单"), + "quxiaozhifu": MessageLookupByLibrary.simpleMessage("取消支付"), + "quzhifu": MessageLookupByLibrary.simpleMessage("去支付"), + "remenwenzhangshipin": MessageLookupByLibrary.simpleMessage("热门文章视频"), + "remenwenzhangshipinliebiao": + MessageLookupByLibrary.simpleMessage("热门文章视频列表"), + "ren": m27, + "renwuzhongxin": MessageLookupByLibrary.simpleMessage("任务中心"), + "resend_in_seconds": m28, + "ricahngfenxiang": MessageLookupByLibrary.simpleMessage("日常分享"), + "ruhedihuanjifen": MessageLookupByLibrary.simpleMessage("如何兑换积分"), + "ruhedihuanjifen1": MessageLookupByLibrary.simpleMessage( + "点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~"), + "ruhelingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("如何领取优惠券?"), + "ruhelingquyouhuiquan1": MessageLookupByLibrary.simpleMessage( + "点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~"), + "ruheqiandao": MessageLookupByLibrary.simpleMessage("如何签到?"), + "ruheqiandao1": MessageLookupByLibrary.simpleMessage( + "1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。"), + "ruxutuikuanqingyumendianlianxi": MessageLookupByLibrary.simpleMessage( + "如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系"), + "saoma": MessageLookupByLibrary.simpleMessage("扫码"), + "saomadiancan": MessageLookupByLibrary.simpleMessage("您即将进行扫码点餐"), + "saomashibieguanzhugongzonghao": + MessageLookupByLibrary.simpleMessage("扫码识别,关注公众号"), + "send_code": MessageLookupByLibrary.simpleMessage("发送验证码"), + "shanchu": MessageLookupByLibrary.simpleMessage("删除"), + "shanchudingdan": MessageLookupByLibrary.simpleMessage("删除一单"), + "shanghuruzhu": MessageLookupByLibrary.simpleMessage("商户入驻"), + "shangjiaquan": MessageLookupByLibrary.simpleMessage("商家券"), + "shangjiaqueren": MessageLookupByLibrary.simpleMessage("商家确认"), + "shangjiayifahuo": MessageLookupByLibrary.simpleMessage("商家已发货"), + "shangjiazhengzaipeican": + MessageLookupByLibrary.simpleMessage("商家正在配餐"), + "shanglajiazai": MessageLookupByLibrary.simpleMessage("上拉加载"), + "shangpincaigou": MessageLookupByLibrary.simpleMessage("商品采购"), + "shangpinjifen": m29, + "shangpinxiangqing": MessageLookupByLibrary.simpleMessage("商品详情"), + "shangyidengji": MessageLookupByLibrary.simpleMessage("上一等级"), + "shenghuoyule": MessageLookupByLibrary.simpleMessage("生活娱乐"), + "shengxianzhaipei": MessageLookupByLibrary.simpleMessage("生鲜宅配"), + "shenmijifendali": MessageLookupByLibrary.simpleMessage("神秘积分大礼"), + "shenqingtuikuan": MessageLookupByLibrary.simpleMessage("申请退款"), + "shezhi": MessageLookupByLibrary.simpleMessage("设置"), + "shifangjiazaigengduo": MessageLookupByLibrary.simpleMessage("释放加载更多"), + "shifangshuaxin": MessageLookupByLibrary.simpleMessage("释放刷新"), + "shifujifen": m30, + "shifujihuanka": m31, + "shimingrenzheng": MessageLookupByLibrary.simpleMessage("实名认证"), + "shixiaoquan": MessageLookupByLibrary.simpleMessage("失效券"), + "shixiaoyouhuiquan": MessageLookupByLibrary.simpleMessage("失效优惠券"), + "shiyongbangzhu": MessageLookupByLibrary.simpleMessage("使用帮助"), + "shiyongmendian": MessageLookupByLibrary.simpleMessage("适用门店"), + "shiyongriqi": MessageLookupByLibrary.simpleMessage("使用日期"), + "shiyongshuoming": MessageLookupByLibrary.simpleMessage("使用说明"), + "shiyongtiaojian": MessageLookupByLibrary.simpleMessage("使用条件"), + "shiyongxiangqing": MessageLookupByLibrary.simpleMessage("使用详情"), + "shouhuodi": MessageLookupByLibrary.simpleMessage("收货地址"), + "shouhuodizhi": MessageLookupByLibrary.simpleMessage("请输入详细收货地址"), + "shouhuodizhi1": MessageLookupByLibrary.simpleMessage("收货地址"), + "shouhuorenshoujihao": + MessageLookupByLibrary.simpleMessage("请输入收货人手机号"), + "shouhuorenxiangxidizhi": + MessageLookupByLibrary.simpleMessage("请输入收货人详细地址"), + "shouhuorenxingming": MessageLookupByLibrary.simpleMessage("请输入收货人姓名"), + "shoujihao": MessageLookupByLibrary.simpleMessage("手机号"), + "shouqi": MessageLookupByLibrary.simpleMessage("收起"), + "shouye": MessageLookupByLibrary.simpleMessage("首页"), + "shuaxin": MessageLookupByLibrary.simpleMessage("刷新"), + "shuaxinchenggong": MessageLookupByLibrary.simpleMessage("刷新成功"), + "shuaxinshibai": MessageLookupByLibrary.simpleMessage("刷新失败"), + "shuaxinyue": MessageLookupByLibrary.simpleMessage("刷新余额"), + "shuaxinzhong": MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang": MessageLookupByLibrary.simpleMessage("数量"), + "shurushouhuorendizhi": + MessageLookupByLibrary.simpleMessage("请输入收货人地址"), + "shuruzhifumima": MessageLookupByLibrary.simpleMessage("输入支付密码"), + "sui": m32, + "tangshi": MessageLookupByLibrary.simpleMessage("堂食"), + "tebieshengming": MessageLookupByLibrary.simpleMessage("特别声明"), + "tehuizhuanqu": MessageLookupByLibrary.simpleMessage("特惠专区"), + "tianjiaxinfuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tianjifuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tiantiandefuli": MessageLookupByLibrary.simpleMessage("天天得福利"), + "tiantianlingjifen": MessageLookupByLibrary.simpleMessage("天天领积分"), + "tijiao": MessageLookupByLibrary.simpleMessage("提交"), + "tijiaochenggong": MessageLookupByLibrary.simpleMessage("提交成功"), + "tingchewei": MessageLookupByLibrary.simpleMessage("停车位"), + "tixian": MessageLookupByLibrary.simpleMessage("提现"), + "tongyibingjixu": MessageLookupByLibrary.simpleMessage("同意并继续"), + "tongzhi": MessageLookupByLibrary.simpleMessage("通知"), + "tongzhitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), + "toushuxuzhi": MessageLookupByLibrary.simpleMessage("投书须知"), + "touxiang": MessageLookupByLibrary.simpleMessage("头像"), + "tuichudenglu": MessageLookupByLibrary.simpleMessage("退出登录"), + "tuiguangma": MessageLookupByLibrary.simpleMessage("推广码"), + "tuikuan": MessageLookupByLibrary.simpleMessage("退款"), + "waidai": MessageLookupByLibrary.simpleMessage("外带"), + "waimai": MessageLookupByLibrary.simpleMessage("外卖"), + "waimaipeisong": MessageLookupByLibrary.simpleMessage("外卖配送"), + "waisong": MessageLookupByLibrary.simpleMessage("外送"), + "wan": MessageLookupByLibrary.simpleMessage("玩"), + "wancheng": MessageLookupByLibrary.simpleMessage("完成"), + "wancheng_": m33, + "wanchengyicixiadan": MessageLookupByLibrary.simpleMessage("完成一次下单"), + "wangjimima": MessageLookupByLibrary.simpleMessage("忘记密码"), + "wanjiankang": MessageLookupByLibrary.simpleMessage("玩健康"), + "wanshanshengrixinxi_nl": + MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), + "wanshanshengrixinxi_yhq": + MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), + "weidenglu": MessageLookupByLibrary.simpleMessage("未登录"), + "weidengluxinxi": MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), + "weihexiao": MessageLookupByLibrary.simpleMessage("未核销"), + "weikaiqi": MessageLookupByLibrary.simpleMessage("未开启"), + "weilegeiningenghaodefuwu": MessageLookupByLibrary.simpleMessage( + "为了给您提供更好的服务,以及享受更加精彩的信息内容,请您在使用期间,进行登录"), + "weilejishishoudaohuodongxiaoxi": + MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), + "weilekaipaizhaoxuanzhetouxiang": + MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), + "weilexiangnintuijianfujindemendianxinxi": + MessageLookupByLibrary.simpleMessage( + "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), + "weilexuanzhezhaopianhuancun": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), + "weiwancheng": MessageLookupByLibrary.simpleMessage(" 未完成 "), + "weixinzhifu": MessageLookupByLibrary.simpleMessage("微信支付"), + "weizhitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), + "wentijian": MessageLookupByLibrary.simpleMessage("问题件"), + "wenzhang": MessageLookupByLibrary.simpleMessage("文章"), + "wenzhangxiangqing": MessageLookupByLibrary.simpleMessage("文章详情"), + "wenzhangzhuanlan": MessageLookupByLibrary.simpleMessage("文章专栏"), + "weulingqu": MessageLookupByLibrary.simpleMessage("未领取"), + "wodechengjiu": MessageLookupByLibrary.simpleMessage("我的成就"), + "wodedingdan": MessageLookupByLibrary.simpleMessage("我的订单"), + "wodedongtai": MessageLookupByLibrary.simpleMessage("我的动态"), + "wodegongju": MessageLookupByLibrary.simpleMessage("我的工具"), + "wodehuiyuandengji": MessageLookupByLibrary.simpleMessage("我的会员等级"), + "wodejifenzhi": MessageLookupByLibrary.simpleMessage("我的积分值"), + "wodekanjia": MessageLookupByLibrary.simpleMessage("我的砍价"), + "wodekaquan": MessageLookupByLibrary.simpleMessage("我的卡券"), + "wodenianling": MessageLookupByLibrary.simpleMessage("我的年龄"), + "wodepintuan": MessageLookupByLibrary.simpleMessage("我的拼团"), + "wodeqianbao": MessageLookupByLibrary.simpleMessage("我的钱包"), + "wodeshengri": MessageLookupByLibrary.simpleMessage("我的生日"), + "wodexiaoxi": MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqing": MessageLookupByLibrary.simpleMessage("我的邀请"), + "wodeyaoqingma": MessageLookupByLibrary.simpleMessage("我的邀请码"), + "woyouyaoqingma": MessageLookupByLibrary.simpleMessage("我有邀请码"), + "wuliudanhao": MessageLookupByLibrary.simpleMessage("物流单号:"), + "wuliugongsi": MessageLookupByLibrary.simpleMessage("物流公司:"), + "wuliuxinxi": MessageLookupByLibrary.simpleMessage("物流信息"), + "wuliuzhuangtai": MessageLookupByLibrary.simpleMessage("物流状态:"), + "xiadanshijian": MessageLookupByLibrary.simpleMessage("下单时间"), + "xiadanshijian_": m34, + "xiadanzhuanjifen": MessageLookupByLibrary.simpleMessage("下单赚积分"), + "xialashuaxin": MessageLookupByLibrary.simpleMessage("下拉刷新"), + "xiangce": MessageLookupByLibrary.simpleMessage("相册"), + "xiangji": MessageLookupByLibrary.simpleMessage("相机"), + "xiangjitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), + "xiangqing": MessageLookupByLibrary.simpleMessage("详情"), + "xiangxidizhi": MessageLookupByLibrary.simpleMessage("详细地址"), + "xianshangfafang": MessageLookupByLibrary.simpleMessage("线上发放"), + "xianshangshiyong": MessageLookupByLibrary.simpleMessage("线上使用"), + "xianxiashiyong": MessageLookupByLibrary.simpleMessage("线下使用"), + "xiaofei": MessageLookupByLibrary.simpleMessage("消费"), + "xiaofeijifen": MessageLookupByLibrary.simpleMessage("消费积分"), + "xiaofeijihuanka": MessageLookupByLibrary.simpleMessage("消费集换卡"), + "xiaofeijilu": MessageLookupByLibrary.simpleMessage("消费记录"), + "xiaoxi": MessageLookupByLibrary.simpleMessage("消息"), + "xiayidengji": MessageLookupByLibrary.simpleMessage("下一等级"), + "xiazaiwancheng": MessageLookupByLibrary.simpleMessage("加载完成"), + "xiedongtai": MessageLookupByLibrary.simpleMessage("写动态"), + "xieyitanchuang": MessageLookupByLibrary.simpleMessage("海峡姐妹用户隐私政策"), + "xihuan_": m35, + "xindianhuodong": MessageLookupByLibrary.simpleMessage("星店活动"), + "xingming": MessageLookupByLibrary.simpleMessage("姓名"), + "xitongtongzhi": MessageLookupByLibrary.simpleMessage("系统通知"), + "xitongxiaoxi": MessageLookupByLibrary.simpleMessage("系统消息"), + "xiugai": MessageLookupByLibrary.simpleMessage("修改"), + "xiugaichenggong": MessageLookupByLibrary.simpleMessage("修改成功"), + "xiugaiyonghuming": MessageLookupByLibrary.simpleMessage("修改用户名"), + "xuanguige": MessageLookupByLibrary.simpleMessage("选规格"), + "xuanhaola": MessageLookupByLibrary.simpleMessage("选好啦"), + "xuanji": MessageLookupByLibrary.simpleMessage("选集"), + "xuanzeshangpinlingqufangshi": + MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), + "xuanzetuijianmendian": MessageLookupByLibrary.simpleMessage("选择推荐门店"), + "xuefeihuiyuan": MessageLookupByLibrary.simpleMessage("续费会员"), + "xuexijiankang": MessageLookupByLibrary.simpleMessage("学习健康"), + "xufeihuixiangVIP": MessageLookupByLibrary.simpleMessage("续费回乡VIP"), + "xuni": MessageLookupByLibrary.simpleMessage("虚拟"), + "yanzhengma": MessageLookupByLibrary.simpleMessage("验证码"), + "yaoqinghaoyou": MessageLookupByLibrary.simpleMessage("邀请好友"), + "yaoqinghaoyoudefen": MessageLookupByLibrary.simpleMessage("邀请好友得分"), + "yaoqingrenshoujihao_": m36, + "yaoqingwancheng": MessageLookupByLibrary.simpleMessage("邀请完成"), + "yibangfuka": MessageLookupByLibrary.simpleMessage("已绑副卡"), + "yiduihuan": MessageLookupByLibrary.simpleMessage("已兑换"), + "yiduihuanjian": m37, + "yifahuo": MessageLookupByLibrary.simpleMessage("已发货"), + "yiguanzhu": MessageLookupByLibrary.simpleMessage("已关注"), + "yihouzaishuo": MessageLookupByLibrary.simpleMessage("以后再说"), + "yihuide": MessageLookupByLibrary.simpleMessage("已获得"), + "yihujiaoqishou": MessageLookupByLibrary.simpleMessage("已呼叫骑手"), + "yikaitongzidongxufei": MessageLookupByLibrary.simpleMessage("已开通自动续费"), + "yikexiao": MessageLookupByLibrary.simpleMessage("已核销"), + "yilingqu": MessageLookupByLibrary.simpleMessage("已领取"), + "yindao1": MessageLookupByLibrary.simpleMessage("新增多项功能,海量优惠资讯实时推送"), + "yindao2": + MessageLookupByLibrary.simpleMessage("新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停"), + "yindao3": + MessageLookupByLibrary.simpleMessage("新增会员任务得积分,消费可得绿金、积分商城换购"), + "yindao4": MessageLookupByLibrary.simpleMessage("传递友爱纯净健康有机环保智慧理念"), + "yindaoye1": MessageLookupByLibrary.simpleMessage("会员最新资讯抢先看"), + "yindaoye2": MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), + "yindaoye3": MessageLookupByLibrary.simpleMessage("会员活动专区"), + "yindaoye4": MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "yingwen": MessageLookupByLibrary.simpleMessage("英文"), + "yingyeshijian": m38, + "yinkahuiyuan": MessageLookupByLibrary.simpleMessage("银卡会员"), + "yinshi": MessageLookupByLibrary.simpleMessage("饮食"), + "yinsishengming": MessageLookupByLibrary.simpleMessage("隐私声明"), + "yinsixieyi": MessageLookupByLibrary.simpleMessage("《隐私协议》"), + "yinsizhengce1": MessageLookupByLibrary.simpleMessage( + " 感谢您使用海峡姐妹APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读海峡姐妹"), + "yinsizhengce2": MessageLookupByLibrary.simpleMessage( + "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"), + "yinzhang": MessageLookupByLibrary.simpleMessage("印章"), + "yiqiandao": MessageLookupByLibrary.simpleMessage("已签到"), + "yiqianshou": MessageLookupByLibrary.simpleMessage("已签收"), + "yiquxiao": MessageLookupByLibrary.simpleMessage(" 已取消 "), + "yishijiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiming": MessageLookupByLibrary.simpleMessage("已实名"), + "yishixiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiyong": MessageLookupByLibrary.simpleMessage("已使用"), + "yishouquan": MessageLookupByLibrary.simpleMessage("已授权"), + "yisongda": MessageLookupByLibrary.simpleMessage("已送达"), + "yituikuan": MessageLookupByLibrary.simpleMessage("已退款"), + "yiwancheng": MessageLookupByLibrary.simpleMessage(" 已完成 "), + "yiwanchengdingdan": MessageLookupByLibrary.simpleMessage("已完成订单"), + "yixianghuiyuanquanyi": MessageLookupByLibrary.simpleMessage("已享会员权益"), + "yixiansquanbupinglun": + MessageLookupByLibrary.simpleMessage("-已显示全部评论-"), + "yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "yiyoujifen": MessageLookupByLibrary.simpleMessage("已有积分"), + "yizhifu": MessageLookupByLibrary.simpleMessage("已支付"), + "yonghuming": MessageLookupByLibrary.simpleMessage("用户名"), + "yonghuxiaofeijifen": + MessageLookupByLibrary.simpleMessage("用户每消费1元可获得1个积分。"), + "youhuiquan": MessageLookupByLibrary.simpleMessage("优惠券"), + "youhuiquanlingqu": MessageLookupByLibrary.simpleMessage("优惠券领取"), + "youhuiquanwufajileijifen": MessageLookupByLibrary.simpleMessage( + "优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), + "youkedenglu": MessageLookupByLibrary.simpleMessage("游客登录"), + "youxiaoqi": m39, + "youxiaoqixian": MessageLookupByLibrary.simpleMessage("有效期限:"), + "youxiaoqizhi": m40, + "yuan": MessageLookupByLibrary.simpleMessage("元"), + "yuan_": m41, + "yuanjia": MessageLookupByLibrary.simpleMessage("原价"), + "yue": MessageLookupByLibrary.simpleMessage("余额"), + "yue_": m42, + "yue__": m43, + "yuemingxi": MessageLookupByLibrary.simpleMessage("余额明细"), + "yuliudianhua": MessageLookupByLibrary.simpleMessage("预留电话"), + "yunfei": MessageLookupByLibrary.simpleMessage("运费"), + "yuyan": MessageLookupByLibrary.simpleMessage("语言"), + "zailaiyidan": MessageLookupByLibrary.simpleMessage("再来一单"), + "zaituzhong": MessageLookupByLibrary.simpleMessage("运输中"), + "zaixiankefu": MessageLookupByLibrary.simpleMessage("在线客服"), + "zanbuzhichixianshangdiancan": + MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"), + "zanweijiesuo": MessageLookupByLibrary.simpleMessage("暂未解锁"), + "zanweikaifang": MessageLookupByLibrary.simpleMessage("暂未开放"), + "zanweikaitong": MessageLookupByLibrary.simpleMessage("暂未开通"), + "zanwupinglun": MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), + "zanwuxianshangjindian": MessageLookupByLibrary.simpleMessage("暂无线上门店"), + "zanwuyouhuiquankelingqu": + MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), + "zhanghaoanquan": MessageLookupByLibrary.simpleMessage("账号安全"), + "zhanghaoshouquan": MessageLookupByLibrary.simpleMessage("账号授权"), + "zhanghaoxinxi": MessageLookupByLibrary.simpleMessage("账号信息"), + "zhanghaoyuanquan": MessageLookupByLibrary.simpleMessage("账号与安全"), + "zhanghaozhuxiaoshuoming": + MessageLookupByLibrary.simpleMessage("账号注销说明"), + "zhanghuyue": MessageLookupByLibrary.simpleMessage("账户余额"), + "zhankai": MessageLookupByLibrary.simpleMessage("展开"), + "zhengzaihujiaoqishou": MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), + "zhengzaijiazai": MessageLookupByLibrary.simpleMessage("正在加载"), + "zhengzaipeisong": MessageLookupByLibrary.simpleMessage("正在配送"), + "zhengzaixiazaizhong": MessageLookupByLibrary.simpleMessage("正在加载中..."), + "zhidianmendian": MessageLookupByLibrary.simpleMessage("致电门店"), + "zhifubao": MessageLookupByLibrary.simpleMessage("支付宝"), + "zhifubaozhifu": MessageLookupByLibrary.simpleMessage("支付宝支付"), + "zhifufangshi": MessageLookupByLibrary.simpleMessage("支付方式"), + "zhifuxiangqing": MessageLookupByLibrary.simpleMessage("支付详情"), + "zhizunhuiyuan": MessageLookupByLibrary.simpleMessage("至尊会员"), + "zhizuowancheng": MessageLookupByLibrary.simpleMessage("制作完成"), + "zhongchakan": MessageLookupByLibrary.simpleMessage("中查看"), + "zhongwenjianti": MessageLookupByLibrary.simpleMessage("简体中文"), + "zhuanlan": MessageLookupByLibrary.simpleMessage("专栏"), + "zhuanxiangyouhuiquan": MessageLookupByLibrary.simpleMessage("专享优惠券"), + "zhunong1": MessageLookupByLibrary.simpleMessage("爱在回乡 快乐助农"), + "zhunongjifen": MessageLookupByLibrary.simpleMessage("助农积分"), + "zhunongzhuanqu": MessageLookupByLibrary.simpleMessage("助农专区"), + "zhuxiaotixing": MessageLookupByLibrary.simpleMessage( + "再次提醒:注销帐号后不可恢复,相关数据和信息会永久删除。"), + "zhuxiaozhanghao": MessageLookupByLibrary.simpleMessage("注销账号"), + "ziqu": MessageLookupByLibrary.simpleMessage("自取"), + "ziti": MessageLookupByLibrary.simpleMessage("自提"), + "zitidizhi": MessageLookupByLibrary.simpleMessage("自提地址"), + "zitiduihuanquan": MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), + "zitishijian": MessageLookupByLibrary.simpleMessage("自提时间"), + "zongzichan": MessageLookupByLibrary.simpleMessage("总资产"), + "zongzichanyuan": MessageLookupByLibrary.simpleMessage("总资产(元)"), + "zuanshihuiyuan": MessageLookupByLibrary.simpleMessage("钻石会员"), + "zuixinwenzhang": MessageLookupByLibrary.simpleMessage("最新文章"), + "zuorenwudejifen": MessageLookupByLibrary.simpleMessage("做任务得积分"), + "zuozhe": m44 + }; } diff --git a/lib/generated/intl/messages_en_US.dart b/lib/generated/intl/messages_en_US.dart index e7d5ae74..46e9b190 100644 --- a/lib/generated/intl/messages_en_US.dart +++ b/lib/generated/intl/messages_en_US.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,814 +20,1187 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'en_US'; - static m0(version) => "Version:${version}"; + static String m0(version) => "Version:${version}"; - static m1(yuan) => "The minimum recharge amount is ${yuan}"; + static String m1(yuan) => "The minimum recharge amount is ${yuan}"; - static m2(time) => "Creation time${time}"; + static String m2(time) => "Creation time${time}"; - static m3(xihuan) => "Like${xihuan}"; + static String m3(xihuan) => "Like${xihuan}"; - static m4(shijian) => "Publishing start time ${shijian}"; + static String m4(shijian) => "Publishing start time ${shijian}"; - static m5(ge) => "${ge}g/piece"; + static String m5(ge) => "${ge}g/piece"; - static m6(jian) => "common${jian}piece"; + static String m6(jian) => "common${jian}piece"; - static m7(jian) => "common${jian} items in total"; + static String m7(jian) => "common${jian} items in total"; - static m8(km) => "${km}km"; + static String m8(km) => "${km}km"; - static m9(huifu) => "Reply@${huifu}:"; + static String m9(huifu) => "Reply@${huifu}:"; - static m10(yuan) => "Event relief${yuan}yuan distribution fee"; + static String m10(yuan) => "Event relief${yuan}yuan distribution fee"; - static m11(yue) => "Activity balance ${yue}"; + static String m11(yue) => "Activity balance ${yue}"; - static m12(jifen) => "+ ${jifen} integral"; + static String m12(jifen) => "+ ${jifen} integral"; - static m13(jianjie) => "Introduction:${jianjie}"; + static String m13(jianjie) => "Introduction:${jianjie}"; - static m14(jifen) => "${jifen}integral"; + static String m14(jifen) => "${jifen}integral"; - static m15(jifen) => "${jifen}Integrate to the next level"; + static String m15(jifen) => "${jifen}Integrate to the next level"; - static m16(date) => "Opening date:${date}"; + static String m16(date) => "Opening date:${date}"; - static m17(shijian) => "Picking time ${shijian}"; + static String m17(shijian) => "Picking time ${shijian}"; - static m18(yue) => "green coin ${yue}"; + static String m18(yue) => "green coin ${yue}"; - static m19(man, jian) => "full${man}yuan Lijian${jian}yuan coupons"; + static String m19(man, jian) => "full${man}yuan Lijian${jian}yuan coupons"; - static m20(yuan) => "full ${yuan}available"; + static String m20(yuan) => "full ${yuan}available"; - static m21(mi) => "${mi}meters"; + static String m21(mi) => "${mi}meters"; - static m22(tian) => "You have signed in for${tian}consecutive days"; + static String m22(tian) => "You have signed in for${tian}consecutive days"; - static m23(pinglun) => "Comment(${pinglun})"; + static String m23(pinglun) => "Comment(${pinglun})"; - static m24(zongyue) => "Balance:${zongyue}"; + static String m24(zongyue) => "Balance:${zongyue}"; - static m25(zhe) => "full${zhe}folding"; + static String m25(zhe) => "full${zhe}folding"; - static m26(num) => "Retrieval No${num}"; + static String m26(num) => "Retrieval No${num}"; - static m27(ren) => "¥${ren}/person"; + static String m27(ren) => "¥${ren}/person"; - static m28(second) => "${second}s and then resend"; + static String m28(second) => "${second}s and then resend"; - static m29(jifen) => "Product credit ${jifen}credit"; + static String m29(jifen) => "Product credit ${jifen}credit"; - static m30(jifen) => "Paid in integral ${jifen}integral"; + static String m30(jifen) => "Paid in integral ${jifen}integral"; - static m31(jihuanka) => "paid-in trading card ${jihuanka}trading card"; + static String m31(jihuanka) => "paid-in trading card ${jihuanka}trading card"; - static m32(sui) => "${sui}years old"; + static String m32(sui) => "${sui}years old"; - static m33(num) => "Finish${num}"; + static String m33(num) => "Finish${num}"; - static m34(time) => "Ordering time:${time}"; + static String m34(time) => "Ordering time:${time}"; - static m35(xihuan) => "Like(${xihuan})"; + static String m35(xihuan) => "Like(${xihuan})"; - static m36(shoujihao) => "Inviter\'s mobile number:${shoujihao}"; + static String m36(shoujihao) => "Inviter\'s mobile number:${shoujihao}"; - static m37(jian) => "${jian}pieces redeemed"; + static String m37(jian) => "${jian}pieces redeemed"; - static m38(time) => "Business hours: ${time}"; + static String m38(time) => "Business hours: ${time}"; - static m39(date) => "Validity:${date}"; + static String m39(date) => "Validity:${date}"; - static m40(date) => "Valid until ${date}"; + static String m40(date) => "Valid until ${date}"; - static m41(yuan) => "${yuan}yuan"; + static String m41(yuan) => "${yuan}yuan"; - static m42(yue) => "Balance ${yue}"; + static String m42(yue) => "Balance ${yue}"; - static m43(yue) => "Balance ${yue}"; + static String m43(yue) => "Balance ${yue}"; - static m44(zuozhe) => "Author:${zuozhe}"; + static String m44(zuozhe) => "Author:${zuozhe}"; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "bainianchuanjiao" : MessageLookupByLibrary.simpleMessage("Hundred year Sichuan Pepper"), - "baiyin" : MessageLookupByLibrary.simpleMessage("silver"), - "baiyinhuiyuan" : MessageLookupByLibrary.simpleMessage("Silver Member"), - "banben" : m0, - "bangdingfuka" : MessageLookupByLibrary.simpleMessage("binding sub card"), - "bangdingshouji" : MessageLookupByLibrary.simpleMessage("bind phone"), - "bangong" : MessageLookupByLibrary.simpleMessage("Office"), - "bangzhuyufankui" : MessageLookupByLibrary.simpleMessage("Help"), - "baocun" : MessageLookupByLibrary.simpleMessage("Save"), - "baocunchenggong" : MessageLookupByLibrary.simpleMessage("Saving succeeded"), - "baocunsaoma" : MessageLookupByLibrary.simpleMessage("The screenshot saves the QR code below, invites others to scan WeChat for identification, long press follow, completes the small game, receives the coupon, and the invitation is successful!"), - "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("Each invited user can get a coupon of 10 yuan for Qianjin Maiwei after entering the invitation code"), - "beizhu" : MessageLookupByLibrary.simpleMessage("Remarks"), - "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("Remarks"), - "benzhouquanbao" : MessageLookupByLibrary.simpleMessage("This week coupon bag"), - "bianjidizhi" : MessageLookupByLibrary.simpleMessage("Edit Address"), - "bianjigerenziliao" : MessageLookupByLibrary.simpleMessage("Edit Profile "), - "biaojiweiyidu" : MessageLookupByLibrary.simpleMessage("Mark as Read"), - "biaoweiyidu" : MessageLookupByLibrary.simpleMessage("Mark as Read"), - "bodadianhua" : MessageLookupByLibrary.simpleMessage("Make a call"), - "bofangcishu" : MessageLookupByLibrary.simpleMessage("Playback times"), - "bojin" : MessageLookupByLibrary.simpleMessage("platinum"), - "brand_yixinhuixiang" : MessageLookupByLibrary.simpleMessage("strait sisters"), - "buzhichikaipiao" : MessageLookupByLibrary.simpleMessage("Invoicing is not supported"), - "canyingfuwu" : MessageLookupByLibrary.simpleMessage("catering service"), - "chakan" : MessageLookupByLibrary.simpleMessage("View"), - "chakangengduo" : MessageLookupByLibrary.simpleMessage("See more"), - "chakanhexiaoma" : MessageLookupByLibrary.simpleMessage("View Write off Code"), - "chakanquanyi" : MessageLookupByLibrary.simpleMessage("View Equity"), - "chakanshixiaoquan" : MessageLookupByLibrary.simpleMessage("View invalid coupons"), - "chakanwodekabao" : MessageLookupByLibrary.simpleMessage("Check my card bag"), - "chakanwodekaquan" : MessageLookupByLibrary.simpleMessage("Check my card coupon"), - "chakanwuliu" : MessageLookupByLibrary.simpleMessage("View Logistics"), - "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("View Details"), - "changjianwenti" : MessageLookupByLibrary.simpleMessage("Frequently Asked Questions"), - "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("Long term effective"), - "chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("Premium coupon"), - "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("Founder\'s story"), - "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("You can become a member by successfully logging in and registering and binding relevant information。"), - "chengjiu" : MessageLookupByLibrary.simpleMessage("achievement"), - "chengjiuhuizhang" : MessageLookupByLibrary.simpleMessage("Achievement badge"), - "chengshixuanze" : MessageLookupByLibrary.simpleMessage("City Selection"), - "chengweidianpuzhuanshuhuiyuan" : MessageLookupByLibrary.simpleMessage("Become an exclusive member of the store and enjoy exclusive rights"), - "chi" : MessageLookupByLibrary.simpleMessage("Eat"), - "chijiankang" : MessageLookupByLibrary.simpleMessage("Eat healthy"), - "chongzhi" : MessageLookupByLibrary.simpleMessage("Recharge"), - "chongzhichenggong" : MessageLookupByLibrary.simpleMessage("Recharge succeeded"), - "chongzhifuliduo" : MessageLookupByLibrary.simpleMessage("Recharge Fulido"), - "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("recharge message"), - "chongzhizuixiaojine" : m1, - "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("The story of the founder -"), - "chuangshirendegushi1" : MessageLookupByLibrary.simpleMessage("The Founder\'s Story"), - "chuzhiyouhui" : MessageLookupByLibrary.simpleMessage("Value saving discount"), - "code_error" : MessageLookupByLibrary.simpleMessage("Wrong input of verification code"), - "cunchu" : MessageLookupByLibrary.simpleMessage("Storage"), - "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("It is recommended that you open the storage permission during use in order to obtain photo usage, caching and other functions"), - "dabaodaodianqu" : MessageLookupByLibrary.simpleMessage("pack to shop take away"), - "daifukuan" : MessageLookupByLibrary.simpleMessage("Obligations"), - "daipeisong" : MessageLookupByLibrary.simpleMessage("to be delivered"), - "daiqucan" : MessageLookupByLibrary.simpleMessage("To be picked up"), - "daiqueren" : MessageLookupByLibrary.simpleMessage("to be confirmed"), - "daizhifu" : MessageLookupByLibrary.simpleMessage("to be paid"), - "daizhizuo" : MessageLookupByLibrary.simpleMessage("to be made"), - "dajiadouzaiduihuan" : MessageLookupByLibrary.simpleMessage("Everyone is exchanging"), - "dakaidingwei" : MessageLookupByLibrary.simpleMessage("Open Positioning"), - "dangqianbanben" : MessageLookupByLibrary.simpleMessage("Current Version"), - "dangqiandengji" : MessageLookupByLibrary.simpleMessage("Current Level"), - "dangqianjifen" : MessageLookupByLibrary.simpleMessage("Current integral:"), - "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("The current commodity exchange write off code has been written off"), - "dangqianzhukadengji" : MessageLookupByLibrary.simpleMessage("Current Master Card Level"), - "daodianziqu" : MessageLookupByLibrary.simpleMessage("Get it at the store"), - "daopinglunliebiaodingbu" : MessageLookupByLibrary.simpleMessage("To the top of the comment list"), - "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("To the next level"), - "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("Wait for the merchant\'s confirmation"), - "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("Waiting for the user to pick up the meal"), - "denglu" : MessageLookupByLibrary.simpleMessage("Login"), - "diancan" : MessageLookupByLibrary.simpleMessage("Order a meal"), - "diandan" : MessageLookupByLibrary.simpleMessage("Order"), - "dianhua" : MessageLookupByLibrary.simpleMessage("Telephone"), - "dianjidenglu" : MessageLookupByLibrary.simpleMessage("Click login to enjoy more wonderful information"), - "dianneiyongcan" : MessageLookupByLibrary.simpleMessage("store dining"), - "dianpuchongzhi" : MessageLookupByLibrary.simpleMessage("Recharge"), - "dianputuijian" : MessageLookupByLibrary.simpleMessage("Store recommendation"), - "dianpuyue" : MessageLookupByLibrary.simpleMessage("Shop balance"), - "dianwolingqu" : MessageLookupByLibrary.simpleMessage("Click me to get it"), - "dianzan" : MessageLookupByLibrary.simpleMessage("Like"), - "dianzanxihuan_" : m3, - "dingdan" : MessageLookupByLibrary.simpleMessage("Order"), - "dingdanbianhao" : MessageLookupByLibrary.simpleMessage("Order No"), - "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("Order to be shipped"), - "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("Order to be paid"), - "dingdangenzong" : MessageLookupByLibrary.simpleMessage("Order tracking"), - "dingdanhao" : MessageLookupByLibrary.simpleMessage("Order No"), - "dingdanjiesuan" : MessageLookupByLibrary.simpleMessage("Order Settlement"), - "dingdanqueren" : MessageLookupByLibrary.simpleMessage("Order confirmation"), - "dingdantongzhi" : MessageLookupByLibrary.simpleMessage("Order Notice"), - "dingdanxiaoxi" : MessageLookupByLibrary.simpleMessage("Order Message"), - "dingdanyisongda" : MessageLookupByLibrary.simpleMessage("Order delivery"), - "dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("The order has been refunded"), - "dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("The order has been completed"), - "dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("The order has been paid"), - "dingwei" : MessageLookupByLibrary.simpleMessage("Positioning"), - "dizhi" : MessageLookupByLibrary.simpleMessage("Address"), - "dongtai" : MessageLookupByLibrary.simpleMessage("Dynamic"), - "dongtaitishi" : MessageLookupByLibrary.simpleMessage("The user\'s published content needs to wait for the system review, and will be displayed in the recommended square after the review is passed"), - "dongtaixiangqing" : MessageLookupByLibrary.simpleMessage("Dynamic Details"), - "duihuan" : MessageLookupByLibrary.simpleMessage("exchange"), - "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("Successful exchange"), - "duihuanguize" : MessageLookupByLibrary.simpleMessage("Exchange Rules"), - "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("Delivery within five working days after exchange"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("You can go to the store five working days after the exchange"), - "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("From low to high exchange volume"), - "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("From high to low exchange volume"), - "duihuanlishi" : MessageLookupByLibrary.simpleMessage("Exchange"), - "duihuanquan" : MessageLookupByLibrary.simpleMessage("redeem coupon"), - "duihuanshangpinxiangqing" : MessageLookupByLibrary.simpleMessage("Details of exchanged goods"), - "duihuanxinxi" : MessageLookupByLibrary.simpleMessage("Exchange information"), - "duozhongyouhui" : MessageLookupByLibrary.simpleMessage("A variety of coupons are waiting for you"), - "fabu" : MessageLookupByLibrary.simpleMessage("Publish"), - "fangshier" : MessageLookupByLibrary.simpleMessage("Mode 2"), - "fangshiyi" : MessageLookupByLibrary.simpleMessage("Mode 1"), - "fanhuiduihuanlishi" : MessageLookupByLibrary.simpleMessage("Return to exchange history"), - "fanhuishequn" : MessageLookupByLibrary.simpleMessage("Return to the community"), - "fanhuishouye" : MessageLookupByLibrary.simpleMessage("Return to the home page"), - "fankui" : MessageLookupByLibrary.simpleMessage("Feedback"), - "fankuilizi" : MessageLookupByLibrary.simpleMessage("You can enter feedback content here, such as product suggestions, functional exceptions, etc"), - "fantizhongwen" : MessageLookupByLibrary.simpleMessage("Traditional Chinese"), - "fapiao" : MessageLookupByLibrary.simpleMessage("Invoice"), - "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("Invoice Assistant"), - "fasong" : MessageLookupByLibrary.simpleMessage("Sending"), - "fasongduanxin" : MessageLookupByLibrary.simpleMessage("Send SMS"), - "faxingshijian" : m4, - "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("Non physical exchange code"), - "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("After exchanging non physical goods, you can use the coupon!"), - "fensi" : MessageLookupByLibrary.simpleMessage("Fans"), - "fenxiang" : MessageLookupByLibrary.simpleMessage("Sharing"), - "fenxiangdao" : MessageLookupByLibrary.simpleMessage("Share to"), - "fenxiangjiankang" : MessageLookupByLibrary.simpleMessage("Sharing Health"), - "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("You can also directly click on the top right to share with the people you want to invite。"), - "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("Share the invitation code with your friend, and the other person will enter the invitation code on the login page of the app, and the invitation will be successful。"), - "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("Share to WeChat"), - "fukashoujihao" : MessageLookupByLibrary.simpleMessage("Slave card mobile number"), - "fuliduihuan" : MessageLookupByLibrary.simpleMessage("Benefit exchange"), - "fulizhongxin" : MessageLookupByLibrary.simpleMessage("CNOUS"), - "ge" : m5, - "geiwopingfen" : MessageLookupByLibrary.simpleMessage("Rate me"), - "gengduo" : MessageLookupByLibrary.simpleMessage("more"), - "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("more good coupons"), - "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("more coupons"), - "genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("modify bind phone"), - "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("Changing the background"), - "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("Changing the avatar"), - "gengyouhui" : MessageLookupByLibrary.simpleMessage("More preferential"), - "gerenxinxi" : MessageLookupByLibrary.simpleMessage("Personal Information"), - "gexingqianming" : MessageLookupByLibrary.simpleMessage("Personal Signature"), - "gong" : MessageLookupByLibrary.simpleMessage("total"), - "gongchuanghuiyuan" : MessageLookupByLibrary.simpleMessage("Co founder Member"), - "gongjijian" : m6, - "gongjijianshangpin" : m7, - "gongli" : m8, - "gongxinchengwei" : MessageLookupByLibrary.simpleMessage("Congratulations on becoming"), - "gongxinichengweibendianhuiyuan" : MessageLookupByLibrary.simpleMessage("Congratulations, you have become a member of our store. Go and enjoy the super many member rights。"), - "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("Please check the agreement on privacy service and return home service"), - "guanlidizhi" : MessageLookupByLibrary.simpleMessage("Management Address"), - "guanyu" : MessageLookupByLibrary.simpleMessage("About"), - "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("About the Founder"), - "guanyuhuixiang" : MessageLookupByLibrary.simpleMessage("About Going Home"), - "guanzhu" : MessageLookupByLibrary.simpleMessage("Follow"), - "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("Live a healthy and organic life"), - "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("No message~"), - "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("There is no coupon to get~"), - "haixiajiemei" : MessageLookupByLibrary.simpleMessage("Straits Sister"), - "haowu" : MessageLookupByLibrary.simpleMessage("good things"), - "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("Friend Reward Rules"), - "he" : MessageLookupByLibrary.simpleMessage("Drink"), - "heji" : MessageLookupByLibrary.simpleMessage("Total:"), - "hejiankang" : MessageLookupByLibrary.simpleMessage("Drink healthy"), - "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("Write off succeeded"), - "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("Write off Code Details"), - "huangjin" : MessageLookupByLibrary.simpleMessage("gold"), - "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("Golden Member"), - "huifu" : MessageLookupByLibrary.simpleMessage("Delete"), - "huifu_" : m9, - "huixiangVIPka" : MessageLookupByLibrary.simpleMessage("Home Returning VIP Card"), - "huixiangqianbao" : MessageLookupByLibrary.simpleMessage("Wallet"), - "huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("For:Any store dedicated to returning home"), - "huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("Homecoming Headlines"), - "huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("Home Return VIP Card Exclusive Rights"), - "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("Homecoming VIP Membership Card Rules Agreement"), - "huiyuandengji" : MessageLookupByLibrary.simpleMessage("Membership Level"), - "huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("Member Level Description"), - "huiyuanguize" : MessageLookupByLibrary.simpleMessage("Member Rules Description"), - "huiyuanhuodejifen" : MessageLookupByLibrary.simpleMessage("How members get points"), - "huiyuanjia" : MessageLookupByLibrary.simpleMessage("member price"), - "huiyuanjibieduizhao" : MessageLookupByLibrary.simpleMessage("Member Level Comparison Table"), - "huiyuanjifen" : MessageLookupByLibrary.simpleMessage("Member Points"), - "huiyuanka" : MessageLookupByLibrary.simpleMessage("Membership Card"), - "huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("Membership card details"), - "huiyuanma" : MessageLookupByLibrary.simpleMessage("vipCode"), - "huiyuanquanyi" : MessageLookupByLibrary.simpleMessage("Membership Rights"), - "huiyuanyue" : MessageLookupByLibrary.simpleMessage("Member Balance"), - "huiyuanzhongxin" : MessageLookupByLibrary.simpleMessage("Member Center"), - "huiyuanzhuanxiangjiage" : MessageLookupByLibrary.simpleMessage("Member Exclusive Price"), - "huode" : MessageLookupByLibrary.simpleMessage("get"), - "huodequanyi" : MessageLookupByLibrary.simpleMessage("acquire interests"), - "huodong" : MessageLookupByLibrary.simpleMessage("activity"), - "huodongguize" : MessageLookupByLibrary.simpleMessage("Activity Rules"), - "huodongjianmianpeisongfei" : m10, - "huodongjinxingzhong" : MessageLookupByLibrary.simpleMessage("Activity in Progress"), - "huodongliebiao" : MessageLookupByLibrary.simpleMessage("Activity List"), - "huodongyue" : MessageLookupByLibrary.simpleMessage("Activity Balance"), - "huodongyue_" : m11, - "huodongzixun" : MessageLookupByLibrary.simpleMessage("Activity information"), - "huopinyisongda" : MessageLookupByLibrary.simpleMessage("The goods have been delivered"), - "huozan" : MessageLookupByLibrary.simpleMessage("liked"), - "input_code" : MessageLookupByLibrary.simpleMessage("Mobile phone verification code"), - "input_code_hide" : MessageLookupByLibrary.simpleMessage("Please enter the verification code"), - "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("Fill in the invitation code"), - "input_phone" : MessageLookupByLibrary.simpleMessage("Enter the phone number"), - "input_phone_hide" : MessageLookupByLibrary.simpleMessage("Please enter your mobile number"), - "invite_code_error" : MessageLookupByLibrary.simpleMessage("Wrong invitation code"), - "jiajifen" : m12, - "jian" : MessageLookupByLibrary.simpleMessage("piece"), - "jiangli" : MessageLookupByLibrary.simpleMessage("Reward"), - "jiangshi" : MessageLookupByLibrary.simpleMessage("Instructor"), - "jianjie" : m13, - "jiazaishibai" : MessageLookupByLibrary.simpleMessage("Loading failed"), - "jiesuan" : MessageLookupByLibrary.simpleMessage("Settlement"), - "jiesuanjine" : MessageLookupByLibrary.simpleMessage("Settlement Amount"), - "jifen" : MessageLookupByLibrary.simpleMessage("Integral"), - "jifen_" : m14, - "jifenbuzu" : MessageLookupByLibrary.simpleMessage("Your points are insufficient"), - "jifendaoxiayidengji" : m15, - "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("Calculation description of integral"), - "jifendidaogao" : MessageLookupByLibrary.simpleMessage("From low to high"), - "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("Integral from high to low"), - "jifenhuanquan" : MessageLookupByLibrary.simpleMessage("points for coupons"), - "jifenmingxi" : MessageLookupByLibrary.simpleMessage("Integral Details"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("Points Mall"), - "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("Points Details"), - "jihuanka" : MessageLookupByLibrary.simpleMessage("trading card"), - "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("Jingbi League Member Store"), - "jingxuanhaowen" : MessageLookupByLibrary.simpleMessage("Selected good articles "), - "jingxuanhuodong" : MessageLookupByLibrary.simpleMessage("Selected Activities"), - "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("Gold Card Member"), - "jinrihuiyuanrenwu" : MessageLookupByLibrary.simpleMessage("Today\'s Member Task"), - "jinrushangdian" : MessageLookupByLibrary.simpleMessage("Enter the store"), - "jinruzhuanqu" : MessageLookupByLibrary.simpleMessage("Enter the zone"), - "jinxingbangdingfuka" : MessageLookupByLibrary.simpleMessage("Bind sub card"), - "jinxingfukabangding" : MessageLookupByLibrary.simpleMessage("Associate card binding"), - "jinxingzhanghaozhuxiao" : MessageLookupByLibrary.simpleMessage("Account cancellation"), - "jinxingzhongdedingdan" : MessageLookupByLibrary.simpleMessage("Orders in Progress"), - "jituanchuangbanren" : MessageLookupByLibrary.simpleMessage(" Founder of the Group"), - "jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("Founder of the Group"), - "jixuduihuan" : MessageLookupByLibrary.simpleMessage("Continue to exchange"), - "jixuzhifu" : MessageLookupByLibrary.simpleMessage("Continue to pay"), - "jubao" : MessageLookupByLibrary.simpleMessage("Report"), - "jubaogaineirong" : MessageLookupByLibrary.simpleMessage("Report this content"), - "jubaotishi" : MessageLookupByLibrary.simpleMessage("Your report is waiting for manual review, and we will process it in 7-15 working days. The processing results can be found in"), - "jubaoyuanyin" : MessageLookupByLibrary.simpleMessage("Please enter the reason for reporting, so that we can locate the problem faster and handle it quickly"), - "jujue" : MessageLookupByLibrary.simpleMessage("Reject"), - "kabao" : MessageLookupByLibrary.simpleMessage("card bag"), - "kabaokeshiyong" : MessageLookupByLibrary.simpleMessage("Card bag-available"), - "kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("Open Permission"), - "kaitonghuixianghuoququanyi" : MessageLookupByLibrary.simpleMessage("Open a return home VIP card to get more benefits"), - "kaitongriqi" : m16, - "kaquan" : MessageLookupByLibrary.simpleMessage("card coupon"), - "kelingqudeyouhuiquan" : MessageLookupByLibrary.simpleMessage("Coupons available"), - "keshiyong" : MessageLookupByLibrary.simpleMessage("available"), - "keyongjifen" : MessageLookupByLibrary.simpleMessage("Available Points"), - "keyongquan" : MessageLookupByLibrary.simpleMessage("Available vouchers"), - "keyongyouhuiquan" : MessageLookupByLibrary.simpleMessage("Available Coupons"), - "keyongyue" : MessageLookupByLibrary.simpleMessage("Available Balance"), - "kongtiao" : MessageLookupByLibrary.simpleMessage("Air conditioner"), - "kuaidi" : MessageLookupByLibrary.simpleMessage("express"), - "kuaidiwuliu" : MessageLookupByLibrary.simpleMessage("express logistics"), - "kuailezhunong" : MessageLookupByLibrary.simpleMessage("Helping farmers happily"), - "lianxikefu" : MessageLookupByLibrary.simpleMessage("Service"), - "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("Contact phone number"), - "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("Sign in continuously to receive double points"), - "liaojie" : MessageLookupByLibrary.simpleMessage("Understand"), - "liaojiejiankang" : MessageLookupByLibrary.simpleMessage("Understanding Health"), - "lijicanjia" : MessageLookupByLibrary.simpleMessage("Join now"), - "lijichongzhi" : MessageLookupByLibrary.simpleMessage("Recharge Now"), - "lijigengxin" : MessageLookupByLibrary.simpleMessage("Update Now"), - "lijikaitong" : MessageLookupByLibrary.simpleMessage("Open now"), - "lijilingqu" : MessageLookupByLibrary.simpleMessage("Get it now"), - "lijiqiandao" : MessageLookupByLibrary.simpleMessage("Sign in immediately"), - "lijishiyong" : MessageLookupByLibrary.simpleMessage("Use Now"), - "lijitiyan" : MessageLookupByLibrary.simpleMessage("Experience Now"), - "lijiyuyue" : MessageLookupByLibrary.simpleMessage("directly reservation"), - "likekaitong" : MessageLookupByLibrary.simpleMessage("Open now"), - "likexufei" : MessageLookupByLibrary.simpleMessage("Renew now"), - "likezhifu" : MessageLookupByLibrary.simpleMessage("Pay Now"), - "lingqu" : MessageLookupByLibrary.simpleMessage("Receive"), - "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("Coupon Collection Center"), - "lingquchenggong" : MessageLookupByLibrary.simpleMessage("Claim succeeded"), - "lingqudaokabao" : MessageLookupByLibrary.simpleMessage("Get the card bag"), - "lingqufangshi" : MessageLookupByLibrary.simpleMessage("Collection Method"), - "lingqushijian" : m17, - "linian" : MessageLookupByLibrary.simpleMessage("concept"), - "lishijilu" : MessageLookupByLibrary.simpleMessage("History"), - "liuxianinjingcaidepinglunba" : MessageLookupByLibrary.simpleMessage("Leave your wonderful comments"), - "login" : MessageLookupByLibrary.simpleMessage("login"), - "login_splash" : MessageLookupByLibrary.simpleMessage("Welcome Back Home"), - "lvbiyue" : MessageLookupByLibrary.simpleMessage("balance of green currency"), - "lvbiyue_" : m18, - "lvbizhifu" : MessageLookupByLibrary.simpleMessage("green payment"), - "main_menu1" : MessageLookupByLibrary.simpleMessage("Home"), - "main_menu2" : MessageLookupByLibrary.simpleMessage("Store"), - "main_menu3" : MessageLookupByLibrary.simpleMessage("Association"), - "main_menu4" : MessageLookupByLibrary.simpleMessage("Me"), - "main_menu5" : MessageLookupByLibrary.simpleMessage("Hi"), - "manlijiandaijinquan" : m19, - "manyuankeyong" : m20, - "meiriqiandao" : MessageLookupByLibrary.simpleMessage("Sign in every day"), - "meiyougengduohuiyuanka" : MessageLookupByLibrary.simpleMessage("No more membership cards"), - "meiyougengduoshujule" : MessageLookupByLibrary.simpleMessage("No more data"), - "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("No more coupons"), - "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("updated every Wednesday"), - "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("Wednesday renewal coupon"), - "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("Store Selection"), - "mendianyue" : MessageLookupByLibrary.simpleMessage("store balance"), - "menpaihao" : MessageLookupByLibrary.simpleMessage("Please enter the house number"), - "mi" : m21, - "mingxi" : MessageLookupByLibrary.simpleMessage("Details"), - "morenpaixu" : MessageLookupByLibrary.simpleMessage("Default sort"), - "muqianwujilu" : MessageLookupByLibrary.simpleMessage("No record at present"), - "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("At present, there is no star store activity"), - "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("You have no consumption or recharge records here~"), - "nincunchuquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("You have not opened the storage permission, please click"), - "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("Your positioning function switch is not turned on, please click to turn on positioning"), - "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("You have not opened the location permission, please click OK to apply for permission"), - "ninweidenglu" : MessageLookupByLibrary.simpleMessage("You are not logged in, please click to log in"), - "ninxiangjiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("You have not opened the camera permission, please click"), - "ninxiaoxiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("You have not enabled the message notification permission, please click Enable"), - "ninyichenggonglingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("You have successfully received the coupon, please go to"), - "ninyilianxuqiandaotian" : m22, - "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("You need to go to the store to get an order"), - "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("You have a new order"), - "paizhao" : MessageLookupByLibrary.simpleMessage("Take a picture"), - "peisong" : MessageLookupByLibrary.simpleMessage("Delivery"), - "peisongfangshi" : MessageLookupByLibrary.simpleMessage("Delivery Method"), - "peisongfei" : MessageLookupByLibrary.simpleMessage("Delivery fee"), - "peisongfuwu" : MessageLookupByLibrary.simpleMessage("Ordering time"), - "peisongzhong" : MessageLookupByLibrary.simpleMessage("Shipping"), - "phone_error" : MessageLookupByLibrary.simpleMessage("Wrong phone format"), - "pinglun" : MessageLookupByLibrary.simpleMessage("Comment"), - "pinglun_" : m23, - "pingtaiyue" : MessageLookupByLibrary.simpleMessage("Platform Balance"), - "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("Platform payment password"), - "pingtaizongyue" : m24, - "pinpai" : MessageLookupByLibrary.simpleMessage("brand"), - "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("Brand Introduction"), - "privacy_policy1" : MessageLookupByLibrary.simpleMessage("Login Agreed"), - "privacy_policy2" : MessageLookupByLibrary.simpleMessage("《Service Agreement for Returning Home with One Heart》"), - "privacy_policy3" : MessageLookupByLibrary.simpleMessage("《privacy Services》"), - "privacy_policy4" : MessageLookupByLibrary.simpleMessage("Log in with your own number"), - "qianbao" : MessageLookupByLibrary.simpleMessage("Wallet"), - "qiandao" : MessageLookupByLibrary.simpleMessage("Sign in"), - "qiandaodejifen" : MessageLookupByLibrary.simpleMessage("Sign in and get points"), - "qiandaolingjifen" : MessageLookupByLibrary.simpleMessage("Sign in to receive points"), - "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("Sign in to receive points"), - "qiandaowancheng" : MessageLookupByLibrary.simpleMessage("Sign in completion"), - "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("Qianjin Maiwei"), - "qianshou" : MessageLookupByLibrary.simpleMessage("Signed in"), - "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("Go to any store under Yixin Huixiang and show the commodity exchange code to the staff. After verification, you can get the corresponding commodity"), - "qinglihuancun" : MessageLookupByLibrary.simpleMessage("Clear Cache"), - "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("Please enter the note requirements"), - "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("Please enter the recharge amount"), - "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("Please enter your mobile number"), - "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("Please enter the verification code"), - "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("Please enter the invitation code"), - "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("Please enter your valid mobile number"), - "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("Please enter the payment password"), - "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("Please fill in the recipient\'s mobile number"), - "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("Please fill in the recipient\'s name"), - "qingtong" : MessageLookupByLibrary.simpleMessage("bronze"), - "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("Bronze Member"), - "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("please select specs"), - "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("Please select a store to use"), - "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please select the shipping address"), - "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("Please select a store"), - "qingxuanzeyuyeushijian" : MessageLookupByLibrary.simpleMessage("please select subscribe time"), - "qingxuanzeyuyuemendian" : MessageLookupByLibrary.simpleMessage("please select subscribe shop"), - "qingxuanzhemendian" : MessageLookupByLibrary.simpleMessage("Please select a store"), - "qingxuanzheninxiangshezhideyuyan" : MessageLookupByLibrary.simpleMessage("Please select the language you want to set"), - "qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("Please complete the payment within the specified time"), - "qingzhuo" : MessageLookupByLibrary.simpleMessage("clearing the table"), - "qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("The rider is in delivery, and the estimated delivery time"), - "qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("The rider has received the order and is picking up goods"), - "qita" : MessageLookupByLibrary.simpleMessage("Other"), - "qiyetuanjian" : MessageLookupByLibrary.simpleMessage("Enterprise League Building"), - "quanbao" : MessageLookupByLibrary.simpleMessage("coupon package"), - "quanbu" : MessageLookupByLibrary.simpleMessage("All"), - "quanbudingdan" : MessageLookupByLibrary.simpleMessage("All Orders"), - "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("Exchange All"), - "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("universal"), - "quanchangzhe" : m25, - "quantian" : MessageLookupByLibrary.simpleMessage("all day"), - "quanxian" : MessageLookupByLibrary.simpleMessage("Permissions"), - "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("Permission Settings"), - "quanyijishao" : MessageLookupByLibrary.simpleMessage("Equity Introduction"), - "quanyishuoming" : MessageLookupByLibrary.simpleMessage("Equity Description"), - "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("Equity Details"), - "qucanhao" : MessageLookupByLibrary.simpleMessage("Picking number"), - "qudanhao" : m26, - "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("channel source"), - "qudenglu" : MessageLookupByLibrary.simpleMessage("Log in"), - "queding" : MessageLookupByLibrary.simpleMessage("OK"), - "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("Are you sure you want to delete this dynamic?"), - "queren" : MessageLookupByLibrary.simpleMessage("Confirm"), - "querenbangding" : MessageLookupByLibrary.simpleMessage("Confirm Binding"), - "querenchongzhi" : MessageLookupByLibrary.simpleMessage("Confirm Recharging"), - "querenduihuan" : MessageLookupByLibrary.simpleMessage("Confirm exchange"), - "querenshouhuo" : MessageLookupByLibrary.simpleMessage("Confirm receipt"), - "querenyaoshanchudangqianpinglunma" : MessageLookupByLibrary.simpleMessage("Are you sure you want to delete the current comment?"), - "querenzhuxiao" : MessageLookupByLibrary.simpleMessage("Confirm Logout"), - "quhexiao" : MessageLookupByLibrary.simpleMessage("De write off"), - "quhuozhong" : MessageLookupByLibrary.simpleMessage("Picking"), - "qujianma" : MessageLookupByLibrary.simpleMessage("Picking Code"), - "quqiandao" : MessageLookupByLibrary.simpleMessage("Sign in"), - "qushiyong" : MessageLookupByLibrary.simpleMessage("To use"), - "quwancheng" : MessageLookupByLibrary.simpleMessage(" To complete "), - "quxiao" : MessageLookupByLibrary.simpleMessage("Cancel"), - "quxiaodingdan" : MessageLookupByLibrary.simpleMessage("Please complete the payment within the specified time"), - "quxiaozhifu" : MessageLookupByLibrary.simpleMessage("Cancel Payment"), - "quzhifu" : MessageLookupByLibrary.simpleMessage("To pay"), - "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("Popular article videos"), - "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("Popular article video list"), - "ren" : m27, - "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("Task Center"), - "resend_in_seconds" : m28, - "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("Daily sharing"), - "ruhedihuanjifen" : MessageLookupByLibrary.simpleMessage("How to redeem points"), - "ruhedihuanjifen1" : MessageLookupByLibrary.simpleMessage("Click Jingbi to enter the points store, click the goods you want to exchange, enter the details of the goods and click below to exchange~"), - "ruhelingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("How do I get coupons?"), - "ruhelingquyouhuiquan1" : MessageLookupByLibrary.simpleMessage("Click My, enter my page, click the coupon collection center below, and then you can get the coupon~"), - "ruheqiandao" : MessageLookupByLibrary.simpleMessage("How to sign in?"), - "ruheqiandao1" : MessageLookupByLibrary.simpleMessage("1.Click Jingbi to enter the home page, and click on the top to sign in。\n2.Click on My to enter my page, and click on the point details above to sign in。"), - "ruxutuikuanqingyumendianlianxi" : MessageLookupByLibrary.simpleMessage("If you need a refund, please prepare the order number/receipt number in advance and contact the store staff"), - "saoma" : MessageLookupByLibrary.simpleMessage("scanning code"), - "saomadiancan" : MessageLookupByLibrary.simpleMessage("You are about to scan the code to order"), - "saomashibieguanzhugongzonghao" : MessageLookupByLibrary.simpleMessage("Scan code to identify and follow official account"), - "send_code" : MessageLookupByLibrary.simpleMessage("Validate code"), - "shanchu" : MessageLookupByLibrary.simpleMessage("Delete"), - "shanchudingdan" : MessageLookupByLibrary.simpleMessage("Delete a single order"), - "shanghuruzhu" : MessageLookupByLibrary.simpleMessage("Settled"), - "shangjiaquan" : MessageLookupByLibrary.simpleMessage("merchant coupon"), - "shangjiaqueren" : MessageLookupByLibrary.simpleMessage("Merchant confirmation"), - "shangjiayifahuo" : MessageLookupByLibrary.simpleMessage("Merchant has delivered goods"), - "shangjiazhengzaipeican" : MessageLookupByLibrary.simpleMessage("The merchant is preparing meals"), - "shanglajiazai" : MessageLookupByLibrary.simpleMessage("pull-up loading"), - "shangpincaigou" : MessageLookupByLibrary.simpleMessage("Commodity buy"), - "shangpinjifen" : m29, - "shangpinxiangqing" : MessageLookupByLibrary.simpleMessage("Product Details"), - "shangyidengji" : MessageLookupByLibrary.simpleMessage("Previous Level"), - "shenghuoyule" : MessageLookupByLibrary.simpleMessage("life entertainment"), - "shengxianzhaipei" : MessageLookupByLibrary.simpleMessage("Fresh House"), - "shenmijifendali" : MessageLookupByLibrary.simpleMessage("Mysterious integral gift"), - "shenqingtuikuan" : MessageLookupByLibrary.simpleMessage("Apply for refund"), - "shezhi" : MessageLookupByLibrary.simpleMessage("Settings"), - "shifangjiazaigengduo" : MessageLookupByLibrary.simpleMessage("Release Load More"), - "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("Release Refresh"), - "shifujifen" : m30, - "shifujihuanka" : m31, - "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("Real name authentication"), - "shixiaoquan" : MessageLookupByLibrary.simpleMessage("Invalid coupon"), - "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("Invalid coupon"), - "shiyongbangzhu" : MessageLookupByLibrary.simpleMessage("Using Help"), - "shiyongmendian" : MessageLookupByLibrary.simpleMessage("Applicable stores"), - "shiyongriqi" : MessageLookupByLibrary.simpleMessage("Use Date"), - "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("Instructions for Use"), - "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("Use Conditions"), - "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("Use Details"), - "shouhuodi" : MessageLookupByLibrary.simpleMessage("Ship To Address"), - "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please enter the detailed receiving address"), - "shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("Delivery address"), - "shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("Please enter the receiver\'s mobile phone number"), - "shouhuorenxiangxidizhi" : MessageLookupByLibrary.simpleMessage("Please enter the detailed address of the consignee"), - "shouhuorenxingming" : MessageLookupByLibrary.simpleMessage("Please enter the name of the consignee"), - "shoujihao" : MessageLookupByLibrary.simpleMessage("mobile phone number"), - "shouqi" : MessageLookupByLibrary.simpleMessage("Stow"), - "shouye" : MessageLookupByLibrary.simpleMessage("Home"), - "shuaxin" : MessageLookupByLibrary.simpleMessage("Refresh"), - "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("Refresh succeeded"), - "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("Refresh failed"), - "shuaxinyue" : MessageLookupByLibrary.simpleMessage("Refresh Balance"), - "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("Refreshing...."), - "shuliang" : MessageLookupByLibrary.simpleMessage("number"), - "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("Please enter the consignee address"), - "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("Enter payment password"), - "sui" : m32, - "tangshi" : MessageLookupByLibrary.simpleMessage("tang shi"), - "tebieshengming" : MessageLookupByLibrary.simpleMessage("Special statement"), - "tehuizhuanqu" : MessageLookupByLibrary.simpleMessage("Special offer area"), - "tianjiaxinfuka" : MessageLookupByLibrary.simpleMessage("Add a new secondary card"), - "tianjifuka" : MessageLookupByLibrary.simpleMessage("Add a new sub card"), - "tiantiandefuli" : MessageLookupByLibrary.simpleMessage("get benefits every day"), - "tiantianlingjifen" : MessageLookupByLibrary.simpleMessage("Earn points every day"), - "tijiao" : MessageLookupByLibrary.simpleMessage("Submit"), - "tijiaochenggong" : MessageLookupByLibrary.simpleMessage("Submitted successfully"), - "tingchewei" : MessageLookupByLibrary.simpleMessage("Parking space"), - "tixian" : MessageLookupByLibrary.simpleMessage("Withdrawal"), - "tongyibingjixu" : MessageLookupByLibrary.simpleMessage("Agree and Continue"), - "tongzhi" : MessageLookupByLibrary.simpleMessage("Notification"), - "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("In order that you can receive our activity information in time, it is recommended that you open the receipt of notifications when using HISAPP"), - "toushuxuzhi" : MessageLookupByLibrary.simpleMessage("Instructions for Submission"), - "touxiang" : MessageLookupByLibrary.simpleMessage("avatar"), - "tuichudenglu" : MessageLookupByLibrary.simpleMessage("Log out"), - "tuiguangma" : MessageLookupByLibrary.simpleMessage("Promotion code"), - "tuikuan" : MessageLookupByLibrary.simpleMessage("Refund"), - "waidai" : MessageLookupByLibrary.simpleMessage("take away"), - "waimai" : MessageLookupByLibrary.simpleMessage("take away"), - "waimaipeisong" : MessageLookupByLibrary.simpleMessage("delivery"), - "waisong" : MessageLookupByLibrary.simpleMessage("sending out"), - "wan" : MessageLookupByLibrary.simpleMessage("Play"), - "wancheng" : MessageLookupByLibrary.simpleMessage("finish"), - "wancheng_" : m33, - "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("Place an order once"), - "wangjimima" : MessageLookupByLibrary.simpleMessage("Forgot password"), - "wanjiankang" : MessageLookupByLibrary.simpleMessage("Play healthy"), - "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("Automatically generated after improving birthday information"), - "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("Exclusive coupon for improving birthday information"), - "weidenglu" : MessageLookupByLibrary.simpleMessage("not logged in"), - "weidengluxinxi" : MessageLookupByLibrary.simpleMessage("Click login to enjoy more wonderful information"), - "weihexiao" : MessageLookupByLibrary.simpleMessage("Unwritten off"), - "weikaiqi" : MessageLookupByLibrary.simpleMessage("Not open"), - "weilegeiningenghaodefuwu" : MessageLookupByLibrary.simpleMessage("In order to provide you with better services and enjoy more wonderful information, please log in during use"), - "weilejishishoudaohuodongxiaoxi" : MessageLookupByLibrary.simpleMessage("In order that you can receive our activity information in time, please open the message notification permission"), - "weilekaipaizhaoxuanzhetouxiang" : MessageLookupByLibrary.simpleMessage("In order to change your avatar during use, please open the camera permission"), - "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("In order to recommend the nearby store information to you, we recommend that you let us use the location information during the use"), - "weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("It is recommended that you open the storage permission during use in order to obtain photo usage, caching and other functions"), - "weiwancheng" : MessageLookupByLibrary.simpleMessage("Incomplete"), - "weixinzhifu" : MessageLookupByLibrary.simpleMessage("WeChat payment"), - "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("In order to recommend the nearby store information to you, we recommend that you let us use the location information when using HISAPP"), - "wentijian" : MessageLookupByLibrary.simpleMessage("Problem piece"), - "wenzhang" : MessageLookupByLibrary.simpleMessage("Article"), - "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("Article Details"), - "wenzhangzhuanlan" : MessageLookupByLibrary.simpleMessage("Article Column"), - "weulingqu" : MessageLookupByLibrary.simpleMessage("Unclaimed"), - "wodechengjiu" : MessageLookupByLibrary.simpleMessage("My achievements"), - "wodedingdan" : MessageLookupByLibrary.simpleMessage("My order"), - "wodedongtai" : MessageLookupByLibrary.simpleMessage("My dynamic"), - "wodegongju" : MessageLookupByLibrary.simpleMessage("My tools"), - "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("My membership level"), - "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("My integral value"), - "wodekanjia" : MessageLookupByLibrary.simpleMessage("My bargain"), - "wodekaquan" : MessageLookupByLibrary.simpleMessage("My card coupon"), - "wodenianling" : MessageLookupByLibrary.simpleMessage("my age"), - "wodepintuan" : MessageLookupByLibrary.simpleMessage("My Group"), - "wodeqianbao" : MessageLookupByLibrary.simpleMessage("My wallet"), - "wodeshengri" : MessageLookupByLibrary.simpleMessage("My birthday"), - "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("My Message"), - "wodeyaoqing" : MessageLookupByLibrary.simpleMessage("My invitation"), - "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("My invitation code"), - "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("I have an invitation code"), - "wuliudanhao" : MessageLookupByLibrary.simpleMessage("Logistics Doc No:"), - "wuliugongsi" : MessageLookupByLibrary.simpleMessage("Logistics company:"), - "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("Logistics Information"), - "wuliuzhuangtai" : MessageLookupByLibrary.simpleMessage("Logistics status:"), - "xiadanshijian" : MessageLookupByLibrary.simpleMessage("Order placement time"), - "xiadanshijian_" : m34, - "xiadanzhuanjifen" : MessageLookupByLibrary.simpleMessage("Place orders integral"), - "xialashuaxin" : MessageLookupByLibrary.simpleMessage("Pull down Refresh"), - "xiangce" : MessageLookupByLibrary.simpleMessage("album"), - "xiangji" : MessageLookupByLibrary.simpleMessage("camera"), - "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("For you to share in the process of using, I hope you can let us use the camera function when using HISAPP"), - "xiangqing" : MessageLookupByLibrary.simpleMessage("universal"), - "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("Detailed Address"), - "xianshangfafang" : MessageLookupByLibrary.simpleMessage("online distribution"), - "xianshangshiyong" : MessageLookupByLibrary.simpleMessage("online use"), - "xianxiashiyong" : MessageLookupByLibrary.simpleMessage("offline use"), - "xiaofei" : MessageLookupByLibrary.simpleMessage("consumption"), - "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("Consumption Points"), - "xiaofeijihuanka" : MessageLookupByLibrary.simpleMessage("consume trading card"), - "xiaofeijilu" : MessageLookupByLibrary.simpleMessage("Consumption Record"), - "xiaoxi" : MessageLookupByLibrary.simpleMessage("Messages"), - "xiayidengji" : MessageLookupByLibrary.simpleMessage("Next Level"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("Loading completed"), - "xiedongtai" : MessageLookupByLibrary.simpleMessage("Write dynamic"), - "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("privacy policy for returning home users"), - "xihuan_" : m35, - "xindianhuodong" : MessageLookupByLibrary.simpleMessage("Star Store Activity"), - "xingming" : MessageLookupByLibrary.simpleMessage("name"), - "xitongtongzhi" : MessageLookupByLibrary.simpleMessage("System Notification"), - "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("System Messages"), - "xiugai" : MessageLookupByLibrary.simpleMessage("modify"), - "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("Modification succeeded"), - "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("Modify User Name"), - "xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"), - "xuanhaola" : MessageLookupByLibrary.simpleMessage("select success"), - "xuanji" : MessageLookupByLibrary.simpleMessage("Selection"), - "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"), - "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("select recommended store"), - "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("Renewal member"), - "xuexijiankang" : MessageLookupByLibrary.simpleMessage("Learning Health"), - "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("Renewal Home VIP"), - "xuni" : MessageLookupByLibrary.simpleMessage("virtual"), - "yanzhengma" : MessageLookupByLibrary.simpleMessage("verification code"), - "yaoqinghaoyou" : MessageLookupByLibrary.simpleMessage("Invite friends"), - "yaoqinghaoyoudefen" : MessageLookupByLibrary.simpleMessage("Invite friends to score"), - "yaoqingrenshoujihao_" : m36, - "yaoqingwancheng" : MessageLookupByLibrary.simpleMessage("Invitation completed"), - "yibangfuka" : MessageLookupByLibrary.simpleMessage("bound sub card"), - "yiduihuan" : MessageLookupByLibrary.simpleMessage("redeemed"), - "yiduihuanjian" : m37, - "yifahuo" : MessageLookupByLibrary.simpleMessage("Shipped"), - "yiguanzhu" : MessageLookupByLibrary.simpleMessage("Followed"), - "yihouzaishuo" : MessageLookupByLibrary.simpleMessage("Talk Later"), - "yihuide" : MessageLookupByLibrary.simpleMessage("acquired"), - "yihujiaoqishou" : MessageLookupByLibrary.simpleMessage("Called rider"), - "yikaitongzidongxufei" : MessageLookupByLibrary.simpleMessage("Automatic renewal has been activated"), - "yikexiao" : MessageLookupByLibrary.simpleMessage("Written off"), - "yilingqu" : MessageLookupByLibrary.simpleMessage("claimed"), - "yindao1" : MessageLookupByLibrary.simpleMessage("New multiple functions, real-time push of massive preferential information"), - "yindao2" : MessageLookupByLibrary.simpleMessage("Many new functions have been added, and there are many discounts for using the platform wallet, as well as recharging privileges"), - "yindao3" : MessageLookupByLibrary.simpleMessage("Points will be obtained for new member tasks, and green gold and points store will be exchanged for consumption"), - "yindao4" : MessageLookupByLibrary.simpleMessage("pass on the idea of friendship, purity, health, organic and environmental protection"), - "yindaoye1" : MessageLookupByLibrary.simpleMessage("Members\' latest information is the first to see"), - "yindaoye2" : MessageLookupByLibrary.simpleMessage("New Group Alliance Store Members Order Meals"), - "yindaoye3" : MessageLookupByLibrary.simpleMessage("Member activity zone"), - "yindaoye4" : MessageLookupByLibrary.simpleMessage("Live a healthy and organic life"), - "yingwen" : MessageLookupByLibrary.simpleMessage("United States"), - "yingyeshijian" : m38, - "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("Silver card member"), - "yinshi" : MessageLookupByLibrary.simpleMessage("diet"), - "yinsishengming" : MessageLookupByLibrary.simpleMessage("Privacy Statement"), - "yinsixieyi" : MessageLookupByLibrary.simpleMessage("《Privacy Agreement》"), - "yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" Thank you for using the Home bound APP. We attach great importance to your personal information and privacy protection. In order to better ensure your personal rights and interests, before you use our products, please carefully read"), - "yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     With your consent, we will collect some possible data (geographic location, camera, storage and other information) according to your use needs。"), - "yinzhang" : MessageLookupByLibrary.simpleMessage("Seal"), - "yiqiandao" : MessageLookupByLibrary.simpleMessage("Signed in"), - "yiqianshou" : MessageLookupByLibrary.simpleMessage("Signed in"), - "yiquxiao" : MessageLookupByLibrary.simpleMessage(" Canceled "), - "yishijiao" : MessageLookupByLibrary.simpleMessage("Expired"), - "yishiming" : MessageLookupByLibrary.simpleMessage("already real name"), - "yishixiao" : MessageLookupByLibrary.simpleMessage("Expired"), - "yishiyong" : MessageLookupByLibrary.simpleMessage("used"), - "yishouquan" : MessageLookupByLibrary.simpleMessage("authorized"), - "yisongda" : MessageLookupByLibrary.simpleMessage("Delivered"), - "yituikuan" : MessageLookupByLibrary.simpleMessage("Refunded"), - "yiwancheng" : MessageLookupByLibrary.simpleMessage(" Completed "), - "yiwanchengdingdan" : MessageLookupByLibrary.simpleMessage("Completed Order"), - "yixianghuiyuanquanyi" : MessageLookupByLibrary.simpleMessage("Member benefits enjoyed"), - "yixiansquanbupinglun" : MessageLookupByLibrary.simpleMessage("- All comments displayed-"), - "yixinhuixiang" : MessageLookupByLibrary.simpleMessage("going back home with one heart"), - "yiyoujifen" : MessageLookupByLibrary.simpleMessage("Existing Points"), - "yizhifu" : MessageLookupByLibrary.simpleMessage("Paid"), - "yonghuming" : MessageLookupByLibrary.simpleMessage("User name"), - "yonghuxiaofeijifen" : MessageLookupByLibrary.simpleMessage("The user can get 1 point for every 1 yuan spent。"), - "youhuiquan" : MessageLookupByLibrary.simpleMessage("Coupon"), - "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("coupon collection"), - "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("The preferential amount cannot accumulate points, and the corresponding points cannot be obtained for orders that are not successfully paid due to order cancellation or other reasons。"), - "youkedenglu" : MessageLookupByLibrary.simpleMessage("Visitor login"), - "youxiaoqi" : m39, - "youxiaoqixian" : MessageLookupByLibrary.simpleMessage("Valid Period:"), - "youxiaoqizhi" : m40, - "yuan" : MessageLookupByLibrary.simpleMessage("yuan"), - "yuan_" : m41, - "yuanjia" : MessageLookupByLibrary.simpleMessage("original price"), - "yue" : MessageLookupByLibrary.simpleMessage("Balance"), - "yue_" : m42, - "yue__" : m43, - "yuemingxi" : MessageLookupByLibrary.simpleMessage("Balance Details"), - "yuliudianhua" : MessageLookupByLibrary.simpleMessage("Reserved telephone"), - "yunfei" : MessageLookupByLibrary.simpleMessage("Freight"), - "yuyan" : MessageLookupByLibrary.simpleMessage("Language"), - "zailaiyidan" : MessageLookupByLibrary.simpleMessage("Another order"), - "zaituzhong" : MessageLookupByLibrary.simpleMessage("In transit"), - "zaixiankefu" : MessageLookupByLibrary.simpleMessage("Online Customer Service"), - "zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("Online ordering is not supported temporarily"), - "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("Not unlocked"), - "zanweikaifang" : MessageLookupByLibrary.simpleMessage("Not open"), - "zanweikaitong" : MessageLookupByLibrary.simpleMessage("Not yet open"), - "zanwupinglun" : MessageLookupByLibrary.simpleMessage("No comment, please comment"), - "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("Temporary wireless shopping"), - "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("There are no coupons to receive"), - "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("Account security"), - "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("Account Authorization"), - "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("Account Information"), - "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("Account and Security"), - "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("Account cancellation instructions"), - "zhanghuyue" : MessageLookupByLibrary.simpleMessage("Account Balance"), - "zhankai" : MessageLookupByLibrary.simpleMessage("Expand"), - "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("Calling the rider"), - "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("Loading"), - "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("Shipping"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("Loading..."), - "zhidianmendian" : MessageLookupByLibrary.simpleMessage("Call the store"), - "zhifubao" : MessageLookupByLibrary.simpleMessage("Alipay"), - "zhifubaozhifu" : MessageLookupByLibrary.simpleMessage("Alipay payment"), - "zhifufangshi" : MessageLookupByLibrary.simpleMessage("Payment Method"), - "zhifuxiangqing" : MessageLookupByLibrary.simpleMessage("Payment Details"), - "zhizunhuiyuan" : MessageLookupByLibrary.simpleMessage("Supreme Member"), - "zhizuowancheng" : MessageLookupByLibrary.simpleMessage("Making completed"), - "zhongchakan" : MessageLookupByLibrary.simpleMessage("View in"), - "zhongwenjianti" : MessageLookupByLibrary.simpleMessage("Simplified Chinese"), - "zhuanlan" : MessageLookupByLibrary.simpleMessage("Column"), - "zhuanxiangyouhuiquan" : MessageLookupByLibrary.simpleMessage("Exclusive coupon"), - "zhunong1" : MessageLookupByLibrary.simpleMessage("Love returns home and helps farmers happily"), - "zhunongjifen" : MessageLookupByLibrary.simpleMessage("Farming aid points"), - "zhunongzhuanqu" : MessageLookupByLibrary.simpleMessage("Special Area for Agricultural Aid"), - "zhuxiaotixing" : MessageLookupByLibrary.simpleMessage("Reminder again: After the account is logged off, it cannot be recovered, and relevant data and information will be permanently deleted。"), - "zhuxiaozhanghao" : MessageLookupByLibrary.simpleMessage("Account cancellation"), - "ziqu" : MessageLookupByLibrary.simpleMessage("self fetching"), - "ziti" : MessageLookupByLibrary.simpleMessage("Self mention"), - "zitidizhi" : MessageLookupByLibrary.simpleMessage("Self lifting address"), - "zitiduihuanquan" : MessageLookupByLibrary.simpleMessage("Coupon type:self withdrawal exchange coupon"), - "zitishijian" : MessageLookupByLibrary.simpleMessage("Self mention time"), - "zongzichan" : MessageLookupByLibrary.simpleMessage("Total assets"), - "zongzichanyuan" : MessageLookupByLibrary.simpleMessage("Total assets (元)"), - "zuanshihuiyuan" : MessageLookupByLibrary.simpleMessage("Diamond Member"), - "zuixinwenzhang" : MessageLookupByLibrary.simpleMessage("Latest Articles"), - "zuorenwudejifen" : MessageLookupByLibrary.simpleMessage("Score points for doing tasks"), - "zuozhe" : m44 - }; + static Map _notInlinedMessages(_) => { + "bainianchuanjiao": + MessageLookupByLibrary.simpleMessage("Hundred year Sichuan Pepper"), + "baiyin": MessageLookupByLibrary.simpleMessage("silver"), + "baiyinhuiyuan": MessageLookupByLibrary.simpleMessage("Silver Member"), + "banben": m0, + "bangdingfuka": + MessageLookupByLibrary.simpleMessage("binding sub card"), + "bangdingshouji": MessageLookupByLibrary.simpleMessage("bind phone"), + "bangong": MessageLookupByLibrary.simpleMessage("Office"), + "bangzhuyufankui": MessageLookupByLibrary.simpleMessage("Help"), + "baocun": MessageLookupByLibrary.simpleMessage("Save"), + "baocunchenggong": + MessageLookupByLibrary.simpleMessage("Saving succeeded"), + "baocunsaoma": MessageLookupByLibrary.simpleMessage( + "The screenshot saves the QR code below, invites others to scan WeChat for identification, long press follow, completes the small game, receives the coupon, and the invitation is successful!"), + "beiyaoqingdejiangli": MessageLookupByLibrary.simpleMessage( + "Each invited user can get a coupon of 10 yuan for Qianjin Maiwei after entering the invitation code"), + "beizhu": MessageLookupByLibrary.simpleMessage("Remarks"), + "beizhuxinxi": MessageLookupByLibrary.simpleMessage("Remarks"), + "benzhouquanbao": + MessageLookupByLibrary.simpleMessage("This week coupon bag"), + "bianjidizhi": MessageLookupByLibrary.simpleMessage("Edit Address"), + "bianjigerenziliao": + MessageLookupByLibrary.simpleMessage("Edit Profile "), + "biaojiweiyidu": MessageLookupByLibrary.simpleMessage("Mark as Read"), + "biaoweiyidu": MessageLookupByLibrary.simpleMessage("Mark as Read"), + "bodadianhua": MessageLookupByLibrary.simpleMessage("Make a call"), + "bofangcishu": MessageLookupByLibrary.simpleMessage("Playback times"), + "bojin": MessageLookupByLibrary.simpleMessage("platinum"), + "brand_yixinhuixiang": + MessageLookupByLibrary.simpleMessage("strait sisters"), + "buzhichikaipiao": + MessageLookupByLibrary.simpleMessage("Invoicing is not supported"), + "canyingfuwu": MessageLookupByLibrary.simpleMessage("catering service"), + "chakan": MessageLookupByLibrary.simpleMessage("View"), + "chakangengduo": MessageLookupByLibrary.simpleMessage("See more"), + "chakanhexiaoma": + MessageLookupByLibrary.simpleMessage("View Write off Code"), + "chakanquanyi": MessageLookupByLibrary.simpleMessage("View Equity"), + "chakanshixiaoquan": + MessageLookupByLibrary.simpleMessage("View invalid coupons"), + "chakanwodekabao": + MessageLookupByLibrary.simpleMessage("Check my card bag"), + "chakanwodekaquan": + MessageLookupByLibrary.simpleMessage("Check my card coupon"), + "chakanwuliu": MessageLookupByLibrary.simpleMessage("View Logistics"), + "chakanxiangqing": MessageLookupByLibrary.simpleMessage("View Details"), + "changjianwenti": + MessageLookupByLibrary.simpleMessage("Frequently Asked Questions"), + "changqiyouxiao": + MessageLookupByLibrary.simpleMessage("Long term effective"), + "chaojiyouhuiquan": + MessageLookupByLibrary.simpleMessage("Premium coupon"), + "chaungshirengushi": + MessageLookupByLibrary.simpleMessage("Founder\'s story"), + "chenggongdengluzhuce": MessageLookupByLibrary.simpleMessage( + "You can become a member by successfully logging in and registering and binding relevant information。"), + "chengjiu": MessageLookupByLibrary.simpleMessage("achievement"), + "chengjiuhuizhang": + MessageLookupByLibrary.simpleMessage("Achievement badge"), + "chengshixuanze": + MessageLookupByLibrary.simpleMessage("City Selection"), + "chengweidianpuzhuanshuhuiyuan": MessageLookupByLibrary.simpleMessage( + "Become an exclusive member of the store and enjoy exclusive rights"), + "chi": MessageLookupByLibrary.simpleMessage("Eat"), + "chijiankang": MessageLookupByLibrary.simpleMessage("Eat healthy"), + "chongzhi": MessageLookupByLibrary.simpleMessage("Recharge"), + "chongzhichenggong": + MessageLookupByLibrary.simpleMessage("Recharge succeeded"), + "chongzhifuliduo": + MessageLookupByLibrary.simpleMessage("Recharge Fulido"), + "chongzhixiaoxi": + MessageLookupByLibrary.simpleMessage("recharge message"), + "chongzhizuixiaojine": m1, + "chuangjianshijian": m2, + "chuangshirendegushi": + MessageLookupByLibrary.simpleMessage("The story of the founder -"), + "chuangshirendegushi1": + MessageLookupByLibrary.simpleMessage("The Founder\'s Story"), + "chuzhiyouhui": + MessageLookupByLibrary.simpleMessage("Value saving discount"), + "code_error": MessageLookupByLibrary.simpleMessage( + "Wrong input of verification code"), + "cunchu": MessageLookupByLibrary.simpleMessage("Storage"), + "cunchutishixinxi": MessageLookupByLibrary.simpleMessage( + "It is recommended that you open the storage permission during use in order to obtain photo usage, caching and other functions"), + "dabaodaodianqu": + MessageLookupByLibrary.simpleMessage("pack to shop take away"), + "daifukuan": MessageLookupByLibrary.simpleMessage("Obligations"), + "daipeisong": MessageLookupByLibrary.simpleMessage("to be delivered"), + "daiqucan": MessageLookupByLibrary.simpleMessage("To be picked up"), + "daiqueren": MessageLookupByLibrary.simpleMessage("to be confirmed"), + "daizhifu": MessageLookupByLibrary.simpleMessage("to be paid"), + "daizhizuo": MessageLookupByLibrary.simpleMessage("to be made"), + "dajiadouzaiduihuan": + MessageLookupByLibrary.simpleMessage("Everyone is exchanging"), + "dakaidingwei": + MessageLookupByLibrary.simpleMessage("Open Positioning"), + "dangqianbanben": + MessageLookupByLibrary.simpleMessage("Current Version"), + "dangqiandengji": MessageLookupByLibrary.simpleMessage("Current Level"), + "dangqianjifen": + MessageLookupByLibrary.simpleMessage("Current integral:"), + "dangqianshangpinduihuanhexiaoma": MessageLookupByLibrary.simpleMessage( + "The current commodity exchange write off code has been written off"), + "dangqianzhukadengji": + MessageLookupByLibrary.simpleMessage("Current Master Card Level"), + "daodianziqu": + MessageLookupByLibrary.simpleMessage("Get it at the store"), + "daopinglunliebiaodingbu": MessageLookupByLibrary.simpleMessage( + "To the top of the comment list"), + "daoxiayidengji": + MessageLookupByLibrary.simpleMessage("To the next level"), + "dengdaishangjiaqueren": MessageLookupByLibrary.simpleMessage( + "Wait for the merchant\'s confirmation"), + "dengdaiyonghuqucan": MessageLookupByLibrary.simpleMessage( + "Waiting for the user to pick up the meal"), + "denglu": MessageLookupByLibrary.simpleMessage("Login"), + "diancan": MessageLookupByLibrary.simpleMessage("Order a meal"), + "diandan": MessageLookupByLibrary.simpleMessage("Order"), + "dianhua": MessageLookupByLibrary.simpleMessage("Telephone"), + "dianjidenglu": MessageLookupByLibrary.simpleMessage( + "Click login to enjoy more wonderful information"), + "dianneiyongcan": MessageLookupByLibrary.simpleMessage("store dining"), + "dianpuchongzhi": MessageLookupByLibrary.simpleMessage("Recharge"), + "dianputuijian": + MessageLookupByLibrary.simpleMessage("Store recommendation"), + "dianpuyue": MessageLookupByLibrary.simpleMessage("Shop balance"), + "dianwolingqu": + MessageLookupByLibrary.simpleMessage("Click me to get it"), + "dianzan": MessageLookupByLibrary.simpleMessage("Like"), + "dianzanxihuan_": m3, + "dingdan": MessageLookupByLibrary.simpleMessage("Order"), + "dingdanbianhao": MessageLookupByLibrary.simpleMessage("Order No"), + "dingdandaifahuo": + MessageLookupByLibrary.simpleMessage("Order to be shipped"), + "dingdandaizhifu": + MessageLookupByLibrary.simpleMessage("Order to be paid"), + "dingdangenzong": + MessageLookupByLibrary.simpleMessage("Order tracking"), + "dingdanhao": MessageLookupByLibrary.simpleMessage("Order No"), + "dingdanjiesuan": + MessageLookupByLibrary.simpleMessage("Order Settlement"), + "dingdanqueren": + MessageLookupByLibrary.simpleMessage("Order confirmation"), + "dingdantongzhi": MessageLookupByLibrary.simpleMessage("Order Notice"), + "dingdanxiaoxi": MessageLookupByLibrary.simpleMessage("Order Message"), + "dingdanyisongda": + MessageLookupByLibrary.simpleMessage("Order delivery"), + "dingdanyituikuan": + MessageLookupByLibrary.simpleMessage("The order has been refunded"), + "dingdanyiwancheng": MessageLookupByLibrary.simpleMessage( + "The order has been completed"), + "dingdanyizhifu": + MessageLookupByLibrary.simpleMessage("The order has been paid"), + "dingwei": MessageLookupByLibrary.simpleMessage("Positioning"), + "dizhi": MessageLookupByLibrary.simpleMessage("Address"), + "dongtai": MessageLookupByLibrary.simpleMessage("Dynamic"), + "dongtaitishi": MessageLookupByLibrary.simpleMessage( + "The user\'s published content needs to wait for the system review, and will be displayed in the recommended square after the review is passed"), + "dongtaixiangqing": + MessageLookupByLibrary.simpleMessage("Dynamic Details"), + "duihuan": MessageLookupByLibrary.simpleMessage("exchange"), + "duihuanchenggong": + MessageLookupByLibrary.simpleMessage("Successful exchange"), + "duihuanguize": MessageLookupByLibrary.simpleMessage("Exchange Rules"), + "duihuanhoufahuo": MessageLookupByLibrary.simpleMessage( + "Delivery within five working days after exchange"), + "duihuanhouwugegongzuori": MessageLookupByLibrary.simpleMessage( + "You can go to the store five working days after the exchange"), + "duihuanliangdidaogao": MessageLookupByLibrary.simpleMessage( + "From low to high exchange volume"), + "duihuanlianggaodaodi": MessageLookupByLibrary.simpleMessage( + "From high to low exchange volume"), + "duihuanlishi": MessageLookupByLibrary.simpleMessage("Exchange"), + "duihuanquan": MessageLookupByLibrary.simpleMessage("redeem coupon"), + "duihuanshangpinxiangqing": + MessageLookupByLibrary.simpleMessage("Details of exchanged goods"), + "duihuanxinxi": + MessageLookupByLibrary.simpleMessage("Exchange information"), + "duozhongyouhui": MessageLookupByLibrary.simpleMessage( + "A variety of coupons are waiting for you"), + "fabu": MessageLookupByLibrary.simpleMessage("Publish"), + "fangshier": MessageLookupByLibrary.simpleMessage("Mode 2"), + "fangshiyi": MessageLookupByLibrary.simpleMessage("Mode 1"), + "fanhuiduihuanlishi": + MessageLookupByLibrary.simpleMessage("Return to exchange history"), + "fanhuishequn": + MessageLookupByLibrary.simpleMessage("Return to the community"), + "fanhuishouye": + MessageLookupByLibrary.simpleMessage("Return to the home page"), + "fankui": MessageLookupByLibrary.simpleMessage("Feedback"), + "fankuilizi": MessageLookupByLibrary.simpleMessage( + "You can enter feedback content here, such as product suggestions, functional exceptions, etc"), + "fantizhongwen": + MessageLookupByLibrary.simpleMessage("Traditional Chinese"), + "fapiao": MessageLookupByLibrary.simpleMessage("Invoice"), + "fapiaozhushou": + MessageLookupByLibrary.simpleMessage("Invoice Assistant"), + "fasong": MessageLookupByLibrary.simpleMessage("Sending"), + "fasongduanxin": MessageLookupByLibrary.simpleMessage("Send SMS"), + "faxingshijian": m4, + "feishiwuduihuanma": + MessageLookupByLibrary.simpleMessage("Non physical exchange code"), + "feishiwushangpin": MessageLookupByLibrary.simpleMessage( + "After exchanging non physical goods, you can use the coupon!"), + "fensi": MessageLookupByLibrary.simpleMessage("Fans"), + "fenxiang": MessageLookupByLibrary.simpleMessage("Sharing"), + "fenxiangdao": MessageLookupByLibrary.simpleMessage("Share to"), + "fenxiangjiankang": + MessageLookupByLibrary.simpleMessage("Sharing Health"), + "fenxiangyaoqing": MessageLookupByLibrary.simpleMessage( + "You can also directly click on the top right to share with the people you want to invite。"), + "fenxiangyaoqingma": MessageLookupByLibrary.simpleMessage( + "Share the invitation code with your friend, and the other person will enter the invitation code on the login page of the app, and the invitation will be successful。"), + "fenxiangzhiweixin": + MessageLookupByLibrary.simpleMessage("Share to WeChat"), + "fukashoujihao": + MessageLookupByLibrary.simpleMessage("Slave card mobile number"), + "fuliduihuan": MessageLookupByLibrary.simpleMessage("Benefit exchange"), + "fulizhongxin": MessageLookupByLibrary.simpleMessage("CNOUS"), + "ge": m5, + "geiwopingfen": MessageLookupByLibrary.simpleMessage("Rate me"), + "gengduo": MessageLookupByLibrary.simpleMessage("more"), + "gengduohaoquan": + MessageLookupByLibrary.simpleMessage("more good coupons"), + "gengduoyouhuiquan": + MessageLookupByLibrary.simpleMessage("more coupons"), + "genggaibangdingshoujihao": + MessageLookupByLibrary.simpleMessage("modify bind phone"), + "genghuanbeijing": + MessageLookupByLibrary.simpleMessage("Changing the background"), + "genghuantouxiang": + MessageLookupByLibrary.simpleMessage("Changing the avatar"), + "gengyouhui": MessageLookupByLibrary.simpleMessage("More preferential"), + "gerenxinxi": + MessageLookupByLibrary.simpleMessage("Personal Information"), + "gexingqianming": + MessageLookupByLibrary.simpleMessage("Personal Signature"), + "gong": MessageLookupByLibrary.simpleMessage("total"), + "gongchuanghuiyuan": + MessageLookupByLibrary.simpleMessage("Co founder Member"), + "gongjijian": m6, + "gongjijianshangpin": m7, + "gongli": m8, + "gongxinchengwei": + MessageLookupByLibrary.simpleMessage("Congratulations on becoming"), + "gongxinichengweibendianhuiyuan": MessageLookupByLibrary.simpleMessage( + "Congratulations, you have become a member of our store. Go and enjoy the super many member rights。"), + "gouxuanxieyi": MessageLookupByLibrary.simpleMessage( + "Please check the agreement on privacy service and return home service"), + "guanlidizhi": + MessageLookupByLibrary.simpleMessage("Management Address"), + "guanyu": MessageLookupByLibrary.simpleMessage("About"), + "guanyuchuangshiren": + MessageLookupByLibrary.simpleMessage("About the Founder"), + "guanyuhuixiang": + MessageLookupByLibrary.simpleMessage("About Going Home"), + "guanzhu": MessageLookupByLibrary.simpleMessage("Follow"), + "guojiankangyoujishenghuo": MessageLookupByLibrary.simpleMessage( + "Live a healthy and organic life"), + "haimeiyouxiaoxi": MessageLookupByLibrary.simpleMessage("No message~"), + "haimeiyouyouhuiquankeyilingqu": + MessageLookupByLibrary.simpleMessage("There is no coupon to get~"), + "haixiajiemei": MessageLookupByLibrary.simpleMessage("Straits Sister"), + "haowu": MessageLookupByLibrary.simpleMessage("good things"), + "haoyoujiangliguize": + MessageLookupByLibrary.simpleMessage("Friend Reward Rules"), + "he": MessageLookupByLibrary.simpleMessage("Drink"), + "heji": MessageLookupByLibrary.simpleMessage("Total:"), + "hejiankang": MessageLookupByLibrary.simpleMessage("Drink healthy"), + "hexiaochenggong": + MessageLookupByLibrary.simpleMessage("Write off succeeded"), + "hexiaomaxiangqing": + MessageLookupByLibrary.simpleMessage("Write off Code Details"), + "huangjin": MessageLookupByLibrary.simpleMessage("gold"), + "huangjinhuiyuan": + MessageLookupByLibrary.simpleMessage("Golden Member"), + "huifu": MessageLookupByLibrary.simpleMessage("Delete"), + "huifu_": m9, + "huixiangVIPka": + MessageLookupByLibrary.simpleMessage("Home Returning VIP Card"), + "huixiangqianbao": MessageLookupByLibrary.simpleMessage("Wallet"), + "huixiangrenyimendian": MessageLookupByLibrary.simpleMessage( + "For:Any store dedicated to returning home"), + "huixiangtoutiao": + MessageLookupByLibrary.simpleMessage("Homecoming Headlines"), + "huixiangvipkazhuanxiang": MessageLookupByLibrary.simpleMessage( + "Home Return VIP Card Exclusive Rights"), + "huixiangxieyi": MessageLookupByLibrary.simpleMessage( + "Homecoming VIP Membership Card Rules Agreement"), + "huiyuandengji": + MessageLookupByLibrary.simpleMessage("Membership Level"), + "huiyuandengjishuoming": + MessageLookupByLibrary.simpleMessage("Member Level Description"), + "huiyuanguize": + MessageLookupByLibrary.simpleMessage("Member Rules Description"), + "huiyuanhuodejifen": + MessageLookupByLibrary.simpleMessage("How members get points"), + "huiyuanjia": MessageLookupByLibrary.simpleMessage("member price"), + "huiyuanjibieduizhao": MessageLookupByLibrary.simpleMessage( + "Member Level Comparison Table"), + "huiyuanjifen": MessageLookupByLibrary.simpleMessage("Member Points"), + "huiyuanka": MessageLookupByLibrary.simpleMessage("Membership Card"), + "huiyuankaxiangqing": + MessageLookupByLibrary.simpleMessage("Membership card details"), + "huiyuanma": MessageLookupByLibrary.simpleMessage("vipCode"), + "huiyuanquanyi": + MessageLookupByLibrary.simpleMessage("Membership Rights"), + "huiyuanyue": MessageLookupByLibrary.simpleMessage("Member Balance"), + "huiyuanzhongxin": + MessageLookupByLibrary.simpleMessage("Member Center"), + "huiyuanzhuanxiangjiage": + MessageLookupByLibrary.simpleMessage("Member Exclusive Price"), + "huode": MessageLookupByLibrary.simpleMessage("get"), + "huodequanyi": + MessageLookupByLibrary.simpleMessage("acquire interests"), + "huodong": MessageLookupByLibrary.simpleMessage("activity"), + "huodongguize": MessageLookupByLibrary.simpleMessage("Activity Rules"), + "huodongjianmianpeisongfei": m10, + "huodongjinxingzhong": + MessageLookupByLibrary.simpleMessage("Activity in Progress"), + "huodongliebiao": MessageLookupByLibrary.simpleMessage("Activity List"), + "huodongyue": MessageLookupByLibrary.simpleMessage("Activity Balance"), + "huodongyue_": m11, + "huodongzixun": + MessageLookupByLibrary.simpleMessage("Activity information"), + "huopinyisongda": MessageLookupByLibrary.simpleMessage( + "The goods have been delivered"), + "huozan": MessageLookupByLibrary.simpleMessage("liked"), + "input_code": MessageLookupByLibrary.simpleMessage( + "Mobile phone verification code"), + "input_code_hide": MessageLookupByLibrary.simpleMessage( + "Please enter the verification code"), + "input_invite_code_hide": + MessageLookupByLibrary.simpleMessage("Fill in the invitation code"), + "input_phone": + MessageLookupByLibrary.simpleMessage("Enter the phone number"), + "input_phone_hide": MessageLookupByLibrary.simpleMessage( + "Please enter your mobile number"), + "invite_code_error": + MessageLookupByLibrary.simpleMessage("Wrong invitation code"), + "jiajifen": m12, + "jian": MessageLookupByLibrary.simpleMessage("piece"), + "jiangli": MessageLookupByLibrary.simpleMessage("Reward"), + "jiangshi": MessageLookupByLibrary.simpleMessage("Instructor"), + "jianjie": m13, + "jiazaishibai": MessageLookupByLibrary.simpleMessage("Loading failed"), + "jiesuan": MessageLookupByLibrary.simpleMessage("Settlement"), + "jiesuanjine": + MessageLookupByLibrary.simpleMessage("Settlement Amount"), + "jifen": MessageLookupByLibrary.simpleMessage("Integral"), + "jifen_": m14, + "jifenbuzu": MessageLookupByLibrary.simpleMessage( + "Your points are insufficient"), + "jifendaoxiayidengji": m15, + "jifendejisuanshuoming": MessageLookupByLibrary.simpleMessage( + "Calculation description of integral"), + "jifendidaogao": + MessageLookupByLibrary.simpleMessage("From low to high"), + "jifengaodaodi": + MessageLookupByLibrary.simpleMessage("Integral from high to low"), + "jifenhuanquan": + MessageLookupByLibrary.simpleMessage("points for coupons"), + "jifenmingxi": MessageLookupByLibrary.simpleMessage("Integral Details"), + "jifenshangcheng": MessageLookupByLibrary.simpleMessage("Points Mall"), + "jifenxiangqing": + MessageLookupByLibrary.simpleMessage("Points Details"), + "jihuanka": MessageLookupByLibrary.simpleMessage("trading card"), + "jingbilianmenghuiyuandian": + MessageLookupByLibrary.simpleMessage("Jingbi League Member Store"), + "jingxuanhaowen": + MessageLookupByLibrary.simpleMessage("Selected good articles "), + "jingxuanhuodong": + MessageLookupByLibrary.simpleMessage("Selected Activities"), + "jinkahuiyuan": + MessageLookupByLibrary.simpleMessage("Gold Card Member"), + "jinrihuiyuanrenwu": + MessageLookupByLibrary.simpleMessage("Today\'s Member Task"), + "jinrushangdian": + MessageLookupByLibrary.simpleMessage("Enter the store"), + "jinruzhuanqu": MessageLookupByLibrary.simpleMessage("Enter the zone"), + "jinxingbangdingfuka": + MessageLookupByLibrary.simpleMessage("Bind sub card"), + "jinxingfukabangding": + MessageLookupByLibrary.simpleMessage("Associate card binding"), + "jinxingzhanghaozhuxiao": + MessageLookupByLibrary.simpleMessage("Account cancellation"), + "jinxingzhongdedingdan": + MessageLookupByLibrary.simpleMessage("Orders in Progress"), + "jituanchuangbanren": + MessageLookupByLibrary.simpleMessage(" Founder of the Group"), + "jituanchuangshiren": + MessageLookupByLibrary.simpleMessage("Founder of the Group"), + "jixuduihuan": + MessageLookupByLibrary.simpleMessage("Continue to exchange"), + "jixuzhifu": MessageLookupByLibrary.simpleMessage("Continue to pay"), + "jubao": MessageLookupByLibrary.simpleMessage("Report"), + "jubaogaineirong": + MessageLookupByLibrary.simpleMessage("Report this content"), + "jubaotishi": MessageLookupByLibrary.simpleMessage( + "Your report is waiting for manual review, and we will process it in 7-15 working days. The processing results can be found in"), + "jubaoyuanyin": MessageLookupByLibrary.simpleMessage( + "Please enter the reason for reporting, so that we can locate the problem faster and handle it quickly"), + "jujue": MessageLookupByLibrary.simpleMessage("Reject"), + "kabao": MessageLookupByLibrary.simpleMessage("card bag"), + "kabaokeshiyong": + MessageLookupByLibrary.simpleMessage("Card bag-available"), + "kaiqiquanxian": + MessageLookupByLibrary.simpleMessage("Open Permission"), + "kaitonghuixianghuoququanyi": MessageLookupByLibrary.simpleMessage( + "Open a return home VIP card to get more benefits"), + "kaitongriqi": m16, + "kaquan": MessageLookupByLibrary.simpleMessage("card coupon"), + "kelingqudeyouhuiquan": + MessageLookupByLibrary.simpleMessage("Coupons available"), + "keshiyong": MessageLookupByLibrary.simpleMessage("available"), + "keyongjifen": MessageLookupByLibrary.simpleMessage("Available Points"), + "keyongquan": + MessageLookupByLibrary.simpleMessage("Available vouchers"), + "keyongyouhuiquan": + MessageLookupByLibrary.simpleMessage("Available Coupons"), + "keyongyue": MessageLookupByLibrary.simpleMessage("Available Balance"), + "kongtiao": MessageLookupByLibrary.simpleMessage("Air conditioner"), + "kuaidi": MessageLookupByLibrary.simpleMessage("express"), + "kuaidiwuliu": + MessageLookupByLibrary.simpleMessage("express logistics"), + "kuailezhunong": + MessageLookupByLibrary.simpleMessage("Helping farmers happily"), + "lianxikefu": MessageLookupByLibrary.simpleMessage("Service"), + "lianxishoujihao": + MessageLookupByLibrary.simpleMessage("Contact phone number"), + "lianxuqiandaolingqushuangbeijifen": + MessageLookupByLibrary.simpleMessage( + "Sign in continuously to receive double points"), + "liaojie": MessageLookupByLibrary.simpleMessage("Understand"), + "liaojiejiankang": + MessageLookupByLibrary.simpleMessage("Understanding Health"), + "lijicanjia": MessageLookupByLibrary.simpleMessage("Join now"), + "lijichongzhi": MessageLookupByLibrary.simpleMessage("Recharge Now"), + "lijigengxin": MessageLookupByLibrary.simpleMessage("Update Now"), + "lijikaitong": MessageLookupByLibrary.simpleMessage("Open now"), + "lijilingqu": MessageLookupByLibrary.simpleMessage("Get it now"), + "lijiqiandao": + MessageLookupByLibrary.simpleMessage("Sign in immediately"), + "lijishiyong": MessageLookupByLibrary.simpleMessage("Use Now"), + "lijitiyan": MessageLookupByLibrary.simpleMessage("Experience Now"), + "lijiyuyue": + MessageLookupByLibrary.simpleMessage("directly reservation"), + "likekaitong": MessageLookupByLibrary.simpleMessage("Open now"), + "likexufei": MessageLookupByLibrary.simpleMessage("Renew now"), + "likezhifu": MessageLookupByLibrary.simpleMessage("Pay Now"), + "lingqu": MessageLookupByLibrary.simpleMessage("Receive"), + "lingquanzhongxin": + MessageLookupByLibrary.simpleMessage("Coupon Collection Center"), + "lingquchenggong": + MessageLookupByLibrary.simpleMessage("Claim succeeded"), + "lingqudaokabao": + MessageLookupByLibrary.simpleMessage("Get the card bag"), + "lingqufangshi": + MessageLookupByLibrary.simpleMessage("Collection Method"), + "lingqushijian": m17, + "linian": MessageLookupByLibrary.simpleMessage("concept"), + "lishijilu": MessageLookupByLibrary.simpleMessage("History"), + "liuxianinjingcaidepinglunba": MessageLookupByLibrary.simpleMessage( + "Leave your wonderful comments"), + "login": MessageLookupByLibrary.simpleMessage("login"), + "login_splash": + MessageLookupByLibrary.simpleMessage("Welcome Back Home"), + "lvbiyue": + MessageLookupByLibrary.simpleMessage("balance of green currency"), + "lvbiyue_": m18, + "lvbizhifu": MessageLookupByLibrary.simpleMessage("green payment"), + "main_menu1": MessageLookupByLibrary.simpleMessage("Home"), + "main_menu2": MessageLookupByLibrary.simpleMessage("Store"), + "main_menu3": MessageLookupByLibrary.simpleMessage("Association"), + "main_menu4": MessageLookupByLibrary.simpleMessage("Me"), + "main_menu5": MessageLookupByLibrary.simpleMessage("Hi"), + "manlijiandaijinquan": m19, + "manyuankeyong": m20, + "meiriqiandao": + MessageLookupByLibrary.simpleMessage("Sign in every day"), + "meiyougengduohuiyuanka": + MessageLookupByLibrary.simpleMessage("No more membership cards"), + "meiyougengduoshujule": + MessageLookupByLibrary.simpleMessage("No more data"), + "meiyougengduoyouhuiquan": + MessageLookupByLibrary.simpleMessage("No more coupons"), + "meizhousangengxin": + MessageLookupByLibrary.simpleMessage("updated every Wednesday"), + "meizhousanquanbao": + MessageLookupByLibrary.simpleMessage("Wednesday renewal coupon"), + "mendianxuanzhe": + MessageLookupByLibrary.simpleMessage("Store Selection"), + "mendianyue": MessageLookupByLibrary.simpleMessage("store balance"), + "menpaihao": MessageLookupByLibrary.simpleMessage( + "Please enter the house number"), + "mi": m21, + "mingxi": MessageLookupByLibrary.simpleMessage("Details"), + "morenpaixu": MessageLookupByLibrary.simpleMessage("Default sort"), + "muqianwujilu": + MessageLookupByLibrary.simpleMessage("No record at present"), + "muqianzanwuxingdianhuodong": MessageLookupByLibrary.simpleMessage( + "At present, there is no star store activity"), + "nihaimeiyouchongzhihuoxiaofeijilu": + MessageLookupByLibrary.simpleMessage( + "You have no consumption or recharge records here~"), + "nincunchuquanxianweikaiqi": MessageLookupByLibrary.simpleMessage( + "You have not opened the storage permission, please click"), + "nindingweigongnengweikaiqi": MessageLookupByLibrary.simpleMessage( + "Your positioning function switch is not turned on, please click to turn on positioning"), + "nindingweiquanxianweiyunxu": MessageLookupByLibrary.simpleMessage( + "You have not opened the location permission, please click OK to apply for permission"), + "ninweidenglu": MessageLookupByLibrary.simpleMessage( + "You are not logged in, please click to log in"), + "ninxiangjiquanxianweikaiqi": MessageLookupByLibrary.simpleMessage( + "You have not opened the camera permission, please click"), + "ninxiaoxiquanxianweikaiqi": MessageLookupByLibrary.simpleMessage( + "You have not enabled the message notification permission, please click Enable"), + "ninyichenggonglingquyouhuiquan": MessageLookupByLibrary.simpleMessage( + "You have successfully received the coupon, please go to"), + "ninyilianxuqiandaotian": m22, + "ninyouyigedingdanyaolingqu": MessageLookupByLibrary.simpleMessage( + "You need to go to the store to get an order"), + "ninyouyigexindedingdan": + MessageLookupByLibrary.simpleMessage("You have a new order"), + "paizhao": MessageLookupByLibrary.simpleMessage("Take a picture"), + "peisong": MessageLookupByLibrary.simpleMessage("Delivery"), + "peisongfangshi": + MessageLookupByLibrary.simpleMessage("Delivery Method"), + "peisongfei": MessageLookupByLibrary.simpleMessage("Delivery fee"), + "peisongfuwu": MessageLookupByLibrary.simpleMessage("Ordering time"), + "peisongzhong": MessageLookupByLibrary.simpleMessage("Shipping"), + "phone_error": + MessageLookupByLibrary.simpleMessage("Wrong phone format"), + "pinglun": MessageLookupByLibrary.simpleMessage("Comment"), + "pinglun_": m23, + "pingtaiyue": MessageLookupByLibrary.simpleMessage("Platform Balance"), + "pingtaizhifumima": + MessageLookupByLibrary.simpleMessage("Platform payment password"), + "pingtaizongyue": m24, + "pinpai": MessageLookupByLibrary.simpleMessage("brand"), + "pinpaijieshao": + MessageLookupByLibrary.simpleMessage("Brand Introduction"), + "privacy_policy1": MessageLookupByLibrary.simpleMessage("Login Agreed"), + "privacy_policy2": MessageLookupByLibrary.simpleMessage( + "《Service Agreement for Returning Home with One Heart》"), + "privacy_policy3": + MessageLookupByLibrary.simpleMessage("《privacy Services》"), + "privacy_policy4": + MessageLookupByLibrary.simpleMessage("Log in with your own number"), + "qianbao": MessageLookupByLibrary.simpleMessage("Wallet"), + "qiandao": MessageLookupByLibrary.simpleMessage("Sign in"), + "qiandaodejifen": + MessageLookupByLibrary.simpleMessage("Sign in and get points"), + "qiandaolingjifen": + MessageLookupByLibrary.simpleMessage("Sign in to receive points"), + "qiandaolingqujinfen": + MessageLookupByLibrary.simpleMessage("Sign in to receive points"), + "qiandaowancheng": + MessageLookupByLibrary.simpleMessage("Sign in completion"), + "qianjinmaiwei": MessageLookupByLibrary.simpleMessage("Qianjin Maiwei"), + "qianshou": MessageLookupByLibrary.simpleMessage("Signed in"), + "qianwanghuixiangmendianduihuanhexiao": + MessageLookupByLibrary.simpleMessage( + "Go to any store under Yixin Huixiang and show the commodity exchange code to the staff. After verification, you can get the corresponding commodity"), + "qinglihuancun": MessageLookupByLibrary.simpleMessage("Clear Cache"), + "qingshurubeizhuyaoqiu": MessageLookupByLibrary.simpleMessage( + "Please enter the note requirements"), + "qingshuruchongzhijine": MessageLookupByLibrary.simpleMessage( + "Please enter the recharge amount"), + "qingshurushoujihao": MessageLookupByLibrary.simpleMessage( + "Please enter your mobile number"), + "qingshuruyanzhengma": MessageLookupByLibrary.simpleMessage( + "Please enter the verification code"), + "qingshuruyaoqingma": MessageLookupByLibrary.simpleMessage( + "Please enter the invitation code"), + "qingshuruyouxiaoshoujihaoma": MessageLookupByLibrary.simpleMessage( + "Please enter your valid mobile number"), + "qingshuruzhifumima": MessageLookupByLibrary.simpleMessage( + "Please enter the payment password"), + "qingtianxieshoujihao": MessageLookupByLibrary.simpleMessage( + "Please fill in the recipient\'s mobile number"), + "qingtianxiexingming": MessageLookupByLibrary.simpleMessage( + "Please fill in the recipient\'s name"), + "qingtong": MessageLookupByLibrary.simpleMessage("bronze"), + "qingtonghuiyuan": + MessageLookupByLibrary.simpleMessage("Bronze Member"), + "qingxianxuanguige": + MessageLookupByLibrary.simpleMessage("please select specs"), + "qingxuanzeshiyongmendian": MessageLookupByLibrary.simpleMessage( + "Please select a store to use"), + "qingxuanzeshouhuodizhi": MessageLookupByLibrary.simpleMessage( + "Please select the shipping address"), + "qingxuanzeyigemendian": + MessageLookupByLibrary.simpleMessage("Please select a store"), + "qingxuanzeyuyeushijian": MessageLookupByLibrary.simpleMessage( + "please select subscribe time"), + "qingxuanzeyuyuemendian": MessageLookupByLibrary.simpleMessage( + "please select subscribe shop"), + "qingxuanzhemendian": + MessageLookupByLibrary.simpleMessage("Please select a store"), + "qingxuanzheninxiangshezhideyuyan": + MessageLookupByLibrary.simpleMessage( + "Please select the language you want to set"), + "qingzaiguidingshijianneizhifu": MessageLookupByLibrary.simpleMessage( + "Please complete the payment within the specified time"), + "qingzhuo": MessageLookupByLibrary.simpleMessage("clearing the table"), + "qishoupeisongzhongyujisongdashijian": + MessageLookupByLibrary.simpleMessage( + "The rider is in delivery, and the estimated delivery time"), + "qishouyijiedanquhuozhong": MessageLookupByLibrary.simpleMessage( + "The rider has received the order and is picking up goods"), + "qita": MessageLookupByLibrary.simpleMessage("Other"), + "qiyetuanjian": + MessageLookupByLibrary.simpleMessage("Enterprise League Building"), + "quanbao": MessageLookupByLibrary.simpleMessage("coupon package"), + "quanbu": MessageLookupByLibrary.simpleMessage("All"), + "quanbudingdan": MessageLookupByLibrary.simpleMessage("All Orders"), + "quanbuduihuan": MessageLookupByLibrary.simpleMessage("Exchange All"), + "quanchangtongyong": MessageLookupByLibrary.simpleMessage("universal"), + "quanchangzhe": m25, + "quantian": MessageLookupByLibrary.simpleMessage("all day"), + "quanxian": MessageLookupByLibrary.simpleMessage("Permissions"), + "quanxianshezhi": + MessageLookupByLibrary.simpleMessage("Permission Settings"), + "quanyijishao": + MessageLookupByLibrary.simpleMessage("Equity Introduction"), + "quanyishuoming": + MessageLookupByLibrary.simpleMessage("Equity Description"), + "quanyixiangqing": + MessageLookupByLibrary.simpleMessage("Equity Details"), + "qucanhao": MessageLookupByLibrary.simpleMessage("Picking number"), + "qudanhao": m26, + "qudaolaiyuan": MessageLookupByLibrary.simpleMessage("channel source"), + "qudenglu": MessageLookupByLibrary.simpleMessage("Log in"), + "queding": MessageLookupByLibrary.simpleMessage("OK"), + "quedingyaoshanchudongtai": MessageLookupByLibrary.simpleMessage( + "Are you sure you want to delete this dynamic?"), + "queren": MessageLookupByLibrary.simpleMessage("Confirm"), + "querenbangding": + MessageLookupByLibrary.simpleMessage("Confirm Binding"), + "querenchongzhi": + MessageLookupByLibrary.simpleMessage("Confirm Recharging"), + "querenduihuan": + MessageLookupByLibrary.simpleMessage("Confirm exchange"), + "querenshouhuo": + MessageLookupByLibrary.simpleMessage("Confirm receipt"), + "querenyaoshanchudangqianpinglunma": + MessageLookupByLibrary.simpleMessage( + "Are you sure you want to delete the current comment?"), + "querenzhuxiao": MessageLookupByLibrary.simpleMessage("Confirm Logout"), + "quhexiao": MessageLookupByLibrary.simpleMessage("De write off"), + "quhuozhong": MessageLookupByLibrary.simpleMessage("Picking"), + "qujianma": MessageLookupByLibrary.simpleMessage("Picking Code"), + "quqiandao": MessageLookupByLibrary.simpleMessage("Sign in"), + "qushiyong": MessageLookupByLibrary.simpleMessage("To use"), + "quwancheng": MessageLookupByLibrary.simpleMessage(" To complete "), + "quxiao": MessageLookupByLibrary.simpleMessage("Cancel"), + "quxiaodingdan": MessageLookupByLibrary.simpleMessage( + "Please complete the payment within the specified time"), + "quxiaozhifu": MessageLookupByLibrary.simpleMessage("Cancel Payment"), + "quzhifu": MessageLookupByLibrary.simpleMessage("To pay"), + "remenwenzhangshipin": + MessageLookupByLibrary.simpleMessage("Popular article videos"), + "remenwenzhangshipinliebiao": + MessageLookupByLibrary.simpleMessage("Popular article video list"), + "ren": m27, + "renwuzhongxin": MessageLookupByLibrary.simpleMessage("Task Center"), + "resend_in_seconds": m28, + "ricahngfenxiang": + MessageLookupByLibrary.simpleMessage("Daily sharing"), + "ruhedihuanjifen": + MessageLookupByLibrary.simpleMessage("How to redeem points"), + "ruhedihuanjifen1": MessageLookupByLibrary.simpleMessage( + "Click Jingbi to enter the points store, click the goods you want to exchange, enter the details of the goods and click below to exchange~"), + "ruhelingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("How do I get coupons?"), + "ruhelingquyouhuiquan1": MessageLookupByLibrary.simpleMessage( + "Click My, enter my page, click the coupon collection center below, and then you can get the coupon~"), + "ruheqiandao": MessageLookupByLibrary.simpleMessage("How to sign in?"), + "ruheqiandao1": MessageLookupByLibrary.simpleMessage( + "1.Click Jingbi to enter the home page, and click on the top to sign in。\n2.Click on My to enter my page, and click on the point details above to sign in。"), + "ruxutuikuanqingyumendianlianxi": MessageLookupByLibrary.simpleMessage( + "If you need a refund, please prepare the order number/receipt number in advance and contact the store staff"), + "saoma": MessageLookupByLibrary.simpleMessage("scanning code"), + "saomadiancan": MessageLookupByLibrary.simpleMessage( + "You are about to scan the code to order"), + "saomashibieguanzhugongzonghao": MessageLookupByLibrary.simpleMessage( + "Scan code to identify and follow official account"), + "send_code": MessageLookupByLibrary.simpleMessage("Validate code"), + "shanchu": MessageLookupByLibrary.simpleMessage("Delete"), + "shanchudingdan": + MessageLookupByLibrary.simpleMessage("Delete a single order"), + "shanghuruzhu": MessageLookupByLibrary.simpleMessage("Settled"), + "shangjiaquan": MessageLookupByLibrary.simpleMessage("merchant coupon"), + "shangjiaqueren": + MessageLookupByLibrary.simpleMessage("Merchant confirmation"), + "shangjiayifahuo": MessageLookupByLibrary.simpleMessage( + "Merchant has delivered goods"), + "shangjiazhengzaipeican": MessageLookupByLibrary.simpleMessage( + "The merchant is preparing meals"), + "shanglajiazai": + MessageLookupByLibrary.simpleMessage("pull-up loading"), + "shangpincaigou": MessageLookupByLibrary.simpleMessage("Commodity buy"), + "shangpinjifen": m29, + "shangpinxiangqing": + MessageLookupByLibrary.simpleMessage("Product Details"), + "shangyidengji": MessageLookupByLibrary.simpleMessage("Previous Level"), + "shenghuoyule": + MessageLookupByLibrary.simpleMessage("life entertainment"), + "shengxianzhaipei": MessageLookupByLibrary.simpleMessage("Fresh House"), + "shenmijifendali": + MessageLookupByLibrary.simpleMessage("Mysterious integral gift"), + "shenqingtuikuan": + MessageLookupByLibrary.simpleMessage("Apply for refund"), + "shezhi": MessageLookupByLibrary.simpleMessage("Settings"), + "shifangjiazaigengduo": + MessageLookupByLibrary.simpleMessage("Release Load More"), + "shifangshuaxin": + MessageLookupByLibrary.simpleMessage("Release Refresh"), + "shifujifen": m30, + "shifujihuanka": m31, + "shimingrenzheng": + MessageLookupByLibrary.simpleMessage("Real name authentication"), + "shixiaoquan": MessageLookupByLibrary.simpleMessage("Invalid coupon"), + "shixiaoyouhuiquan": + MessageLookupByLibrary.simpleMessage("Invalid coupon"), + "shiyongbangzhu": MessageLookupByLibrary.simpleMessage("Using Help"), + "shiyongmendian": + MessageLookupByLibrary.simpleMessage("Applicable stores"), + "shiyongriqi": MessageLookupByLibrary.simpleMessage("Use Date"), + "shiyongshuoming": + MessageLookupByLibrary.simpleMessage("Instructions for Use"), + "shiyongtiaojian": + MessageLookupByLibrary.simpleMessage("Use Conditions"), + "shiyongxiangqing": MessageLookupByLibrary.simpleMessage("Use Details"), + "shouhuodi": MessageLookupByLibrary.simpleMessage("Ship To Address"), + "shouhuodizhi": MessageLookupByLibrary.simpleMessage( + "Please enter the detailed receiving address"), + "shouhuodizhi1": + MessageLookupByLibrary.simpleMessage("Delivery address"), + "shouhuorenshoujihao": MessageLookupByLibrary.simpleMessage( + "Please enter the receiver\'s mobile phone number"), + "shouhuorenxiangxidizhi": MessageLookupByLibrary.simpleMessage( + "Please enter the detailed address of the consignee"), + "shouhuorenxingming": MessageLookupByLibrary.simpleMessage( + "Please enter the name of the consignee"), + "shoujihao": + MessageLookupByLibrary.simpleMessage("mobile phone number"), + "shouqi": MessageLookupByLibrary.simpleMessage("Stow"), + "shouye": MessageLookupByLibrary.simpleMessage("Home"), + "shuaxin": MessageLookupByLibrary.simpleMessage("Refresh"), + "shuaxinchenggong": + MessageLookupByLibrary.simpleMessage("Refresh succeeded"), + "shuaxinshibai": MessageLookupByLibrary.simpleMessage("Refresh failed"), + "shuaxinyue": MessageLookupByLibrary.simpleMessage("Refresh Balance"), + "shuaxinzhong": MessageLookupByLibrary.simpleMessage("Refreshing...."), + "shuliang": MessageLookupByLibrary.simpleMessage("number"), + "shurushouhuorendizhi": MessageLookupByLibrary.simpleMessage( + "Please enter the consignee address"), + "shuruzhifumima": + MessageLookupByLibrary.simpleMessage("Enter payment password"), + "sui": m32, + "tangshi": MessageLookupByLibrary.simpleMessage("tang shi"), + "tebieshengming": + MessageLookupByLibrary.simpleMessage("Special statement"), + "tehuizhuanqu": + MessageLookupByLibrary.simpleMessage("Special offer area"), + "tianjiaxinfuka": + MessageLookupByLibrary.simpleMessage("Add a new secondary card"), + "tianjifuka": + MessageLookupByLibrary.simpleMessage("Add a new sub card"), + "tiantiandefuli": + MessageLookupByLibrary.simpleMessage("get benefits every day"), + "tiantianlingjifen": + MessageLookupByLibrary.simpleMessage("Earn points every day"), + "tijiao": MessageLookupByLibrary.simpleMessage("Submit"), + "tijiaochenggong": + MessageLookupByLibrary.simpleMessage("Submitted successfully"), + "tingchewei": MessageLookupByLibrary.simpleMessage("Parking space"), + "tixian": MessageLookupByLibrary.simpleMessage("Withdrawal"), + "tongyibingjixu": + MessageLookupByLibrary.simpleMessage("Agree and Continue"), + "tongzhi": MessageLookupByLibrary.simpleMessage("Notification"), + "tongzhitishixinxi": MessageLookupByLibrary.simpleMessage( + "In order that you can receive our activity information in time, it is recommended that you open the receipt of notifications when using HISAPP"), + "toushuxuzhi": + MessageLookupByLibrary.simpleMessage("Instructions for Submission"), + "touxiang": MessageLookupByLibrary.simpleMessage("avatar"), + "tuichudenglu": MessageLookupByLibrary.simpleMessage("Log out"), + "tuiguangma": MessageLookupByLibrary.simpleMessage("Promotion code"), + "tuikuan": MessageLookupByLibrary.simpleMessage("Refund"), + "waidai": MessageLookupByLibrary.simpleMessage("take away"), + "waimai": MessageLookupByLibrary.simpleMessage("take away"), + "waimaipeisong": MessageLookupByLibrary.simpleMessage("delivery"), + "waisong": MessageLookupByLibrary.simpleMessage("sending out"), + "wan": MessageLookupByLibrary.simpleMessage("Play"), + "wancheng": MessageLookupByLibrary.simpleMessage("finish"), + "wancheng_": m33, + "wanchengyicixiadan": + MessageLookupByLibrary.simpleMessage("Place an order once"), + "wangjimima": MessageLookupByLibrary.simpleMessage("Forgot password"), + "wanjiankang": MessageLookupByLibrary.simpleMessage("Play healthy"), + "wanshanshengrixinxi_nl": MessageLookupByLibrary.simpleMessage( + "Automatically generated after improving birthday information"), + "wanshanshengrixinxi_yhq": MessageLookupByLibrary.simpleMessage( + "Exclusive coupon for improving birthday information"), + "weidenglu": MessageLookupByLibrary.simpleMessage("not logged in"), + "weidengluxinxi": MessageLookupByLibrary.simpleMessage( + "Click login to enjoy more wonderful information"), + "weihexiao": MessageLookupByLibrary.simpleMessage("Unwritten off"), + "weikaiqi": MessageLookupByLibrary.simpleMessage("Not open"), + "weilegeiningenghaodefuwu": MessageLookupByLibrary.simpleMessage( + "In order to provide you with better services and enjoy more wonderful information, please log in during use"), + "weilejishishoudaohuodongxiaoxi": MessageLookupByLibrary.simpleMessage( + "In order that you can receive our activity information in time, please open the message notification permission"), + "weilekaipaizhaoxuanzhetouxiang": MessageLookupByLibrary.simpleMessage( + "In order to change your avatar during use, please open the camera permission"), + "weilexiangnintuijianfujindemendianxinxi": + MessageLookupByLibrary.simpleMessage( + "In order to recommend the nearby store information to you, we recommend that you let us use the location information during the use"), + "weilexuanzhezhaopianhuancun": MessageLookupByLibrary.simpleMessage( + "It is recommended that you open the storage permission during use in order to obtain photo usage, caching and other functions"), + "weiwancheng": MessageLookupByLibrary.simpleMessage("Incomplete"), + "weixinzhifu": MessageLookupByLibrary.simpleMessage("WeChat payment"), + "weizhitishixinxi": MessageLookupByLibrary.simpleMessage( + "In order to recommend the nearby store information to you, we recommend that you let us use the location information when using HISAPP"), + "wentijian": MessageLookupByLibrary.simpleMessage("Problem piece"), + "wenzhang": MessageLookupByLibrary.simpleMessage("Article"), + "wenzhangxiangqing": + MessageLookupByLibrary.simpleMessage("Article Details"), + "wenzhangzhuanlan": + MessageLookupByLibrary.simpleMessage("Article Column"), + "weulingqu": MessageLookupByLibrary.simpleMessage("Unclaimed"), + "wodechengjiu": MessageLookupByLibrary.simpleMessage("My achievements"), + "wodedingdan": MessageLookupByLibrary.simpleMessage("My order"), + "wodedongtai": MessageLookupByLibrary.simpleMessage("My dynamic"), + "wodegongju": MessageLookupByLibrary.simpleMessage("My tools"), + "wodehuiyuandengji": + MessageLookupByLibrary.simpleMessage("My membership level"), + "wodejifenzhi": + MessageLookupByLibrary.simpleMessage("My integral value"), + "wodekanjia": MessageLookupByLibrary.simpleMessage("My bargain"), + "wodekaquan": MessageLookupByLibrary.simpleMessage("My card coupon"), + "wodenianling": MessageLookupByLibrary.simpleMessage("my age"), + "wodepintuan": MessageLookupByLibrary.simpleMessage("My Group"), + "wodeqianbao": MessageLookupByLibrary.simpleMessage("My wallet"), + "wodeshengri": MessageLookupByLibrary.simpleMessage("My birthday"), + "wodexiaoxi": MessageLookupByLibrary.simpleMessage("My Message"), + "wodeyaoqing": MessageLookupByLibrary.simpleMessage("My invitation"), + "wodeyaoqingma": + MessageLookupByLibrary.simpleMessage("My invitation code"), + "woyouyaoqingma": + MessageLookupByLibrary.simpleMessage("I have an invitation code"), + "wuliudanhao": + MessageLookupByLibrary.simpleMessage("Logistics Doc No:"), + "wuliugongsi": + MessageLookupByLibrary.simpleMessage("Logistics company:"), + "wuliuxinxi": + MessageLookupByLibrary.simpleMessage("Logistics Information"), + "wuliuzhuangtai": + MessageLookupByLibrary.simpleMessage("Logistics status:"), + "xiadanshijian": + MessageLookupByLibrary.simpleMessage("Order placement time"), + "xiadanshijian_": m34, + "xiadanzhuanjifen": + MessageLookupByLibrary.simpleMessage("Place orders integral"), + "xialashuaxin": + MessageLookupByLibrary.simpleMessage("Pull down Refresh"), + "xiangce": MessageLookupByLibrary.simpleMessage("album"), + "xiangji": MessageLookupByLibrary.simpleMessage("camera"), + "xiangjitishixinxi": MessageLookupByLibrary.simpleMessage( + "For you to share in the process of using, I hope you can let us use the camera function when using HISAPP"), + "xiangqing": MessageLookupByLibrary.simpleMessage("universal"), + "xiangxidizhi": + MessageLookupByLibrary.simpleMessage("Detailed Address"), + "xianshangfafang": + MessageLookupByLibrary.simpleMessage("online distribution"), + "xianshangshiyong": MessageLookupByLibrary.simpleMessage("online use"), + "xianxiashiyong": MessageLookupByLibrary.simpleMessage("offline use"), + "xiaofei": MessageLookupByLibrary.simpleMessage("consumption"), + "xiaofeijifen": + MessageLookupByLibrary.simpleMessage("Consumption Points"), + "xiaofeijihuanka": + MessageLookupByLibrary.simpleMessage("consume trading card"), + "xiaofeijilu": + MessageLookupByLibrary.simpleMessage("Consumption Record"), + "xiaoxi": MessageLookupByLibrary.simpleMessage("Messages"), + "xiayidengji": MessageLookupByLibrary.simpleMessage("Next Level"), + "xiazaiwancheng": + MessageLookupByLibrary.simpleMessage("Loading completed"), + "xiedongtai": MessageLookupByLibrary.simpleMessage("Write dynamic"), + "xieyitanchuang": MessageLookupByLibrary.simpleMessage( + "privacy policy for returning home users"), + "xihuan_": m35, + "xindianhuodong": + MessageLookupByLibrary.simpleMessage("Star Store Activity"), + "xingming": MessageLookupByLibrary.simpleMessage("name"), + "xitongtongzhi": + MessageLookupByLibrary.simpleMessage("System Notification"), + "xitongxiaoxi": MessageLookupByLibrary.simpleMessage("System Messages"), + "xiugai": MessageLookupByLibrary.simpleMessage("modify"), + "xiugaichenggong": + MessageLookupByLibrary.simpleMessage("Modification succeeded"), + "xiugaiyonghuming": + MessageLookupByLibrary.simpleMessage("Modify User Name"), + "xuanguige": MessageLookupByLibrary.simpleMessage("Select specs"), + "xuanhaola": MessageLookupByLibrary.simpleMessage("select success"), + "xuanji": MessageLookupByLibrary.simpleMessage("Selection"), + "xuanzeshangpinlingqufangshi": MessageLookupByLibrary.simpleMessage( + "Please select the picking method of goods"), + "xuanzetuijianmendian": + MessageLookupByLibrary.simpleMessage("select recommended store"), + "xuefeihuiyuan": MessageLookupByLibrary.simpleMessage("Renewal member"), + "xuexijiankang": + MessageLookupByLibrary.simpleMessage("Learning Health"), + "xufeihuixiangVIP": + MessageLookupByLibrary.simpleMessage("Renewal Home VIP"), + "xuni": MessageLookupByLibrary.simpleMessage("virtual"), + "yanzhengma": MessageLookupByLibrary.simpleMessage("verification code"), + "yaoqinghaoyou": MessageLookupByLibrary.simpleMessage("Invite friends"), + "yaoqinghaoyoudefen": + MessageLookupByLibrary.simpleMessage("Invite friends to score"), + "yaoqingrenshoujihao_": m36, + "yaoqingwancheng": + MessageLookupByLibrary.simpleMessage("Invitation completed"), + "yibangfuka": MessageLookupByLibrary.simpleMessage("bound sub card"), + "yiduihuan": MessageLookupByLibrary.simpleMessage("redeemed"), + "yiduihuanjian": m37, + "yifahuo": MessageLookupByLibrary.simpleMessage("Shipped"), + "yiguanzhu": MessageLookupByLibrary.simpleMessage("Followed"), + "yihouzaishuo": MessageLookupByLibrary.simpleMessage("Talk Later"), + "yihuide": MessageLookupByLibrary.simpleMessage("acquired"), + "yihujiaoqishou": MessageLookupByLibrary.simpleMessage("Called rider"), + "yikaitongzidongxufei": MessageLookupByLibrary.simpleMessage( + "Automatic renewal has been activated"), + "yikexiao": MessageLookupByLibrary.simpleMessage("Written off"), + "yilingqu": MessageLookupByLibrary.simpleMessage("claimed"), + "yindao1": MessageLookupByLibrary.simpleMessage( + "New multiple functions, real-time push of massive preferential information"), + "yindao2": MessageLookupByLibrary.simpleMessage( + "Many new functions have been added, and there are many discounts for using the platform wallet, as well as recharging privileges"), + "yindao3": MessageLookupByLibrary.simpleMessage( + "Points will be obtained for new member tasks, and green gold and points store will be exchanged for consumption"), + "yindao4": MessageLookupByLibrary.simpleMessage( + "pass on the idea of friendship, purity, health, organic and environmental protection"), + "yindaoye1": MessageLookupByLibrary.simpleMessage( + "Members\' latest information is the first to see"), + "yindaoye2": MessageLookupByLibrary.simpleMessage( + "New Group Alliance Store Members Order Meals"), + "yindaoye3": + MessageLookupByLibrary.simpleMessage("Member activity zone"), + "yindaoye4": MessageLookupByLibrary.simpleMessage( + "Live a healthy and organic life"), + "yingwen": MessageLookupByLibrary.simpleMessage("United States"), + "yingyeshijian": m38, + "yinkahuiyuan": + MessageLookupByLibrary.simpleMessage("Silver card member"), + "yinshi": MessageLookupByLibrary.simpleMessage("diet"), + "yinsishengming": + MessageLookupByLibrary.simpleMessage("Privacy Statement"), + "yinsixieyi": + MessageLookupByLibrary.simpleMessage("《Privacy Agreement》"), + "yinsizhengce1": MessageLookupByLibrary.simpleMessage( + " Thank you for using the Home bound APP. We attach great importance to your personal information and privacy protection. In order to better ensure your personal rights and interests, before you use our products, please carefully read"), + "yinsizhengce2": MessageLookupByLibrary.simpleMessage( + "     With your consent, we will collect some possible data (geographic location, camera, storage and other information) according to your use needs。"), + "yinzhang": MessageLookupByLibrary.simpleMessage("Seal"), + "yiqiandao": MessageLookupByLibrary.simpleMessage("Signed in"), + "yiqianshou": MessageLookupByLibrary.simpleMessage("Signed in"), + "yiquxiao": MessageLookupByLibrary.simpleMessage(" Canceled "), + "yishijiao": MessageLookupByLibrary.simpleMessage("Expired"), + "yishiming": MessageLookupByLibrary.simpleMessage("already real name"), + "yishixiao": MessageLookupByLibrary.simpleMessage("Expired"), + "yishiyong": MessageLookupByLibrary.simpleMessage("used"), + "yishouquan": MessageLookupByLibrary.simpleMessage("authorized"), + "yisongda": MessageLookupByLibrary.simpleMessage("Delivered"), + "yituikuan": MessageLookupByLibrary.simpleMessage("Refunded"), + "yiwancheng": MessageLookupByLibrary.simpleMessage(" Completed "), + "yiwanchengdingdan": + MessageLookupByLibrary.simpleMessage("Completed Order"), + "yixianghuiyuanquanyi": + MessageLookupByLibrary.simpleMessage("Member benefits enjoyed"), + "yixiansquanbupinglun": + MessageLookupByLibrary.simpleMessage("- All comments displayed-"), + "yixinhuixiang": MessageLookupByLibrary.simpleMessage( + "going back home with one heart"), + "yiyoujifen": MessageLookupByLibrary.simpleMessage("Existing Points"), + "yizhifu": MessageLookupByLibrary.simpleMessage("Paid"), + "yonghuming": MessageLookupByLibrary.simpleMessage("User name"), + "yonghuxiaofeijifen": MessageLookupByLibrary.simpleMessage( + "The user can get 1 point for every 1 yuan spent。"), + "youhuiquan": MessageLookupByLibrary.simpleMessage("Coupon"), + "youhuiquanlingqu": + MessageLookupByLibrary.simpleMessage("coupon collection"), + "youhuiquanwufajileijifen": MessageLookupByLibrary.simpleMessage( + "The preferential amount cannot accumulate points, and the corresponding points cannot be obtained for orders that are not successfully paid due to order cancellation or other reasons。"), + "youkedenglu": MessageLookupByLibrary.simpleMessage("Visitor login"), + "youxiaoqi": m39, + "youxiaoqixian": MessageLookupByLibrary.simpleMessage("Valid Period:"), + "youxiaoqizhi": m40, + "yuan": MessageLookupByLibrary.simpleMessage("yuan"), + "yuan_": m41, + "yuanjia": MessageLookupByLibrary.simpleMessage("original price"), + "yue": MessageLookupByLibrary.simpleMessage("Balance"), + "yue_": m42, + "yue__": m43, + "yuemingxi": MessageLookupByLibrary.simpleMessage("Balance Details"), + "yuliudianhua": + MessageLookupByLibrary.simpleMessage("Reserved telephone"), + "yunfei": MessageLookupByLibrary.simpleMessage("Freight"), + "yuyan": MessageLookupByLibrary.simpleMessage("Language"), + "zailaiyidan": MessageLookupByLibrary.simpleMessage("Another order"), + "zaituzhong": MessageLookupByLibrary.simpleMessage("In transit"), + "zaixiankefu": + MessageLookupByLibrary.simpleMessage("Online Customer Service"), + "zanbuzhichixianshangdiancan": MessageLookupByLibrary.simpleMessage( + "Online ordering is not supported temporarily"), + "zanweijiesuo": MessageLookupByLibrary.simpleMessage("Not unlocked"), + "zanweikaifang": MessageLookupByLibrary.simpleMessage("Not open"), + "zanweikaitong": MessageLookupByLibrary.simpleMessage("Not yet open"), + "zanwupinglun": + MessageLookupByLibrary.simpleMessage("No comment, please comment"), + "zanwuxianshangjindian": + MessageLookupByLibrary.simpleMessage("Temporary wireless shopping"), + "zanwuyouhuiquankelingqu": MessageLookupByLibrary.simpleMessage( + "There are no coupons to receive"), + "zhanghaoanquan": + MessageLookupByLibrary.simpleMessage("Account security"), + "zhanghaoshouquan": + MessageLookupByLibrary.simpleMessage("Account Authorization"), + "zhanghaoxinxi": + MessageLookupByLibrary.simpleMessage("Account Information"), + "zhanghaoyuanquan": + MessageLookupByLibrary.simpleMessage("Account and Security"), + "zhanghaozhuxiaoshuoming": MessageLookupByLibrary.simpleMessage( + "Account cancellation instructions"), + "zhanghuyue": MessageLookupByLibrary.simpleMessage("Account Balance"), + "zhankai": MessageLookupByLibrary.simpleMessage("Expand"), + "zhengzaihujiaoqishou": + MessageLookupByLibrary.simpleMessage("Calling the rider"), + "zhengzaijiazai": MessageLookupByLibrary.simpleMessage("Loading"), + "zhengzaipeisong": MessageLookupByLibrary.simpleMessage("Shipping"), + "zhengzaixiazaizhong": + MessageLookupByLibrary.simpleMessage("Loading..."), + "zhidianmendian": + MessageLookupByLibrary.simpleMessage("Call the store"), + "zhifubao": MessageLookupByLibrary.simpleMessage("Alipay"), + "zhifubaozhifu": MessageLookupByLibrary.simpleMessage("Alipay payment"), + "zhifufangshi": MessageLookupByLibrary.simpleMessage("Payment Method"), + "zhifuxiangqing": + MessageLookupByLibrary.simpleMessage("Payment Details"), + "zhizunhuiyuan": MessageLookupByLibrary.simpleMessage("Supreme Member"), + "zhizuowancheng": + MessageLookupByLibrary.simpleMessage("Making completed"), + "zhongchakan": MessageLookupByLibrary.simpleMessage("View in"), + "zhongwenjianti": + MessageLookupByLibrary.simpleMessage("Simplified Chinese"), + "zhuanlan": MessageLookupByLibrary.simpleMessage("Column"), + "zhuanxiangyouhuiquan": + MessageLookupByLibrary.simpleMessage("Exclusive coupon"), + "zhunong1": MessageLookupByLibrary.simpleMessage( + "Love returns home and helps farmers happily"), + "zhunongjifen": + MessageLookupByLibrary.simpleMessage("Farming aid points"), + "zhunongzhuanqu": MessageLookupByLibrary.simpleMessage( + "Special Area for Agricultural Aid"), + "zhuxiaotixing": MessageLookupByLibrary.simpleMessage( + "Reminder again: After the account is logged off, it cannot be recovered, and relevant data and information will be permanently deleted。"), + "zhuxiaozhanghao": + MessageLookupByLibrary.simpleMessage("Account cancellation"), + "ziqu": MessageLookupByLibrary.simpleMessage("self fetching"), + "ziti": MessageLookupByLibrary.simpleMessage("Self mention"), + "zitidizhi": + MessageLookupByLibrary.simpleMessage("Self lifting address"), + "zitiduihuanquan": MessageLookupByLibrary.simpleMessage( + "Coupon type:self withdrawal exchange coupon"), + "zitishijian": + MessageLookupByLibrary.simpleMessage("Self mention time"), + "zongzichan": MessageLookupByLibrary.simpleMessage("Total assets"), + "zongzichanyuan": + MessageLookupByLibrary.simpleMessage("Total assets (元)"), + "zuanshihuiyuan": + MessageLookupByLibrary.simpleMessage("Diamond Member"), + "zuixinwenzhang": + MessageLookupByLibrary.simpleMessage("Latest Articles"), + "zuorenwudejifen": MessageLookupByLibrary.simpleMessage( + "Score points for doing tasks"), + "zuozhe": m44 + }; } diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 97b44075..408d1cf2 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,814 +20,908 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'zh_CN'; - static m0(version) => "版本:${version}"; + static String m0(version) => "版本:${version}"; - static m1(yuan) => "充值金额最小是${yuan}元"; + static String m1(yuan) => "充值金额最小是${yuan}元"; - static m2(time) => "创建时间${time}"; + static String m2(time) => "创建时间${time}"; - static m3(xihuan) => "点赞喜欢${xihuan}"; + static String m3(xihuan) => "点赞喜欢${xihuan}"; - static m4(shijian) => "发行开始时间 ${shijian}"; + static String m4(shijian) => "发行开始时间 ${shijian}"; - static m5(ge) => "${ge}g/个"; + static String m5(ge) => "${ge}g/个"; - static m6(jian) => "共${jian}件"; + static String m6(jian) => "共${jian}件"; - static m7(jian) => "共${jian}件商品"; + static String m7(jian) => "共${jian}件商品"; - static m8(km) => "${km}公里"; + static String m8(km) => "${km}公里"; - static m9(huifu) => "回复@${huifu}:"; + static String m9(huifu) => "回复@${huifu}:"; - static m10(yuan) => "活动减免${yuan}元配送费"; + static String m10(yuan) => "活动减免${yuan}元配送费"; - static m11(yue) => "活动余额 ${yue}"; + static String m11(yue) => "活动余额 ${yue}"; - static m12(jifen) => "+ ${jifen} 积分"; + static String m12(jifen) => "+ ${jifen} 积分"; - static m13(jianjie) => "简介:${jianjie}"; + static String m13(jianjie) => "简介:${jianjie}"; - static m14(jifen) => "${jifen}积分"; + static String m14(jifen) => "${jifen}积分"; - static m15(jifen) => "${jifen}积分 到下一个等级"; + static String m15(jifen) => "${jifen}积分 到下一个等级"; - static m16(date) => "开通日期:${date}"; + static String m16(date) => "开通日期:${date}"; - static m17(shijian) => "领取时间 ${shijian}"; + static String m17(shijian) => "领取时间 ${shijian}"; - static m18(yue) => "绿币 ${yue}"; + static String m18(yue) => "绿币 ${yue}"; - static m19(man, jian) => "满${man}元立减${jian}元代金券"; + static String m19(man, jian) => "满${man}元立减${jian}元代金券"; - static m20(yuan) => "满${yuan}可用"; + static String m20(yuan) => "满${yuan}可用"; - static m21(mi) => "${mi}米"; + static String m21(mi) => "${mi}米"; - static m22(tian) => "您已连续签到${tian}天"; + static String m22(tian) => "您已连续签到${tian}天"; - static m23(pinglun) => "评论(${pinglun})"; + static String m23(pinglun) => "评论(${pinglun})"; - static m24(zongyue) => "余额:${zongyue}"; + static String m24(zongyue) => "余额:${zongyue}"; - static m25(zhe) => "全场${zhe}折"; + static String m25(zhe) => "全场${zhe}折"; - static m26(num) => "取单号${num}"; + static String m26(num) => "取单号${num}"; - static m27(ren) => "¥${ren}/人"; + static String m27(ren) => "¥${ren}/人"; - static m28(second) => "${second}s后重新发送"; + static String m28(second) => "${second}s后重新发送"; - static m29(jifen) => "商品积分 ${jifen}积分"; + static String m29(jifen) => "商品积分 ${jifen}积分"; - static m30(jifen) => "实付积分 ${jifen}积分"; + static String m30(jifen) => "实付积分 ${jifen}积分"; - static m31(jihuanka) => "实付集换卡 ${jihuanka}集换卡"; + static String m31(jihuanka) => "实付集换卡 ${jihuanka}集换卡"; - static m32(sui) => "${sui}岁"; + static String m32(sui) => "${sui}岁"; - static m33(num) => "完成${num}"; + static String m33(num) => "完成${num}"; - static m34(time) => "下单时间:${time}"; + static String m34(time) => "下单时间:${time}"; - static m35(xihuan) => "喜欢(${xihuan})"; + static String m35(xihuan) => "喜欢(${xihuan})"; - static m36(shoujihao) => "邀请人手机号:${shoujihao}"; + static String m36(shoujihao) => "邀请人手机号:${shoujihao}"; - static m37(jian) => "已兑换${jian}件"; + static String m37(jian) => "已兑换${jian}件"; - static m38(time) => "营业时间: ${time}"; + static String m38(time) => "营业时间: ${time}"; - static m39(date) => "有效期:${date}"; + static String m39(date) => "有效期:${date}"; - static m40(date) => "有效期至${date}"; + static String m40(date) => "有效期至${date}"; - static m41(yuan) => "${yuan}元"; + static String m41(yuan) => "${yuan}元"; - static m42(yue) => "余额${yue}"; + static String m42(yue) => "余额${yue}"; - static m43(yue) => "余额 ${yue}"; + static String m43(yue) => "余额 ${yue}"; - static m44(zuozhe) => "作者:${zuozhe}"; + static String m44(zuozhe) => "作者:${zuozhe}"; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "bainianchuanjiao" : MessageLookupByLibrary.simpleMessage("百年川椒"), - "baiyin" : MessageLookupByLibrary.simpleMessage("白银"), - "baiyinhuiyuan" : MessageLookupByLibrary.simpleMessage("白银会员"), - "banben" : m0, - "bangdingfuka" : MessageLookupByLibrary.simpleMessage("绑定副卡"), - "bangdingshouji" : MessageLookupByLibrary.simpleMessage("绑定手机"), - "bangong" : MessageLookupByLibrary.simpleMessage("办公"), - "bangzhuyufankui" : MessageLookupByLibrary.simpleMessage("帮助与反馈"), - "baocun" : MessageLookupByLibrary.simpleMessage("保存"), - "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), - "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), - "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), - "beizhu" : MessageLookupByLibrary.simpleMessage("备注"), - "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("备注信息"), - "benzhouquanbao" : MessageLookupByLibrary.simpleMessage("本周券包"), - "bianjidizhi" : MessageLookupByLibrary.simpleMessage("编辑地址"), - "bianjigerenziliao" : MessageLookupByLibrary.simpleMessage("编辑个人资料"), - "biaojiweiyidu" : MessageLookupByLibrary.simpleMessage("标为已读"), - "biaoweiyidu" : MessageLookupByLibrary.simpleMessage("标为已读"), - "bodadianhua" : MessageLookupByLibrary.simpleMessage("拨打电话"), - "bofangcishu" : MessageLookupByLibrary.simpleMessage("播放次数"), - "bojin" : MessageLookupByLibrary.simpleMessage("铂金"), - "brand_yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "buzhichikaipiao" : MessageLookupByLibrary.simpleMessage("不支持开票"), - "canyingfuwu" : MessageLookupByLibrary.simpleMessage("餐饮服务"), - "chakan" : MessageLookupByLibrary.simpleMessage("查看"), - "chakangengduo" : MessageLookupByLibrary.simpleMessage("查看更多"), - "chakanhexiaoma" : MessageLookupByLibrary.simpleMessage("查看核销码"), - "chakanquanyi" : MessageLookupByLibrary.simpleMessage("查看权益"), - "chakanshixiaoquan" : MessageLookupByLibrary.simpleMessage("查看失效券"), - "chakanwodekabao" : MessageLookupByLibrary.simpleMessage("查看我的卡包"), - "chakanwodekaquan" : MessageLookupByLibrary.simpleMessage("查看我的卡券"), - "chakanwuliu" : MessageLookupByLibrary.simpleMessage("查看物流"), - "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"), - "changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"), - "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"), - "chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"), - "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"), - "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), - "chengjiu" : MessageLookupByLibrary.simpleMessage("成就"), - "chengjiuhuizhang" : MessageLookupByLibrary.simpleMessage("成就徽章"), - "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"), - "chengweidianpuzhuanshuhuiyuan" : MessageLookupByLibrary.simpleMessage("成为店铺专属会员,享专属权益"), - "chi" : MessageLookupByLibrary.simpleMessage("吃"), - "chijiankang" : MessageLookupByLibrary.simpleMessage("吃健康"), - "chongzhi" : MessageLookupByLibrary.simpleMessage("充值"), - "chongzhichenggong" : MessageLookupByLibrary.simpleMessage("充值成功"), - "chongzhifuliduo" : MessageLookupByLibrary.simpleMessage("充值福利多"), - "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), - "chongzhizuixiaojine" : m1, - "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"), - "chuangshirendegushi1" : MessageLookupByLibrary.simpleMessage("创始人的故事"), - "chuzhiyouhui" : MessageLookupByLibrary.simpleMessage("储值优惠"), - "code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"), - "cunchu" : MessageLookupByLibrary.simpleMessage("存储"), - "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), - "dabaodaodianqu" : MessageLookupByLibrary.simpleMessage("打包到店取"), - "daifukuan" : MessageLookupByLibrary.simpleMessage("待付款"), - "daipeisong" : MessageLookupByLibrary.simpleMessage("待配送"), - "daiqucan" : MessageLookupByLibrary.simpleMessage("待取餐"), - "daiqueren" : MessageLookupByLibrary.simpleMessage("待确认"), - "daizhifu" : MessageLookupByLibrary.simpleMessage("待支付"), - "daizhizuo" : MessageLookupByLibrary.simpleMessage("待制作"), - "dajiadouzaiduihuan" : MessageLookupByLibrary.simpleMessage("大家都在兑换"), - "dakaidingwei" : MessageLookupByLibrary.simpleMessage("打开定位"), - "dangqianbanben" : MessageLookupByLibrary.simpleMessage("当前版本"), - "dangqiandengji" : MessageLookupByLibrary.simpleMessage("当前等级"), - "dangqianjifen" : MessageLookupByLibrary.simpleMessage("当前积分:"), - "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), - "dangqianzhukadengji" : MessageLookupByLibrary.simpleMessage("当前主卡等级"), - "daodianziqu" : MessageLookupByLibrary.simpleMessage("到店自取"), - "daopinglunliebiaodingbu" : MessageLookupByLibrary.simpleMessage("到评论列表顶部"), - "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等级"), - "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家确认"), - "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"), - "denglu" : MessageLookupByLibrary.simpleMessage("登录"), - "diancan" : MessageLookupByLibrary.simpleMessage("点餐"), - "diandan" : MessageLookupByLibrary.simpleMessage("点单"), - "dianhua" : MessageLookupByLibrary.simpleMessage("电话"), - "dianjidenglu" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), - "dianneiyongcan" : MessageLookupByLibrary.simpleMessage("店内用餐"), - "dianpuchongzhi" : MessageLookupByLibrary.simpleMessage("店铺充值"), - "dianputuijian" : MessageLookupByLibrary.simpleMessage("店铺推荐"), - "dianpuyue" : MessageLookupByLibrary.simpleMessage("店铺余额"), - "dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"), - "dianzan" : MessageLookupByLibrary.simpleMessage("点赞"), - "dianzanxihuan_" : m3, - "dingdan" : MessageLookupByLibrary.simpleMessage("订单"), - "dingdanbianhao" : MessageLookupByLibrary.simpleMessage("订单编号"), - "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("订单待发货"), - "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("订单待支付"), - "dingdangenzong" : MessageLookupByLibrary.simpleMessage("订单跟踪"), - "dingdanhao" : MessageLookupByLibrary.simpleMessage("订单号"), - "dingdanjiesuan" : MessageLookupByLibrary.simpleMessage("订单结算"), - "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), - "dingdantongzhi" : MessageLookupByLibrary.simpleMessage("订单通知"), - "dingdanxiaoxi" : MessageLookupByLibrary.simpleMessage("订单消息"), - "dingdanyisongda" : MessageLookupByLibrary.simpleMessage("订单送达"), - "dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("订单已退款"), - "dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("订单已完成"), - "dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单已支付"), - "dingwei" : MessageLookupByLibrary.simpleMessage("定位"), - "dizhi" : MessageLookupByLibrary.simpleMessage("地址"), - "dongtai" : MessageLookupByLibrary.simpleMessage("动态"), - "dongtaitishi" : MessageLookupByLibrary.simpleMessage("用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示"), - "dongtaixiangqing" : MessageLookupByLibrary.simpleMessage("动态详情"), - "duihuan" : MessageLookupByLibrary.simpleMessage("兑换"), - "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), - "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), - "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), - "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), - "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), - "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), - "duihuanquan" : MessageLookupByLibrary.simpleMessage("兑换券"), - "duihuanshangpinxiangqing" : MessageLookupByLibrary.simpleMessage("兑换商品详情"), - "duihuanxinxi" : MessageLookupByLibrary.simpleMessage("兑换信息"), - "duozhongyouhui" : MessageLookupByLibrary.simpleMessage("多种优惠券等你拿"), - "fabu" : MessageLookupByLibrary.simpleMessage("发布"), - "fangshier" : MessageLookupByLibrary.simpleMessage("方式二"), - "fangshiyi" : MessageLookupByLibrary.simpleMessage("方式一"), - "fanhuiduihuanlishi" : MessageLookupByLibrary.simpleMessage("返回兑换历史"), - "fanhuishequn" : MessageLookupByLibrary.simpleMessage("返回社群"), - "fanhuishouye" : MessageLookupByLibrary.simpleMessage("返回首页"), - "fankui" : MessageLookupByLibrary.simpleMessage("反馈"), - "fankuilizi" : MessageLookupByLibrary.simpleMessage("您可以在这里输入反馈内容,例如产品建议,功能异常等"), - "fantizhongwen" : MessageLookupByLibrary.simpleMessage("繁体中文"), - "fapiao" : MessageLookupByLibrary.simpleMessage("发票"), - "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"), - "fasong" : MessageLookupByLibrary.simpleMessage("发送"), - "fasongduanxin" : MessageLookupByLibrary.simpleMessage("发送短信"), - "faxingshijian" : m4, - "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换码"), - "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), - "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), - "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), - "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), - "fenxiangjiankang" : MessageLookupByLibrary.simpleMessage("分享健康"), - "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), - "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("将邀请码分享给好友,对方在海峡姐妹App登录页输入邀请码,即可邀请成功。"), - "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), - "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手机号"), - "fuliduihuan" : MessageLookupByLibrary.simpleMessage("福利兑换"), - "fulizhongxin" : MessageLookupByLibrary.simpleMessage("福利中心"), - "ge" : m5, - "geiwopingfen" : MessageLookupByLibrary.simpleMessage("给我评分"), - "gengduo" : MessageLookupByLibrary.simpleMessage("更多"), - "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), - "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), - "genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改绑定手机号"), - "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"), - "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), - "gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"), - "gerenxinxi" : MessageLookupByLibrary.simpleMessage("个人信息"), - "gexingqianming" : MessageLookupByLibrary.simpleMessage("个性签名"), - "gong" : MessageLookupByLibrary.simpleMessage("共"), - "gongchuanghuiyuan" : MessageLookupByLibrary.simpleMessage("共创会员"), - "gongjijian" : m6, - "gongjijianshangpin" : m7, - "gongli" : m8, - "gongxinchengwei" : MessageLookupByLibrary.simpleMessage("恭喜您成为"), - "gongxinichengweibendianhuiyuan" : MessageLookupByLibrary.simpleMessage("恭喜您,成为本店的会员,快去享受超多会员权益吧。"), - "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和海峡姐妹服务协议"), - "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), - "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), - "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"), - "guanyuhuixiang" : MessageLookupByLibrary.simpleMessage("关于回乡"), - "guanzhu" : MessageLookupByLibrary.simpleMessage("关注"), - "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), - "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), - "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), - "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "haowu" : MessageLookupByLibrary.simpleMessage("好物"), - "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友奖励规则"), - "he" : MessageLookupByLibrary.simpleMessage("喝"), - "heji" : MessageLookupByLibrary.simpleMessage("合计:"), - "hejiankang" : MessageLookupByLibrary.simpleMessage("喝健康"), - "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), - "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), - "huangjin" : MessageLookupByLibrary.simpleMessage("黄金"), - "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"), - "huifu" : MessageLookupByLibrary.simpleMessage("回复"), - "huifu_" : m9, - "huixiangVIPka" : MessageLookupByLibrary.simpleMessage("回乡VIP卡"), - "huixiangqianbao" : MessageLookupByLibrary.simpleMessage("海峡钱包"), - "huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), - "huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"), - "huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"), - "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"), - "huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"), - "huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"), - "huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"), - "huiyuanhuodejifen" : MessageLookupByLibrary.simpleMessage("会员如何获得积分"), - "huiyuanjia" : MessageLookupByLibrary.simpleMessage("会员价"), - "huiyuanjibieduizhao" : MessageLookupByLibrary.simpleMessage("会员级别对照表"), - "huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"), - "huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"), - "huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"), - "huiyuanma" : MessageLookupByLibrary.simpleMessage("会员码"), - "huiyuanquanyi" : MessageLookupByLibrary.simpleMessage("会员权益"), - "huiyuanyue" : MessageLookupByLibrary.simpleMessage("会员余额"), - "huiyuanzhongxin" : MessageLookupByLibrary.simpleMessage("会员中心"), - "huiyuanzhuanxiangjiage" : MessageLookupByLibrary.simpleMessage("会员专享价格"), - "huode" : MessageLookupByLibrary.simpleMessage("获得"), - "huodequanyi" : MessageLookupByLibrary.simpleMessage("获得权益"), - "huodong" : MessageLookupByLibrary.simpleMessage("活动"), - "huodongguize" : MessageLookupByLibrary.simpleMessage("活动规则"), - "huodongjianmianpeisongfei" : m10, - "huodongjinxingzhong" : MessageLookupByLibrary.simpleMessage("活动进行中"), - "huodongliebiao" : MessageLookupByLibrary.simpleMessage("活动列表"), - "huodongyue" : MessageLookupByLibrary.simpleMessage("活动余额"), - "huodongyue_" : m11, - "huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"), - "huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"), - "huozan" : MessageLookupByLibrary.simpleMessage("获赞"), - "input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"), - "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), - "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"), - "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), - "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), - "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀请码输入错误"), - "jiajifen" : m12, - "jian" : MessageLookupByLibrary.simpleMessage("件"), - "jiangli" : MessageLookupByLibrary.simpleMessage("奖励"), - "jiangshi" : MessageLookupByLibrary.simpleMessage("讲师"), - "jianjie" : m13, - "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"), - "jiesuan" : MessageLookupByLibrary.simpleMessage("结算"), - "jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"), - "jifen" : MessageLookupByLibrary.simpleMessage("积分"), - "jifen_" : m14, - "jifenbuzu" : MessageLookupByLibrary.simpleMessage("您的积分不足"), - "jifendaoxiayidengji" : m15, - "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("积分的计算说明"), - "jifendidaogao" : MessageLookupByLibrary.simpleMessage("积分从低到高"), - "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("积分从高到低"), - "jifenhuanquan" : MessageLookupByLibrary.simpleMessage("积分换券"), - "jifenmingxi" : MessageLookupByLibrary.simpleMessage("积分明细"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("积分商城"), - "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("积分详情"), - "jihuanka" : MessageLookupByLibrary.simpleMessage("集换卡"), - "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), - "jingxuanhaowen" : MessageLookupByLibrary.simpleMessage("精选好文"), - "jingxuanhuodong" : MessageLookupByLibrary.simpleMessage("精选活动"), - "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), - "jinrihuiyuanrenwu" : MessageLookupByLibrary.simpleMessage("今日会员任务"), - "jinrushangdian" : MessageLookupByLibrary.simpleMessage("进入商店"), - "jinruzhuanqu" : MessageLookupByLibrary.simpleMessage("进入专区"), - "jinxingbangdingfuka" : MessageLookupByLibrary.simpleMessage("进行绑定副卡"), - "jinxingfukabangding" : MessageLookupByLibrary.simpleMessage("进行副卡绑定"), - "jinxingzhanghaozhuxiao" : MessageLookupByLibrary.simpleMessage("进行账号注销"), - "jinxingzhongdedingdan" : MessageLookupByLibrary.simpleMessage("进行中的订单"), - "jituanchuangbanren" : MessageLookupByLibrary.simpleMessage(" 集团创办人"), - "jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集团创始人"), - "jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"), - "jixuzhifu" : MessageLookupByLibrary.simpleMessage("继续支付"), - "jubao" : MessageLookupByLibrary.simpleMessage("举报"), - "jubaogaineirong" : MessageLookupByLibrary.simpleMessage("举报该内容"), - "jubaotishi" : MessageLookupByLibrary.simpleMessage("您的举报正在等待人工审核,我们会在7~15个工作日处理,处理结果可在"), - "jubaoyuanyin" : MessageLookupByLibrary.simpleMessage("请输入举报原因,以便我们更快定位问题,快速处理"), - "jujue" : MessageLookupByLibrary.simpleMessage("拒绝"), - "kabao" : MessageLookupByLibrary.simpleMessage("卡包"), - "kabaokeshiyong" : MessageLookupByLibrary.simpleMessage("卡包-可使用"), - "kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("开启权限"), - "kaitonghuixianghuoququanyi" : MessageLookupByLibrary.simpleMessage("开通回乡VIP卡获取更多权益"), - "kaitongriqi" : m16, - "kaquan" : MessageLookupByLibrary.simpleMessage("卡券"), - "kelingqudeyouhuiquan" : MessageLookupByLibrary.simpleMessage("可领取的优惠券"), - "keshiyong" : MessageLookupByLibrary.simpleMessage("可使用"), - "keyongjifen" : MessageLookupByLibrary.simpleMessage("可用积分"), - "keyongquan" : MessageLookupByLibrary.simpleMessage("可用券"), - "keyongyouhuiquan" : MessageLookupByLibrary.simpleMessage("可用优惠券"), - "keyongyue" : MessageLookupByLibrary.simpleMessage("可用余额"), - "kongtiao" : MessageLookupByLibrary.simpleMessage("空调"), - "kuaidi" : MessageLookupByLibrary.simpleMessage("快递"), - "kuaidiwuliu" : MessageLookupByLibrary.simpleMessage("快递物流"), - "kuailezhunong" : MessageLookupByLibrary.simpleMessage("快乐助农"), - "lianxikefu" : MessageLookupByLibrary.simpleMessage("联系客服"), - "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("联系手机号"), - "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), - "liaojie" : MessageLookupByLibrary.simpleMessage("了解"), - "liaojiejiankang" : MessageLookupByLibrary.simpleMessage("了解健康"), - "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即参加"), - "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), - "lijigengxin" : MessageLookupByLibrary.simpleMessage("立即更新"), - "lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"), - "lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"), - "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"), - "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"), - "lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"), - "lijiyuyue" : MessageLookupByLibrary.simpleMessage("立即预约"), - "likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"), - "likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"), - "likezhifu" : MessageLookupByLibrary.simpleMessage("立刻支付"), - "lingqu" : MessageLookupByLibrary.simpleMessage("领取"), - "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("领券中心"), - "lingquchenggong" : MessageLookupByLibrary.simpleMessage("领取成功"), - "lingqudaokabao" : MessageLookupByLibrary.simpleMessage("领取到卡包"), - "lingqufangshi" : MessageLookupByLibrary.simpleMessage("领取方式"), - "lingqushijian" : m17, - "linian" : MessageLookupByLibrary.simpleMessage("理念"), - "lishijilu" : MessageLookupByLibrary.simpleMessage("历史记录"), - "liuxianinjingcaidepinglunba" : MessageLookupByLibrary.simpleMessage("留下您精彩的评论吧"), - "login" : MessageLookupByLibrary.simpleMessage("登录"), - "login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到海峡姐妹"), - "lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"), - "lvbiyue_" : m18, - "lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"), - "main_menu1" : MessageLookupByLibrary.simpleMessage("首页"), - "main_menu2" : MessageLookupByLibrary.simpleMessage("门店"), - "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"), - "main_menu4" : MessageLookupByLibrary.simpleMessage("我的"), - "main_menu5" : MessageLookupByLibrary.simpleMessage("hi"), - "manlijiandaijinquan" : m19, - "manyuankeyong" : m20, - "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), - "meiyougengduohuiyuanka" : MessageLookupByLibrary.simpleMessage("没有更多会员卡"), - "meiyougengduoshujule" : MessageLookupByLibrary.simpleMessage("没有更多的数据了"), - "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), - "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"), - "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"), - "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"), - "menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"), - "mi" : m21, - "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), - "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), - "muqianwujilu" : MessageLookupByLibrary.simpleMessage("目前暂未记录哦"), - "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), - "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), - "nincunchuquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), - "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), - "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), - "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), - "ninxiangjiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), - "ninxiaoxiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), - "ninyichenggonglingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("您已成功领取优惠劵,请在"), - "ninyilianxuqiandaotian" : m22, - "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), - "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"), - "paizhao" : MessageLookupByLibrary.simpleMessage("拍照"), - "peisong" : MessageLookupByLibrary.simpleMessage("配送"), - "peisongfangshi" : MessageLookupByLibrary.simpleMessage("配送方式"), - "peisongfei" : MessageLookupByLibrary.simpleMessage("配送费"), - "peisongfuwu" : MessageLookupByLibrary.simpleMessage("配送服务"), - "peisongzhong" : MessageLookupByLibrary.simpleMessage("配送中"), - "phone_error" : MessageLookupByLibrary.simpleMessage("手机格式错误"), - "pinglun" : MessageLookupByLibrary.simpleMessage("评论"), - "pinglun_" : m23, - "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平台余额"), - "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平台支付密码"), - "pingtaizongyue" : m24, - "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), - "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介绍"), - "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登录既同意"), - "privacy_policy2" : MessageLookupByLibrary.simpleMessage("《海峡姐妹服务协议》"), - "privacy_policy3" : MessageLookupByLibrary.simpleMessage("《隐私服务》"), - "privacy_policy4" : MessageLookupByLibrary.simpleMessage("并使用本机号码登录"), - "qianbao" : MessageLookupByLibrary.simpleMessage("钱包"), - "qiandao" : MessageLookupByLibrary.simpleMessage("签到"), - "qiandaodejifen" : MessageLookupByLibrary.simpleMessage("签到得积分"), - "qiandaolingjifen" : MessageLookupByLibrary.simpleMessage("签到领积分"), - "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"), - "qiandaowancheng" : MessageLookupByLibrary.simpleMessage("签到完成"), - "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"), - "qianshou" : MessageLookupByLibrary.simpleMessage("已签收"), - "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), - "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"), - "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"), - "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("请输入充值金额"), - "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), - "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("请输入验证码"), - "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("请输入邀请码"), - "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), - "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("请输入支付密码"), - "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), - "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), - "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), - "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), - "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"), - "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), - "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), - "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), - "qingxuanzeyuyeushijian" : MessageLookupByLibrary.simpleMessage("请选择预约时间"), - "qingxuanzeyuyuemendian" : MessageLookupByLibrary.simpleMessage("请选择预约门店"), - "qingxuanzhemendian" : MessageLookupByLibrary.simpleMessage("请选择门店"), - "qingxuanzheninxiangshezhideyuyan" : MessageLookupByLibrary.simpleMessage("请选择您想设置的语言"), - "qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"), - "qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"), - "qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"), - "qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"), - "qita" : MessageLookupByLibrary.simpleMessage("其他"), - "qiyetuanjian" : MessageLookupByLibrary.simpleMessage("企业团建"), - "quanbao" : MessageLookupByLibrary.simpleMessage("券包"), - "quanbu" : MessageLookupByLibrary.simpleMessage("全部"), - "quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"), - "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"), - "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全场通用"), - "quanchangzhe" : m25, - "quantian" : MessageLookupByLibrary.simpleMessage("全天"), - "quanxian" : MessageLookupByLibrary.simpleMessage("权限"), - "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"), - "quanyijishao" : MessageLookupByLibrary.simpleMessage("权益介绍"), - "quanyishuoming" : MessageLookupByLibrary.simpleMessage("权益说明"), - "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), - "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), - "qudanhao" : m26, - "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"), - "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), - "queding" : MessageLookupByLibrary.simpleMessage("确定"), - "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), - "queren" : MessageLookupByLibrary.simpleMessage("确认"), - "querenbangding" : MessageLookupByLibrary.simpleMessage("确认绑定"), - "querenchongzhi" : MessageLookupByLibrary.simpleMessage("确认充值"), - "querenduihuan" : MessageLookupByLibrary.simpleMessage("确认兑换"), - "querenshouhuo" : MessageLookupByLibrary.simpleMessage("确认收货"), - "querenyaoshanchudangqianpinglunma" : MessageLookupByLibrary.simpleMessage("确认要删除当前评论?"), - "querenzhuxiao" : MessageLookupByLibrary.simpleMessage("确认注销"), - "quhexiao" : MessageLookupByLibrary.simpleMessage("去核销"), - "quhuozhong" : MessageLookupByLibrary.simpleMessage("取货中"), - "qujianma" : MessageLookupByLibrary.simpleMessage("取件码"), - "quqiandao" : MessageLookupByLibrary.simpleMessage("去签到"), - "qushiyong" : MessageLookupByLibrary.simpleMessage("去使用"), - "quwancheng" : MessageLookupByLibrary.simpleMessage(" 去完成 "), - "quxiao" : MessageLookupByLibrary.simpleMessage("取消"), - "quxiaodingdan" : MessageLookupByLibrary.simpleMessage("取消订单"), - "quxiaozhifu" : MessageLookupByLibrary.simpleMessage("取消支付"), - "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), - "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"), - "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"), - "ren" : m27, - "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任务中心"), - "resend_in_seconds" : m28, - "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), - "ruhedihuanjifen" : MessageLookupByLibrary.simpleMessage("如何兑换积分"), - "ruhedihuanjifen1" : MessageLookupByLibrary.simpleMessage("点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~"), - "ruhelingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("如何领取优惠券?"), - "ruhelingquyouhuiquan1" : MessageLookupByLibrary.simpleMessage("点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~"), - "ruheqiandao" : MessageLookupByLibrary.simpleMessage("如何签到?"), - "ruheqiandao1" : MessageLookupByLibrary.simpleMessage("1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。"), - "ruxutuikuanqingyumendianlianxi" : MessageLookupByLibrary.simpleMessage("如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系"), - "saoma" : MessageLookupByLibrary.simpleMessage("扫码"), - "saomadiancan" : MessageLookupByLibrary.simpleMessage("您即将进行扫码点餐"), - "saomashibieguanzhugongzonghao" : MessageLookupByLibrary.simpleMessage("扫码识别,关注公众号"), - "send_code" : MessageLookupByLibrary.simpleMessage("发送验证码"), - "shanchu" : MessageLookupByLibrary.simpleMessage("删除"), - "shanchudingdan" : MessageLookupByLibrary.simpleMessage("删除一单"), - "shanghuruzhu" : MessageLookupByLibrary.simpleMessage("商户入驻"), - "shangjiaquan" : MessageLookupByLibrary.simpleMessage("商家券"), - "shangjiaqueren" : MessageLookupByLibrary.simpleMessage("商家确认"), - "shangjiayifahuo" : MessageLookupByLibrary.simpleMessage("商家已发货"), - "shangjiazhengzaipeican" : MessageLookupByLibrary.simpleMessage("商家正在配餐"), - "shanglajiazai" : MessageLookupByLibrary.simpleMessage("上拉加载"), - "shangpincaigou" : MessageLookupByLibrary.simpleMessage("商品采购"), - "shangpinjifen" : m29, - "shangpinxiangqing" : MessageLookupByLibrary.simpleMessage("商品详情"), - "shangyidengji" : MessageLookupByLibrary.simpleMessage("上一等级"), - "shenghuoyule" : MessageLookupByLibrary.simpleMessage("生活娱乐"), - "shengxianzhaipei" : MessageLookupByLibrary.simpleMessage("生鲜宅配"), - "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘积分大礼"), - "shenqingtuikuan" : MessageLookupByLibrary.simpleMessage("申请退款"), - "shezhi" : MessageLookupByLibrary.simpleMessage("设置"), - "shifangjiazaigengduo" : MessageLookupByLibrary.simpleMessage("释放加载更多"), - "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("释放刷新"), - "shifujifen" : m30, - "shifujihuanka" : m31, - "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("实名认证"), - "shixiaoquan" : MessageLookupByLibrary.simpleMessage("失效券"), - "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongbangzhu" : MessageLookupByLibrary.simpleMessage("使用帮助"), - "shiyongmendian" : MessageLookupByLibrary.simpleMessage("适用门店"), - "shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"), - "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), - "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), - "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"), - "shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"), - "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"), - "shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"), - "shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("请输入收货人手机号"), - "shouhuorenxiangxidizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人详细地址"), - "shouhuorenxingming" : MessageLookupByLibrary.simpleMessage("请输入收货人姓名"), - "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), - "shouqi" : MessageLookupByLibrary.simpleMessage("收起"), - "shouye" : MessageLookupByLibrary.simpleMessage("首页"), - "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), - "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), - "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), - "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), - "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), - "shuliang" : MessageLookupByLibrary.simpleMessage("数量"), - "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), - "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), - "sui" : m32, - "tangshi" : MessageLookupByLibrary.simpleMessage("堂食"), - "tebieshengming" : MessageLookupByLibrary.simpleMessage("特别声明"), - "tehuizhuanqu" : MessageLookupByLibrary.simpleMessage("特惠专区"), - "tianjiaxinfuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tianjifuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tiantiandefuli" : MessageLookupByLibrary.simpleMessage("天天得福利"), - "tiantianlingjifen" : MessageLookupByLibrary.simpleMessage("天天领积分"), - "tijiao" : MessageLookupByLibrary.simpleMessage("提交"), - "tijiaochenggong" : MessageLookupByLibrary.simpleMessage("提交成功"), - "tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"), - "tixian" : MessageLookupByLibrary.simpleMessage("提现"), - "tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"), - "tongzhi" : MessageLookupByLibrary.simpleMessage("通知"), - "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), - "toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投书须知"), - "touxiang" : MessageLookupByLibrary.simpleMessage("头像"), - "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), - "tuiguangma" : MessageLookupByLibrary.simpleMessage("推广码"), - "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), - "waidai" : MessageLookupByLibrary.simpleMessage("外带"), - "waimai" : MessageLookupByLibrary.simpleMessage("外卖"), - "waimaipeisong" : MessageLookupByLibrary.simpleMessage("外卖配送"), - "waisong" : MessageLookupByLibrary.simpleMessage("外送"), - "wan" : MessageLookupByLibrary.simpleMessage("玩"), - "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m33, - "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"), - "wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"), - "wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"), - "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), - "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), - "weidenglu" : MessageLookupByLibrary.simpleMessage("未登录"), - "weidengluxinxi" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), - "weihexiao" : MessageLookupByLibrary.simpleMessage("未核销"), - "weikaiqi" : MessageLookupByLibrary.simpleMessage("未开启"), - "weilegeiningenghaodefuwu" : MessageLookupByLibrary.simpleMessage("为了给您提供更好的服务,以及享受更加精彩的信息内容,请您在使用期间,进行登录"), - "weilejishishoudaohuodongxiaoxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), - "weilekaipaizhaoxuanzhetouxiang" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), - "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), - "weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), - "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), - "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), - "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), - "wentijian" : MessageLookupByLibrary.simpleMessage("问题件"), - "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), - "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"), - "wenzhangzhuanlan" : MessageLookupByLibrary.simpleMessage("文章专栏"), - "weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"), - "wodechengjiu" : MessageLookupByLibrary.simpleMessage("我的成就"), - "wodedingdan" : MessageLookupByLibrary.simpleMessage("我的订单"), - "wodedongtai" : MessageLookupByLibrary.simpleMessage("我的动态"), - "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), - "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"), - "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"), - "wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍价"), - "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), - "wodenianling" : MessageLookupByLibrary.simpleMessage("我的年龄"), - "wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼团"), - "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"), - "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), - "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), - "wodeyaoqing" : MessageLookupByLibrary.simpleMessage("我的邀请"), - "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀请码"), - "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀请码"), - "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流单号:"), - "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), - "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), - "wuliuzhuangtai" : MessageLookupByLibrary.simpleMessage("物流状态:"), - "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"), - "xiadanshijian_" : m34, - "xiadanzhuanjifen" : MessageLookupByLibrary.simpleMessage("下单赚积分"), - "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), - "xiangce" : MessageLookupByLibrary.simpleMessage("相册"), - "xiangji" : MessageLookupByLibrary.simpleMessage("相机"), - "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), - "xiangqing" : MessageLookupByLibrary.simpleMessage("详情"), - "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("详细地址"), - "xianshangfafang" : MessageLookupByLibrary.simpleMessage("线上发放"), - "xianshangshiyong" : MessageLookupByLibrary.simpleMessage("线上使用"), - "xianxiashiyong" : MessageLookupByLibrary.simpleMessage("线下使用"), - "xiaofei" : MessageLookupByLibrary.simpleMessage("消费"), - "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), - "xiaofeijihuanka" : MessageLookupByLibrary.simpleMessage("消费集换卡"), - "xiaofeijilu" : MessageLookupByLibrary.simpleMessage("消费记录"), - "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), - "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等级"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加载完成"), - "xiedongtai" : MessageLookupByLibrary.simpleMessage("写动态"), - "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("海峡姐妹用户隐私政策"), - "xihuan_" : m35, - "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活动"), - "xingming" : MessageLookupByLibrary.simpleMessage("姓名"), - "xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系统通知"), - "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"), - "xiugai" : MessageLookupByLibrary.simpleMessage("修改"), - "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), - "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), - "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), - "xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"), - "xuanji" : MessageLookupByLibrary.simpleMessage("选集"), - "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), - "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), - "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"), - "xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"), - "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"), - "xuni" : MessageLookupByLibrary.simpleMessage("虚拟"), - "yanzhengma" : MessageLookupByLibrary.simpleMessage("验证码"), - "yaoqinghaoyou" : MessageLookupByLibrary.simpleMessage("邀请好友"), - "yaoqinghaoyoudefen" : MessageLookupByLibrary.simpleMessage("邀请好友得分"), - "yaoqingrenshoujihao_" : m36, - "yaoqingwancheng" : MessageLookupByLibrary.simpleMessage("邀请完成"), - "yibangfuka" : MessageLookupByLibrary.simpleMessage("已绑副卡"), - "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"), - "yiduihuanjian" : m37, - "yifahuo" : MessageLookupByLibrary.simpleMessage("已发货"), - "yiguanzhu" : MessageLookupByLibrary.simpleMessage("已关注"), - "yihouzaishuo" : MessageLookupByLibrary.simpleMessage("以后再说"), - "yihuide" : MessageLookupByLibrary.simpleMessage("已获得"), - "yihujiaoqishou" : MessageLookupByLibrary.simpleMessage("已呼叫骑手"), - "yikaitongzidongxufei" : MessageLookupByLibrary.simpleMessage("已开通自动续费"), - "yikexiao" : MessageLookupByLibrary.simpleMessage("已核销"), - "yilingqu" : MessageLookupByLibrary.simpleMessage("已领取"), - "yindao1" : MessageLookupByLibrary.simpleMessage("新增多项功能,海量优惠资讯实时推送"), - "yindao2" : MessageLookupByLibrary.simpleMessage("新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停"), - "yindao3" : MessageLookupByLibrary.simpleMessage("新增会员任务得积分,消费可得绿金、积分商城换购"), - "yindao4" : MessageLookupByLibrary.simpleMessage("传递友爱纯净健康有机环保智慧理念"), - "yindaoye1" : MessageLookupByLibrary.simpleMessage("会员最新资讯抢先看"), - "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), - "yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"), - "yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), - "yingwen" : MessageLookupByLibrary.simpleMessage("英文"), - "yingyeshijian" : m38, - "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), - "yinshi" : MessageLookupByLibrary.simpleMessage("饮食"), - "yinsishengming" : MessageLookupByLibrary.simpleMessage("隐私声明"), - "yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隐私协议》"), - "yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感谢您使用海峡姐妹APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读海峡姐妹"), - "yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"), - "yinzhang" : MessageLookupByLibrary.simpleMessage("印章"), - "yiqiandao" : MessageLookupByLibrary.simpleMessage("已签到"), - "yiqianshou" : MessageLookupByLibrary.simpleMessage("已签收"), - "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), - "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), - "yishixiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiyong" : MessageLookupByLibrary.simpleMessage("已使用"), - "yishouquan" : MessageLookupByLibrary.simpleMessage("已授权"), - "yisongda" : MessageLookupByLibrary.simpleMessage("已送达"), - "yituikuan" : MessageLookupByLibrary.simpleMessage("已退款"), - "yiwancheng" : MessageLookupByLibrary.simpleMessage(" 已完成 "), - "yiwanchengdingdan" : MessageLookupByLibrary.simpleMessage("已完成订单"), - "yixianghuiyuanquanyi" : MessageLookupByLibrary.simpleMessage("已享会员权益"), - "yixiansquanbupinglun" : MessageLookupByLibrary.simpleMessage("-已显示全部评论-"), - "yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "yiyoujifen" : MessageLookupByLibrary.simpleMessage("已有积分"), - "yizhifu" : MessageLookupByLibrary.simpleMessage("已支付"), - "yonghuming" : MessageLookupByLibrary.simpleMessage("用户名"), - "yonghuxiaofeijifen" : MessageLookupByLibrary.simpleMessage("用户每消费1元可获得1个积分。"), - "youhuiquan" : MessageLookupByLibrary.simpleMessage("优惠券"), - "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), - "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), - "youkedenglu" : MessageLookupByLibrary.simpleMessage("游客登录"), - "youxiaoqi" : m39, - "youxiaoqixian" : MessageLookupByLibrary.simpleMessage("有效期限:"), - "youxiaoqizhi" : m40, - "yuan" : MessageLookupByLibrary.simpleMessage("元"), - "yuan_" : m41, - "yuanjia" : MessageLookupByLibrary.simpleMessage("原价"), - "yue" : MessageLookupByLibrary.simpleMessage("余额"), - "yue_" : m42, - "yue__" : m43, - "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), - "yuliudianhua" : MessageLookupByLibrary.simpleMessage("预留电话"), - "yunfei" : MessageLookupByLibrary.simpleMessage("运费"), - "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), - "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"), - "zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"), - "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"), - "zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"), - "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("暂未解锁"), - "zanweikaifang" : MessageLookupByLibrary.simpleMessage("暂未开放"), - "zanweikaitong" : MessageLookupByLibrary.simpleMessage("暂未开通"), - "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), - "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"), - "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), - "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("账号安全"), - "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), - "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("账号信息"), - "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("账号与安全"), - "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("账号注销说明"), - "zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"), - "zhankai" : MessageLookupByLibrary.simpleMessage("展开"), - "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), - "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"), - "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加载中..."), - "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致电门店"), - "zhifubao" : MessageLookupByLibrary.simpleMessage("支付宝"), - "zhifubaozhifu" : MessageLookupByLibrary.simpleMessage("支付宝支付"), - "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), - "zhifuxiangqing" : MessageLookupByLibrary.simpleMessage("支付详情"), - "zhizunhuiyuan" : MessageLookupByLibrary.simpleMessage("至尊会员"), - "zhizuowancheng" : MessageLookupByLibrary.simpleMessage("制作完成"), - "zhongchakan" : MessageLookupByLibrary.simpleMessage("中查看"), - "zhongwenjianti" : MessageLookupByLibrary.simpleMessage("简体中文"), - "zhuanlan" : MessageLookupByLibrary.simpleMessage("专栏"), - "zhuanxiangyouhuiquan" : MessageLookupByLibrary.simpleMessage("专享优惠券"), - "zhunong1" : MessageLookupByLibrary.simpleMessage("爱在回乡 快乐助农"), - "zhunongjifen" : MessageLookupByLibrary.simpleMessage("助农积分"), - "zhunongzhuanqu" : MessageLookupByLibrary.simpleMessage("助农专区"), - "zhuxiaotixing" : MessageLookupByLibrary.simpleMessage("再次提醒:注销帐号后不可恢复,相关数据和信息会永久删除。"), - "zhuxiaozhanghao" : MessageLookupByLibrary.simpleMessage("注销账号"), - "ziqu" : MessageLookupByLibrary.simpleMessage("自取"), - "ziti" : MessageLookupByLibrary.simpleMessage("自提"), - "zitidizhi" : MessageLookupByLibrary.simpleMessage("自提地址"), - "zitiduihuanquan" : MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), - "zitishijian" : MessageLookupByLibrary.simpleMessage("自提时间"), - "zongzichan" : MessageLookupByLibrary.simpleMessage("总资产"), - "zongzichanyuan" : MessageLookupByLibrary.simpleMessage("总资产(元)"), - "zuanshihuiyuan" : MessageLookupByLibrary.simpleMessage("钻石会员"), - "zuixinwenzhang" : MessageLookupByLibrary.simpleMessage("最新文章"), - "zuorenwudejifen" : MessageLookupByLibrary.simpleMessage("做任务得积分"), - "zuozhe" : m44 - }; + static Map _notInlinedMessages(_) => { + "bainianchuanjiao": MessageLookupByLibrary.simpleMessage("百年川椒"), + "baiyin": MessageLookupByLibrary.simpleMessage("白银"), + "baiyinhuiyuan": MessageLookupByLibrary.simpleMessage("白银会员"), + "banben": m0, + "bangdingfuka": MessageLookupByLibrary.simpleMessage("绑定副卡"), + "bangdingshouji": MessageLookupByLibrary.simpleMessage("绑定手机"), + "bangong": MessageLookupByLibrary.simpleMessage("办公"), + "bangzhuyufankui": MessageLookupByLibrary.simpleMessage("帮助与反馈"), + "baocun": MessageLookupByLibrary.simpleMessage("保存"), + "baocunchenggong": MessageLookupByLibrary.simpleMessage("保存成功"), + "baocunsaoma": MessageLookupByLibrary.simpleMessage( + "截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), + "beiyaoqingdejiangli": MessageLookupByLibrary.simpleMessage( + "每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), + "beizhu": MessageLookupByLibrary.simpleMessage("备注"), + "beizhuxinxi": MessageLookupByLibrary.simpleMessage("备注信息"), + "benzhouquanbao": MessageLookupByLibrary.simpleMessage("本周券包"), + "bianjidizhi": MessageLookupByLibrary.simpleMessage("编辑地址"), + "bianjigerenziliao": MessageLookupByLibrary.simpleMessage("编辑个人资料"), + "biaojiweiyidu": MessageLookupByLibrary.simpleMessage("标为已读"), + "biaoweiyidu": MessageLookupByLibrary.simpleMessage("标为已读"), + "bodadianhua": MessageLookupByLibrary.simpleMessage("拨打电话"), + "bofangcishu": MessageLookupByLibrary.simpleMessage("播放次数"), + "bojin": MessageLookupByLibrary.simpleMessage("铂金"), + "brand_yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "buzhichikaipiao": MessageLookupByLibrary.simpleMessage("不支持开票"), + "canyingfuwu": MessageLookupByLibrary.simpleMessage("餐饮服务"), + "chakan": MessageLookupByLibrary.simpleMessage("查看"), + "chakangengduo": MessageLookupByLibrary.simpleMessage("查看更多"), + "chakanhexiaoma": MessageLookupByLibrary.simpleMessage("查看核销码"), + "chakanquanyi": MessageLookupByLibrary.simpleMessage("查看权益"), + "chakanshixiaoquan": MessageLookupByLibrary.simpleMessage("查看失效券"), + "chakanwodekabao": MessageLookupByLibrary.simpleMessage("查看我的卡包"), + "chakanwodekaquan": MessageLookupByLibrary.simpleMessage("查看我的卡券"), + "chakanwuliu": MessageLookupByLibrary.simpleMessage("查看物流"), + "chakanxiangqing": MessageLookupByLibrary.simpleMessage("查看详情"), + "changjianwenti": MessageLookupByLibrary.simpleMessage("常见问题"), + "changqiyouxiao": MessageLookupByLibrary.simpleMessage("长期有效"), + "chaojiyouhuiquan": MessageLookupByLibrary.simpleMessage("超值优惠券"), + "chaungshirengushi": MessageLookupByLibrary.simpleMessage("创始人故事"), + "chenggongdengluzhuce": + MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), + "chengjiu": MessageLookupByLibrary.simpleMessage("成就"), + "chengjiuhuizhang": MessageLookupByLibrary.simpleMessage("成就徽章"), + "chengshixuanze": MessageLookupByLibrary.simpleMessage("城市选择"), + "chengweidianpuzhuanshuhuiyuan": + MessageLookupByLibrary.simpleMessage("成为店铺专属会员,享专属权益"), + "chi": MessageLookupByLibrary.simpleMessage("吃"), + "chijiankang": MessageLookupByLibrary.simpleMessage("吃健康"), + "chongzhi": MessageLookupByLibrary.simpleMessage("充值"), + "chongzhichenggong": MessageLookupByLibrary.simpleMessage("充值成功"), + "chongzhifuliduo": MessageLookupByLibrary.simpleMessage("充值福利多"), + "chongzhixiaoxi": MessageLookupByLibrary.simpleMessage("充值消息"), + "chongzhizuixiaojine": m1, + "chuangjianshijian": m2, + "chuangshirendegushi": MessageLookupByLibrary.simpleMessage("创始人的故事-"), + "chuangshirendegushi1": MessageLookupByLibrary.simpleMessage("创始人的故事"), + "chuzhiyouhui": MessageLookupByLibrary.simpleMessage("储值优惠"), + "code_error": MessageLookupByLibrary.simpleMessage("验证码输入错误"), + "cunchu": MessageLookupByLibrary.simpleMessage("存储"), + "cunchutishixinxi": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), + "dabaodaodianqu": MessageLookupByLibrary.simpleMessage("打包到店取"), + "daifukuan": MessageLookupByLibrary.simpleMessage("待付款"), + "daipeisong": MessageLookupByLibrary.simpleMessage("待配送"), + "daiqucan": MessageLookupByLibrary.simpleMessage("待取餐"), + "daiqueren": MessageLookupByLibrary.simpleMessage("待确认"), + "daizhifu": MessageLookupByLibrary.simpleMessage("待支付"), + "daizhizuo": MessageLookupByLibrary.simpleMessage("待制作"), + "dajiadouzaiduihuan": MessageLookupByLibrary.simpleMessage("大家都在兑换"), + "dakaidingwei": MessageLookupByLibrary.simpleMessage("打开定位"), + "dangqianbanben": MessageLookupByLibrary.simpleMessage("当前版本"), + "dangqiandengji": MessageLookupByLibrary.simpleMessage("当前等级"), + "dangqianjifen": MessageLookupByLibrary.simpleMessage("当前积分:"), + "dangqianshangpinduihuanhexiaoma": + MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), + "dangqianzhukadengji": MessageLookupByLibrary.simpleMessage("当前主卡等级"), + "daodianziqu": MessageLookupByLibrary.simpleMessage("到店自取"), + "daopinglunliebiaodingbu": + MessageLookupByLibrary.simpleMessage("到评论列表顶部"), + "daoxiayidengji": MessageLookupByLibrary.simpleMessage("到下一等级"), + "dengdaishangjiaqueren": MessageLookupByLibrary.simpleMessage("等待商家确认"), + "dengdaiyonghuqucan": MessageLookupByLibrary.simpleMessage("等待用户取餐"), + "denglu": MessageLookupByLibrary.simpleMessage("登录"), + "diancan": MessageLookupByLibrary.simpleMessage("点餐"), + "diandan": MessageLookupByLibrary.simpleMessage("点单"), + "dianhua": MessageLookupByLibrary.simpleMessage("电话"), + "dianjidenglu": MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), + "dianneiyongcan": MessageLookupByLibrary.simpleMessage("店内用餐"), + "dianpuchongzhi": MessageLookupByLibrary.simpleMessage("店铺充值"), + "dianputuijian": MessageLookupByLibrary.simpleMessage("店铺推荐"), + "dianpuyue": MessageLookupByLibrary.simpleMessage("店铺余额"), + "dianwolingqu": MessageLookupByLibrary.simpleMessage("点我领取"), + "dianzan": MessageLookupByLibrary.simpleMessage("点赞"), + "dianzanxihuan_": m3, + "dingdan": MessageLookupByLibrary.simpleMessage("订单"), + "dingdanbianhao": MessageLookupByLibrary.simpleMessage("订单编号"), + "dingdandaifahuo": MessageLookupByLibrary.simpleMessage("订单待发货"), + "dingdandaizhifu": MessageLookupByLibrary.simpleMessage("订单待支付"), + "dingdangenzong": MessageLookupByLibrary.simpleMessage("订单跟踪"), + "dingdanhao": MessageLookupByLibrary.simpleMessage("订单号"), + "dingdanjiesuan": MessageLookupByLibrary.simpleMessage("订单结算"), + "dingdanqueren": MessageLookupByLibrary.simpleMessage("订单确认"), + "dingdantongzhi": MessageLookupByLibrary.simpleMessage("订单通知"), + "dingdanxiaoxi": MessageLookupByLibrary.simpleMessage("订单消息"), + "dingdanyisongda": MessageLookupByLibrary.simpleMessage("订单送达"), + "dingdanyituikuan": MessageLookupByLibrary.simpleMessage("订单已退款"), + "dingdanyiwancheng": MessageLookupByLibrary.simpleMessage("订单已完成"), + "dingdanyizhifu": MessageLookupByLibrary.simpleMessage("订单已支付"), + "dingwei": MessageLookupByLibrary.simpleMessage("定位"), + "dizhi": MessageLookupByLibrary.simpleMessage("地址"), + "dongtai": MessageLookupByLibrary.simpleMessage("动态"), + "dongtaitishi": MessageLookupByLibrary.simpleMessage( + "用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示"), + "dongtaixiangqing": MessageLookupByLibrary.simpleMessage("动态详情"), + "duihuan": MessageLookupByLibrary.simpleMessage("兑换"), + "duihuanchenggong": MessageLookupByLibrary.simpleMessage("兑换成功"), + "duihuanguize": MessageLookupByLibrary.simpleMessage("兑换规则"), + "duihuanhoufahuo": MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), + "duihuanhouwugegongzuori": + MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), + "duihuanliangdidaogao": MessageLookupByLibrary.simpleMessage("兑换量从低到高"), + "duihuanlianggaodaodi": MessageLookupByLibrary.simpleMessage("兑换量从高到低"), + "duihuanlishi": MessageLookupByLibrary.simpleMessage("兑换历史"), + "duihuanquan": MessageLookupByLibrary.simpleMessage("兑换券"), + "duihuanshangpinxiangqing": + MessageLookupByLibrary.simpleMessage("兑换商品详情"), + "duihuanxinxi": MessageLookupByLibrary.simpleMessage("兑换信息"), + "duozhongyouhui": MessageLookupByLibrary.simpleMessage("多种优惠券等你拿"), + "fabu": MessageLookupByLibrary.simpleMessage("发布"), + "fangshier": MessageLookupByLibrary.simpleMessage("方式二"), + "fangshiyi": MessageLookupByLibrary.simpleMessage("方式一"), + "fanhuiduihuanlishi": MessageLookupByLibrary.simpleMessage("返回兑换历史"), + "fanhuishequn": MessageLookupByLibrary.simpleMessage("返回社群"), + "fanhuishouye": MessageLookupByLibrary.simpleMessage("返回首页"), + "fankui": MessageLookupByLibrary.simpleMessage("反馈"), + "fankuilizi": + MessageLookupByLibrary.simpleMessage("您可以在这里输入反馈内容,例如产品建议,功能异常等"), + "fantizhongwen": MessageLookupByLibrary.simpleMessage("繁体中文"), + "fapiao": MessageLookupByLibrary.simpleMessage("发票"), + "fapiaozhushou": MessageLookupByLibrary.simpleMessage("发票助手"), + "fasong": MessageLookupByLibrary.simpleMessage("发送"), + "fasongduanxin": MessageLookupByLibrary.simpleMessage("发送短信"), + "faxingshijian": m4, + "feishiwuduihuanma": MessageLookupByLibrary.simpleMessage("非实物兑换码"), + "feishiwushangpin": + MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), + "fensi": MessageLookupByLibrary.simpleMessage("粉丝"), + "fenxiang": MessageLookupByLibrary.simpleMessage("分享"), + "fenxiangdao": MessageLookupByLibrary.simpleMessage("分享到"), + "fenxiangjiankang": MessageLookupByLibrary.simpleMessage("分享健康"), + "fenxiangyaoqing": + MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), + "fenxiangyaoqingma": MessageLookupByLibrary.simpleMessage( + "将邀请码分享给好友,对方在海峡姐妹App登录页输入邀请码,即可邀请成功。"), + "fenxiangzhiweixin": MessageLookupByLibrary.simpleMessage("分享至微信"), + "fukashoujihao": MessageLookupByLibrary.simpleMessage("副卡手机号"), + "fuliduihuan": MessageLookupByLibrary.simpleMessage("福利兑换"), + "fulizhongxin": MessageLookupByLibrary.simpleMessage("福利中心"), + "ge": m5, + "geiwopingfen": MessageLookupByLibrary.simpleMessage("给我评分"), + "gengduo": MessageLookupByLibrary.simpleMessage("更多"), + "gengduohaoquan": MessageLookupByLibrary.simpleMessage("更多好券"), + "gengduoyouhuiquan": MessageLookupByLibrary.simpleMessage("更多优惠券"), + "genggaibangdingshoujihao": + MessageLookupByLibrary.simpleMessage("更改绑定手机号"), + "genghuanbeijing": MessageLookupByLibrary.simpleMessage("更换背景"), + "genghuantouxiang": MessageLookupByLibrary.simpleMessage("更换头像"), + "gengyouhui": MessageLookupByLibrary.simpleMessage("更优惠"), + "gerenxinxi": MessageLookupByLibrary.simpleMessage("个人信息"), + "gexingqianming": MessageLookupByLibrary.simpleMessage("个性签名"), + "gong": MessageLookupByLibrary.simpleMessage("共"), + "gongchuanghuiyuan": MessageLookupByLibrary.simpleMessage("共创会员"), + "gongjijian": m6, + "gongjijianshangpin": m7, + "gongli": m8, + "gongxinchengwei": MessageLookupByLibrary.simpleMessage("恭喜您成为"), + "gongxinichengweibendianhuiyuan": + MessageLookupByLibrary.simpleMessage("恭喜您,成为本店的会员,快去享受超多会员权益吧。"), + "gouxuanxieyi": + MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和海峡姐妹服务协议"), + "guanlidizhi": MessageLookupByLibrary.simpleMessage("管理地址"), + "guanyu": MessageLookupByLibrary.simpleMessage("关于"), + "guanyuchuangshiren": MessageLookupByLibrary.simpleMessage("关于创始人"), + "guanyuhuixiang": MessageLookupByLibrary.simpleMessage("关于回乡"), + "guanzhu": MessageLookupByLibrary.simpleMessage("关注"), + "guojiankangyoujishenghuo": + MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "haimeiyouxiaoxi": MessageLookupByLibrary.simpleMessage("还没有消息~"), + "haimeiyouyouhuiquankeyilingqu": + MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), + "haixiajiemei": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "haowu": MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize": MessageLookupByLibrary.simpleMessage("好友奖励规则"), + "he": MessageLookupByLibrary.simpleMessage("喝"), + "heji": MessageLookupByLibrary.simpleMessage("合计:"), + "hejiankang": MessageLookupByLibrary.simpleMessage("喝健康"), + "hexiaochenggong": MessageLookupByLibrary.simpleMessage("核销成功"), + "hexiaomaxiangqing": MessageLookupByLibrary.simpleMessage("核销码详情"), + "huangjin": MessageLookupByLibrary.simpleMessage("黄金"), + "huangjinhuiyuan": MessageLookupByLibrary.simpleMessage("黄金会员"), + "huifu": MessageLookupByLibrary.simpleMessage("回复"), + "huifu_": m9, + "huixiangVIPka": MessageLookupByLibrary.simpleMessage("回乡VIP卡"), + "huixiangqianbao": MessageLookupByLibrary.simpleMessage("海峡钱包"), + "huixiangrenyimendian": + MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), + "huixiangtoutiao": MessageLookupByLibrary.simpleMessage("回乡头条"), + "huixiangvipkazhuanxiang": + MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"), + "huixiangxieyi": MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"), + "huiyuandengji": MessageLookupByLibrary.simpleMessage("会员等级"), + "huiyuandengjishuoming": MessageLookupByLibrary.simpleMessage("会员等级说明"), + "huiyuanguize": MessageLookupByLibrary.simpleMessage("会员规则说明"), + "huiyuanhuodejifen": MessageLookupByLibrary.simpleMessage("会员如何获得积分"), + "huiyuanjia": MessageLookupByLibrary.simpleMessage("会员价"), + "huiyuanjibieduizhao": MessageLookupByLibrary.simpleMessage("会员级别对照表"), + "huiyuanjifen": MessageLookupByLibrary.simpleMessage("会员积分"), + "huiyuanka": MessageLookupByLibrary.simpleMessage("会员卡"), + "huiyuankaxiangqing": MessageLookupByLibrary.simpleMessage("会员卡详情"), + "huiyuanma": MessageLookupByLibrary.simpleMessage("会员码"), + "huiyuanquanyi": MessageLookupByLibrary.simpleMessage("会员权益"), + "huiyuanyue": MessageLookupByLibrary.simpleMessage("会员余额"), + "huiyuanzhongxin": MessageLookupByLibrary.simpleMessage("会员中心"), + "huiyuanzhuanxiangjiage": + MessageLookupByLibrary.simpleMessage("会员专享价格"), + "huode": MessageLookupByLibrary.simpleMessage("获得"), + "huodequanyi": MessageLookupByLibrary.simpleMessage("获得权益"), + "huodong": MessageLookupByLibrary.simpleMessage("活动"), + "huodongguize": MessageLookupByLibrary.simpleMessage("活动规则"), + "huodongjianmianpeisongfei": m10, + "huodongjinxingzhong": MessageLookupByLibrary.simpleMessage("活动进行中"), + "huodongliebiao": MessageLookupByLibrary.simpleMessage("活动列表"), + "huodongyue": MessageLookupByLibrary.simpleMessage("活动余额"), + "huodongyue_": m11, + "huodongzixun": MessageLookupByLibrary.simpleMessage("活动资讯"), + "huopinyisongda": MessageLookupByLibrary.simpleMessage("货品已送达"), + "huozan": MessageLookupByLibrary.simpleMessage("获赞"), + "input_code": MessageLookupByLibrary.simpleMessage("手机验证码"), + "input_code_hide": MessageLookupByLibrary.simpleMessage("请输入验证码"), + "input_invite_code_hide": MessageLookupByLibrary.simpleMessage("填写邀请码"), + "input_phone": MessageLookupByLibrary.simpleMessage("输入手机号"), + "input_phone_hide": MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "invite_code_error": MessageLookupByLibrary.simpleMessage("邀请码输入错误"), + "jiajifen": m12, + "jian": MessageLookupByLibrary.simpleMessage("件"), + "jiangli": MessageLookupByLibrary.simpleMessage("奖励"), + "jiangshi": MessageLookupByLibrary.simpleMessage("讲师"), + "jianjie": m13, + "jiazaishibai": MessageLookupByLibrary.simpleMessage("加载失败"), + "jiesuan": MessageLookupByLibrary.simpleMessage("结算"), + "jiesuanjine": MessageLookupByLibrary.simpleMessage("结算金额"), + "jifen": MessageLookupByLibrary.simpleMessage("积分"), + "jifen_": m14, + "jifenbuzu": MessageLookupByLibrary.simpleMessage("您的积分不足"), + "jifendaoxiayidengji": m15, + "jifendejisuanshuoming": + MessageLookupByLibrary.simpleMessage("积分的计算说明"), + "jifendidaogao": MessageLookupByLibrary.simpleMessage("积分从低到高"), + "jifengaodaodi": MessageLookupByLibrary.simpleMessage("积分从高到低"), + "jifenhuanquan": MessageLookupByLibrary.simpleMessage("积分换券"), + "jifenmingxi": MessageLookupByLibrary.simpleMessage("积分明细"), + "jifenshangcheng": MessageLookupByLibrary.simpleMessage("积分商城"), + "jifenxiangqing": MessageLookupByLibrary.simpleMessage("积分详情"), + "jihuanka": MessageLookupByLibrary.simpleMessage("集换卡"), + "jingbilianmenghuiyuandian": + MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), + "jingxuanhaowen": MessageLookupByLibrary.simpleMessage("精选好文"), + "jingxuanhuodong": MessageLookupByLibrary.simpleMessage("精选活动"), + "jinkahuiyuan": MessageLookupByLibrary.simpleMessage("金卡会员"), + "jinrihuiyuanrenwu": MessageLookupByLibrary.simpleMessage("今日会员任务"), + "jinrushangdian": MessageLookupByLibrary.simpleMessage("进入商店"), + "jinruzhuanqu": MessageLookupByLibrary.simpleMessage("进入专区"), + "jinxingbangdingfuka": MessageLookupByLibrary.simpleMessage("进行绑定副卡"), + "jinxingfukabangding": MessageLookupByLibrary.simpleMessage("进行副卡绑定"), + "jinxingzhanghaozhuxiao": + MessageLookupByLibrary.simpleMessage("进行账号注销"), + "jinxingzhongdedingdan": MessageLookupByLibrary.simpleMessage("进行中的订单"), + "jituanchuangbanren": MessageLookupByLibrary.simpleMessage(" 集团创办人"), + "jituanchuangshiren": MessageLookupByLibrary.simpleMessage("集团创始人"), + "jixuduihuan": MessageLookupByLibrary.simpleMessage("继续兑换"), + "jixuzhifu": MessageLookupByLibrary.simpleMessage("继续支付"), + "jubao": MessageLookupByLibrary.simpleMessage("举报"), + "jubaogaineirong": MessageLookupByLibrary.simpleMessage("举报该内容"), + "jubaotishi": MessageLookupByLibrary.simpleMessage( + "您的举报正在等待人工审核,我们会在7~15个工作日处理,处理结果可在"), + "jubaoyuanyin": + MessageLookupByLibrary.simpleMessage("请输入举报原因,以便我们更快定位问题,快速处理"), + "jujue": MessageLookupByLibrary.simpleMessage("拒绝"), + "kabao": MessageLookupByLibrary.simpleMessage("卡包"), + "kabaokeshiyong": MessageLookupByLibrary.simpleMessage("卡包-可使用"), + "kaiqiquanxian": MessageLookupByLibrary.simpleMessage("开启权限"), + "kaitonghuixianghuoququanyi": + MessageLookupByLibrary.simpleMessage("开通回乡VIP卡获取更多权益"), + "kaitongriqi": m16, + "kaquan": MessageLookupByLibrary.simpleMessage("卡券"), + "kelingqudeyouhuiquan": MessageLookupByLibrary.simpleMessage("可领取的优惠券"), + "keshiyong": MessageLookupByLibrary.simpleMessage("可使用"), + "keyongjifen": MessageLookupByLibrary.simpleMessage("可用积分"), + "keyongquan": MessageLookupByLibrary.simpleMessage("可用券"), + "keyongyouhuiquan": MessageLookupByLibrary.simpleMessage("可用优惠券"), + "keyongyue": MessageLookupByLibrary.simpleMessage("可用余额"), + "kongtiao": MessageLookupByLibrary.simpleMessage("空调"), + "kuaidi": MessageLookupByLibrary.simpleMessage("快递"), + "kuaidiwuliu": MessageLookupByLibrary.simpleMessage("快递物流"), + "kuailezhunong": MessageLookupByLibrary.simpleMessage("快乐助农"), + "lianxikefu": MessageLookupByLibrary.simpleMessage("联系客服"), + "lianxishoujihao": MessageLookupByLibrary.simpleMessage("联系手机号"), + "lianxuqiandaolingqushuangbeijifen": + MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), + "liaojie": MessageLookupByLibrary.simpleMessage("了解"), + "liaojiejiankang": MessageLookupByLibrary.simpleMessage("了解健康"), + "lijicanjia": MessageLookupByLibrary.simpleMessage("立即参加"), + "lijichongzhi": MessageLookupByLibrary.simpleMessage("立即充值"), + "lijigengxin": MessageLookupByLibrary.simpleMessage("立即更新"), + "lijikaitong": MessageLookupByLibrary.simpleMessage("立即开通"), + "lijilingqu": MessageLookupByLibrary.simpleMessage("立即领取"), + "lijiqiandao": MessageLookupByLibrary.simpleMessage("立即签到"), + "lijishiyong": MessageLookupByLibrary.simpleMessage("立即使用"), + "lijitiyan": MessageLookupByLibrary.simpleMessage("立即体验"), + "lijiyuyue": MessageLookupByLibrary.simpleMessage("立即预约"), + "likekaitong": MessageLookupByLibrary.simpleMessage("立刻开通"), + "likexufei": MessageLookupByLibrary.simpleMessage("立刻续费"), + "likezhifu": MessageLookupByLibrary.simpleMessage("立刻支付"), + "lingqu": MessageLookupByLibrary.simpleMessage("领取"), + "lingquanzhongxin": MessageLookupByLibrary.simpleMessage("领券中心"), + "lingquchenggong": MessageLookupByLibrary.simpleMessage("领取成功"), + "lingqudaokabao": MessageLookupByLibrary.simpleMessage("领取到卡包"), + "lingqufangshi": MessageLookupByLibrary.simpleMessage("领取方式"), + "lingqushijian": m17, + "linian": MessageLookupByLibrary.simpleMessage("理念"), + "lishijilu": MessageLookupByLibrary.simpleMessage("历史记录"), + "liuxianinjingcaidepinglunba": + MessageLookupByLibrary.simpleMessage("留下您精彩的评论吧"), + "login": MessageLookupByLibrary.simpleMessage("登录"), + "login_splash": MessageLookupByLibrary.simpleMessage("欢迎来到海峡姐妹"), + "lvbiyue": MessageLookupByLibrary.simpleMessage("绿币余额"), + "lvbiyue_": m18, + "lvbizhifu": MessageLookupByLibrary.simpleMessage("绿币支付"), + "main_menu1": MessageLookupByLibrary.simpleMessage("首页"), + "main_menu2": MessageLookupByLibrary.simpleMessage("门店"), + "main_menu3": MessageLookupByLibrary.simpleMessage("社群"), + "main_menu4": MessageLookupByLibrary.simpleMessage("我的"), + "main_menu5": MessageLookupByLibrary.simpleMessage("hi"), + "manlijiandaijinquan": m19, + "manyuankeyong": m20, + "meiriqiandao": MessageLookupByLibrary.simpleMessage("每日签到"), + "meiyougengduohuiyuanka": + MessageLookupByLibrary.simpleMessage("没有更多会员卡"), + "meiyougengduoshujule": + MessageLookupByLibrary.simpleMessage("没有更多的数据了"), + "meiyougengduoyouhuiquan": + MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), + "meizhousangengxin": MessageLookupByLibrary.simpleMessage("每周三更新"), + "meizhousanquanbao": MessageLookupByLibrary.simpleMessage("每周三更新劵包"), + "mendianxuanzhe": MessageLookupByLibrary.simpleMessage("门店选择"), + "mendianyue": MessageLookupByLibrary.simpleMessage("门店余额"), + "menpaihao": MessageLookupByLibrary.simpleMessage("请输入门牌号"), + "mi": m21, + "mingxi": MessageLookupByLibrary.simpleMessage("明细"), + "morenpaixu": MessageLookupByLibrary.simpleMessage("默认排序"), + "muqianwujilu": MessageLookupByLibrary.simpleMessage("目前暂未记录哦"), + "muqianzanwuxingdianhuodong": + MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), + "nihaimeiyouchongzhihuoxiaofeijilu": + MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), + "nincunchuquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), + "nindingweigongnengweikaiqi": + MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), + "nindingweiquanxianweiyunxu": + MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), + "ninweidenglu": MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), + "ninxiangjiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), + "ninxiaoxiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), + "ninyichenggonglingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("您已成功领取优惠劵,请在"), + "ninyilianxuqiandaotian": m22, + "ninyouyigedingdanyaolingqu": + MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), + "ninyouyigexindedingdan": + MessageLookupByLibrary.simpleMessage("您有一个新的订单"), + "paizhao": MessageLookupByLibrary.simpleMessage("拍照"), + "peisong": MessageLookupByLibrary.simpleMessage("配送"), + "peisongfangshi": MessageLookupByLibrary.simpleMessage("配送方式"), + "peisongfei": MessageLookupByLibrary.simpleMessage("配送费"), + "peisongfuwu": MessageLookupByLibrary.simpleMessage("配送服务"), + "peisongzhong": MessageLookupByLibrary.simpleMessage("配送中"), + "phone_error": MessageLookupByLibrary.simpleMessage("手机格式错误"), + "pinglun": MessageLookupByLibrary.simpleMessage("评论"), + "pinglun_": m23, + "pingtaiyue": MessageLookupByLibrary.simpleMessage("平台余额"), + "pingtaizhifumima": MessageLookupByLibrary.simpleMessage("平台支付密码"), + "pingtaizongyue": m24, + "pinpai": MessageLookupByLibrary.simpleMessage("品牌"), + "pinpaijieshao": MessageLookupByLibrary.simpleMessage("品牌介绍"), + "privacy_policy1": MessageLookupByLibrary.simpleMessage("登录既同意"), + "privacy_policy2": MessageLookupByLibrary.simpleMessage("《海峡姐妹服务协议》"), + "privacy_policy3": MessageLookupByLibrary.simpleMessage("《隐私服务》"), + "privacy_policy4": MessageLookupByLibrary.simpleMessage("并使用本机号码登录"), + "qianbao": MessageLookupByLibrary.simpleMessage("钱包"), + "qiandao": MessageLookupByLibrary.simpleMessage("签到"), + "qiandaodejifen": MessageLookupByLibrary.simpleMessage("签到得积分"), + "qiandaolingjifen": MessageLookupByLibrary.simpleMessage("签到领积分"), + "qiandaolingqujinfen": MessageLookupByLibrary.simpleMessage("签到领取积分"), + "qiandaowancheng": MessageLookupByLibrary.simpleMessage("签到完成"), + "qianjinmaiwei": MessageLookupByLibrary.simpleMessage("前进麦味"), + "qianshou": MessageLookupByLibrary.simpleMessage("已签收"), + "qianwanghuixiangmendianduihuanhexiao": + MessageLookupByLibrary.simpleMessage( + "前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun": MessageLookupByLibrary.simpleMessage("清理缓存"), + "qingshurubeizhuyaoqiu": + MessageLookupByLibrary.simpleMessage("请输入备注要求"), + "qingshuruchongzhijine": + MessageLookupByLibrary.simpleMessage("请输入充值金额"), + "qingshurushoujihao": MessageLookupByLibrary.simpleMessage("请输入手机号"), + "qingshuruyanzhengma": MessageLookupByLibrary.simpleMessage("请输入验证码"), + "qingshuruyaoqingma": MessageLookupByLibrary.simpleMessage("请输入邀请码"), + "qingshuruyouxiaoshoujihaoma": + MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), + "qingshuruzhifumima": MessageLookupByLibrary.simpleMessage("请输入支付密码"), + "qingtianxieshoujihao": + MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), + "qingtianxiexingming": MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), + "qingtong": MessageLookupByLibrary.simpleMessage("青铜"), + "qingtonghuiyuan": MessageLookupByLibrary.simpleMessage("青铜会员"), + "qingxianxuanguige": MessageLookupByLibrary.simpleMessage("请先选规格"), + "qingxuanzeshiyongmendian": + MessageLookupByLibrary.simpleMessage("请选择使用门店"), + "qingxuanzeshouhuodizhi": + MessageLookupByLibrary.simpleMessage("请选择收货地址"), + "qingxuanzeyigemendian": + MessageLookupByLibrary.simpleMessage("请选择一个门店"), + "qingxuanzeyuyeushijian": + MessageLookupByLibrary.simpleMessage("请选择预约时间"), + "qingxuanzeyuyuemendian": + MessageLookupByLibrary.simpleMessage("请选择预约门店"), + "qingxuanzhemendian": MessageLookupByLibrary.simpleMessage("请选择门店"), + "qingxuanzheninxiangshezhideyuyan": + MessageLookupByLibrary.simpleMessage("请选择您想设置的语言"), + "qingzaiguidingshijianneizhifu": + MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"), + "qingzhuo": MessageLookupByLibrary.simpleMessage("清桌"), + "qishoupeisongzhongyujisongdashijian": + MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"), + "qishouyijiedanquhuozhong": + MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"), + "qita": MessageLookupByLibrary.simpleMessage("其他"), + "qiyetuanjian": MessageLookupByLibrary.simpleMessage("企业团建"), + "quanbao": MessageLookupByLibrary.simpleMessage("券包"), + "quanbu": MessageLookupByLibrary.simpleMessage("全部"), + "quanbudingdan": MessageLookupByLibrary.simpleMessage("全部订单"), + "quanbuduihuan": MessageLookupByLibrary.simpleMessage("全部兑换"), + "quanchangtongyong": MessageLookupByLibrary.simpleMessage("全场通用"), + "quanchangzhe": m25, + "quantian": MessageLookupByLibrary.simpleMessage("全天"), + "quanxian": MessageLookupByLibrary.simpleMessage("权限"), + "quanxianshezhi": MessageLookupByLibrary.simpleMessage("权限设置"), + "quanyijishao": MessageLookupByLibrary.simpleMessage("权益介绍"), + "quanyishuoming": MessageLookupByLibrary.simpleMessage("权益说明"), + "quanyixiangqing": MessageLookupByLibrary.simpleMessage("权益详情"), + "qucanhao": MessageLookupByLibrary.simpleMessage("取餐号"), + "qudanhao": m26, + "qudaolaiyuan": MessageLookupByLibrary.simpleMessage("渠道来源"), + "qudenglu": MessageLookupByLibrary.simpleMessage("去登录"), + "queding": MessageLookupByLibrary.simpleMessage("确定"), + "quedingyaoshanchudongtai": + MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), + "queren": MessageLookupByLibrary.simpleMessage("确认"), + "querenbangding": MessageLookupByLibrary.simpleMessage("确认绑定"), + "querenchongzhi": MessageLookupByLibrary.simpleMessage("确认充值"), + "querenduihuan": MessageLookupByLibrary.simpleMessage("确认兑换"), + "querenshouhuo": MessageLookupByLibrary.simpleMessage("确认收货"), + "querenyaoshanchudangqianpinglunma": + MessageLookupByLibrary.simpleMessage("确认要删除当前评论?"), + "querenzhuxiao": MessageLookupByLibrary.simpleMessage("确认注销"), + "quhexiao": MessageLookupByLibrary.simpleMessage("去核销"), + "quhuozhong": MessageLookupByLibrary.simpleMessage("取货中"), + "qujianma": MessageLookupByLibrary.simpleMessage("取件码"), + "quqiandao": MessageLookupByLibrary.simpleMessage("去签到"), + "qushiyong": MessageLookupByLibrary.simpleMessage("去使用"), + "quwancheng": MessageLookupByLibrary.simpleMessage(" 去完成 "), + "quxiao": MessageLookupByLibrary.simpleMessage("取消"), + "quxiaodingdan": MessageLookupByLibrary.simpleMessage("取消订单"), + "quxiaozhifu": MessageLookupByLibrary.simpleMessage("取消支付"), + "quzhifu": MessageLookupByLibrary.simpleMessage("去支付"), + "remenwenzhangshipin": MessageLookupByLibrary.simpleMessage("热门文章视频"), + "remenwenzhangshipinliebiao": + MessageLookupByLibrary.simpleMessage("热门文章视频列表"), + "ren": m27, + "renwuzhongxin": MessageLookupByLibrary.simpleMessage("任务中心"), + "resend_in_seconds": m28, + "ricahngfenxiang": MessageLookupByLibrary.simpleMessage("日常分享"), + "ruhedihuanjifen": MessageLookupByLibrary.simpleMessage("如何兑换积分"), + "ruhedihuanjifen1": MessageLookupByLibrary.simpleMessage( + "点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~"), + "ruhelingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("如何领取优惠券?"), + "ruhelingquyouhuiquan1": MessageLookupByLibrary.simpleMessage( + "点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~"), + "ruheqiandao": MessageLookupByLibrary.simpleMessage("如何签到?"), + "ruheqiandao1": MessageLookupByLibrary.simpleMessage( + "1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。"), + "ruxutuikuanqingyumendianlianxi": MessageLookupByLibrary.simpleMessage( + "如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系"), + "saoma": MessageLookupByLibrary.simpleMessage("扫码"), + "saomadiancan": MessageLookupByLibrary.simpleMessage("您即将进行扫码点餐"), + "saomashibieguanzhugongzonghao": + MessageLookupByLibrary.simpleMessage("扫码识别,关注公众号"), + "send_code": MessageLookupByLibrary.simpleMessage("发送验证码"), + "shanchu": MessageLookupByLibrary.simpleMessage("删除"), + "shanchudingdan": MessageLookupByLibrary.simpleMessage("删除一单"), + "shanghuruzhu": MessageLookupByLibrary.simpleMessage("商户入驻"), + "shangjiaquan": MessageLookupByLibrary.simpleMessage("商家券"), + "shangjiaqueren": MessageLookupByLibrary.simpleMessage("商家确认"), + "shangjiayifahuo": MessageLookupByLibrary.simpleMessage("商家已发货"), + "shangjiazhengzaipeican": + MessageLookupByLibrary.simpleMessage("商家正在配餐"), + "shanglajiazai": MessageLookupByLibrary.simpleMessage("上拉加载"), + "shangpincaigou": MessageLookupByLibrary.simpleMessage("商品采购"), + "shangpinjifen": m29, + "shangpinxiangqing": MessageLookupByLibrary.simpleMessage("商品详情"), + "shangyidengji": MessageLookupByLibrary.simpleMessage("上一等级"), + "shenghuoyule": MessageLookupByLibrary.simpleMessage("生活娱乐"), + "shengxianzhaipei": MessageLookupByLibrary.simpleMessage("生鲜宅配"), + "shenmijifendali": MessageLookupByLibrary.simpleMessage("神秘积分大礼"), + "shenqingtuikuan": MessageLookupByLibrary.simpleMessage("申请退款"), + "shezhi": MessageLookupByLibrary.simpleMessage("设置"), + "shifangjiazaigengduo": MessageLookupByLibrary.simpleMessage("释放加载更多"), + "shifangshuaxin": MessageLookupByLibrary.simpleMessage("释放刷新"), + "shifujifen": m30, + "shifujihuanka": m31, + "shimingrenzheng": MessageLookupByLibrary.simpleMessage("实名认证"), + "shixiaoquan": MessageLookupByLibrary.simpleMessage("失效券"), + "shixiaoyouhuiquan": MessageLookupByLibrary.simpleMessage("失效优惠券"), + "shiyongbangzhu": MessageLookupByLibrary.simpleMessage("使用帮助"), + "shiyongmendian": MessageLookupByLibrary.simpleMessage("适用门店"), + "shiyongriqi": MessageLookupByLibrary.simpleMessage("使用日期"), + "shiyongshuoming": MessageLookupByLibrary.simpleMessage("使用说明"), + "shiyongtiaojian": MessageLookupByLibrary.simpleMessage("使用条件"), + "shiyongxiangqing": MessageLookupByLibrary.simpleMessage("使用详情"), + "shouhuodi": MessageLookupByLibrary.simpleMessage("收货地址"), + "shouhuodizhi": MessageLookupByLibrary.simpleMessage("请输入详细收货地址"), + "shouhuodizhi1": MessageLookupByLibrary.simpleMessage("收货地址"), + "shouhuorenshoujihao": + MessageLookupByLibrary.simpleMessage("请输入收货人手机号"), + "shouhuorenxiangxidizhi": + MessageLookupByLibrary.simpleMessage("请输入收货人详细地址"), + "shouhuorenxingming": MessageLookupByLibrary.simpleMessage("请输入收货人姓名"), + "shoujihao": MessageLookupByLibrary.simpleMessage("手机号"), + "shouqi": MessageLookupByLibrary.simpleMessage("收起"), + "shouye": MessageLookupByLibrary.simpleMessage("首页"), + "shuaxin": MessageLookupByLibrary.simpleMessage("刷新"), + "shuaxinchenggong": MessageLookupByLibrary.simpleMessage("刷新成功"), + "shuaxinshibai": MessageLookupByLibrary.simpleMessage("刷新失败"), + "shuaxinyue": MessageLookupByLibrary.simpleMessage("刷新余额"), + "shuaxinzhong": MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang": MessageLookupByLibrary.simpleMessage("数量"), + "shurushouhuorendizhi": + MessageLookupByLibrary.simpleMessage("请输入收货人地址"), + "shuruzhifumima": MessageLookupByLibrary.simpleMessage("输入支付密码"), + "sui": m32, + "tangshi": MessageLookupByLibrary.simpleMessage("堂食"), + "tebieshengming": MessageLookupByLibrary.simpleMessage("特别声明"), + "tehuizhuanqu": MessageLookupByLibrary.simpleMessage("特惠专区"), + "tianjiaxinfuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tianjifuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tiantiandefuli": MessageLookupByLibrary.simpleMessage("天天得福利"), + "tiantianlingjifen": MessageLookupByLibrary.simpleMessage("天天领积分"), + "tijiao": MessageLookupByLibrary.simpleMessage("提交"), + "tijiaochenggong": MessageLookupByLibrary.simpleMessage("提交成功"), + "tingchewei": MessageLookupByLibrary.simpleMessage("停车位"), + "tixian": MessageLookupByLibrary.simpleMessage("提现"), + "tongyibingjixu": MessageLookupByLibrary.simpleMessage("同意并继续"), + "tongzhi": MessageLookupByLibrary.simpleMessage("通知"), + "tongzhitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), + "toushuxuzhi": MessageLookupByLibrary.simpleMessage("投书须知"), + "touxiang": MessageLookupByLibrary.simpleMessage("头像"), + "tuichudenglu": MessageLookupByLibrary.simpleMessage("退出登录"), + "tuiguangma": MessageLookupByLibrary.simpleMessage("推广码"), + "tuikuan": MessageLookupByLibrary.simpleMessage("退款"), + "waidai": MessageLookupByLibrary.simpleMessage("外带"), + "waimai": MessageLookupByLibrary.simpleMessage("外卖"), + "waimaipeisong": MessageLookupByLibrary.simpleMessage("外卖配送"), + "waisong": MessageLookupByLibrary.simpleMessage("外送"), + "wan": MessageLookupByLibrary.simpleMessage("玩"), + "wancheng": MessageLookupByLibrary.simpleMessage("完成"), + "wancheng_": m33, + "wanchengyicixiadan": MessageLookupByLibrary.simpleMessage("完成一次下单"), + "wangjimima": MessageLookupByLibrary.simpleMessage("忘记密码"), + "wanjiankang": MessageLookupByLibrary.simpleMessage("玩健康"), + "wanshanshengrixinxi_nl": + MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), + "wanshanshengrixinxi_yhq": + MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), + "weidenglu": MessageLookupByLibrary.simpleMessage("未登录"), + "weidengluxinxi": MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), + "weihexiao": MessageLookupByLibrary.simpleMessage("未核销"), + "weikaiqi": MessageLookupByLibrary.simpleMessage("未开启"), + "weilegeiningenghaodefuwu": MessageLookupByLibrary.simpleMessage( + "为了给您提供更好的服务,以及享受更加精彩的信息内容,请您在使用期间,进行登录"), + "weilejishishoudaohuodongxiaoxi": + MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), + "weilekaipaizhaoxuanzhetouxiang": + MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), + "weilexiangnintuijianfujindemendianxinxi": + MessageLookupByLibrary.simpleMessage( + "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), + "weilexuanzhezhaopianhuancun": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), + "weiwancheng": MessageLookupByLibrary.simpleMessage(" 未完成 "), + "weixinzhifu": MessageLookupByLibrary.simpleMessage("微信支付"), + "weizhitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), + "wentijian": MessageLookupByLibrary.simpleMessage("问题件"), + "wenzhang": MessageLookupByLibrary.simpleMessage("文章"), + "wenzhangxiangqing": MessageLookupByLibrary.simpleMessage("文章详情"), + "wenzhangzhuanlan": MessageLookupByLibrary.simpleMessage("文章专栏"), + "weulingqu": MessageLookupByLibrary.simpleMessage("未领取"), + "wodechengjiu": MessageLookupByLibrary.simpleMessage("我的成就"), + "wodedingdan": MessageLookupByLibrary.simpleMessage("我的订单"), + "wodedongtai": MessageLookupByLibrary.simpleMessage("我的动态"), + "wodegongju": MessageLookupByLibrary.simpleMessage("我的工具"), + "wodehuiyuandengji": MessageLookupByLibrary.simpleMessage("我的会员等级"), + "wodejifenzhi": MessageLookupByLibrary.simpleMessage("我的积分值"), + "wodekanjia": MessageLookupByLibrary.simpleMessage("我的砍价"), + "wodekaquan": MessageLookupByLibrary.simpleMessage("我的卡券"), + "wodenianling": MessageLookupByLibrary.simpleMessage("我的年龄"), + "wodepintuan": MessageLookupByLibrary.simpleMessage("我的拼团"), + "wodeqianbao": MessageLookupByLibrary.simpleMessage("我的钱包"), + "wodeshengri": MessageLookupByLibrary.simpleMessage("我的生日"), + "wodexiaoxi": MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqing": MessageLookupByLibrary.simpleMessage("我的邀请"), + "wodeyaoqingma": MessageLookupByLibrary.simpleMessage("我的邀请码"), + "woyouyaoqingma": MessageLookupByLibrary.simpleMessage("我有邀请码"), + "wuliudanhao": MessageLookupByLibrary.simpleMessage("物流单号:"), + "wuliugongsi": MessageLookupByLibrary.simpleMessage("物流公司:"), + "wuliuxinxi": MessageLookupByLibrary.simpleMessage("物流信息"), + "wuliuzhuangtai": MessageLookupByLibrary.simpleMessage("物流状态:"), + "xiadanshijian": MessageLookupByLibrary.simpleMessage("下单时间"), + "xiadanshijian_": m34, + "xiadanzhuanjifen": MessageLookupByLibrary.simpleMessage("下单赚积分"), + "xialashuaxin": MessageLookupByLibrary.simpleMessage("下拉刷新"), + "xiangce": MessageLookupByLibrary.simpleMessage("相册"), + "xiangji": MessageLookupByLibrary.simpleMessage("相机"), + "xiangjitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), + "xiangqing": MessageLookupByLibrary.simpleMessage("详情"), + "xiangxidizhi": MessageLookupByLibrary.simpleMessage("详细地址"), + "xianshangfafang": MessageLookupByLibrary.simpleMessage("线上发放"), + "xianshangshiyong": MessageLookupByLibrary.simpleMessage("线上使用"), + "xianxiashiyong": MessageLookupByLibrary.simpleMessage("线下使用"), + "xiaofei": MessageLookupByLibrary.simpleMessage("消费"), + "xiaofeijifen": MessageLookupByLibrary.simpleMessage("消费积分"), + "xiaofeijihuanka": MessageLookupByLibrary.simpleMessage("消费集换卡"), + "xiaofeijilu": MessageLookupByLibrary.simpleMessage("消费记录"), + "xiaoxi": MessageLookupByLibrary.simpleMessage("消息"), + "xiayidengji": MessageLookupByLibrary.simpleMessage("下一等级"), + "xiazaiwancheng": MessageLookupByLibrary.simpleMessage("加载完成"), + "xiedongtai": MessageLookupByLibrary.simpleMessage("写动态"), + "xieyitanchuang": MessageLookupByLibrary.simpleMessage("海峡姐妹用户隐私政策"), + "xihuan_": m35, + "xindianhuodong": MessageLookupByLibrary.simpleMessage("星店活动"), + "xingming": MessageLookupByLibrary.simpleMessage("姓名"), + "xitongtongzhi": MessageLookupByLibrary.simpleMessage("系统通知"), + "xitongxiaoxi": MessageLookupByLibrary.simpleMessage("系统消息"), + "xiugai": MessageLookupByLibrary.simpleMessage("修改"), + "xiugaichenggong": MessageLookupByLibrary.simpleMessage("修改成功"), + "xiugaiyonghuming": MessageLookupByLibrary.simpleMessage("修改用户名"), + "xuanguige": MessageLookupByLibrary.simpleMessage("选规格"), + "xuanhaola": MessageLookupByLibrary.simpleMessage("选好啦"), + "xuanji": MessageLookupByLibrary.simpleMessage("选集"), + "xuanzeshangpinlingqufangshi": + MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), + "xuanzetuijianmendian": MessageLookupByLibrary.simpleMessage("选择推荐门店"), + "xuefeihuiyuan": MessageLookupByLibrary.simpleMessage("续费会员"), + "xuexijiankang": MessageLookupByLibrary.simpleMessage("学习健康"), + "xufeihuixiangVIP": MessageLookupByLibrary.simpleMessage("续费回乡VIP"), + "xuni": MessageLookupByLibrary.simpleMessage("虚拟"), + "yanzhengma": MessageLookupByLibrary.simpleMessage("验证码"), + "yaoqinghaoyou": MessageLookupByLibrary.simpleMessage("邀请好友"), + "yaoqinghaoyoudefen": MessageLookupByLibrary.simpleMessage("邀请好友得分"), + "yaoqingrenshoujihao_": m36, + "yaoqingwancheng": MessageLookupByLibrary.simpleMessage("邀请完成"), + "yibangfuka": MessageLookupByLibrary.simpleMessage("已绑副卡"), + "yiduihuan": MessageLookupByLibrary.simpleMessage("已兑换"), + "yiduihuanjian": m37, + "yifahuo": MessageLookupByLibrary.simpleMessage("已发货"), + "yiguanzhu": MessageLookupByLibrary.simpleMessage("已关注"), + "yihouzaishuo": MessageLookupByLibrary.simpleMessage("以后再说"), + "yihuide": MessageLookupByLibrary.simpleMessage("已获得"), + "yihujiaoqishou": MessageLookupByLibrary.simpleMessage("已呼叫骑手"), + "yikaitongzidongxufei": MessageLookupByLibrary.simpleMessage("已开通自动续费"), + "yikexiao": MessageLookupByLibrary.simpleMessage("已核销"), + "yilingqu": MessageLookupByLibrary.simpleMessage("已领取"), + "yindao1": MessageLookupByLibrary.simpleMessage("新增多项功能,海量优惠资讯实时推送"), + "yindao2": + MessageLookupByLibrary.simpleMessage("新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停"), + "yindao3": + MessageLookupByLibrary.simpleMessage("新增会员任务得积分,消费可得绿金、积分商城换购"), + "yindao4": MessageLookupByLibrary.simpleMessage("传递友爱纯净健康有机环保智慧理念"), + "yindaoye1": MessageLookupByLibrary.simpleMessage("会员最新资讯抢先看"), + "yindaoye2": MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), + "yindaoye3": MessageLookupByLibrary.simpleMessage("会员活动专区"), + "yindaoye4": MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "yingwen": MessageLookupByLibrary.simpleMessage("英文"), + "yingyeshijian": m38, + "yinkahuiyuan": MessageLookupByLibrary.simpleMessage("银卡会员"), + "yinshi": MessageLookupByLibrary.simpleMessage("饮食"), + "yinsishengming": MessageLookupByLibrary.simpleMessage("隐私声明"), + "yinsixieyi": MessageLookupByLibrary.simpleMessage("《隐私协议》"), + "yinsizhengce1": MessageLookupByLibrary.simpleMessage( + " 感谢您使用海峡姐妹APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读海峡姐妹"), + "yinsizhengce2": MessageLookupByLibrary.simpleMessage( + "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"), + "yinzhang": MessageLookupByLibrary.simpleMessage("印章"), + "yiqiandao": MessageLookupByLibrary.simpleMessage("已签到"), + "yiqianshou": MessageLookupByLibrary.simpleMessage("已签收"), + "yiquxiao": MessageLookupByLibrary.simpleMessage(" 已取消 "), + "yishijiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiming": MessageLookupByLibrary.simpleMessage("已实名"), + "yishixiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiyong": MessageLookupByLibrary.simpleMessage("已使用"), + "yishouquan": MessageLookupByLibrary.simpleMessage("已授权"), + "yisongda": MessageLookupByLibrary.simpleMessage("已送达"), + "yituikuan": MessageLookupByLibrary.simpleMessage("已退款"), + "yiwancheng": MessageLookupByLibrary.simpleMessage(" 已完成 "), + "yiwanchengdingdan": MessageLookupByLibrary.simpleMessage("已完成订单"), + "yixianghuiyuanquanyi": MessageLookupByLibrary.simpleMessage("已享会员权益"), + "yixiansquanbupinglun": + MessageLookupByLibrary.simpleMessage("-已显示全部评论-"), + "yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "yiyoujifen": MessageLookupByLibrary.simpleMessage("已有积分"), + "yizhifu": MessageLookupByLibrary.simpleMessage("已支付"), + "yonghuming": MessageLookupByLibrary.simpleMessage("用户名"), + "yonghuxiaofeijifen": + MessageLookupByLibrary.simpleMessage("用户每消费1元可获得1个积分。"), + "youhuiquan": MessageLookupByLibrary.simpleMessage("优惠券"), + "youhuiquanlingqu": MessageLookupByLibrary.simpleMessage("优惠券领取"), + "youhuiquanwufajileijifen": MessageLookupByLibrary.simpleMessage( + "优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), + "youkedenglu": MessageLookupByLibrary.simpleMessage("游客登录"), + "youxiaoqi": m39, + "youxiaoqixian": MessageLookupByLibrary.simpleMessage("有效期限:"), + "youxiaoqizhi": m40, + "yuan": MessageLookupByLibrary.simpleMessage("元"), + "yuan_": m41, + "yuanjia": MessageLookupByLibrary.simpleMessage("原价"), + "yue": MessageLookupByLibrary.simpleMessage("余额"), + "yue_": m42, + "yue__": m43, + "yuemingxi": MessageLookupByLibrary.simpleMessage("余额明细"), + "yuliudianhua": MessageLookupByLibrary.simpleMessage("预留电话"), + "yunfei": MessageLookupByLibrary.simpleMessage("运费"), + "yuyan": MessageLookupByLibrary.simpleMessage("语言"), + "zailaiyidan": MessageLookupByLibrary.simpleMessage("再来一单"), + "zaituzhong": MessageLookupByLibrary.simpleMessage("运输中"), + "zaixiankefu": MessageLookupByLibrary.simpleMessage("在线客服"), + "zanbuzhichixianshangdiancan": + MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"), + "zanweijiesuo": MessageLookupByLibrary.simpleMessage("暂未解锁"), + "zanweikaifang": MessageLookupByLibrary.simpleMessage("暂未开放"), + "zanweikaitong": MessageLookupByLibrary.simpleMessage("暂未开通"), + "zanwupinglun": MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), + "zanwuxianshangjindian": MessageLookupByLibrary.simpleMessage("暂无线上门店"), + "zanwuyouhuiquankelingqu": + MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), + "zhanghaoanquan": MessageLookupByLibrary.simpleMessage("账号安全"), + "zhanghaoshouquan": MessageLookupByLibrary.simpleMessage("账号授权"), + "zhanghaoxinxi": MessageLookupByLibrary.simpleMessage("账号信息"), + "zhanghaoyuanquan": MessageLookupByLibrary.simpleMessage("账号与安全"), + "zhanghaozhuxiaoshuoming": + MessageLookupByLibrary.simpleMessage("账号注销说明"), + "zhanghuyue": MessageLookupByLibrary.simpleMessage("账户余额"), + "zhankai": MessageLookupByLibrary.simpleMessage("展开"), + "zhengzaihujiaoqishou": MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), + "zhengzaijiazai": MessageLookupByLibrary.simpleMessage("正在加载"), + "zhengzaipeisong": MessageLookupByLibrary.simpleMessage("正在配送"), + "zhengzaixiazaizhong": MessageLookupByLibrary.simpleMessage("正在加载中..."), + "zhidianmendian": MessageLookupByLibrary.simpleMessage("致电门店"), + "zhifubao": MessageLookupByLibrary.simpleMessage("支付宝"), + "zhifubaozhifu": MessageLookupByLibrary.simpleMessage("支付宝支付"), + "zhifufangshi": MessageLookupByLibrary.simpleMessage("支付方式"), + "zhifuxiangqing": MessageLookupByLibrary.simpleMessage("支付详情"), + "zhizunhuiyuan": MessageLookupByLibrary.simpleMessage("至尊会员"), + "zhizuowancheng": MessageLookupByLibrary.simpleMessage("制作完成"), + "zhongchakan": MessageLookupByLibrary.simpleMessage("中查看"), + "zhongwenjianti": MessageLookupByLibrary.simpleMessage("简体中文"), + "zhuanlan": MessageLookupByLibrary.simpleMessage("专栏"), + "zhuanxiangyouhuiquan": MessageLookupByLibrary.simpleMessage("专享优惠券"), + "zhunong1": MessageLookupByLibrary.simpleMessage("爱在回乡 快乐助农"), + "zhunongjifen": MessageLookupByLibrary.simpleMessage("助农积分"), + "zhunongzhuanqu": MessageLookupByLibrary.simpleMessage("助农专区"), + "zhuxiaotixing": MessageLookupByLibrary.simpleMessage( + "再次提醒:注销帐号后不可恢复,相关数据和信息会永久删除。"), + "zhuxiaozhanghao": MessageLookupByLibrary.simpleMessage("注销账号"), + "ziqu": MessageLookupByLibrary.simpleMessage("自取"), + "ziti": MessageLookupByLibrary.simpleMessage("自提"), + "zitidizhi": MessageLookupByLibrary.simpleMessage("自提地址"), + "zitiduihuanquan": MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), + "zitishijian": MessageLookupByLibrary.simpleMessage("自提时间"), + "zongzichan": MessageLookupByLibrary.simpleMessage("总资产"), + "zongzichanyuan": MessageLookupByLibrary.simpleMessage("总资产(元)"), + "zuanshihuiyuan": MessageLookupByLibrary.simpleMessage("钻石会员"), + "zuixinwenzhang": MessageLookupByLibrary.simpleMessage("最新文章"), + "zuorenwudejifen": MessageLookupByLibrary.simpleMessage("做任务得积分"), + "zuozhe": m44 + }; } diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index 1abdf430..5eaac5cd 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,814 +20,908 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'zh_Hans_CN'; - static m0(version) => "版本:${version}"; + static String m0(version) => "版本:${version}"; - static m1(yuan) => "充值金额最小是${yuan}元"; + static String m1(yuan) => "充值金额最小是${yuan}元"; - static m2(time) => "创建时间${time}"; + static String m2(time) => "创建时间${time}"; - static m3(xihuan) => "点赞喜欢${xihuan}"; + static String m3(xihuan) => "点赞喜欢${xihuan}"; - static m4(shijian) => "发行开始时间 ${shijian}"; + static String m4(shijian) => "发行开始时间 ${shijian}"; - static m5(ge) => "${ge}g/个"; + static String m5(ge) => "${ge}g/个"; - static m6(jian) => "共${jian}件"; + static String m6(jian) => "共${jian}件"; - static m7(jian) => "共${jian}件商品"; + static String m7(jian) => "共${jian}件商品"; - static m8(km) => "${km}公里"; + static String m8(km) => "${km}公里"; - static m9(huifu) => "回复@${huifu}:"; + static String m9(huifu) => "回复@${huifu}:"; - static m10(yuan) => "活动减免${yuan}元配送费"; + static String m10(yuan) => "活动减免${yuan}元配送费"; - static m11(yue) => "活动余额 ${yue}"; + static String m11(yue) => "活动余额 ${yue}"; - static m12(jifen) => "+ ${jifen} 积分"; + static String m12(jifen) => "+ ${jifen} 积分"; - static m13(jianjie) => "简介:${jianjie}"; + static String m13(jianjie) => "简介:${jianjie}"; - static m14(jifen) => "${jifen}积分"; + static String m14(jifen) => "${jifen}积分"; - static m15(jifen) => "${jifen}积分 到下一个等级"; + static String m15(jifen) => "${jifen}积分 到下一个等级"; - static m16(date) => "开通日期:${date}"; + static String m16(date) => "开通日期:${date}"; - static m17(shijian) => "领取时间 ${shijian}"; + static String m17(shijian) => "领取时间 ${shijian}"; - static m18(yue) => "绿币 ${yue}"; + static String m18(yue) => "绿币 ${yue}"; - static m19(man, jian) => "满${man}元立减${jian}元代金券"; + static String m19(man, jian) => "满${man}元立减${jian}元代金券"; - static m20(yuan) => "满${yuan}可用"; + static String m20(yuan) => "满${yuan}可用"; - static m21(mi) => "${mi}米"; + static String m21(mi) => "${mi}米"; - static m22(tian) => "您已连续签到${tian}天"; + static String m22(tian) => "您已连续签到${tian}天"; - static m23(pinglun) => "评论(${pinglun})"; + static String m23(pinglun) => "评论(${pinglun})"; - static m24(zongyue) => "余额:${zongyue}"; + static String m24(zongyue) => "余额:${zongyue}"; - static m25(zhe) => "全场${zhe}折"; + static String m25(zhe) => "全场${zhe}折"; - static m26(num) => "取单号${num}"; + static String m26(num) => "取单号${num}"; - static m27(ren) => "¥${ren}/人"; + static String m27(ren) => "¥${ren}/人"; - static m28(second) => "${second}s后重新发送"; + static String m28(second) => "${second}s后重新发送"; - static m29(jifen) => "商品积分 ${jifen}积分"; + static String m29(jifen) => "商品积分 ${jifen}积分"; - static m30(jifen) => "实付积分 ${jifen}积分"; + static String m30(jifen) => "实付积分 ${jifen}积分"; - static m31(jihuanka) => "实付集换卡 ${jihuanka}集换卡"; + static String m31(jihuanka) => "实付集换卡 ${jihuanka}集换卡"; - static m32(sui) => "${sui}岁"; + static String m32(sui) => "${sui}岁"; - static m33(num) => "完成${num}"; + static String m33(num) => "完成${num}"; - static m34(time) => "下单时间:${time}"; + static String m34(time) => "下单时间:${time}"; - static m35(xihuan) => "喜欢(${xihuan})"; + static String m35(xihuan) => "喜欢(${xihuan})"; - static m36(shoujihao) => "邀请人手机号:${shoujihao}"; + static String m36(shoujihao) => "邀请人手机号:${shoujihao}"; - static m37(jian) => "已兑换${jian}件"; + static String m37(jian) => "已兑换${jian}件"; - static m38(time) => "营业时间: ${time}"; + static String m38(time) => "营业时间: ${time}"; - static m39(date) => "有效期:${date}"; + static String m39(date) => "有效期:${date}"; - static m40(date) => "有效期至${date}"; + static String m40(date) => "有效期至${date}"; - static m41(yuan) => "${yuan}元"; + static String m41(yuan) => "${yuan}元"; - static m42(yue) => "余额${yue}"; + static String m42(yue) => "余额${yue}"; - static m43(yue) => "余额 ${yue}"; + static String m43(yue) => "余额 ${yue}"; - static m44(zuozhe) => "作者:${zuozhe}"; + static String m44(zuozhe) => "作者:${zuozhe}"; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "bainianchuanjiao" : MessageLookupByLibrary.simpleMessage("百年川椒"), - "baiyin" : MessageLookupByLibrary.simpleMessage("白银"), - "baiyinhuiyuan" : MessageLookupByLibrary.simpleMessage("白银会员"), - "banben" : m0, - "bangdingfuka" : MessageLookupByLibrary.simpleMessage("绑定副卡"), - "bangdingshouji" : MessageLookupByLibrary.simpleMessage("绑定手机"), - "bangong" : MessageLookupByLibrary.simpleMessage("办公"), - "bangzhuyufankui" : MessageLookupByLibrary.simpleMessage("帮助与反馈"), - "baocun" : MessageLookupByLibrary.simpleMessage("保存"), - "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), - "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), - "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), - "beizhu" : MessageLookupByLibrary.simpleMessage("备注"), - "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("备注信息"), - "benzhouquanbao" : MessageLookupByLibrary.simpleMessage("本周券包"), - "bianjidizhi" : MessageLookupByLibrary.simpleMessage("编辑地址"), - "bianjigerenziliao" : MessageLookupByLibrary.simpleMessage("编辑个人资料"), - "biaojiweiyidu" : MessageLookupByLibrary.simpleMessage("标为已读"), - "biaoweiyidu" : MessageLookupByLibrary.simpleMessage("标为已读"), - "bodadianhua" : MessageLookupByLibrary.simpleMessage("拨打电话"), - "bofangcishu" : MessageLookupByLibrary.simpleMessage("播放次数"), - "bojin" : MessageLookupByLibrary.simpleMessage("铂金"), - "brand_yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "buzhichikaipiao" : MessageLookupByLibrary.simpleMessage("不支持开票"), - "canyingfuwu" : MessageLookupByLibrary.simpleMessage("餐饮服务"), - "chakan" : MessageLookupByLibrary.simpleMessage("查看"), - "chakangengduo" : MessageLookupByLibrary.simpleMessage("查看更多"), - "chakanhexiaoma" : MessageLookupByLibrary.simpleMessage("查看核销码"), - "chakanquanyi" : MessageLookupByLibrary.simpleMessage("查看权益"), - "chakanshixiaoquan" : MessageLookupByLibrary.simpleMessage("查看失效券"), - "chakanwodekabao" : MessageLookupByLibrary.simpleMessage("查看我的卡包"), - "chakanwodekaquan" : MessageLookupByLibrary.simpleMessage("查看我的卡券"), - "chakanwuliu" : MessageLookupByLibrary.simpleMessage("查看物流"), - "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"), - "changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"), - "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"), - "chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"), - "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"), - "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), - "chengjiu" : MessageLookupByLibrary.simpleMessage("成就"), - "chengjiuhuizhang" : MessageLookupByLibrary.simpleMessage("成就徽章"), - "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"), - "chengweidianpuzhuanshuhuiyuan" : MessageLookupByLibrary.simpleMessage("成为店铺专属会员,享专属权益"), - "chi" : MessageLookupByLibrary.simpleMessage("吃"), - "chijiankang" : MessageLookupByLibrary.simpleMessage("吃健康"), - "chongzhi" : MessageLookupByLibrary.simpleMessage("充值"), - "chongzhichenggong" : MessageLookupByLibrary.simpleMessage("充值成功"), - "chongzhifuliduo" : MessageLookupByLibrary.simpleMessage("充值福利多"), - "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), - "chongzhizuixiaojine" : m1, - "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"), - "chuangshirendegushi1" : MessageLookupByLibrary.simpleMessage("创始人的故事"), - "chuzhiyouhui" : MessageLookupByLibrary.simpleMessage("储值优惠"), - "code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"), - "cunchu" : MessageLookupByLibrary.simpleMessage("存储"), - "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), - "dabaodaodianqu" : MessageLookupByLibrary.simpleMessage("打包到店取"), - "daifukuan" : MessageLookupByLibrary.simpleMessage("待付款"), - "daipeisong" : MessageLookupByLibrary.simpleMessage("待配送"), - "daiqucan" : MessageLookupByLibrary.simpleMessage("待取餐"), - "daiqueren" : MessageLookupByLibrary.simpleMessage("待确认"), - "daizhifu" : MessageLookupByLibrary.simpleMessage("待支付"), - "daizhizuo" : MessageLookupByLibrary.simpleMessage("待制作"), - "dajiadouzaiduihuan" : MessageLookupByLibrary.simpleMessage("大家都在兑换"), - "dakaidingwei" : MessageLookupByLibrary.simpleMessage("打开定位"), - "dangqianbanben" : MessageLookupByLibrary.simpleMessage("当前版本"), - "dangqiandengji" : MessageLookupByLibrary.simpleMessage("当前等级"), - "dangqianjifen" : MessageLookupByLibrary.simpleMessage("当前积分:"), - "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), - "dangqianzhukadengji" : MessageLookupByLibrary.simpleMessage("当前主卡等级"), - "daodianziqu" : MessageLookupByLibrary.simpleMessage("到店自取"), - "daopinglunliebiaodingbu" : MessageLookupByLibrary.simpleMessage("到评论列表顶部"), - "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等级"), - "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家确认"), - "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"), - "denglu" : MessageLookupByLibrary.simpleMessage("登录"), - "diancan" : MessageLookupByLibrary.simpleMessage("点餐"), - "diandan" : MessageLookupByLibrary.simpleMessage("点单"), - "dianhua" : MessageLookupByLibrary.simpleMessage("电话"), - "dianjidenglu" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), - "dianneiyongcan" : MessageLookupByLibrary.simpleMessage("店内用餐"), - "dianpuchongzhi" : MessageLookupByLibrary.simpleMessage("店铺充值"), - "dianputuijian" : MessageLookupByLibrary.simpleMessage("店铺推荐"), - "dianpuyue" : MessageLookupByLibrary.simpleMessage("店铺余额"), - "dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"), - "dianzan" : MessageLookupByLibrary.simpleMessage("点赞"), - "dianzanxihuan_" : m3, - "dingdan" : MessageLookupByLibrary.simpleMessage("订单"), - "dingdanbianhao" : MessageLookupByLibrary.simpleMessage("订单编号"), - "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("订单待发货"), - "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("订单待支付"), - "dingdangenzong" : MessageLookupByLibrary.simpleMessage("订单跟踪"), - "dingdanhao" : MessageLookupByLibrary.simpleMessage("订单号"), - "dingdanjiesuan" : MessageLookupByLibrary.simpleMessage("订单结算"), - "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), - "dingdantongzhi" : MessageLookupByLibrary.simpleMessage("订单通知"), - "dingdanxiaoxi" : MessageLookupByLibrary.simpleMessage("订单消息"), - "dingdanyisongda" : MessageLookupByLibrary.simpleMessage("订单送达"), - "dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("订单已退款"), - "dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("订单已完成"), - "dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("订单已支付"), - "dingwei" : MessageLookupByLibrary.simpleMessage("定位"), - "dizhi" : MessageLookupByLibrary.simpleMessage("地址"), - "dongtai" : MessageLookupByLibrary.simpleMessage("动态"), - "dongtaitishi" : MessageLookupByLibrary.simpleMessage("用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示"), - "dongtaixiangqing" : MessageLookupByLibrary.simpleMessage("动态详情"), - "duihuan" : MessageLookupByLibrary.simpleMessage("兑换"), - "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), - "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), - "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), - "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兑换量从低到高"), - "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兑换量从高到低"), - "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兑换历史"), - "duihuanquan" : MessageLookupByLibrary.simpleMessage("兑换券"), - "duihuanshangpinxiangqing" : MessageLookupByLibrary.simpleMessage("兑换商品详情"), - "duihuanxinxi" : MessageLookupByLibrary.simpleMessage("兑换信息"), - "duozhongyouhui" : MessageLookupByLibrary.simpleMessage("多种优惠券等你拿"), - "fabu" : MessageLookupByLibrary.simpleMessage("发布"), - "fangshier" : MessageLookupByLibrary.simpleMessage("方式二"), - "fangshiyi" : MessageLookupByLibrary.simpleMessage("方式一"), - "fanhuiduihuanlishi" : MessageLookupByLibrary.simpleMessage("返回兑换历史"), - "fanhuishequn" : MessageLookupByLibrary.simpleMessage("返回社群"), - "fanhuishouye" : MessageLookupByLibrary.simpleMessage("返回首页"), - "fankui" : MessageLookupByLibrary.simpleMessage("反馈"), - "fankuilizi" : MessageLookupByLibrary.simpleMessage("您可以在这里输入反馈内容,例如产品建议,功能异常等"), - "fantizhongwen" : MessageLookupByLibrary.simpleMessage("繁体中文"), - "fapiao" : MessageLookupByLibrary.simpleMessage("发票"), - "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"), - "fasong" : MessageLookupByLibrary.simpleMessage("发送"), - "fasongduanxin" : MessageLookupByLibrary.simpleMessage("发送短信"), - "faxingshijian" : m4, - "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换码"), - "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), - "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), - "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), - "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), - "fenxiangjiankang" : MessageLookupByLibrary.simpleMessage("分享健康"), - "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), - "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("将邀请码分享给好友,对方在海峡姐妹App登录页输入邀请码,即可邀请成功。"), - "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), - "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手机号"), - "fuliduihuan" : MessageLookupByLibrary.simpleMessage("福利兑换"), - "fulizhongxin" : MessageLookupByLibrary.simpleMessage("福利中心"), - "ge" : m5, - "geiwopingfen" : MessageLookupByLibrary.simpleMessage("给我评分"), - "gengduo" : MessageLookupByLibrary.simpleMessage("更多"), - "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), - "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), - "genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改绑定手机号"), - "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更换背景"), - "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), - "gengyouhui" : MessageLookupByLibrary.simpleMessage("更优惠"), - "gerenxinxi" : MessageLookupByLibrary.simpleMessage("个人信息"), - "gexingqianming" : MessageLookupByLibrary.simpleMessage("个性签名"), - "gong" : MessageLookupByLibrary.simpleMessage("共"), - "gongchuanghuiyuan" : MessageLookupByLibrary.simpleMessage("共创会员"), - "gongjijian" : m6, - "gongjijianshangpin" : m7, - "gongli" : m8, - "gongxinchengwei" : MessageLookupByLibrary.simpleMessage("恭喜您成为"), - "gongxinichengweibendianhuiyuan" : MessageLookupByLibrary.simpleMessage("恭喜您,成为本店的会员,快去享受超多会员权益吧。"), - "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和海峡姐妹服务协议"), - "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), - "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), - "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"), - "guanyuhuixiang" : MessageLookupByLibrary.simpleMessage("关于回乡"), - "guanzhu" : MessageLookupByLibrary.simpleMessage("关注"), - "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), - "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), - "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), - "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "haowu" : MessageLookupByLibrary.simpleMessage("好物"), - "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友奖励规则"), - "he" : MessageLookupByLibrary.simpleMessage("喝"), - "heji" : MessageLookupByLibrary.simpleMessage("合计:"), - "hejiankang" : MessageLookupByLibrary.simpleMessage("喝健康"), - "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), - "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), - "huangjin" : MessageLookupByLibrary.simpleMessage("黄金"), - "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"), - "huifu" : MessageLookupByLibrary.simpleMessage("回复"), - "huifu_" : m9, - "huixiangVIPka" : MessageLookupByLibrary.simpleMessage("回乡VIP卡"), - "huixiangqianbao" : MessageLookupByLibrary.simpleMessage("海峡钱包"), - "huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), - "huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"), - "huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"), - "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"), - "huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"), - "huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"), - "huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"), - "huiyuanhuodejifen" : MessageLookupByLibrary.simpleMessage("会员如何获得积分"), - "huiyuanjia" : MessageLookupByLibrary.simpleMessage("会员价"), - "huiyuanjibieduizhao" : MessageLookupByLibrary.simpleMessage("会员级别对照表"), - "huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"), - "huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"), - "huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"), - "huiyuanma" : MessageLookupByLibrary.simpleMessage("会员码"), - "huiyuanquanyi" : MessageLookupByLibrary.simpleMessage("会员权益"), - "huiyuanyue" : MessageLookupByLibrary.simpleMessage("会员余额"), - "huiyuanzhongxin" : MessageLookupByLibrary.simpleMessage("会员中心"), - "huiyuanzhuanxiangjiage" : MessageLookupByLibrary.simpleMessage("会员专享价格"), - "huode" : MessageLookupByLibrary.simpleMessage("获得"), - "huodequanyi" : MessageLookupByLibrary.simpleMessage("获得权益"), - "huodong" : MessageLookupByLibrary.simpleMessage("活动"), - "huodongguize" : MessageLookupByLibrary.simpleMessage("活动规则"), - "huodongjianmianpeisongfei" : m10, - "huodongjinxingzhong" : MessageLookupByLibrary.simpleMessage("活动进行中"), - "huodongliebiao" : MessageLookupByLibrary.simpleMessage("活动列表"), - "huodongyue" : MessageLookupByLibrary.simpleMessage("活动余额"), - "huodongyue_" : m11, - "huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"), - "huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"), - "huozan" : MessageLookupByLibrary.simpleMessage("获赞"), - "input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"), - "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), - "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"), - "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), - "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), - "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀请码输入错误"), - "jiajifen" : m12, - "jian" : MessageLookupByLibrary.simpleMessage("件"), - "jiangli" : MessageLookupByLibrary.simpleMessage("奖励"), - "jiangshi" : MessageLookupByLibrary.simpleMessage("讲师"), - "jianjie" : m13, - "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"), - "jiesuan" : MessageLookupByLibrary.simpleMessage("结算"), - "jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"), - "jifen" : MessageLookupByLibrary.simpleMessage("积分"), - "jifen_" : m14, - "jifenbuzu" : MessageLookupByLibrary.simpleMessage("您的积分不足"), - "jifendaoxiayidengji" : m15, - "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("积分的计算说明"), - "jifendidaogao" : MessageLookupByLibrary.simpleMessage("积分从低到高"), - "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("积分从高到低"), - "jifenhuanquan" : MessageLookupByLibrary.simpleMessage("积分换券"), - "jifenmingxi" : MessageLookupByLibrary.simpleMessage("积分明细"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("积分商城"), - "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("积分详情"), - "jihuanka" : MessageLookupByLibrary.simpleMessage("集换卡"), - "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), - "jingxuanhaowen" : MessageLookupByLibrary.simpleMessage("精选好文"), - "jingxuanhuodong" : MessageLookupByLibrary.simpleMessage("精选活动"), - "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), - "jinrihuiyuanrenwu" : MessageLookupByLibrary.simpleMessage("今日会员任务"), - "jinrushangdian" : MessageLookupByLibrary.simpleMessage("进入商店"), - "jinruzhuanqu" : MessageLookupByLibrary.simpleMessage("进入专区"), - "jinxingbangdingfuka" : MessageLookupByLibrary.simpleMessage("进行绑定副卡"), - "jinxingfukabangding" : MessageLookupByLibrary.simpleMessage("进行副卡绑定"), - "jinxingzhanghaozhuxiao" : MessageLookupByLibrary.simpleMessage("进行账号注销"), - "jinxingzhongdedingdan" : MessageLookupByLibrary.simpleMessage("进行中的订单"), - "jituanchuangbanren" : MessageLookupByLibrary.simpleMessage(" 集团创办人"), - "jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集团创始人"), - "jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"), - "jixuzhifu" : MessageLookupByLibrary.simpleMessage("继续支付"), - "jubao" : MessageLookupByLibrary.simpleMessage("举报"), - "jubaogaineirong" : MessageLookupByLibrary.simpleMessage("举报该内容"), - "jubaotishi" : MessageLookupByLibrary.simpleMessage("您的举报正在等待人工审核,我们会在7~15个工作日处理,处理结果可在"), - "jubaoyuanyin" : MessageLookupByLibrary.simpleMessage("请输入举报原因,以便我们更快定位问题,快速处理"), - "jujue" : MessageLookupByLibrary.simpleMessage("拒绝"), - "kabao" : MessageLookupByLibrary.simpleMessage("卡包"), - "kabaokeshiyong" : MessageLookupByLibrary.simpleMessage("卡包-可使用"), - "kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("开启权限"), - "kaitonghuixianghuoququanyi" : MessageLookupByLibrary.simpleMessage("开通回乡VIP卡获取更多权益"), - "kaitongriqi" : m16, - "kaquan" : MessageLookupByLibrary.simpleMessage("卡券"), - "kelingqudeyouhuiquan" : MessageLookupByLibrary.simpleMessage("可领取的优惠券"), - "keshiyong" : MessageLookupByLibrary.simpleMessage("可使用"), - "keyongjifen" : MessageLookupByLibrary.simpleMessage("可用积分"), - "keyongquan" : MessageLookupByLibrary.simpleMessage("可用券"), - "keyongyouhuiquan" : MessageLookupByLibrary.simpleMessage("可用优惠券"), - "keyongyue" : MessageLookupByLibrary.simpleMessage("可用余额"), - "kongtiao" : MessageLookupByLibrary.simpleMessage("空调"), - "kuaidi" : MessageLookupByLibrary.simpleMessage("快递"), - "kuaidiwuliu" : MessageLookupByLibrary.simpleMessage("快递物流"), - "kuailezhunong" : MessageLookupByLibrary.simpleMessage("快乐助农"), - "lianxikefu" : MessageLookupByLibrary.simpleMessage("联系客服"), - "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("联系手机号"), - "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), - "liaojie" : MessageLookupByLibrary.simpleMessage("了解"), - "liaojiejiankang" : MessageLookupByLibrary.simpleMessage("了解健康"), - "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即参加"), - "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), - "lijigengxin" : MessageLookupByLibrary.simpleMessage("立即更新"), - "lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"), - "lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"), - "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"), - "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"), - "lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"), - "lijiyuyue" : MessageLookupByLibrary.simpleMessage("立即预约"), - "likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"), - "likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"), - "likezhifu" : MessageLookupByLibrary.simpleMessage("立刻支付"), - "lingqu" : MessageLookupByLibrary.simpleMessage("领取"), - "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("领券中心"), - "lingquchenggong" : MessageLookupByLibrary.simpleMessage("领取成功"), - "lingqudaokabao" : MessageLookupByLibrary.simpleMessage("领取到卡包"), - "lingqufangshi" : MessageLookupByLibrary.simpleMessage("领取方式"), - "lingqushijian" : m17, - "linian" : MessageLookupByLibrary.simpleMessage("理念"), - "lishijilu" : MessageLookupByLibrary.simpleMessage("历史记录"), - "liuxianinjingcaidepinglunba" : MessageLookupByLibrary.simpleMessage("留下您精彩的评论吧"), - "login" : MessageLookupByLibrary.simpleMessage("登录"), - "login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到海峡姐妹"), - "lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"), - "lvbiyue_" : m18, - "lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"), - "main_menu1" : MessageLookupByLibrary.simpleMessage("首页"), - "main_menu2" : MessageLookupByLibrary.simpleMessage("门店"), - "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"), - "main_menu4" : MessageLookupByLibrary.simpleMessage("我的"), - "main_menu5" : MessageLookupByLibrary.simpleMessage("hi"), - "manlijiandaijinquan" : m19, - "manyuankeyong" : m20, - "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), - "meiyougengduohuiyuanka" : MessageLookupByLibrary.simpleMessage("没有更多会员卡"), - "meiyougengduoshujule" : MessageLookupByLibrary.simpleMessage("没有更多的数据了"), - "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), - "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"), - "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"), - "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"), - "menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"), - "mi" : m21, - "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), - "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), - "muqianwujilu" : MessageLookupByLibrary.simpleMessage("目前暂未记录哦"), - "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), - "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), - "nincunchuquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), - "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), - "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), - "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), - "ninxiangjiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), - "ninxiaoxiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), - "ninyichenggonglingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("您已成功领取优惠劵,请在"), - "ninyilianxuqiandaotian" : m22, - "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), - "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"), - "paizhao" : MessageLookupByLibrary.simpleMessage("拍照"), - "peisong" : MessageLookupByLibrary.simpleMessage("配送"), - "peisongfangshi" : MessageLookupByLibrary.simpleMessage("配送方式"), - "peisongfei" : MessageLookupByLibrary.simpleMessage("配送费"), - "peisongfuwu" : MessageLookupByLibrary.simpleMessage("配送服务"), - "peisongzhong" : MessageLookupByLibrary.simpleMessage("配送中"), - "phone_error" : MessageLookupByLibrary.simpleMessage("手机格式错误"), - "pinglun" : MessageLookupByLibrary.simpleMessage("评论"), - "pinglun_" : m23, - "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平台余额"), - "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平台支付密码"), - "pingtaizongyue" : m24, - "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), - "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介绍"), - "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登录既同意"), - "privacy_policy2" : MessageLookupByLibrary.simpleMessage("《海峡姐妹服务协议》"), - "privacy_policy3" : MessageLookupByLibrary.simpleMessage("《隐私服务》"), - "privacy_policy4" : MessageLookupByLibrary.simpleMessage("并使用本机号码登录"), - "qianbao" : MessageLookupByLibrary.simpleMessage("钱包"), - "qiandao" : MessageLookupByLibrary.simpleMessage("签到"), - "qiandaodejifen" : MessageLookupByLibrary.simpleMessage("签到得积分"), - "qiandaolingjifen" : MessageLookupByLibrary.simpleMessage("签到领积分"), - "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("签到领取积分"), - "qiandaowancheng" : MessageLookupByLibrary.simpleMessage("签到完成"), - "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前进麦味"), - "qianshou" : MessageLookupByLibrary.simpleMessage("已签收"), - "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), - "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理缓存"), - "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("请输入备注要求"), - "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("请输入充值金额"), - "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("请输入手机号"), - "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("请输入验证码"), - "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("请输入邀请码"), - "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), - "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("请输入支付密码"), - "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), - "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), - "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), - "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青铜会员"), - "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("请先选规格"), - "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("请选择使用门店"), - "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("请选择收货地址"), - "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("请选择一个门店"), - "qingxuanzeyuyeushijian" : MessageLookupByLibrary.simpleMessage("请选择预约时间"), - "qingxuanzeyuyuemendian" : MessageLookupByLibrary.simpleMessage("请选择预约门店"), - "qingxuanzhemendian" : MessageLookupByLibrary.simpleMessage("请选择门店"), - "qingxuanzheninxiangshezhideyuyan" : MessageLookupByLibrary.simpleMessage("请选择您想设置的语言"), - "qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"), - "qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"), - "qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"), - "qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"), - "qita" : MessageLookupByLibrary.simpleMessage("其他"), - "qiyetuanjian" : MessageLookupByLibrary.simpleMessage("企业团建"), - "quanbao" : MessageLookupByLibrary.simpleMessage("券包"), - "quanbu" : MessageLookupByLibrary.simpleMessage("全部"), - "quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"), - "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"), - "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全场通用"), - "quanchangzhe" : m25, - "quantian" : MessageLookupByLibrary.simpleMessage("全天"), - "quanxian" : MessageLookupByLibrary.simpleMessage("权限"), - "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("权限设置"), - "quanyijishao" : MessageLookupByLibrary.simpleMessage("权益介绍"), - "quanyishuoming" : MessageLookupByLibrary.simpleMessage("权益说明"), - "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("权益详情"), - "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐号"), - "qudanhao" : m26, - "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道来源"), - "qudenglu" : MessageLookupByLibrary.simpleMessage("去登录"), - "queding" : MessageLookupByLibrary.simpleMessage("确定"), - "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), - "queren" : MessageLookupByLibrary.simpleMessage("确认"), - "querenbangding" : MessageLookupByLibrary.simpleMessage("确认绑定"), - "querenchongzhi" : MessageLookupByLibrary.simpleMessage("确认充值"), - "querenduihuan" : MessageLookupByLibrary.simpleMessage("确认兑换"), - "querenshouhuo" : MessageLookupByLibrary.simpleMessage("确认收货"), - "querenyaoshanchudangqianpinglunma" : MessageLookupByLibrary.simpleMessage("确认要删除当前评论?"), - "querenzhuxiao" : MessageLookupByLibrary.simpleMessage("确认注销"), - "quhexiao" : MessageLookupByLibrary.simpleMessage("去核销"), - "quhuozhong" : MessageLookupByLibrary.simpleMessage("取货中"), - "qujianma" : MessageLookupByLibrary.simpleMessage("取件码"), - "quqiandao" : MessageLookupByLibrary.simpleMessage("去签到"), - "qushiyong" : MessageLookupByLibrary.simpleMessage("去使用"), - "quwancheng" : MessageLookupByLibrary.simpleMessage(" 去完成 "), - "quxiao" : MessageLookupByLibrary.simpleMessage("取消"), - "quxiaodingdan" : MessageLookupByLibrary.simpleMessage("取消订单"), - "quxiaozhifu" : MessageLookupByLibrary.simpleMessage("取消支付"), - "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), - "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"), - "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"), - "ren" : m27, - "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任务中心"), - "resend_in_seconds" : m28, - "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), - "ruhedihuanjifen" : MessageLookupByLibrary.simpleMessage("如何兑换积分"), - "ruhedihuanjifen1" : MessageLookupByLibrary.simpleMessage("点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~"), - "ruhelingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("如何领取优惠券?"), - "ruhelingquyouhuiquan1" : MessageLookupByLibrary.simpleMessage("点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~"), - "ruheqiandao" : MessageLookupByLibrary.simpleMessage("如何签到?"), - "ruheqiandao1" : MessageLookupByLibrary.simpleMessage("1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。"), - "ruxutuikuanqingyumendianlianxi" : MessageLookupByLibrary.simpleMessage("如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系"), - "saoma" : MessageLookupByLibrary.simpleMessage("扫码"), - "saomadiancan" : MessageLookupByLibrary.simpleMessage("您即将进行扫码点餐"), - "saomashibieguanzhugongzonghao" : MessageLookupByLibrary.simpleMessage("扫码识别,关注公众号"), - "send_code" : MessageLookupByLibrary.simpleMessage("发送验证码"), - "shanchu" : MessageLookupByLibrary.simpleMessage("删除"), - "shanchudingdan" : MessageLookupByLibrary.simpleMessage("删除一单"), - "shanghuruzhu" : MessageLookupByLibrary.simpleMessage("商户入驻"), - "shangjiaquan" : MessageLookupByLibrary.simpleMessage("商家券"), - "shangjiaqueren" : MessageLookupByLibrary.simpleMessage("商家确认"), - "shangjiayifahuo" : MessageLookupByLibrary.simpleMessage("商家已发货"), - "shangjiazhengzaipeican" : MessageLookupByLibrary.simpleMessage("商家正在配餐"), - "shanglajiazai" : MessageLookupByLibrary.simpleMessage("上拉加载"), - "shangpincaigou" : MessageLookupByLibrary.simpleMessage("商品采购"), - "shangpinjifen" : m29, - "shangpinxiangqing" : MessageLookupByLibrary.simpleMessage("商品详情"), - "shangyidengji" : MessageLookupByLibrary.simpleMessage("上一等级"), - "shenghuoyule" : MessageLookupByLibrary.simpleMessage("生活娱乐"), - "shengxianzhaipei" : MessageLookupByLibrary.simpleMessage("生鲜宅配"), - "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘积分大礼"), - "shenqingtuikuan" : MessageLookupByLibrary.simpleMessage("申请退款"), - "shezhi" : MessageLookupByLibrary.simpleMessage("设置"), - "shifangjiazaigengduo" : MessageLookupByLibrary.simpleMessage("释放加载更多"), - "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("释放刷新"), - "shifujifen" : m30, - "shifujihuanka" : m31, - "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("实名认证"), - "shixiaoquan" : MessageLookupByLibrary.simpleMessage("失效券"), - "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongbangzhu" : MessageLookupByLibrary.simpleMessage("使用帮助"), - "shiyongmendian" : MessageLookupByLibrary.simpleMessage("适用门店"), - "shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"), - "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), - "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), - "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"), - "shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"), - "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"), - "shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"), - "shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("请输入收货人手机号"), - "shouhuorenxiangxidizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人详细地址"), - "shouhuorenxingming" : MessageLookupByLibrary.simpleMessage("请输入收货人姓名"), - "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), - "shouqi" : MessageLookupByLibrary.simpleMessage("收起"), - "shouye" : MessageLookupByLibrary.simpleMessage("首页"), - "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), - "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), - "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), - "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), - "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), - "shuliang" : MessageLookupByLibrary.simpleMessage("数量"), - "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("请输入收货人地址"), - "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("输入支付密码"), - "sui" : m32, - "tangshi" : MessageLookupByLibrary.simpleMessage("堂食"), - "tebieshengming" : MessageLookupByLibrary.simpleMessage("特别声明"), - "tehuizhuanqu" : MessageLookupByLibrary.simpleMessage("特惠专区"), - "tianjiaxinfuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tianjifuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tiantiandefuli" : MessageLookupByLibrary.simpleMessage("天天得福利"), - "tiantianlingjifen" : MessageLookupByLibrary.simpleMessage("天天领积分"), - "tijiao" : MessageLookupByLibrary.simpleMessage("提交"), - "tijiaochenggong" : MessageLookupByLibrary.simpleMessage("提交成功"), - "tingchewei" : MessageLookupByLibrary.simpleMessage("停车位"), - "tixian" : MessageLookupByLibrary.simpleMessage("提现"), - "tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"), - "tongzhi" : MessageLookupByLibrary.simpleMessage("通知"), - "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), - "toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投书须知"), - "touxiang" : MessageLookupByLibrary.simpleMessage("头像"), - "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"), - "tuiguangma" : MessageLookupByLibrary.simpleMessage("推广码"), - "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), - "waidai" : MessageLookupByLibrary.simpleMessage("外带"), - "waimai" : MessageLookupByLibrary.simpleMessage("外卖"), - "waimaipeisong" : MessageLookupByLibrary.simpleMessage("外卖配送"), - "waisong" : MessageLookupByLibrary.simpleMessage("外送"), - "wan" : MessageLookupByLibrary.simpleMessage("玩"), - "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m33, - "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"), - "wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"), - "wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"), - "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), - "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), - "weidenglu" : MessageLookupByLibrary.simpleMessage("未登录"), - "weidengluxinxi" : MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), - "weihexiao" : MessageLookupByLibrary.simpleMessage("未核销"), - "weikaiqi" : MessageLookupByLibrary.simpleMessage("未开启"), - "weilegeiningenghaodefuwu" : MessageLookupByLibrary.simpleMessage("为了给您提供更好的服务,以及享受更加精彩的信息内容,请您在使用期间,进行登录"), - "weilejishishoudaohuodongxiaoxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), - "weilekaipaizhaoxuanzhetouxiang" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), - "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), - "weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), - "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), - "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), - "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), - "wentijian" : MessageLookupByLibrary.simpleMessage("问题件"), - "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), - "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"), - "wenzhangzhuanlan" : MessageLookupByLibrary.simpleMessage("文章专栏"), - "weulingqu" : MessageLookupByLibrary.simpleMessage("未领取"), - "wodechengjiu" : MessageLookupByLibrary.simpleMessage("我的成就"), - "wodedingdan" : MessageLookupByLibrary.simpleMessage("我的订单"), - "wodedongtai" : MessageLookupByLibrary.simpleMessage("我的动态"), - "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), - "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的会员等级"), - "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的积分值"), - "wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍价"), - "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), - "wodenianling" : MessageLookupByLibrary.simpleMessage("我的年龄"), - "wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼团"), - "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"), - "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), - "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), - "wodeyaoqing" : MessageLookupByLibrary.simpleMessage("我的邀请"), - "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀请码"), - "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀请码"), - "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流单号:"), - "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), - "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), - "wuliuzhuangtai" : MessageLookupByLibrary.simpleMessage("物流状态:"), - "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"), - "xiadanshijian_" : m34, - "xiadanzhuanjifen" : MessageLookupByLibrary.simpleMessage("下单赚积分"), - "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), - "xiangce" : MessageLookupByLibrary.simpleMessage("相册"), - "xiangji" : MessageLookupByLibrary.simpleMessage("相机"), - "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), - "xiangqing" : MessageLookupByLibrary.simpleMessage("详情"), - "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("详细地址"), - "xianshangfafang" : MessageLookupByLibrary.simpleMessage("线上发放"), - "xianshangshiyong" : MessageLookupByLibrary.simpleMessage("线上使用"), - "xianxiashiyong" : MessageLookupByLibrary.simpleMessage("线下使用"), - "xiaofei" : MessageLookupByLibrary.simpleMessage("消费"), - "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), - "xiaofeijihuanka" : MessageLookupByLibrary.simpleMessage("消费集换卡"), - "xiaofeijilu" : MessageLookupByLibrary.simpleMessage("消费记录"), - "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), - "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等级"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加载完成"), - "xiedongtai" : MessageLookupByLibrary.simpleMessage("写动态"), - "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("海峡姐妹用户隐私政策"), - "xihuan_" : m35, - "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活动"), - "xingming" : MessageLookupByLibrary.simpleMessage("姓名"), - "xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系统通知"), - "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"), - "xiugai" : MessageLookupByLibrary.simpleMessage("修改"), - "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), - "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"), - "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), - "xuanhaola" : MessageLookupByLibrary.simpleMessage("选好啦"), - "xuanji" : MessageLookupByLibrary.simpleMessage("选集"), - "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), - "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"), - "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"), - "xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"), - "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"), - "xuni" : MessageLookupByLibrary.simpleMessage("虚拟"), - "yanzhengma" : MessageLookupByLibrary.simpleMessage("验证码"), - "yaoqinghaoyou" : MessageLookupByLibrary.simpleMessage("邀请好友"), - "yaoqinghaoyoudefen" : MessageLookupByLibrary.simpleMessage("邀请好友得分"), - "yaoqingrenshoujihao_" : m36, - "yaoqingwancheng" : MessageLookupByLibrary.simpleMessage("邀请完成"), - "yibangfuka" : MessageLookupByLibrary.simpleMessage("已绑副卡"), - "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"), - "yiduihuanjian" : m37, - "yifahuo" : MessageLookupByLibrary.simpleMessage("已发货"), - "yiguanzhu" : MessageLookupByLibrary.simpleMessage("已关注"), - "yihouzaishuo" : MessageLookupByLibrary.simpleMessage("以后再说"), - "yihuide" : MessageLookupByLibrary.simpleMessage("已获得"), - "yihujiaoqishou" : MessageLookupByLibrary.simpleMessage("已呼叫骑手"), - "yikaitongzidongxufei" : MessageLookupByLibrary.simpleMessage("已开通自动续费"), - "yikexiao" : MessageLookupByLibrary.simpleMessage("已核销"), - "yilingqu" : MessageLookupByLibrary.simpleMessage("已领取"), - "yindao1" : MessageLookupByLibrary.simpleMessage("新增多项功能,海量优惠资讯实时推送"), - "yindao2" : MessageLookupByLibrary.simpleMessage("新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停"), - "yindao3" : MessageLookupByLibrary.simpleMessage("新增会员任务得积分,消费可得绿金、积分商城换购"), - "yindao4" : MessageLookupByLibrary.simpleMessage("传递友爱纯净健康有机环保智慧理念"), - "yindaoye1" : MessageLookupByLibrary.simpleMessage("会员最新资讯抢先看"), - "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), - "yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"), - "yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), - "yingwen" : MessageLookupByLibrary.simpleMessage("英文"), - "yingyeshijian" : m38, - "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), - "yinshi" : MessageLookupByLibrary.simpleMessage("饮食"), - "yinsishengming" : MessageLookupByLibrary.simpleMessage("隐私声明"), - "yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隐私协议》"), - "yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感谢您使用海峡姐妹APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读海峡姐妹"), - "yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"), - "yinzhang" : MessageLookupByLibrary.simpleMessage("印章"), - "yiqiandao" : MessageLookupByLibrary.simpleMessage("已签到"), - "yiqianshou" : MessageLookupByLibrary.simpleMessage("已签收"), - "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), - "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), - "yishixiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiyong" : MessageLookupByLibrary.simpleMessage("已使用"), - "yishouquan" : MessageLookupByLibrary.simpleMessage("已授权"), - "yisongda" : MessageLookupByLibrary.simpleMessage("已送达"), - "yituikuan" : MessageLookupByLibrary.simpleMessage("已退款"), - "yiwancheng" : MessageLookupByLibrary.simpleMessage(" 已完成 "), - "yiwanchengdingdan" : MessageLookupByLibrary.simpleMessage("已完成订单"), - "yixianghuiyuanquanyi" : MessageLookupByLibrary.simpleMessage("已享会员权益"), - "yixiansquanbupinglun" : MessageLookupByLibrary.simpleMessage("-已显示全部评论-"), - "yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), - "yiyoujifen" : MessageLookupByLibrary.simpleMessage("已有积分"), - "yizhifu" : MessageLookupByLibrary.simpleMessage("已支付"), - "yonghuming" : MessageLookupByLibrary.simpleMessage("用户名"), - "yonghuxiaofeijifen" : MessageLookupByLibrary.simpleMessage("用户每消费1元可获得1个积分。"), - "youhuiquan" : MessageLookupByLibrary.simpleMessage("优惠券"), - "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), - "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), - "youkedenglu" : MessageLookupByLibrary.simpleMessage("游客登录"), - "youxiaoqi" : m39, - "youxiaoqixian" : MessageLookupByLibrary.simpleMessage("有效期限:"), - "youxiaoqizhi" : m40, - "yuan" : MessageLookupByLibrary.simpleMessage("元"), - "yuan_" : m41, - "yuanjia" : MessageLookupByLibrary.simpleMessage("原价"), - "yue" : MessageLookupByLibrary.simpleMessage("余额"), - "yue_" : m42, - "yue__" : m43, - "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), - "yuliudianhua" : MessageLookupByLibrary.simpleMessage("预留电话"), - "yunfei" : MessageLookupByLibrary.simpleMessage("运费"), - "yuyan" : MessageLookupByLibrary.simpleMessage("语言"), - "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再来一单"), - "zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"), - "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"), - "zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"), - "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("暂未解锁"), - "zanweikaifang" : MessageLookupByLibrary.simpleMessage("暂未开放"), - "zanweikaitong" : MessageLookupByLibrary.simpleMessage("暂未开通"), - "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), - "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"), - "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), - "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("账号安全"), - "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), - "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("账号信息"), - "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("账号与安全"), - "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("账号注销说明"), - "zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"), - "zhankai" : MessageLookupByLibrary.simpleMessage("展开"), - "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), - "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加载"), - "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加载中..."), - "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致电门店"), - "zhifubao" : MessageLookupByLibrary.simpleMessage("支付宝"), - "zhifubaozhifu" : MessageLookupByLibrary.simpleMessage("支付宝支付"), - "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), - "zhifuxiangqing" : MessageLookupByLibrary.simpleMessage("支付详情"), - "zhizunhuiyuan" : MessageLookupByLibrary.simpleMessage("至尊会员"), - "zhizuowancheng" : MessageLookupByLibrary.simpleMessage("制作完成"), - "zhongchakan" : MessageLookupByLibrary.simpleMessage("中查看"), - "zhongwenjianti" : MessageLookupByLibrary.simpleMessage("简体中文"), - "zhuanlan" : MessageLookupByLibrary.simpleMessage("专栏"), - "zhuanxiangyouhuiquan" : MessageLookupByLibrary.simpleMessage("专享优惠券"), - "zhunong1" : MessageLookupByLibrary.simpleMessage("爱在回乡 快乐助农"), - "zhunongjifen" : MessageLookupByLibrary.simpleMessage("助农积分"), - "zhunongzhuanqu" : MessageLookupByLibrary.simpleMessage("助农专区"), - "zhuxiaotixing" : MessageLookupByLibrary.simpleMessage("再次提醒:注销帐号后不可恢复,相关数据和信息会永久删除。"), - "zhuxiaozhanghao" : MessageLookupByLibrary.simpleMessage("注销账号"), - "ziqu" : MessageLookupByLibrary.simpleMessage("自取"), - "ziti" : MessageLookupByLibrary.simpleMessage("自提"), - "zitidizhi" : MessageLookupByLibrary.simpleMessage("自提地址"), - "zitiduihuanquan" : MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), - "zitishijian" : MessageLookupByLibrary.simpleMessage("自提时间"), - "zongzichan" : MessageLookupByLibrary.simpleMessage("总资产"), - "zongzichanyuan" : MessageLookupByLibrary.simpleMessage("总资产(元)"), - "zuanshihuiyuan" : MessageLookupByLibrary.simpleMessage("钻石会员"), - "zuixinwenzhang" : MessageLookupByLibrary.simpleMessage("最新文章"), - "zuorenwudejifen" : MessageLookupByLibrary.simpleMessage("做任务得积分"), - "zuozhe" : m44 - }; + static Map _notInlinedMessages(_) => { + "bainianchuanjiao": MessageLookupByLibrary.simpleMessage("百年川椒"), + "baiyin": MessageLookupByLibrary.simpleMessage("白银"), + "baiyinhuiyuan": MessageLookupByLibrary.simpleMessage("白银会员"), + "banben": m0, + "bangdingfuka": MessageLookupByLibrary.simpleMessage("绑定副卡"), + "bangdingshouji": MessageLookupByLibrary.simpleMessage("绑定手机"), + "bangong": MessageLookupByLibrary.simpleMessage("办公"), + "bangzhuyufankui": MessageLookupByLibrary.simpleMessage("帮助与反馈"), + "baocun": MessageLookupByLibrary.simpleMessage("保存"), + "baocunchenggong": MessageLookupByLibrary.simpleMessage("保存成功"), + "baocunsaoma": MessageLookupByLibrary.simpleMessage( + "截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!"), + "beiyaoqingdejiangli": MessageLookupByLibrary.simpleMessage( + "每一位被邀请的用户,在输入邀请码之后可获得前进麦味10元代金券一张"), + "beizhu": MessageLookupByLibrary.simpleMessage("备注"), + "beizhuxinxi": MessageLookupByLibrary.simpleMessage("备注信息"), + "benzhouquanbao": MessageLookupByLibrary.simpleMessage("本周券包"), + "bianjidizhi": MessageLookupByLibrary.simpleMessage("编辑地址"), + "bianjigerenziliao": MessageLookupByLibrary.simpleMessage("编辑个人资料"), + "biaojiweiyidu": MessageLookupByLibrary.simpleMessage("标为已读"), + "biaoweiyidu": MessageLookupByLibrary.simpleMessage("标为已读"), + "bodadianhua": MessageLookupByLibrary.simpleMessage("拨打电话"), + "bofangcishu": MessageLookupByLibrary.simpleMessage("播放次数"), + "bojin": MessageLookupByLibrary.simpleMessage("铂金"), + "brand_yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "buzhichikaipiao": MessageLookupByLibrary.simpleMessage("不支持开票"), + "canyingfuwu": MessageLookupByLibrary.simpleMessage("餐饮服务"), + "chakan": MessageLookupByLibrary.simpleMessage("查看"), + "chakangengduo": MessageLookupByLibrary.simpleMessage("查看更多"), + "chakanhexiaoma": MessageLookupByLibrary.simpleMessage("查看核销码"), + "chakanquanyi": MessageLookupByLibrary.simpleMessage("查看权益"), + "chakanshixiaoquan": MessageLookupByLibrary.simpleMessage("查看失效券"), + "chakanwodekabao": MessageLookupByLibrary.simpleMessage("查看我的卡包"), + "chakanwodekaquan": MessageLookupByLibrary.simpleMessage("查看我的卡券"), + "chakanwuliu": MessageLookupByLibrary.simpleMessage("查看物流"), + "chakanxiangqing": MessageLookupByLibrary.simpleMessage("查看详情"), + "changjianwenti": MessageLookupByLibrary.simpleMessage("常见问题"), + "changqiyouxiao": MessageLookupByLibrary.simpleMessage("长期有效"), + "chaojiyouhuiquan": MessageLookupByLibrary.simpleMessage("超值优惠券"), + "chaungshirengushi": MessageLookupByLibrary.simpleMessage("创始人故事"), + "chenggongdengluzhuce": + MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), + "chengjiu": MessageLookupByLibrary.simpleMessage("成就"), + "chengjiuhuizhang": MessageLookupByLibrary.simpleMessage("成就徽章"), + "chengshixuanze": MessageLookupByLibrary.simpleMessage("城市选择"), + "chengweidianpuzhuanshuhuiyuan": + MessageLookupByLibrary.simpleMessage("成为店铺专属会员,享专属权益"), + "chi": MessageLookupByLibrary.simpleMessage("吃"), + "chijiankang": MessageLookupByLibrary.simpleMessage("吃健康"), + "chongzhi": MessageLookupByLibrary.simpleMessage("充值"), + "chongzhichenggong": MessageLookupByLibrary.simpleMessage("充值成功"), + "chongzhifuliduo": MessageLookupByLibrary.simpleMessage("充值福利多"), + "chongzhixiaoxi": MessageLookupByLibrary.simpleMessage("充值消息"), + "chongzhizuixiaojine": m1, + "chuangjianshijian": m2, + "chuangshirendegushi": MessageLookupByLibrary.simpleMessage("创始人的故事-"), + "chuangshirendegushi1": MessageLookupByLibrary.simpleMessage("创始人的故事"), + "chuzhiyouhui": MessageLookupByLibrary.simpleMessage("储值优惠"), + "code_error": MessageLookupByLibrary.simpleMessage("验证码输入错误"), + "cunchu": MessageLookupByLibrary.simpleMessage("存储"), + "cunchutishixinxi": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"), + "dabaodaodianqu": MessageLookupByLibrary.simpleMessage("打包到店取"), + "daifukuan": MessageLookupByLibrary.simpleMessage("待付款"), + "daipeisong": MessageLookupByLibrary.simpleMessage("待配送"), + "daiqucan": MessageLookupByLibrary.simpleMessage("待取餐"), + "daiqueren": MessageLookupByLibrary.simpleMessage("待确认"), + "daizhifu": MessageLookupByLibrary.simpleMessage("待支付"), + "daizhizuo": MessageLookupByLibrary.simpleMessage("待制作"), + "dajiadouzaiduihuan": MessageLookupByLibrary.simpleMessage("大家都在兑换"), + "dakaidingwei": MessageLookupByLibrary.simpleMessage("打开定位"), + "dangqianbanben": MessageLookupByLibrary.simpleMessage("当前版本"), + "dangqiandengji": MessageLookupByLibrary.simpleMessage("当前等级"), + "dangqianjifen": MessageLookupByLibrary.simpleMessage("当前积分:"), + "dangqianshangpinduihuanhexiaoma": + MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), + "dangqianzhukadengji": MessageLookupByLibrary.simpleMessage("当前主卡等级"), + "daodianziqu": MessageLookupByLibrary.simpleMessage("到店自取"), + "daopinglunliebiaodingbu": + MessageLookupByLibrary.simpleMessage("到评论列表顶部"), + "daoxiayidengji": MessageLookupByLibrary.simpleMessage("到下一等级"), + "dengdaishangjiaqueren": MessageLookupByLibrary.simpleMessage("等待商家确认"), + "dengdaiyonghuqucan": MessageLookupByLibrary.simpleMessage("等待用户取餐"), + "denglu": MessageLookupByLibrary.simpleMessage("登录"), + "diancan": MessageLookupByLibrary.simpleMessage("点餐"), + "diandan": MessageLookupByLibrary.simpleMessage("点单"), + "dianhua": MessageLookupByLibrary.simpleMessage("电话"), + "dianjidenglu": MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), + "dianneiyongcan": MessageLookupByLibrary.simpleMessage("店内用餐"), + "dianpuchongzhi": MessageLookupByLibrary.simpleMessage("店铺充值"), + "dianputuijian": MessageLookupByLibrary.simpleMessage("店铺推荐"), + "dianpuyue": MessageLookupByLibrary.simpleMessage("店铺余额"), + "dianwolingqu": MessageLookupByLibrary.simpleMessage("点我领取"), + "dianzan": MessageLookupByLibrary.simpleMessage("点赞"), + "dianzanxihuan_": m3, + "dingdan": MessageLookupByLibrary.simpleMessage("订单"), + "dingdanbianhao": MessageLookupByLibrary.simpleMessage("订单编号"), + "dingdandaifahuo": MessageLookupByLibrary.simpleMessage("订单待发货"), + "dingdandaizhifu": MessageLookupByLibrary.simpleMessage("订单待支付"), + "dingdangenzong": MessageLookupByLibrary.simpleMessage("订单跟踪"), + "dingdanhao": MessageLookupByLibrary.simpleMessage("订单号"), + "dingdanjiesuan": MessageLookupByLibrary.simpleMessage("订单结算"), + "dingdanqueren": MessageLookupByLibrary.simpleMessage("订单确认"), + "dingdantongzhi": MessageLookupByLibrary.simpleMessage("订单通知"), + "dingdanxiaoxi": MessageLookupByLibrary.simpleMessage("订单消息"), + "dingdanyisongda": MessageLookupByLibrary.simpleMessage("订单送达"), + "dingdanyituikuan": MessageLookupByLibrary.simpleMessage("订单已退款"), + "dingdanyiwancheng": MessageLookupByLibrary.simpleMessage("订单已完成"), + "dingdanyizhifu": MessageLookupByLibrary.simpleMessage("订单已支付"), + "dingwei": MessageLookupByLibrary.simpleMessage("定位"), + "dizhi": MessageLookupByLibrary.simpleMessage("地址"), + "dongtai": MessageLookupByLibrary.simpleMessage("动态"), + "dongtaitishi": MessageLookupByLibrary.simpleMessage( + "用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示"), + "dongtaixiangqing": MessageLookupByLibrary.simpleMessage("动态详情"), + "duihuan": MessageLookupByLibrary.simpleMessage("兑换"), + "duihuanchenggong": MessageLookupByLibrary.simpleMessage("兑换成功"), + "duihuanguize": MessageLookupByLibrary.simpleMessage("兑换规则"), + "duihuanhoufahuo": MessageLookupByLibrary.simpleMessage("兑换后五个工作日内发货"), + "duihuanhouwugegongzuori": + MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), + "duihuanliangdidaogao": MessageLookupByLibrary.simpleMessage("兑换量从低到高"), + "duihuanlianggaodaodi": MessageLookupByLibrary.simpleMessage("兑换量从高到低"), + "duihuanlishi": MessageLookupByLibrary.simpleMessage("兑换历史"), + "duihuanquan": MessageLookupByLibrary.simpleMessage("兑换券"), + "duihuanshangpinxiangqing": + MessageLookupByLibrary.simpleMessage("兑换商品详情"), + "duihuanxinxi": MessageLookupByLibrary.simpleMessage("兑换信息"), + "duozhongyouhui": MessageLookupByLibrary.simpleMessage("多种优惠券等你拿"), + "fabu": MessageLookupByLibrary.simpleMessage("发布"), + "fangshier": MessageLookupByLibrary.simpleMessage("方式二"), + "fangshiyi": MessageLookupByLibrary.simpleMessage("方式一"), + "fanhuiduihuanlishi": MessageLookupByLibrary.simpleMessage("返回兑换历史"), + "fanhuishequn": MessageLookupByLibrary.simpleMessage("返回社群"), + "fanhuishouye": MessageLookupByLibrary.simpleMessage("返回首页"), + "fankui": MessageLookupByLibrary.simpleMessage("反馈"), + "fankuilizi": + MessageLookupByLibrary.simpleMessage("您可以在这里输入反馈内容,例如产品建议,功能异常等"), + "fantizhongwen": MessageLookupByLibrary.simpleMessage("繁体中文"), + "fapiao": MessageLookupByLibrary.simpleMessage("发票"), + "fapiaozhushou": MessageLookupByLibrary.simpleMessage("发票助手"), + "fasong": MessageLookupByLibrary.simpleMessage("发送"), + "fasongduanxin": MessageLookupByLibrary.simpleMessage("发送短信"), + "faxingshijian": m4, + "feishiwuduihuanma": MessageLookupByLibrary.simpleMessage("非实物兑换码"), + "feishiwushangpin": + MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), + "fensi": MessageLookupByLibrary.simpleMessage("粉丝"), + "fenxiang": MessageLookupByLibrary.simpleMessage("分享"), + "fenxiangdao": MessageLookupByLibrary.simpleMessage("分享到"), + "fenxiangjiankang": MessageLookupByLibrary.simpleMessage("分享健康"), + "fenxiangyaoqing": + MessageLookupByLibrary.simpleMessage("也可以直接点击右上方的分享给到你想要邀请的人。"), + "fenxiangyaoqingma": MessageLookupByLibrary.simpleMessage( + "将邀请码分享给好友,对方在海峡姐妹App登录页输入邀请码,即可邀请成功。"), + "fenxiangzhiweixin": MessageLookupByLibrary.simpleMessage("分享至微信"), + "fukashoujihao": MessageLookupByLibrary.simpleMessage("副卡手机号"), + "fuliduihuan": MessageLookupByLibrary.simpleMessage("福利兑换"), + "fulizhongxin": MessageLookupByLibrary.simpleMessage("福利中心"), + "ge": m5, + "geiwopingfen": MessageLookupByLibrary.simpleMessage("给我评分"), + "gengduo": MessageLookupByLibrary.simpleMessage("更多"), + "gengduohaoquan": MessageLookupByLibrary.simpleMessage("更多好券"), + "gengduoyouhuiquan": MessageLookupByLibrary.simpleMessage("更多优惠券"), + "genggaibangdingshoujihao": + MessageLookupByLibrary.simpleMessage("更改绑定手机号"), + "genghuanbeijing": MessageLookupByLibrary.simpleMessage("更换背景"), + "genghuantouxiang": MessageLookupByLibrary.simpleMessage("更换头像"), + "gengyouhui": MessageLookupByLibrary.simpleMessage("更优惠"), + "gerenxinxi": MessageLookupByLibrary.simpleMessage("个人信息"), + "gexingqianming": MessageLookupByLibrary.simpleMessage("个性签名"), + "gong": MessageLookupByLibrary.simpleMessage("共"), + "gongchuanghuiyuan": MessageLookupByLibrary.simpleMessage("共创会员"), + "gongjijian": m6, + "gongjijianshangpin": m7, + "gongli": m8, + "gongxinchengwei": MessageLookupByLibrary.simpleMessage("恭喜您成为"), + "gongxinichengweibendianhuiyuan": + MessageLookupByLibrary.simpleMessage("恭喜您,成为本店的会员,快去享受超多会员权益吧。"), + "gouxuanxieyi": + MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和海峡姐妹服务协议"), + "guanlidizhi": MessageLookupByLibrary.simpleMessage("管理地址"), + "guanyu": MessageLookupByLibrary.simpleMessage("关于"), + "guanyuchuangshiren": MessageLookupByLibrary.simpleMessage("关于创始人"), + "guanyuhuixiang": MessageLookupByLibrary.simpleMessage("关于回乡"), + "guanzhu": MessageLookupByLibrary.simpleMessage("关注"), + "guojiankangyoujishenghuo": + MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "haimeiyouxiaoxi": MessageLookupByLibrary.simpleMessage("还没有消息~"), + "haimeiyouyouhuiquankeyilingqu": + MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"), + "haixiajiemei": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "haowu": MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize": MessageLookupByLibrary.simpleMessage("好友奖励规则"), + "he": MessageLookupByLibrary.simpleMessage("喝"), + "heji": MessageLookupByLibrary.simpleMessage("合计:"), + "hejiankang": MessageLookupByLibrary.simpleMessage("喝健康"), + "hexiaochenggong": MessageLookupByLibrary.simpleMessage("核销成功"), + "hexiaomaxiangqing": MessageLookupByLibrary.simpleMessage("核销码详情"), + "huangjin": MessageLookupByLibrary.simpleMessage("黄金"), + "huangjinhuiyuan": MessageLookupByLibrary.simpleMessage("黄金会员"), + "huifu": MessageLookupByLibrary.simpleMessage("回复"), + "huifu_": m9, + "huixiangVIPka": MessageLookupByLibrary.simpleMessage("回乡VIP卡"), + "huixiangqianbao": MessageLookupByLibrary.simpleMessage("海峡钱包"), + "huixiangrenyimendian": + MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), + "huixiangtoutiao": MessageLookupByLibrary.simpleMessage("回乡头条"), + "huixiangvipkazhuanxiang": + MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"), + "huixiangxieyi": MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"), + "huiyuandengji": MessageLookupByLibrary.simpleMessage("会员等级"), + "huiyuandengjishuoming": MessageLookupByLibrary.simpleMessage("会员等级说明"), + "huiyuanguize": MessageLookupByLibrary.simpleMessage("会员规则说明"), + "huiyuanhuodejifen": MessageLookupByLibrary.simpleMessage("会员如何获得积分"), + "huiyuanjia": MessageLookupByLibrary.simpleMessage("会员价"), + "huiyuanjibieduizhao": MessageLookupByLibrary.simpleMessage("会员级别对照表"), + "huiyuanjifen": MessageLookupByLibrary.simpleMessage("会员积分"), + "huiyuanka": MessageLookupByLibrary.simpleMessage("会员卡"), + "huiyuankaxiangqing": MessageLookupByLibrary.simpleMessage("会员卡详情"), + "huiyuanma": MessageLookupByLibrary.simpleMessage("会员码"), + "huiyuanquanyi": MessageLookupByLibrary.simpleMessage("会员权益"), + "huiyuanyue": MessageLookupByLibrary.simpleMessage("会员余额"), + "huiyuanzhongxin": MessageLookupByLibrary.simpleMessage("会员中心"), + "huiyuanzhuanxiangjiage": + MessageLookupByLibrary.simpleMessage("会员专享价格"), + "huode": MessageLookupByLibrary.simpleMessage("获得"), + "huodequanyi": MessageLookupByLibrary.simpleMessage("获得权益"), + "huodong": MessageLookupByLibrary.simpleMessage("活动"), + "huodongguize": MessageLookupByLibrary.simpleMessage("活动规则"), + "huodongjianmianpeisongfei": m10, + "huodongjinxingzhong": MessageLookupByLibrary.simpleMessage("活动进行中"), + "huodongliebiao": MessageLookupByLibrary.simpleMessage("活动列表"), + "huodongyue": MessageLookupByLibrary.simpleMessage("活动余额"), + "huodongyue_": m11, + "huodongzixun": MessageLookupByLibrary.simpleMessage("活动资讯"), + "huopinyisongda": MessageLookupByLibrary.simpleMessage("货品已送达"), + "huozan": MessageLookupByLibrary.simpleMessage("获赞"), + "input_code": MessageLookupByLibrary.simpleMessage("手机验证码"), + "input_code_hide": MessageLookupByLibrary.simpleMessage("请输入验证码"), + "input_invite_code_hide": MessageLookupByLibrary.simpleMessage("填写邀请码"), + "input_phone": MessageLookupByLibrary.simpleMessage("输入手机号"), + "input_phone_hide": MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "invite_code_error": MessageLookupByLibrary.simpleMessage("邀请码输入错误"), + "jiajifen": m12, + "jian": MessageLookupByLibrary.simpleMessage("件"), + "jiangli": MessageLookupByLibrary.simpleMessage("奖励"), + "jiangshi": MessageLookupByLibrary.simpleMessage("讲师"), + "jianjie": m13, + "jiazaishibai": MessageLookupByLibrary.simpleMessage("加载失败"), + "jiesuan": MessageLookupByLibrary.simpleMessage("结算"), + "jiesuanjine": MessageLookupByLibrary.simpleMessage("结算金额"), + "jifen": MessageLookupByLibrary.simpleMessage("积分"), + "jifen_": m14, + "jifenbuzu": MessageLookupByLibrary.simpleMessage("您的积分不足"), + "jifendaoxiayidengji": m15, + "jifendejisuanshuoming": + MessageLookupByLibrary.simpleMessage("积分的计算说明"), + "jifendidaogao": MessageLookupByLibrary.simpleMessage("积分从低到高"), + "jifengaodaodi": MessageLookupByLibrary.simpleMessage("积分从高到低"), + "jifenhuanquan": MessageLookupByLibrary.simpleMessage("积分换券"), + "jifenmingxi": MessageLookupByLibrary.simpleMessage("积分明细"), + "jifenshangcheng": MessageLookupByLibrary.simpleMessage("积分商城"), + "jifenxiangqing": MessageLookupByLibrary.simpleMessage("积分详情"), + "jihuanka": MessageLookupByLibrary.simpleMessage("集换卡"), + "jingbilianmenghuiyuandian": + MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), + "jingxuanhaowen": MessageLookupByLibrary.simpleMessage("精选好文"), + "jingxuanhuodong": MessageLookupByLibrary.simpleMessage("精选活动"), + "jinkahuiyuan": MessageLookupByLibrary.simpleMessage("金卡会员"), + "jinrihuiyuanrenwu": MessageLookupByLibrary.simpleMessage("今日会员任务"), + "jinrushangdian": MessageLookupByLibrary.simpleMessage("进入商店"), + "jinruzhuanqu": MessageLookupByLibrary.simpleMessage("进入专区"), + "jinxingbangdingfuka": MessageLookupByLibrary.simpleMessage("进行绑定副卡"), + "jinxingfukabangding": MessageLookupByLibrary.simpleMessage("进行副卡绑定"), + "jinxingzhanghaozhuxiao": + MessageLookupByLibrary.simpleMessage("进行账号注销"), + "jinxingzhongdedingdan": MessageLookupByLibrary.simpleMessage("进行中的订单"), + "jituanchuangbanren": MessageLookupByLibrary.simpleMessage(" 集团创办人"), + "jituanchuangshiren": MessageLookupByLibrary.simpleMessage("集团创始人"), + "jixuduihuan": MessageLookupByLibrary.simpleMessage("继续兑换"), + "jixuzhifu": MessageLookupByLibrary.simpleMessage("继续支付"), + "jubao": MessageLookupByLibrary.simpleMessage("举报"), + "jubaogaineirong": MessageLookupByLibrary.simpleMessage("举报该内容"), + "jubaotishi": MessageLookupByLibrary.simpleMessage( + "您的举报正在等待人工审核,我们会在7~15个工作日处理,处理结果可在"), + "jubaoyuanyin": + MessageLookupByLibrary.simpleMessage("请输入举报原因,以便我们更快定位问题,快速处理"), + "jujue": MessageLookupByLibrary.simpleMessage("拒绝"), + "kabao": MessageLookupByLibrary.simpleMessage("卡包"), + "kabaokeshiyong": MessageLookupByLibrary.simpleMessage("卡包-可使用"), + "kaiqiquanxian": MessageLookupByLibrary.simpleMessage("开启权限"), + "kaitonghuixianghuoququanyi": + MessageLookupByLibrary.simpleMessage("开通回乡VIP卡获取更多权益"), + "kaitongriqi": m16, + "kaquan": MessageLookupByLibrary.simpleMessage("卡券"), + "kelingqudeyouhuiquan": MessageLookupByLibrary.simpleMessage("可领取的优惠券"), + "keshiyong": MessageLookupByLibrary.simpleMessage("可使用"), + "keyongjifen": MessageLookupByLibrary.simpleMessage("可用积分"), + "keyongquan": MessageLookupByLibrary.simpleMessage("可用券"), + "keyongyouhuiquan": MessageLookupByLibrary.simpleMessage("可用优惠券"), + "keyongyue": MessageLookupByLibrary.simpleMessage("可用余额"), + "kongtiao": MessageLookupByLibrary.simpleMessage("空调"), + "kuaidi": MessageLookupByLibrary.simpleMessage("快递"), + "kuaidiwuliu": MessageLookupByLibrary.simpleMessage("快递物流"), + "kuailezhunong": MessageLookupByLibrary.simpleMessage("快乐助农"), + "lianxikefu": MessageLookupByLibrary.simpleMessage("联系客服"), + "lianxishoujihao": MessageLookupByLibrary.simpleMessage("联系手机号"), + "lianxuqiandaolingqushuangbeijifen": + MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), + "liaojie": MessageLookupByLibrary.simpleMessage("了解"), + "liaojiejiankang": MessageLookupByLibrary.simpleMessage("了解健康"), + "lijicanjia": MessageLookupByLibrary.simpleMessage("立即参加"), + "lijichongzhi": MessageLookupByLibrary.simpleMessage("立即充值"), + "lijigengxin": MessageLookupByLibrary.simpleMessage("立即更新"), + "lijikaitong": MessageLookupByLibrary.simpleMessage("立即开通"), + "lijilingqu": MessageLookupByLibrary.simpleMessage("立即领取"), + "lijiqiandao": MessageLookupByLibrary.simpleMessage("立即签到"), + "lijishiyong": MessageLookupByLibrary.simpleMessage("立即使用"), + "lijitiyan": MessageLookupByLibrary.simpleMessage("立即体验"), + "lijiyuyue": MessageLookupByLibrary.simpleMessage("立即预约"), + "likekaitong": MessageLookupByLibrary.simpleMessage("立刻开通"), + "likexufei": MessageLookupByLibrary.simpleMessage("立刻续费"), + "likezhifu": MessageLookupByLibrary.simpleMessage("立刻支付"), + "lingqu": MessageLookupByLibrary.simpleMessage("领取"), + "lingquanzhongxin": MessageLookupByLibrary.simpleMessage("领券中心"), + "lingquchenggong": MessageLookupByLibrary.simpleMessage("领取成功"), + "lingqudaokabao": MessageLookupByLibrary.simpleMessage("领取到卡包"), + "lingqufangshi": MessageLookupByLibrary.simpleMessage("领取方式"), + "lingqushijian": m17, + "linian": MessageLookupByLibrary.simpleMessage("理念"), + "lishijilu": MessageLookupByLibrary.simpleMessage("历史记录"), + "liuxianinjingcaidepinglunba": + MessageLookupByLibrary.simpleMessage("留下您精彩的评论吧"), + "login": MessageLookupByLibrary.simpleMessage("登录"), + "login_splash": MessageLookupByLibrary.simpleMessage("欢迎来到海峡姐妹"), + "lvbiyue": MessageLookupByLibrary.simpleMessage("绿币余额"), + "lvbiyue_": m18, + "lvbizhifu": MessageLookupByLibrary.simpleMessage("绿币支付"), + "main_menu1": MessageLookupByLibrary.simpleMessage("首页"), + "main_menu2": MessageLookupByLibrary.simpleMessage("门店"), + "main_menu3": MessageLookupByLibrary.simpleMessage("社群"), + "main_menu4": MessageLookupByLibrary.simpleMessage("我的"), + "main_menu5": MessageLookupByLibrary.simpleMessage("hi"), + "manlijiandaijinquan": m19, + "manyuankeyong": m20, + "meiriqiandao": MessageLookupByLibrary.simpleMessage("每日签到"), + "meiyougengduohuiyuanka": + MessageLookupByLibrary.simpleMessage("没有更多会员卡"), + "meiyougengduoshujule": + MessageLookupByLibrary.simpleMessage("没有更多的数据了"), + "meiyougengduoyouhuiquan": + MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), + "meizhousangengxin": MessageLookupByLibrary.simpleMessage("每周三更新"), + "meizhousanquanbao": MessageLookupByLibrary.simpleMessage("每周三更新劵包"), + "mendianxuanzhe": MessageLookupByLibrary.simpleMessage("门店选择"), + "mendianyue": MessageLookupByLibrary.simpleMessage("门店余额"), + "menpaihao": MessageLookupByLibrary.simpleMessage("请输入门牌号"), + "mi": m21, + "mingxi": MessageLookupByLibrary.simpleMessage("明细"), + "morenpaixu": MessageLookupByLibrary.simpleMessage("默认排序"), + "muqianwujilu": MessageLookupByLibrary.simpleMessage("目前暂未记录哦"), + "muqianzanwuxingdianhuodong": + MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), + "nihaimeiyouchongzhihuoxiaofeijilu": + MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), + "nincunchuquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), + "nindingweigongnengweikaiqi": + MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), + "nindingweiquanxianweiyunxu": + MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), + "ninweidenglu": MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), + "ninxiangjiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), + "ninxiaoxiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), + "ninyichenggonglingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("您已成功领取优惠劵,请在"), + "ninyilianxuqiandaotian": m22, + "ninyouyigedingdanyaolingqu": + MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), + "ninyouyigexindedingdan": + MessageLookupByLibrary.simpleMessage("您有一个新的订单"), + "paizhao": MessageLookupByLibrary.simpleMessage("拍照"), + "peisong": MessageLookupByLibrary.simpleMessage("配送"), + "peisongfangshi": MessageLookupByLibrary.simpleMessage("配送方式"), + "peisongfei": MessageLookupByLibrary.simpleMessage("配送费"), + "peisongfuwu": MessageLookupByLibrary.simpleMessage("配送服务"), + "peisongzhong": MessageLookupByLibrary.simpleMessage("配送中"), + "phone_error": MessageLookupByLibrary.simpleMessage("手机格式错误"), + "pinglun": MessageLookupByLibrary.simpleMessage("评论"), + "pinglun_": m23, + "pingtaiyue": MessageLookupByLibrary.simpleMessage("平台余额"), + "pingtaizhifumima": MessageLookupByLibrary.simpleMessage("平台支付密码"), + "pingtaizongyue": m24, + "pinpai": MessageLookupByLibrary.simpleMessage("品牌"), + "pinpaijieshao": MessageLookupByLibrary.simpleMessage("品牌介绍"), + "privacy_policy1": MessageLookupByLibrary.simpleMessage("登录既同意"), + "privacy_policy2": MessageLookupByLibrary.simpleMessage("《海峡姐妹服务协议》"), + "privacy_policy3": MessageLookupByLibrary.simpleMessage("《隐私服务》"), + "privacy_policy4": MessageLookupByLibrary.simpleMessage("并使用本机号码登录"), + "qianbao": MessageLookupByLibrary.simpleMessage("钱包"), + "qiandao": MessageLookupByLibrary.simpleMessage("签到"), + "qiandaodejifen": MessageLookupByLibrary.simpleMessage("签到得积分"), + "qiandaolingjifen": MessageLookupByLibrary.simpleMessage("签到领积分"), + "qiandaolingqujinfen": MessageLookupByLibrary.simpleMessage("签到领取积分"), + "qiandaowancheng": MessageLookupByLibrary.simpleMessage("签到完成"), + "qianjinmaiwei": MessageLookupByLibrary.simpleMessage("前进麦味"), + "qianshou": MessageLookupByLibrary.simpleMessage("已签收"), + "qianwanghuixiangmendianduihuanhexiao": + MessageLookupByLibrary.simpleMessage( + "前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun": MessageLookupByLibrary.simpleMessage("清理缓存"), + "qingshurubeizhuyaoqiu": + MessageLookupByLibrary.simpleMessage("请输入备注要求"), + "qingshuruchongzhijine": + MessageLookupByLibrary.simpleMessage("请输入充值金额"), + "qingshurushoujihao": MessageLookupByLibrary.simpleMessage("请输入手机号"), + "qingshuruyanzhengma": MessageLookupByLibrary.simpleMessage("请输入验证码"), + "qingshuruyaoqingma": MessageLookupByLibrary.simpleMessage("请输入邀请码"), + "qingshuruyouxiaoshoujihaoma": + MessageLookupByLibrary.simpleMessage("请输入您的有效手机号"), + "qingshuruzhifumima": MessageLookupByLibrary.simpleMessage("请输入支付密码"), + "qingtianxieshoujihao": + MessageLookupByLibrary.simpleMessage("请填写收件人手机号"), + "qingtianxiexingming": MessageLookupByLibrary.simpleMessage("请填写收件人姓名"), + "qingtong": MessageLookupByLibrary.simpleMessage("青铜"), + "qingtonghuiyuan": MessageLookupByLibrary.simpleMessage("青铜会员"), + "qingxianxuanguige": MessageLookupByLibrary.simpleMessage("请先选规格"), + "qingxuanzeshiyongmendian": + MessageLookupByLibrary.simpleMessage("请选择使用门店"), + "qingxuanzeshouhuodizhi": + MessageLookupByLibrary.simpleMessage("请选择收货地址"), + "qingxuanzeyigemendian": + MessageLookupByLibrary.simpleMessage("请选择一个门店"), + "qingxuanzeyuyeushijian": + MessageLookupByLibrary.simpleMessage("请选择预约时间"), + "qingxuanzeyuyuemendian": + MessageLookupByLibrary.simpleMessage("请选择预约门店"), + "qingxuanzhemendian": MessageLookupByLibrary.simpleMessage("请选择门店"), + "qingxuanzheninxiangshezhideyuyan": + MessageLookupByLibrary.simpleMessage("请选择您想设置的语言"), + "qingzaiguidingshijianneizhifu": + MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"), + "qingzhuo": MessageLookupByLibrary.simpleMessage("清桌"), + "qishoupeisongzhongyujisongdashijian": + MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"), + "qishouyijiedanquhuozhong": + MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"), + "qita": MessageLookupByLibrary.simpleMessage("其他"), + "qiyetuanjian": MessageLookupByLibrary.simpleMessage("企业团建"), + "quanbao": MessageLookupByLibrary.simpleMessage("券包"), + "quanbu": MessageLookupByLibrary.simpleMessage("全部"), + "quanbudingdan": MessageLookupByLibrary.simpleMessage("全部订单"), + "quanbuduihuan": MessageLookupByLibrary.simpleMessage("全部兑换"), + "quanchangtongyong": MessageLookupByLibrary.simpleMessage("全场通用"), + "quanchangzhe": m25, + "quantian": MessageLookupByLibrary.simpleMessage("全天"), + "quanxian": MessageLookupByLibrary.simpleMessage("权限"), + "quanxianshezhi": MessageLookupByLibrary.simpleMessage("权限设置"), + "quanyijishao": MessageLookupByLibrary.simpleMessage("权益介绍"), + "quanyishuoming": MessageLookupByLibrary.simpleMessage("权益说明"), + "quanyixiangqing": MessageLookupByLibrary.simpleMessage("权益详情"), + "qucanhao": MessageLookupByLibrary.simpleMessage("取餐号"), + "qudanhao": m26, + "qudaolaiyuan": MessageLookupByLibrary.simpleMessage("渠道来源"), + "qudenglu": MessageLookupByLibrary.simpleMessage("去登录"), + "queding": MessageLookupByLibrary.simpleMessage("确定"), + "quedingyaoshanchudongtai": + MessageLookupByLibrary.simpleMessage("确定要删除这条动态?"), + "queren": MessageLookupByLibrary.simpleMessage("确认"), + "querenbangding": MessageLookupByLibrary.simpleMessage("确认绑定"), + "querenchongzhi": MessageLookupByLibrary.simpleMessage("确认充值"), + "querenduihuan": MessageLookupByLibrary.simpleMessage("确认兑换"), + "querenshouhuo": MessageLookupByLibrary.simpleMessage("确认收货"), + "querenyaoshanchudangqianpinglunma": + MessageLookupByLibrary.simpleMessage("确认要删除当前评论?"), + "querenzhuxiao": MessageLookupByLibrary.simpleMessage("确认注销"), + "quhexiao": MessageLookupByLibrary.simpleMessage("去核销"), + "quhuozhong": MessageLookupByLibrary.simpleMessage("取货中"), + "qujianma": MessageLookupByLibrary.simpleMessage("取件码"), + "quqiandao": MessageLookupByLibrary.simpleMessage("去签到"), + "qushiyong": MessageLookupByLibrary.simpleMessage("去使用"), + "quwancheng": MessageLookupByLibrary.simpleMessage(" 去完成 "), + "quxiao": MessageLookupByLibrary.simpleMessage("取消"), + "quxiaodingdan": MessageLookupByLibrary.simpleMessage("取消订单"), + "quxiaozhifu": MessageLookupByLibrary.simpleMessage("取消支付"), + "quzhifu": MessageLookupByLibrary.simpleMessage("去支付"), + "remenwenzhangshipin": MessageLookupByLibrary.simpleMessage("热门文章视频"), + "remenwenzhangshipinliebiao": + MessageLookupByLibrary.simpleMessage("热门文章视频列表"), + "ren": m27, + "renwuzhongxin": MessageLookupByLibrary.simpleMessage("任务中心"), + "resend_in_seconds": m28, + "ricahngfenxiang": MessageLookupByLibrary.simpleMessage("日常分享"), + "ruhedihuanjifen": MessageLookupByLibrary.simpleMessage("如何兑换积分"), + "ruhedihuanjifen1": MessageLookupByLibrary.simpleMessage( + "点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~"), + "ruhelingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("如何领取优惠券?"), + "ruhelingquyouhuiquan1": MessageLookupByLibrary.simpleMessage( + "点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~"), + "ruheqiandao": MessageLookupByLibrary.simpleMessage("如何签到?"), + "ruheqiandao1": MessageLookupByLibrary.simpleMessage( + "1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。"), + "ruxutuikuanqingyumendianlianxi": MessageLookupByLibrary.simpleMessage( + "如需退款,请您提前准备好订单号/取单号,并与门店人员进行联系"), + "saoma": MessageLookupByLibrary.simpleMessage("扫码"), + "saomadiancan": MessageLookupByLibrary.simpleMessage("您即将进行扫码点餐"), + "saomashibieguanzhugongzonghao": + MessageLookupByLibrary.simpleMessage("扫码识别,关注公众号"), + "send_code": MessageLookupByLibrary.simpleMessage("发送验证码"), + "shanchu": MessageLookupByLibrary.simpleMessage("删除"), + "shanchudingdan": MessageLookupByLibrary.simpleMessage("删除一单"), + "shanghuruzhu": MessageLookupByLibrary.simpleMessage("商户入驻"), + "shangjiaquan": MessageLookupByLibrary.simpleMessage("商家券"), + "shangjiaqueren": MessageLookupByLibrary.simpleMessage("商家确认"), + "shangjiayifahuo": MessageLookupByLibrary.simpleMessage("商家已发货"), + "shangjiazhengzaipeican": + MessageLookupByLibrary.simpleMessage("商家正在配餐"), + "shanglajiazai": MessageLookupByLibrary.simpleMessage("上拉加载"), + "shangpincaigou": MessageLookupByLibrary.simpleMessage("商品采购"), + "shangpinjifen": m29, + "shangpinxiangqing": MessageLookupByLibrary.simpleMessage("商品详情"), + "shangyidengji": MessageLookupByLibrary.simpleMessage("上一等级"), + "shenghuoyule": MessageLookupByLibrary.simpleMessage("生活娱乐"), + "shengxianzhaipei": MessageLookupByLibrary.simpleMessage("生鲜宅配"), + "shenmijifendali": MessageLookupByLibrary.simpleMessage("神秘积分大礼"), + "shenqingtuikuan": MessageLookupByLibrary.simpleMessage("申请退款"), + "shezhi": MessageLookupByLibrary.simpleMessage("设置"), + "shifangjiazaigengduo": MessageLookupByLibrary.simpleMessage("释放加载更多"), + "shifangshuaxin": MessageLookupByLibrary.simpleMessage("释放刷新"), + "shifujifen": m30, + "shifujihuanka": m31, + "shimingrenzheng": MessageLookupByLibrary.simpleMessage("实名认证"), + "shixiaoquan": MessageLookupByLibrary.simpleMessage("失效券"), + "shixiaoyouhuiquan": MessageLookupByLibrary.simpleMessage("失效优惠券"), + "shiyongbangzhu": MessageLookupByLibrary.simpleMessage("使用帮助"), + "shiyongmendian": MessageLookupByLibrary.simpleMessage("适用门店"), + "shiyongriqi": MessageLookupByLibrary.simpleMessage("使用日期"), + "shiyongshuoming": MessageLookupByLibrary.simpleMessage("使用说明"), + "shiyongtiaojian": MessageLookupByLibrary.simpleMessage("使用条件"), + "shiyongxiangqing": MessageLookupByLibrary.simpleMessage("使用详情"), + "shouhuodi": MessageLookupByLibrary.simpleMessage("收货地址"), + "shouhuodizhi": MessageLookupByLibrary.simpleMessage("请输入详细收货地址"), + "shouhuodizhi1": MessageLookupByLibrary.simpleMessage("收货地址"), + "shouhuorenshoujihao": + MessageLookupByLibrary.simpleMessage("请输入收货人手机号"), + "shouhuorenxiangxidizhi": + MessageLookupByLibrary.simpleMessage("请输入收货人详细地址"), + "shouhuorenxingming": MessageLookupByLibrary.simpleMessage("请输入收货人姓名"), + "shoujihao": MessageLookupByLibrary.simpleMessage("手机号"), + "shouqi": MessageLookupByLibrary.simpleMessage("收起"), + "shouye": MessageLookupByLibrary.simpleMessage("首页"), + "shuaxin": MessageLookupByLibrary.simpleMessage("刷新"), + "shuaxinchenggong": MessageLookupByLibrary.simpleMessage("刷新成功"), + "shuaxinshibai": MessageLookupByLibrary.simpleMessage("刷新失败"), + "shuaxinyue": MessageLookupByLibrary.simpleMessage("刷新余额"), + "shuaxinzhong": MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang": MessageLookupByLibrary.simpleMessage("数量"), + "shurushouhuorendizhi": + MessageLookupByLibrary.simpleMessage("请输入收货人地址"), + "shuruzhifumima": MessageLookupByLibrary.simpleMessage("输入支付密码"), + "sui": m32, + "tangshi": MessageLookupByLibrary.simpleMessage("堂食"), + "tebieshengming": MessageLookupByLibrary.simpleMessage("特别声明"), + "tehuizhuanqu": MessageLookupByLibrary.simpleMessage("特惠专区"), + "tianjiaxinfuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tianjifuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tiantiandefuli": MessageLookupByLibrary.simpleMessage("天天得福利"), + "tiantianlingjifen": MessageLookupByLibrary.simpleMessage("天天领积分"), + "tijiao": MessageLookupByLibrary.simpleMessage("提交"), + "tijiaochenggong": MessageLookupByLibrary.simpleMessage("提交成功"), + "tingchewei": MessageLookupByLibrary.simpleMessage("停车位"), + "tixian": MessageLookupByLibrary.simpleMessage("提现"), + "tongyibingjixu": MessageLookupByLibrary.simpleMessage("同意并继续"), + "tongzhi": MessageLookupByLibrary.simpleMessage("通知"), + "tongzhitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), + "toushuxuzhi": MessageLookupByLibrary.simpleMessage("投书须知"), + "touxiang": MessageLookupByLibrary.simpleMessage("头像"), + "tuichudenglu": MessageLookupByLibrary.simpleMessage("退出登录"), + "tuiguangma": MessageLookupByLibrary.simpleMessage("推广码"), + "tuikuan": MessageLookupByLibrary.simpleMessage("退款"), + "waidai": MessageLookupByLibrary.simpleMessage("外带"), + "waimai": MessageLookupByLibrary.simpleMessage("外卖"), + "waimaipeisong": MessageLookupByLibrary.simpleMessage("外卖配送"), + "waisong": MessageLookupByLibrary.simpleMessage("外送"), + "wan": MessageLookupByLibrary.simpleMessage("玩"), + "wancheng": MessageLookupByLibrary.simpleMessage("完成"), + "wancheng_": m33, + "wanchengyicixiadan": MessageLookupByLibrary.simpleMessage("完成一次下单"), + "wangjimima": MessageLookupByLibrary.simpleMessage("忘记密码"), + "wanjiankang": MessageLookupByLibrary.simpleMessage("玩健康"), + "wanshanshengrixinxi_nl": + MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"), + "wanshanshengrixinxi_yhq": + MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), + "weidenglu": MessageLookupByLibrary.simpleMessage("未登录"), + "weidengluxinxi": MessageLookupByLibrary.simpleMessage("点击登录,享受更多精彩信息"), + "weihexiao": MessageLookupByLibrary.simpleMessage("未核销"), + "weikaiqi": MessageLookupByLibrary.simpleMessage("未开启"), + "weilegeiningenghaodefuwu": MessageLookupByLibrary.simpleMessage( + "为了给您提供更好的服务,以及享受更加精彩的信息内容,请您在使用期间,进行登录"), + "weilejishishoudaohuodongxiaoxi": + MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), + "weilekaipaizhaoxuanzhetouxiang": + MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), + "weilexiangnintuijianfujindemendianxinxi": + MessageLookupByLibrary.simpleMessage( + "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), + "weilexuanzhezhaopianhuancun": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), + "weiwancheng": MessageLookupByLibrary.simpleMessage(" 未完成 "), + "weixinzhifu": MessageLookupByLibrary.simpleMessage("微信支付"), + "weizhitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), + "wentijian": MessageLookupByLibrary.simpleMessage("问题件"), + "wenzhang": MessageLookupByLibrary.simpleMessage("文章"), + "wenzhangxiangqing": MessageLookupByLibrary.simpleMessage("文章详情"), + "wenzhangzhuanlan": MessageLookupByLibrary.simpleMessage("文章专栏"), + "weulingqu": MessageLookupByLibrary.simpleMessage("未领取"), + "wodechengjiu": MessageLookupByLibrary.simpleMessage("我的成就"), + "wodedingdan": MessageLookupByLibrary.simpleMessage("我的订单"), + "wodedongtai": MessageLookupByLibrary.simpleMessage("我的动态"), + "wodegongju": MessageLookupByLibrary.simpleMessage("我的工具"), + "wodehuiyuandengji": MessageLookupByLibrary.simpleMessage("我的会员等级"), + "wodejifenzhi": MessageLookupByLibrary.simpleMessage("我的积分值"), + "wodekanjia": MessageLookupByLibrary.simpleMessage("我的砍价"), + "wodekaquan": MessageLookupByLibrary.simpleMessage("我的卡券"), + "wodenianling": MessageLookupByLibrary.simpleMessage("我的年龄"), + "wodepintuan": MessageLookupByLibrary.simpleMessage("我的拼团"), + "wodeqianbao": MessageLookupByLibrary.simpleMessage("我的钱包"), + "wodeshengri": MessageLookupByLibrary.simpleMessage("我的生日"), + "wodexiaoxi": MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqing": MessageLookupByLibrary.simpleMessage("我的邀请"), + "wodeyaoqingma": MessageLookupByLibrary.simpleMessage("我的邀请码"), + "woyouyaoqingma": MessageLookupByLibrary.simpleMessage("我有邀请码"), + "wuliudanhao": MessageLookupByLibrary.simpleMessage("物流单号:"), + "wuliugongsi": MessageLookupByLibrary.simpleMessage("物流公司:"), + "wuliuxinxi": MessageLookupByLibrary.simpleMessage("物流信息"), + "wuliuzhuangtai": MessageLookupByLibrary.simpleMessage("物流状态:"), + "xiadanshijian": MessageLookupByLibrary.simpleMessage("下单时间"), + "xiadanshijian_": m34, + "xiadanzhuanjifen": MessageLookupByLibrary.simpleMessage("下单赚积分"), + "xialashuaxin": MessageLookupByLibrary.simpleMessage("下拉刷新"), + "xiangce": MessageLookupByLibrary.simpleMessage("相册"), + "xiangji": MessageLookupByLibrary.simpleMessage("相机"), + "xiangjitishixinxi": MessageLookupByLibrary.simpleMessage( + "为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), + "xiangqing": MessageLookupByLibrary.simpleMessage("详情"), + "xiangxidizhi": MessageLookupByLibrary.simpleMessage("详细地址"), + "xianshangfafang": MessageLookupByLibrary.simpleMessage("线上发放"), + "xianshangshiyong": MessageLookupByLibrary.simpleMessage("线上使用"), + "xianxiashiyong": MessageLookupByLibrary.simpleMessage("线下使用"), + "xiaofei": MessageLookupByLibrary.simpleMessage("消费"), + "xiaofeijifen": MessageLookupByLibrary.simpleMessage("消费积分"), + "xiaofeijihuanka": MessageLookupByLibrary.simpleMessage("消费集换卡"), + "xiaofeijilu": MessageLookupByLibrary.simpleMessage("消费记录"), + "xiaoxi": MessageLookupByLibrary.simpleMessage("消息"), + "xiayidengji": MessageLookupByLibrary.simpleMessage("下一等级"), + "xiazaiwancheng": MessageLookupByLibrary.simpleMessage("加载完成"), + "xiedongtai": MessageLookupByLibrary.simpleMessage("写动态"), + "xieyitanchuang": MessageLookupByLibrary.simpleMessage("海峡姐妹用户隐私政策"), + "xihuan_": m35, + "xindianhuodong": MessageLookupByLibrary.simpleMessage("星店活动"), + "xingming": MessageLookupByLibrary.simpleMessage("姓名"), + "xitongtongzhi": MessageLookupByLibrary.simpleMessage("系统通知"), + "xitongxiaoxi": MessageLookupByLibrary.simpleMessage("系统消息"), + "xiugai": MessageLookupByLibrary.simpleMessage("修改"), + "xiugaichenggong": MessageLookupByLibrary.simpleMessage("修改成功"), + "xiugaiyonghuming": MessageLookupByLibrary.simpleMessage("修改用户名"), + "xuanguige": MessageLookupByLibrary.simpleMessage("选规格"), + "xuanhaola": MessageLookupByLibrary.simpleMessage("选好啦"), + "xuanji": MessageLookupByLibrary.simpleMessage("选集"), + "xuanzeshangpinlingqufangshi": + MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), + "xuanzetuijianmendian": MessageLookupByLibrary.simpleMessage("选择推荐门店"), + "xuefeihuiyuan": MessageLookupByLibrary.simpleMessage("续费会员"), + "xuexijiankang": MessageLookupByLibrary.simpleMessage("学习健康"), + "xufeihuixiangVIP": MessageLookupByLibrary.simpleMessage("续费回乡VIP"), + "xuni": MessageLookupByLibrary.simpleMessage("虚拟"), + "yanzhengma": MessageLookupByLibrary.simpleMessage("验证码"), + "yaoqinghaoyou": MessageLookupByLibrary.simpleMessage("邀请好友"), + "yaoqinghaoyoudefen": MessageLookupByLibrary.simpleMessage("邀请好友得分"), + "yaoqingrenshoujihao_": m36, + "yaoqingwancheng": MessageLookupByLibrary.simpleMessage("邀请完成"), + "yibangfuka": MessageLookupByLibrary.simpleMessage("已绑副卡"), + "yiduihuan": MessageLookupByLibrary.simpleMessage("已兑换"), + "yiduihuanjian": m37, + "yifahuo": MessageLookupByLibrary.simpleMessage("已发货"), + "yiguanzhu": MessageLookupByLibrary.simpleMessage("已关注"), + "yihouzaishuo": MessageLookupByLibrary.simpleMessage("以后再说"), + "yihuide": MessageLookupByLibrary.simpleMessage("已获得"), + "yihujiaoqishou": MessageLookupByLibrary.simpleMessage("已呼叫骑手"), + "yikaitongzidongxufei": MessageLookupByLibrary.simpleMessage("已开通自动续费"), + "yikexiao": MessageLookupByLibrary.simpleMessage("已核销"), + "yilingqu": MessageLookupByLibrary.simpleMessage("已领取"), + "yindao1": MessageLookupByLibrary.simpleMessage("新增多项功能,海量优惠资讯实时推送"), + "yindao2": + MessageLookupByLibrary.simpleMessage("新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停"), + "yindao3": + MessageLookupByLibrary.simpleMessage("新增会员任务得积分,消费可得绿金、积分商城换购"), + "yindao4": MessageLookupByLibrary.simpleMessage("传递友爱纯净健康有机环保智慧理念"), + "yindaoye1": MessageLookupByLibrary.simpleMessage("会员最新资讯抢先看"), + "yindaoye2": MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), + "yindaoye3": MessageLookupByLibrary.simpleMessage("会员活动专区"), + "yindaoye4": MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "yingwen": MessageLookupByLibrary.simpleMessage("英文"), + "yingyeshijian": m38, + "yinkahuiyuan": MessageLookupByLibrary.simpleMessage("银卡会员"), + "yinshi": MessageLookupByLibrary.simpleMessage("饮食"), + "yinsishengming": MessageLookupByLibrary.simpleMessage("隐私声明"), + "yinsixieyi": MessageLookupByLibrary.simpleMessage("《隐私协议》"), + "yinsizhengce1": MessageLookupByLibrary.simpleMessage( + " 感谢您使用海峡姐妹APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读海峡姐妹"), + "yinsizhengce2": MessageLookupByLibrary.simpleMessage( + "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。"), + "yinzhang": MessageLookupByLibrary.simpleMessage("印章"), + "yiqiandao": MessageLookupByLibrary.simpleMessage("已签到"), + "yiqianshou": MessageLookupByLibrary.simpleMessage("已签收"), + "yiquxiao": MessageLookupByLibrary.simpleMessage(" 已取消 "), + "yishijiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiming": MessageLookupByLibrary.simpleMessage("已实名"), + "yishixiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiyong": MessageLookupByLibrary.simpleMessage("已使用"), + "yishouquan": MessageLookupByLibrary.simpleMessage("已授权"), + "yisongda": MessageLookupByLibrary.simpleMessage("已送达"), + "yituikuan": MessageLookupByLibrary.simpleMessage("已退款"), + "yiwancheng": MessageLookupByLibrary.simpleMessage(" 已完成 "), + "yiwanchengdingdan": MessageLookupByLibrary.simpleMessage("已完成订单"), + "yixianghuiyuanquanyi": MessageLookupByLibrary.simpleMessage("已享会员权益"), + "yixiansquanbupinglun": + MessageLookupByLibrary.simpleMessage("-已显示全部评论-"), + "yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "yiyoujifen": MessageLookupByLibrary.simpleMessage("已有积分"), + "yizhifu": MessageLookupByLibrary.simpleMessage("已支付"), + "yonghuming": MessageLookupByLibrary.simpleMessage("用户名"), + "yonghuxiaofeijifen": + MessageLookupByLibrary.simpleMessage("用户每消费1元可获得1个积分。"), + "youhuiquan": MessageLookupByLibrary.simpleMessage("优惠券"), + "youhuiquanlingqu": MessageLookupByLibrary.simpleMessage("优惠券领取"), + "youhuiquanwufajileijifen": MessageLookupByLibrary.simpleMessage( + "优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), + "youkedenglu": MessageLookupByLibrary.simpleMessage("游客登录"), + "youxiaoqi": m39, + "youxiaoqixian": MessageLookupByLibrary.simpleMessage("有效期限:"), + "youxiaoqizhi": m40, + "yuan": MessageLookupByLibrary.simpleMessage("元"), + "yuan_": m41, + "yuanjia": MessageLookupByLibrary.simpleMessage("原价"), + "yue": MessageLookupByLibrary.simpleMessage("余额"), + "yue_": m42, + "yue__": m43, + "yuemingxi": MessageLookupByLibrary.simpleMessage("余额明细"), + "yuliudianhua": MessageLookupByLibrary.simpleMessage("预留电话"), + "yunfei": MessageLookupByLibrary.simpleMessage("运费"), + "yuyan": MessageLookupByLibrary.simpleMessage("语言"), + "zailaiyidan": MessageLookupByLibrary.simpleMessage("再来一单"), + "zaituzhong": MessageLookupByLibrary.simpleMessage("运输中"), + "zaixiankefu": MessageLookupByLibrary.simpleMessage("在线客服"), + "zanbuzhichixianshangdiancan": + MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"), + "zanweijiesuo": MessageLookupByLibrary.simpleMessage("暂未解锁"), + "zanweikaifang": MessageLookupByLibrary.simpleMessage("暂未开放"), + "zanweikaitong": MessageLookupByLibrary.simpleMessage("暂未开通"), + "zanwupinglun": MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), + "zanwuxianshangjindian": MessageLookupByLibrary.simpleMessage("暂无线上门店"), + "zanwuyouhuiquankelingqu": + MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), + "zhanghaoanquan": MessageLookupByLibrary.simpleMessage("账号安全"), + "zhanghaoshouquan": MessageLookupByLibrary.simpleMessage("账号授权"), + "zhanghaoxinxi": MessageLookupByLibrary.simpleMessage("账号信息"), + "zhanghaoyuanquan": MessageLookupByLibrary.simpleMessage("账号与安全"), + "zhanghaozhuxiaoshuoming": + MessageLookupByLibrary.simpleMessage("账号注销说明"), + "zhanghuyue": MessageLookupByLibrary.simpleMessage("账户余额"), + "zhankai": MessageLookupByLibrary.simpleMessage("展开"), + "zhengzaihujiaoqishou": MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), + "zhengzaijiazai": MessageLookupByLibrary.simpleMessage("正在加载"), + "zhengzaipeisong": MessageLookupByLibrary.simpleMessage("正在配送"), + "zhengzaixiazaizhong": MessageLookupByLibrary.simpleMessage("正在加载中..."), + "zhidianmendian": MessageLookupByLibrary.simpleMessage("致电门店"), + "zhifubao": MessageLookupByLibrary.simpleMessage("支付宝"), + "zhifubaozhifu": MessageLookupByLibrary.simpleMessage("支付宝支付"), + "zhifufangshi": MessageLookupByLibrary.simpleMessage("支付方式"), + "zhifuxiangqing": MessageLookupByLibrary.simpleMessage("支付详情"), + "zhizunhuiyuan": MessageLookupByLibrary.simpleMessage("至尊会员"), + "zhizuowancheng": MessageLookupByLibrary.simpleMessage("制作完成"), + "zhongchakan": MessageLookupByLibrary.simpleMessage("中查看"), + "zhongwenjianti": MessageLookupByLibrary.simpleMessage("简体中文"), + "zhuanlan": MessageLookupByLibrary.simpleMessage("专栏"), + "zhuanxiangyouhuiquan": MessageLookupByLibrary.simpleMessage("专享优惠券"), + "zhunong1": MessageLookupByLibrary.simpleMessage("爱在回乡 快乐助农"), + "zhunongjifen": MessageLookupByLibrary.simpleMessage("助农积分"), + "zhunongzhuanqu": MessageLookupByLibrary.simpleMessage("助农专区"), + "zhuxiaotixing": MessageLookupByLibrary.simpleMessage( + "再次提醒:注销帐号后不可恢复,相关数据和信息会永久删除。"), + "zhuxiaozhanghao": MessageLookupByLibrary.simpleMessage("注销账号"), + "ziqu": MessageLookupByLibrary.simpleMessage("自取"), + "ziti": MessageLookupByLibrary.simpleMessage("自提"), + "zitidizhi": MessageLookupByLibrary.simpleMessage("自提地址"), + "zitiduihuanquan": MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), + "zitishijian": MessageLookupByLibrary.simpleMessage("自提时间"), + "zongzichan": MessageLookupByLibrary.simpleMessage("总资产"), + "zongzichanyuan": MessageLookupByLibrary.simpleMessage("总资产(元)"), + "zuanshihuiyuan": MessageLookupByLibrary.simpleMessage("钻石会员"), + "zuixinwenzhang": MessageLookupByLibrary.simpleMessage("最新文章"), + "zuorenwudejifen": MessageLookupByLibrary.simpleMessage("做任务得积分"), + "zuozhe": m44 + }; } diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 86a7ce35..78edadaa 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,808 +20,901 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'zh_Hant_CN'; - static m0(version) => "版本:${version}"; + static String m0(version) => "版本:${version}"; - static m1(yuan) => "充值金額最小是${yuan}元"; + static String m1(yuan) => "充值金額最小是${yuan}元"; - static m2(time) => "創建時間${time}"; + static String m2(time) => "創建時間${time}"; - static m3(xihuan) => "點贊喜歡${xihuan}"; + static String m3(xihuan) => "點贊喜歡${xihuan}"; - static m4(shijian) => "發行開始時間 ${shijian}"; + static String m4(shijian) => "發行開始時間 ${shijian}"; - static m5(ge) => "${ge}g/個"; + static String m5(ge) => "${ge}g/個"; - static m6(jian) => "共${jian}件"; + static String m6(jian) => "共${jian}件"; - static m7(jian) => "共${jian}件商品"; + static String m7(jian) => "共${jian}件商品"; - static m8(km) => "${km}公里"; + static String m8(km) => "${km}公里"; - static m9(huifu) => "回復@${huifu}:"; + static String m9(huifu) => "回復@${huifu}:"; - static m10(yuan) => "活動減免${yuan}元配送費"; + static String m10(yuan) => "活動減免${yuan}元配送費"; - static m11(yue) => "活動餘額 ${yue}"; + static String m11(yue) => "活動餘額 ${yue}"; - static m12(jifen) => "+ ${jifen} 積分"; + static String m12(jifen) => "+ ${jifen} 積分"; - static m13(jianjie) => "簡介:${jianjie}"; + static String m13(jianjie) => "簡介:${jianjie}"; - static m14(jifen) => "${jifen}積分"; + static String m14(jifen) => "${jifen}積分"; - static m15(jifen) => "${jifen}積分 到下一個等級"; + static String m15(jifen) => "${jifen}積分 到下一個等級"; - static m16(date) => "開通日期:${date}"; + static String m16(date) => "開通日期:${date}"; - static m17(shijian) => "領取時間 ${shijian}"; + static String m17(shijian) => "領取時間 ${shijian}"; - static m18(yue) => "綠幣 ${yue}"; + static String m18(yue) => "綠幣 ${yue}"; - static m19(man, jian) => "滿${man}元立減${jian}元代金券"; + static String m19(man, jian) => "滿${man}元立減${jian}元代金券"; - static m20(yuan) => "滿${yuan}可用"; + static String m20(yuan) => "滿${yuan}可用"; - static m21(mi) => "${mi}米"; + static String m21(mi) => "${mi}米"; - static m22(tian) => "您已連續簽到${tian}天"; + static String m22(tian) => "您已連續簽到${tian}天"; - static m23(pinglun) => "評論(${pinglun})"; + static String m23(pinglun) => "評論(${pinglun})"; - static m25(zhe) => "全場${zhe}折"; + static String m25(zhe) => "全場${zhe}折"; - static m26(num) => "取單號${num}"; + static String m26(num) => "取單號${num}"; - static m27(ren) => "¥${ren}/人"; + static String m27(ren) => "¥${ren}/人"; - static m28(second) => "${second}s后重新發送"; + static String m28(second) => "${second}s后重新發送"; - static m29(jifen) => "商品積分 ${jifen}積分"; + static String m29(jifen) => "商品積分 ${jifen}積分"; - static m30(jifen) => "實付積分 ${jifen}積分"; + static String m30(jifen) => "實付積分 ${jifen}積分"; - static m31(jihuanka) => "實付集換卡 ${jihuanka}集換卡"; + static String m31(jihuanka) => "實付集換卡 ${jihuanka}集換卡"; - static m32(sui) => "${sui}嵗"; + static String m32(sui) => "${sui}嵗"; - static m33(num) => "完成${num}"; + static String m33(num) => "完成${num}"; - static m34(time) => "下單時間:${time}"; + static String m34(time) => "下單時間:${time}"; - static m35(xihuan) => "喜歡(${xihuan})"; + static String m35(xihuan) => "喜歡(${xihuan})"; - static m36(shoujihao) => "邀请人手機號:${shoujihao}"; + static String m36(shoujihao) => "邀请人手機號:${shoujihao}"; - static m37(jian) => "已兌換${jian}件"; + static String m37(jian) => "已兌換${jian}件"; - static m38(time) => "營業時間: ${time}"; + static String m38(time) => "營業時間: ${time}"; - static m39(date) => "有效期:${date}"; + static String m39(date) => "有效期:${date}"; - static m40(date) => "有效期至${date}"; + static String m40(date) => "有效期至${date}"; - static m41(yuan) => "${yuan}元"; + static String m41(yuan) => "${yuan}元"; - static m42(yue) => "餘額${yue}"; + static String m42(yue) => "餘額${yue}"; - static m43(yue) => "餘額 ${yue}"; + static String m43(yue) => "餘額 ${yue}"; - static m44(zuozhe) => "作者:${zuozhe}"; + static String m44(zuozhe) => "作者:${zuozhe}"; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "bainianchuanjiao" : MessageLookupByLibrary.simpleMessage("百年川椒"), - "baiyin" : MessageLookupByLibrary.simpleMessage("白银"), - "baiyinhuiyuan" : MessageLookupByLibrary.simpleMessage("白銀會員"), - "banben" : m0, - "bangdingfuka" : MessageLookupByLibrary.simpleMessage("綁定副卡"), - "bangdingshouji" : MessageLookupByLibrary.simpleMessage("綁定手機"), - "bangong" : MessageLookupByLibrary.simpleMessage("辦公"), - "bangzhuyufankui" : MessageLookupByLibrary.simpleMessage("幫助與反饋"), - "baocun" : MessageLookupByLibrary.simpleMessage("保存"), - "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), - "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二維碼,邀請他人微信掃一掃識別,長按關注後,完成小遊戲,領取優惠券後,即邀請成功哦!"), - "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張"), - "beizhu" : MessageLookupByLibrary.simpleMessage("備注"), - "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("備注信息"), - "benzhouquanbao" : MessageLookupByLibrary.simpleMessage("本周券包"), - "bianjidizhi" : MessageLookupByLibrary.simpleMessage("編輯地址"), - "biaojiweiyidu" : MessageLookupByLibrary.simpleMessage("標為已讀"), - "biaoweiyidu" : MessageLookupByLibrary.simpleMessage("標爲已讀"), - "bodadianhua" : MessageLookupByLibrary.simpleMessage("撥打電話"), - "bojin" : MessageLookupByLibrary.simpleMessage("铂金"), - "brand_yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), - "buzhichikaipiao" : MessageLookupByLibrary.simpleMessage("不支持開票"), - "canyingfuwu" : MessageLookupByLibrary.simpleMessage("餐飲服務"), - "chakan" : MessageLookupByLibrary.simpleMessage("查看"), - "chakangengduo" : MessageLookupByLibrary.simpleMessage("查看更多"), - "chakanhexiaoma" : MessageLookupByLibrary.simpleMessage("查看核銷碼"), - "chakanquanyi" : MessageLookupByLibrary.simpleMessage("查看權益"), - "chakanshixiaoquan" : MessageLookupByLibrary.simpleMessage("查看失效券"), - "chakanwodekabao" : MessageLookupByLibrary.simpleMessage("查看我的卡包"), - "chakanwodekaquan" : MessageLookupByLibrary.simpleMessage("查看我的卡券"), - "chakanwuliu" : MessageLookupByLibrary.simpleMessage("查看物流"), - "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看詳情"), - "changjianwenti" : MessageLookupByLibrary.simpleMessage("常見問題"), - "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("長期有效"), - "chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"), - "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("創始人故事"), - "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), - "chengjiu" : MessageLookupByLibrary.simpleMessage("成就"), - "chengjiuhuizhang" : MessageLookupByLibrary.simpleMessage("成就徽章"), - "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市選擇"), - "chengweidianpuzhuanshuhuiyuan" : MessageLookupByLibrary.simpleMessage("成為專屬會員,享專屬權益"), - "chi" : MessageLookupByLibrary.simpleMessage("吃"), - "chijiankang" : MessageLookupByLibrary.simpleMessage("吃健康"), - "chongzhi" : MessageLookupByLibrary.simpleMessage("充值"), - "chongzhichenggong" : MessageLookupByLibrary.simpleMessage("充值成功"), - "chongzhifuliduo" : MessageLookupByLibrary.simpleMessage("充值福利多"), - "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), - "chongzhizuixiaojine" : m1, - "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事-"), - "chuangshirendegushi1" : MessageLookupByLibrary.simpleMessage("創始人的故事"), - "chuzhiyouhui" : MessageLookupByLibrary.simpleMessage("儲值優惠"), - "code_error" : MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"), - "cunchu" : MessageLookupByLibrary.simpleMessage("存儲"), - "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"), - "dabaodaodianqu" : MessageLookupByLibrary.simpleMessage("打包到店取"), - "daifukuan" : MessageLookupByLibrary.simpleMessage("待付款"), - "daipeisong" : MessageLookupByLibrary.simpleMessage("待配送"), - "daiqucan" : MessageLookupByLibrary.simpleMessage("待取餐"), - "daiqueren" : MessageLookupByLibrary.simpleMessage("待確認"), - "daizhifu" : MessageLookupByLibrary.simpleMessage("待支付"), - "daizhizuo" : MessageLookupByLibrary.simpleMessage("待製作"), - "dajiadouzaiduihuan" : MessageLookupByLibrary.simpleMessage("大家都在兌換"), - "dakaidingwei" : MessageLookupByLibrary.simpleMessage("打開定位"), - "dangqianbanben" : MessageLookupByLibrary.simpleMessage("當前版本"), - "dangqiandengji" : MessageLookupByLibrary.simpleMessage("當前等級"), - "dangqianjifen" : MessageLookupByLibrary.simpleMessage("當前積分:"), - "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("當前商品兌換核銷碼已核銷完成 "), - "dangqianzhukadengji" : MessageLookupByLibrary.simpleMessage("當前主卡等級"), - "daodianziqu" : MessageLookupByLibrary.simpleMessage("到店自取"), - "daopinglunliebiaodingbu" : MessageLookupByLibrary.simpleMessage("到評論列表頂部"), - "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等級"), - "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家確認"), - "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用戶取餐"), - "denglu" : MessageLookupByLibrary.simpleMessage("登錄"), - "diancan" : MessageLookupByLibrary.simpleMessage("點餐"), - "diandan" : MessageLookupByLibrary.simpleMessage("點單"), - "dianhua" : MessageLookupByLibrary.simpleMessage("電話"), - "dianjidenglu" : MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩信息"), - "dianneiyongcan" : MessageLookupByLibrary.simpleMessage("店内用餐"), - "dianpuchongzhi" : MessageLookupByLibrary.simpleMessage("店鋪充值"), - "dianputuijian" : MessageLookupByLibrary.simpleMessage("店鋪推薦"), - "dianpuyue" : MessageLookupByLibrary.simpleMessage("店鋪餘額"), - "dianwolingqu" : MessageLookupByLibrary.simpleMessage("點我領取"), - "dianzan" : MessageLookupByLibrary.simpleMessage("點贊"), - "dianzanxihuan_" : m3, - "dingdan" : MessageLookupByLibrary.simpleMessage("訂單"), - "dingdanbianhao" : MessageLookupByLibrary.simpleMessage("訂單編號"), - "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("訂單待發貨"), - "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("訂單待支付"), - "dingdangenzong" : MessageLookupByLibrary.simpleMessage("訂單跟蹤"), - "dingdanhao" : MessageLookupByLibrary.simpleMessage("訂單號"), - "dingdanjiesuan" : MessageLookupByLibrary.simpleMessage("訂單結算"), - "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), - "dingdantongzhi" : MessageLookupByLibrary.simpleMessage("訂單通知"), - "dingdanxiaoxi" : MessageLookupByLibrary.simpleMessage("訂單消息"), - "dingdanyisongda" : MessageLookupByLibrary.simpleMessage("訂單送達"), - "dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("訂單已退款"), - "dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("訂單已完成"), - "dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("訂單已支付"), - "dingwei" : MessageLookupByLibrary.simpleMessage("定位"), - "dizhi" : MessageLookupByLibrary.simpleMessage("地址"), - "dongtai" : MessageLookupByLibrary.simpleMessage("動態"), - "dongtaitishi" : MessageLookupByLibrary.simpleMessage("用戶發佈內容需要等待系統稽核,稽核通過後才會在推薦廣場展示"), - "dongtaixiangqing" : MessageLookupByLibrary.simpleMessage("動態詳情"), - "duihuan" : MessageLookupByLibrary.simpleMessage("兑换"), - "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), - "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), - "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), - "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"), - "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"), - "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"), - "duihuanquan" : MessageLookupByLibrary.simpleMessage("兌換券"), - "duihuanshangpinxiangqing" : MessageLookupByLibrary.simpleMessage("兑换商品详情"), - "duihuanxinxi" : MessageLookupByLibrary.simpleMessage("兑换信息"), - "duozhongyouhui" : MessageLookupByLibrary.simpleMessage("多種優惠券等你拿"), - "fabu" : MessageLookupByLibrary.simpleMessage("發佈"), - "fangshier" : MessageLookupByLibrary.simpleMessage("方式二"), - "fangshiyi" : MessageLookupByLibrary.simpleMessage("方式一"), - "fanhuiduihuanlishi" : MessageLookupByLibrary.simpleMessage("返回兌換歷史"), - "fanhuishequn" : MessageLookupByLibrary.simpleMessage("返回社群"), - "fanhuishouye" : MessageLookupByLibrary.simpleMessage("返回首頁"), - "fankui" : MessageLookupByLibrary.simpleMessage("反饋"), - "fankuilizi" : MessageLookupByLibrary.simpleMessage("您可以在這裡輸入迴響內容,例如產品建議,功能异常等"), - "fantizhongwen" : MessageLookupByLibrary.simpleMessage("繁体中文"), - "fapiao" : MessageLookupByLibrary.simpleMessage("發票"), - "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("發票助手"), - "fasong" : MessageLookupByLibrary.simpleMessage("發送"), - "fasongduanxin" : MessageLookupByLibrary.simpleMessage("發送短信"), - "faxingshijian" : m4, - "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"), - "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用!"), - "fensi" : MessageLookupByLibrary.simpleMessage("粉絲"), - "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), - "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), - "fenxiangjiankang" : MessageLookupByLibrary.simpleMessage("分享健康"), - "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接點擊右上方的分享給到你想要邀請的人。"), - "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。"), - "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), - "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手機號"), - "fuliduihuan" : MessageLookupByLibrary.simpleMessage("福利兌換"), - "fulizhongxin" : MessageLookupByLibrary.simpleMessage("福利中心"), - "ge" : m5, - "geiwopingfen" : MessageLookupByLibrary.simpleMessage("給我評分"), - "gengduo" : MessageLookupByLibrary.simpleMessage("更多"), - "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), - "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多優惠券"), - "genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改綁定手機號"), - "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更換背景"), - "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更换头像"), - "gengyouhui" : MessageLookupByLibrary.simpleMessage("更優惠"), - "gerenxinxi" : MessageLookupByLibrary.simpleMessage("個人信息"), - "gexingqianming" : MessageLookupByLibrary.simpleMessage("個性簽名"), - "gong" : MessageLookupByLibrary.simpleMessage("共"), - "gongchuanghuiyuan" : MessageLookupByLibrary.simpleMessage("共创会员"), - "gongjijian" : m6, - "gongjijianshangpin" : m7, - "gongli" : m8, - "gongxinchengwei" : MessageLookupByLibrary.simpleMessage("恭喜您成爲"), - "gongxinichengweibendianhuiyuan" : MessageLookupByLibrary.simpleMessage("恭喜您,成為本店會員,快去享受超多的會員權益吧。"), - "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("請勾選同意隱私服務和一心回鄉服務協定"), - "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), - "guanyu" : MessageLookupByLibrary.simpleMessage("關於"), - "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("關於創始人"), - "guanyuhuixiang" : MessageLookupByLibrary.simpleMessage("關於回鄉"), - "guanzhu" : MessageLookupByLibrary.simpleMessage("關注"), - "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), - "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"), - "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"), - "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), - "haowu" : MessageLookupByLibrary.simpleMessage("好物"), - "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友獎勵規則"), - "he" : MessageLookupByLibrary.simpleMessage("喝"), - "heji" : MessageLookupByLibrary.simpleMessage("合計:"), - "hejiankang" : MessageLookupByLibrary.simpleMessage("喝健康"), - "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核銷成功"), - "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核銷碼詳情"), - "huangjin" : MessageLookupByLibrary.simpleMessage("黄金"), - "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黃金會員"), - "huifu" : MessageLookupByLibrary.simpleMessage("回復"), - "huifu_" : m9, - "huixiangVIPka" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡"), - "huixiangqianbao" : MessageLookupByLibrary.simpleMessage("回鄉錢包"), - "huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), - "huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"), - "huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"), - "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"), - "huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"), - "huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"), - "huiyuanguize" : MessageLookupByLibrary.simpleMessage("會員規則説明"), - "huiyuanhuodejifen" : MessageLookupByLibrary.simpleMessage("會員如何獲得積分"), - "huiyuanjia" : MessageLookupByLibrary.simpleMessage("會員價"), - "huiyuanjibieduizhao" : MessageLookupByLibrary.simpleMessage("會員級別對照表"), - "huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"), - "huiyuanka" : MessageLookupByLibrary.simpleMessage("會員卡"), - "huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("會員卡詳情"), - "huiyuanma" : MessageLookupByLibrary.simpleMessage("會員碼"), - "huiyuanquanyi" : MessageLookupByLibrary.simpleMessage("會員權益"), - "huiyuanyue" : MessageLookupByLibrary.simpleMessage("會員餘額"), - "huiyuanzhongxin" : MessageLookupByLibrary.simpleMessage("會員中心"), - "huiyuanzhuanxiangjiage" : MessageLookupByLibrary.simpleMessage("會員專享價格"), - "huode" : MessageLookupByLibrary.simpleMessage("獲得"), - "huodequanyi" : MessageLookupByLibrary.simpleMessage("獲得權益"), - "huodong" : MessageLookupByLibrary.simpleMessage("活動"), - "huodongguize" : MessageLookupByLibrary.simpleMessage("活動規則"), - "huodongjianmianpeisongfei" : m10, - "huodongjinxingzhong" : MessageLookupByLibrary.simpleMessage("活動進行中"), - "huodongliebiao" : MessageLookupByLibrary.simpleMessage("活動列表"), - "huodongyue" : MessageLookupByLibrary.simpleMessage("活動餘額"), - "huodongyue_" : m11, - "huodongzixun" : MessageLookupByLibrary.simpleMessage("活動資訊"), - "huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"), - "huozan" : MessageLookupByLibrary.simpleMessage("獲贊"), - "input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"), - "input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), - "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"), - "input_phone" : MessageLookupByLibrary.simpleMessage("輸入手機號"), - "input_phone_hide" : MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), - "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀請碼輸入錯誤"), - "jiajifen" : m12, - "jian" : MessageLookupByLibrary.simpleMessage("件"), - "jiangli" : MessageLookupByLibrary.simpleMessage("獎勵"), - "jiangshi" : MessageLookupByLibrary.simpleMessage("講師"), - "jianjie" : m13, - "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加載失敗"), - "jiesuan" : MessageLookupByLibrary.simpleMessage("結算"), - "jiesuanjine" : MessageLookupByLibrary.simpleMessage("結算金額"), - "jifen" : MessageLookupByLibrary.simpleMessage("積分"), - "jifen_" : m14, - "jifenbuzu" : MessageLookupByLibrary.simpleMessage("您的積分不足"), - "jifendaoxiayidengji" : m15, - "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("積分的計算説明"), - "jifendidaogao" : MessageLookupByLibrary.simpleMessage("積分從低到高"), - "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("積分從高到低"), - "jifenhuanquan" : MessageLookupByLibrary.simpleMessage("積分換券"), - "jifenmingxi" : MessageLookupByLibrary.simpleMessage("積分明細"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("積分商城"), - "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("積分詳情"), - "jihuanka" : MessageLookupByLibrary.simpleMessage("集換卡"), - "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("淨弼聯盟會員店"), - "jingxuanhaowen" : MessageLookupByLibrary.simpleMessage("精選好文"), - "jingxuanhuodong" : MessageLookupByLibrary.simpleMessage("精選活動"), - "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), - "jinrihuiyuanrenwu" : MessageLookupByLibrary.simpleMessage("今日會員任務"), - "jinrushangdian" : MessageLookupByLibrary.simpleMessage("進入商店"), - "jinruzhuanqu" : MessageLookupByLibrary.simpleMessage("進入專區"), - "jinxingbangdingfuka" : MessageLookupByLibrary.simpleMessage("進行綁定副卡"), - "jinxingfukabangding" : MessageLookupByLibrary.simpleMessage("進行副卡綁定"), - "jinxingzhanghaozhuxiao" : MessageLookupByLibrary.simpleMessage("進行賬號注銷"), - "jinxingzhongdedingdan" : MessageLookupByLibrary.simpleMessage("進行中的訂單"), - "jituanchuangbanren" : MessageLookupByLibrary.simpleMessage("集团创办人"), - "jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集團創始人"), - "jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"), - "jixuzhifu" : MessageLookupByLibrary.simpleMessage("繼續支付"), - "jubao" : MessageLookupByLibrary.simpleMessage("舉報"), - "jubaogaineirong" : MessageLookupByLibrary.simpleMessage("舉報該内容"), - "jubaotishi" : MessageLookupByLibrary.simpleMessage("您的舉報正在等待人工稽核,我們會在7~15個工作日處理,處理結果可在"), - "jubaoyuanyin" : MessageLookupByLibrary.simpleMessage("請輸入舉報原因,以便我們更快定位問題,快速處理"), - "jujue" : MessageLookupByLibrary.simpleMessage("拒絕"), - "kabao" : MessageLookupByLibrary.simpleMessage("卡包"), - "kabaokeshiyong" : MessageLookupByLibrary.simpleMessage("卡包-可使用"), - "kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("開啓權限"), - "kaitonghuixianghuoququanyi" : MessageLookupByLibrary.simpleMessage("開通回鄉VIP卡獲取更多權益"), - "kaitongriqi" : m16, - "kaquan" : MessageLookupByLibrary.simpleMessage("卡券"), - "kelingqudeyouhuiquan" : MessageLookupByLibrary.simpleMessage("可領取的卡券"), - "keshiyong" : MessageLookupByLibrary.simpleMessage("可使用"), - "keyongjifen" : MessageLookupByLibrary.simpleMessage("可用积分"), - "keyongquan" : MessageLookupByLibrary.simpleMessage("可用券"), - "keyongyouhuiquan" : MessageLookupByLibrary.simpleMessage("可用優惠券"), - "keyongyue" : MessageLookupByLibrary.simpleMessage("可用餘額"), - "kongtiao" : MessageLookupByLibrary.simpleMessage("空調"), - "kuaidi" : MessageLookupByLibrary.simpleMessage("快遞"), - "kuaidiwuliu" : MessageLookupByLibrary.simpleMessage("快遞物流"), - "kuailezhunong" : MessageLookupByLibrary.simpleMessage("快樂助農"), - "lianxikefu" : MessageLookupByLibrary.simpleMessage("聯系客服"), - "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("聯繫手機號"), - "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("連續簽到領取雙倍積分"), - "liaojie" : MessageLookupByLibrary.simpleMessage("瞭解"), - "liaojiejiankang" : MessageLookupByLibrary.simpleMessage("瞭解健康"), - "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即參加"), - "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), - "lijigengxin" : MessageLookupByLibrary.simpleMessage("立即更新"), - "lijikaitong" : MessageLookupByLibrary.simpleMessage("立即開通"), - "lijilingqu" : MessageLookupByLibrary.simpleMessage("立即領取"), - "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"), - "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"), - "lijitiyan" : MessageLookupByLibrary.simpleMessage("立即體驗"), - "lijiyuyue" : MessageLookupByLibrary.simpleMessage("立即預約"), - "likekaitong" : MessageLookupByLibrary.simpleMessage("立刻開通"), - "likexufei" : MessageLookupByLibrary.simpleMessage("立刻續費"), - "likezhifu" : MessageLookupByLibrary.simpleMessage("立刻支付"), - "lingqu" : MessageLookupByLibrary.simpleMessage("領取"), - "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("領券中心"), - "lingquchenggong" : MessageLookupByLibrary.simpleMessage("領取成功"), - "lingqudaokabao" : MessageLookupByLibrary.simpleMessage("領取到卡包"), - "lingqufangshi" : MessageLookupByLibrary.simpleMessage("领取方式"), - "lingqushijian" : m17, - "linian" : MessageLookupByLibrary.simpleMessage("理念"), - "lishijilu" : MessageLookupByLibrary.simpleMessage("歷史記錄"), - "liuxianinjingcaidepinglunba" : MessageLookupByLibrary.simpleMessage("留下您精彩的評論吧"), - "login" : MessageLookupByLibrary.simpleMessage("登錄"), - "login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"), - "lvbiyue" : MessageLookupByLibrary.simpleMessage("綠幣餘額"), - "lvbiyue_" : m18, - "lvbizhifu" : MessageLookupByLibrary.simpleMessage("綠幣支付"), - "main_menu1" : MessageLookupByLibrary.simpleMessage("首頁"), - "main_menu2" : MessageLookupByLibrary.simpleMessage("門店"), - "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"), - "main_menu4" : MessageLookupByLibrary.simpleMessage("我的"), - "main_menu5" : MessageLookupByLibrary.simpleMessage("hi"), - "manlijiandaijinquan" : m19, - "manyuankeyong" : m20, - "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日簽到"), - "meiyougengduohuiyuanka" : MessageLookupByLibrary.simpleMessage("沒有更多會員卡"), - "meiyougengduoshujule" : MessageLookupByLibrary.simpleMessage("沒有更多數據了"), - "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), - "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每週三更新"), - "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每週三更新劵包"), - "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mendianyue" : MessageLookupByLibrary.simpleMessage("門店餘額"), - "menpaihao" : MessageLookupByLibrary.simpleMessage("請輸入門牌號"), - "mi" : m21, - "mingxi" : MessageLookupByLibrary.simpleMessage("明細"), - "morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"), - "muqianwujilu" : MessageLookupByLibrary.simpleMessage("目前暫無記錄哦"), - "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暫無星店活動"), - "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"), - "nincunchuquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), - "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), - "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), - "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"), - "ninxiangjiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), - "ninxiaoxiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), - "ninyichenggonglingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("您已成功領取優惠券,請在"), - "ninyilianxuqiandaotian" : m22, - "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一個訂單需要前往門店領取"), - "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一個新訂單"), - "paizhao" : MessageLookupByLibrary.simpleMessage("拍照"), - "peisong" : MessageLookupByLibrary.simpleMessage("配送"), - "peisongfangshi" : MessageLookupByLibrary.simpleMessage("配送方式"), - "peisongfei" : MessageLookupByLibrary.simpleMessage("配送費"), - "peisongfuwu" : MessageLookupByLibrary.simpleMessage("配送服務"), - "peisongzhong" : MessageLookupByLibrary.simpleMessage("配送中"), - "phone_error" : MessageLookupByLibrary.simpleMessage("手機格式錯誤"), - "pinglun" : MessageLookupByLibrary.simpleMessage("評論"), - "pinglun_" : m23, - "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平臺餘額"), - "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平臺支付密碼"), - "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), - "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介紹"), - "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登錄既同意"), - "privacy_policy2" : MessageLookupByLibrary.simpleMessage("《一心回鄉服務協議》"), - "privacy_policy3" : MessageLookupByLibrary.simpleMessage("《隱私服務》"), - "privacy_policy4" : MessageLookupByLibrary.simpleMessage("并使用本機號碼登錄"), - "qianbao" : MessageLookupByLibrary.simpleMessage("錢包"), - "qiandao" : MessageLookupByLibrary.simpleMessage("簽到"), - "qiandaodejifen" : MessageLookupByLibrary.simpleMessage("簽到得積分"), - "qiandaolingjifen" : MessageLookupByLibrary.simpleMessage("簽到領積分"), - "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("簽到領取積分"), - "qiandaowancheng" : MessageLookupByLibrary.simpleMessage("簽到完成"), - "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前進麥味"), - "qianshou" : MessageLookupByLibrary.simpleMessage("已簽收"), - "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), - "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理緩存"), - "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("請輸入備注要求"), - "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("請輸入充值金額"), - "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("請輸入手機號碼"), - "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), - "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("請輸入邀請碼"), - "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("請輸入您的有效手機號"), - "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("請輸入支付密碼"), - "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("請填寫收件人手機號"), - "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), - "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), - "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"), - "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"), - "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"), - "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), - "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"), - "qingxuanzeyuyeushijian" : MessageLookupByLibrary.simpleMessage("請選擇預約時間"), - "qingxuanzeyuyuemendian" : MessageLookupByLibrary.simpleMessage("請選擇預約門店"), - "qingxuanzhemendian" : MessageLookupByLibrary.simpleMessage("请选择门店"), - "qingxuanzheninxiangshezhideyuyan" : MessageLookupByLibrary.simpleMessage("請選擇您要設置的語言"), - "qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("請在規定時間内完成支付"), - "qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"), - "qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("騎手配送中,預計送達時間"), - "qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("騎手已接單、取貨中"), - "qita" : MessageLookupByLibrary.simpleMessage("其他"), - "qiyetuanjian" : MessageLookupByLibrary.simpleMessage("企業團建"), - "quanbao" : MessageLookupByLibrary.simpleMessage("券包"), - "quanbu" : MessageLookupByLibrary.simpleMessage("全部"), - "quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部訂單"), - "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兌換"), - "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全場通用"), - "quanchangzhe" : m25, - "quantian" : MessageLookupByLibrary.simpleMessage("全天"), - "quanxian" : MessageLookupByLibrary.simpleMessage("權限"), - "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("權限設置"), - "quanyijishao" : MessageLookupByLibrary.simpleMessage("權益介紹"), - "quanyishuoming" : MessageLookupByLibrary.simpleMessage("權益説明"), - "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"), - "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"), - "qudanhao" : m26, - "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"), - "qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"), - "queding" : MessageLookupByLibrary.simpleMessage("確定"), - "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), - "queren" : MessageLookupByLibrary.simpleMessage("确认"), - "querenbangding" : MessageLookupByLibrary.simpleMessage("確認綁定"), - "querenchongzhi" : MessageLookupByLibrary.simpleMessage("確認充值"), - "querenduihuan" : MessageLookupByLibrary.simpleMessage("确认兑换"), - "querenshouhuo" : MessageLookupByLibrary.simpleMessage("確認收貨"), - "querenyaoshanchudangqianpinglunma" : MessageLookupByLibrary.simpleMessage("確認要刪除當前評論嗎?"), - "querenzhuxiao" : MessageLookupByLibrary.simpleMessage("確認注銷"), - "quhexiao" : MessageLookupByLibrary.simpleMessage("去核銷"), - "quhuozhong" : MessageLookupByLibrary.simpleMessage("取貨中"), - "qujianma" : MessageLookupByLibrary.simpleMessage("取件碼"), - "quqiandao" : MessageLookupByLibrary.simpleMessage("去簽到"), - "qushiyong" : MessageLookupByLibrary.simpleMessage("去使用"), - "quwancheng" : MessageLookupByLibrary.simpleMessage(" 去完成 "), - "quxiao" : MessageLookupByLibrary.simpleMessage("取消"), - "quxiaodingdan" : MessageLookupByLibrary.simpleMessage("取消訂單"), - "quxiaozhifu" : MessageLookupByLibrary.simpleMessage("取消支付"), - "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), - "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("熱門文章視頻"), - "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("熱門文章視頻清單"), - "ren" : m27, - "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任務中心"), - "resend_in_seconds" : m28, - "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), - "ruhedihuanjifen" : MessageLookupByLibrary.simpleMessage("如何兌換積分"), - "ruhedihuanjifen1" : MessageLookupByLibrary.simpleMessage("點擊淨弼,進入積分商城,點擊你想兌換的領商品,進入商品詳情後點擊下方兌換,即可兌換哦~"), - "ruhelingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("如何領取優惠券?"), - "ruhelingquyouhuiquan1" : MessageLookupByLibrary.simpleMessage("點擊我的,進入我的頁面後,點擊下方的領取中心,進入后即可領取優惠券哦~"), - "ruheqiandao" : MessageLookupByLibrary.simpleMessage("如何簽到?"), - "ruheqiandao1" : MessageLookupByLibrary.simpleMessage("1.點擊淨弼,進入首頁,點擊上方的去簽到。\n2.點擊我的,進入我的頁面,點擊上方的積分詳情,進入後即可簽到。"), - "ruxutuikuanqingyumendianlianxi" : MessageLookupByLibrary.simpleMessage("如需退款,請您提前準備好訂單號/取單號,並與門店人員進行聯繫"), - "saoma" : MessageLookupByLibrary.simpleMessage("掃碼"), - "saomadiancan" : MessageLookupByLibrary.simpleMessage("您即將進行掃碼點餐"), - "saomashibieguanzhugongzonghao" : MessageLookupByLibrary.simpleMessage("掃碼識別,關注公眾號"), - "send_code" : MessageLookupByLibrary.simpleMessage("發送驗證碼"), - "shanchu" : MessageLookupByLibrary.simpleMessage("刪除"), - "shanchudingdan" : MessageLookupByLibrary.simpleMessage("刪除訂單"), - "shanghuruzhu" : MessageLookupByLibrary.simpleMessage("商戶入駐"), - "shangjiaquan" : MessageLookupByLibrary.simpleMessage("商家券"), - "shangjiaqueren" : MessageLookupByLibrary.simpleMessage("商家確認"), - "shangjiayifahuo" : MessageLookupByLibrary.simpleMessage("商家已發貨"), - "shangjiazhengzaipeican" : MessageLookupByLibrary.simpleMessage("商家正在配餐"), - "shanglajiazai" : MessageLookupByLibrary.simpleMessage("上拉加載"), - "shangpincaigou" : MessageLookupByLibrary.simpleMessage("商品採購"), - "shangpinjifen" : m29, - "shangpinxiangqing" : MessageLookupByLibrary.simpleMessage("商品詳情"), - "shangyidengji" : MessageLookupByLibrary.simpleMessage("上一等級"), - "shenghuoyule" : MessageLookupByLibrary.simpleMessage("生活娛樂"), - "shengxianzhaipei" : MessageLookupByLibrary.simpleMessage("生鮮宅配"), - "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘積分大禮"), - "shenqingtuikuan" : MessageLookupByLibrary.simpleMessage("申請退款"), - "shezhi" : MessageLookupByLibrary.simpleMessage("設置"), - "shifangjiazaigengduo" : MessageLookupByLibrary.simpleMessage("釋放加載更多"), - "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("釋放刷新"), - "shifujifen" : m30, - "shifujihuanka" : m31, - "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("實名認證"), - "shixiaoquan" : MessageLookupByLibrary.simpleMessage("失效券"), - "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongbangzhu" : MessageLookupByLibrary.simpleMessage("使用幫助"), - "shiyongmendian" : MessageLookupByLibrary.simpleMessage("適用門店"), - "shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"), - "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), - "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), - "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用詳情"), - "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"), - "shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收貨地址"), - "shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("請輸入收貨人手機號"), - "shouhuorenxiangxidizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人詳細地址"), - "shouhuorenxingming" : MessageLookupByLibrary.simpleMessage("請輸入收貨人姓名"), - "shoujihao" : MessageLookupByLibrary.simpleMessage("手機號"), - "shouqi" : MessageLookupByLibrary.simpleMessage("收起"), - "shouye" : MessageLookupByLibrary.simpleMessage("首頁"), - "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), - "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), - "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), - "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), - "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), - "shuliang" : MessageLookupByLibrary.simpleMessage("數量"), - "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), - "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"), - "sui" : m32, - "tangshi" : MessageLookupByLibrary.simpleMessage("堂食"), - "tebieshengming" : MessageLookupByLibrary.simpleMessage("特別聲明"), - "tehuizhuanqu" : MessageLookupByLibrary.simpleMessage("特惠專區"), - "tianjiaxinfuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tianjifuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tiantiandefuli" : MessageLookupByLibrary.simpleMessage("天天得福利"), - "tiantianlingjifen" : MessageLookupByLibrary.simpleMessage("天天領積分"), - "tijiao" : MessageLookupByLibrary.simpleMessage("提交"), - "tijiaochenggong" : MessageLookupByLibrary.simpleMessage("提交成功"), - "tingchewei" : MessageLookupByLibrary.simpleMessage("停車位"), - "tixian" : MessageLookupByLibrary.simpleMessage("提現"), - "tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意並繼續"), - "tongzhi" : MessageLookupByLibrary.simpleMessage("通知"), - "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), - "toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投書須知"), - "touxiang" : MessageLookupByLibrary.simpleMessage("頭像"), - "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登錄"), - "tuiguangma" : MessageLookupByLibrary.simpleMessage("推廣碼"), - "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), - "waidai" : MessageLookupByLibrary.simpleMessage("外帶"), - "waimai" : MessageLookupByLibrary.simpleMessage("外賣"), - "waimaipeisong" : MessageLookupByLibrary.simpleMessage("外賣配送"), - "waisong" : MessageLookupByLibrary.simpleMessage("外送"), - "wan" : MessageLookupByLibrary.simpleMessage("玩"), - "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m33, - "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下單"), - "wangjimima" : MessageLookupByLibrary.simpleMessage("忘記密碼"), - "wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"), - "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "), - "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "), - "weidenglu" : MessageLookupByLibrary.simpleMessage("未登錄"), - "weidengluxinxi" : MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩資訊"), - "weihexiao" : MessageLookupByLibrary.simpleMessage("未核銷"), - "weikaiqi" : MessageLookupByLibrary.simpleMessage("未開啓"), - "weilegeiningenghaodefuwu" : MessageLookupByLibrary.simpleMessage("為了給您提供更好的服務,以及享受更加精彩的信息內容,請在使用使用期間登錄"), - "weilejishishoudaohuodongxiaoxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), - "weilekaipaizhaoxuanzhetouxiang" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), - "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息"), - "weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), - "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), - "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), - "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"), - "wentijian" : MessageLookupByLibrary.simpleMessage("問題件"), - "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), - "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"), - "wenzhangzhuanlan" : MessageLookupByLibrary.simpleMessage("文章專欄"), - "weulingqu" : MessageLookupByLibrary.simpleMessage("未領取"), - "wodechengjiu" : MessageLookupByLibrary.simpleMessage("我的成就"), - "wodedingdan" : MessageLookupByLibrary.simpleMessage("我的訂單"), - "wodedongtai" : MessageLookupByLibrary.simpleMessage("我的動態"), - "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), - "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"), - "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的積分值"), - "wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍價"), - "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), - "wodenianling" : MessageLookupByLibrary.simpleMessage("我的年齡"), - "wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼團"), - "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的錢包"), - "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), - "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), - "wodeyaoqing" : MessageLookupByLibrary.simpleMessage("我的邀請"), - "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀請碼"), - "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀請碼"), - "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流單號:"), - "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), - "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), - "wuliuzhuangtai" : MessageLookupByLibrary.simpleMessage("物流狀態:"), - "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下單時間"), - "xiadanshijian_" : m34, - "xiadanzhuanjifen" : MessageLookupByLibrary.simpleMessage("下單賺積分"), - "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), - "xiangce" : MessageLookupByLibrary.simpleMessage("相冊"), - "xiangji" : MessageLookupByLibrary.simpleMessage("相機"), - "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "), - "xiangqing" : MessageLookupByLibrary.simpleMessage("詳情"), - "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("詳細地址"), - "xianshangfafang" : MessageLookupByLibrary.simpleMessage("綫上發放"), - "xianshangshiyong" : MessageLookupByLibrary.simpleMessage("線上使用"), - "xianxiashiyong" : MessageLookupByLibrary.simpleMessage("線下使用"), - "xiaofei" : MessageLookupByLibrary.simpleMessage("消費"), - "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), - "xiaofeijihuanka" : MessageLookupByLibrary.simpleMessage("消費集換卡"), - "xiaofeijilu" : MessageLookupByLibrary.simpleMessage("消費記錄"), - "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), - "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等級"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加載完成"), - "xiedongtai" : MessageLookupByLibrary.simpleMessage("寫動態"), - "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("一心回鄉用戶隱私協議"), - "xihuan_" : m35, - "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活動"), - "xingming" : MessageLookupByLibrary.simpleMessage("姓名"), - "xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系統通知"), - "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系統消息"), - "xiugai" : MessageLookupByLibrary.simpleMessage("修改"), - "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), - "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"), - "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), - "xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"), - "xuanji" : MessageLookupByLibrary.simpleMessage("選集"), - "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), - "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"), - "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"), - "xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"), - "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"), - "xuni" : MessageLookupByLibrary.simpleMessage("虛擬"), - "yanzhengma" : MessageLookupByLibrary.simpleMessage("驗證碼"), - "yaoqinghaoyou" : MessageLookupByLibrary.simpleMessage("邀請好友"), - "yaoqinghaoyoudefen" : MessageLookupByLibrary.simpleMessage("邀請好友得分"), - "yaoqingrenshoujihao_" : m36, - "yaoqingwancheng" : MessageLookupByLibrary.simpleMessage("邀請完成"), - "yibangfuka" : MessageLookupByLibrary.simpleMessage("已綁副卡"), - "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兌換"), - "yiduihuanjian" : m37, - "yifahuo" : MessageLookupByLibrary.simpleMessage("已發貨"), - "yiguanzhu" : MessageLookupByLibrary.simpleMessage("已關注"), - "yihouzaishuo" : MessageLookupByLibrary.simpleMessage("以後再說"), - "yihuide" : MessageLookupByLibrary.simpleMessage("已獲得"), - "yihujiaoqishou" : MessageLookupByLibrary.simpleMessage("已呼叫騎手"), - "yikaitongzidongxufei" : MessageLookupByLibrary.simpleMessage("已開通自動續費"), - "yikexiao" : MessageLookupByLibrary.simpleMessage("已核銷"), - "yilingqu" : MessageLookupByLibrary.simpleMessage("已領取"), - "yindao1" : MessageLookupByLibrary.simpleMessage("新增多項功能,海量優惠資訊實時推送"), - "yindao2" : MessageLookupByLibrary.simpleMessage("新增多項功能,使用平臺錢包優惠多多,更有充值優惠享不停"), - "yindao3" : MessageLookupByLibrary.simpleMessage("新增會員任務得積分,消費可得綠金、積分商城換購"), - "yindao4" : MessageLookupByLibrary.simpleMessage("傳遞友愛純淨健康有機環保智慧理念"), - "yindaoye1" : MessageLookupByLibrary.simpleMessage("會員最新資訊搶先看"), - "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"), - "yindaoye3" : MessageLookupByLibrary.simpleMessage("會員活動專區"), - "yindaoye4" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), - "yingwen" : MessageLookupByLibrary.simpleMessage("英文"), - "yingyeshijian" : m38, - "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), - "yinshi" : MessageLookupByLibrary.simpleMessage("飲食"), - "yinsishengming" : MessageLookupByLibrary.simpleMessage("隱私聲明"), - "yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隱私協議》"), - "yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉"), - "yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。"), - "yinzhang" : MessageLookupByLibrary.simpleMessage("印章"), - "yiqiandao" : MessageLookupByLibrary.simpleMessage("已簽到"), - "yiqianshou" : MessageLookupByLibrary.simpleMessage("已簽收"), - "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), - "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), - "yishixiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiyong" : MessageLookupByLibrary.simpleMessage("已使用"), - "yishouquan" : MessageLookupByLibrary.simpleMessage("已授權"), - "yisongda" : MessageLookupByLibrary.simpleMessage("已送達"), - "yituikuan" : MessageLookupByLibrary.simpleMessage("已退款"), - "yiwancheng" : MessageLookupByLibrary.simpleMessage(" 已完成 "), - "yiwanchengdingdan" : MessageLookupByLibrary.simpleMessage("已完成订单"), - "yixianghuiyuanquanyi" : MessageLookupByLibrary.simpleMessage("已享會員權益"), - "yixiansquanbupinglun" : MessageLookupByLibrary.simpleMessage("-已顯示全部評論-"), - "yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), - "yiyoujifen" : MessageLookupByLibrary.simpleMessage("已有積分"), - "yizhifu" : MessageLookupByLibrary.simpleMessage("已支付"), - "yonghuming" : MessageLookupByLibrary.simpleMessage("用戶名"), - "yonghuxiaofeijifen" : MessageLookupByLibrary.simpleMessage("用戶每消費1元可獲得1個積分 。"), - "youhuiquan" : MessageLookupByLibrary.simpleMessage("優惠券"), - "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("優惠券領取"), - "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("優惠金額無法累積積分,訂單撤銷或其他原因造成的未成功支付的訂單,無法獲得對應的積分。"), - "youkedenglu" : MessageLookupByLibrary.simpleMessage("遊客登錄"), - "youxiaoqi" : m39, - "youxiaoqixian" : MessageLookupByLibrary.simpleMessage("有效期限:"), - "youxiaoqizhi" : m40, - "yuan" : MessageLookupByLibrary.simpleMessage("元"), - "yuan_" : m41, - "yuanjia" : MessageLookupByLibrary.simpleMessage("原價"), - "yue" : MessageLookupByLibrary.simpleMessage("餘額"), - "yue_" : m42, - "yue__" : m43, - "yuemingxi" : MessageLookupByLibrary.simpleMessage("餘額明細"), - "yuliudianhua" : MessageLookupByLibrary.simpleMessage("預留電話"), - "yunfei" : MessageLookupByLibrary.simpleMessage("運費"), - "yuyan" : MessageLookupByLibrary.simpleMessage("語言"), - "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再來一單"), - "zaituzhong" : MessageLookupByLibrary.simpleMessage("運輸中"), - "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"), - "zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"), - "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("暫未解鎖"), - "zanweikaifang" : MessageLookupByLibrary.simpleMessage("暫未開放"), - "zanweikaitong" : MessageLookupByLibrary.simpleMessage("暫未開通"), - "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"), - "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"), - "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"), - "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("賬號安全"), - "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("賬號授權"), - "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("賬號信息"), - "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("賬號與安全"), - "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("賬號注銷説明"), - "zhanghuyue" : MessageLookupByLibrary.simpleMessage("賬戶餘額"), - "zhankai" : MessageLookupByLibrary.simpleMessage("展開"), - "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), - "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加載"), - "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加載中..."), - "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致電門店"), - "zhifubao" : MessageLookupByLibrary.simpleMessage("支付寶"), - "zhifubaozhifu" : MessageLookupByLibrary.simpleMessage("支付寶支付"), - "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), - "zhifuxiangqing" : MessageLookupByLibrary.simpleMessage("支付详情"), - "zhizunhuiyuan" : MessageLookupByLibrary.simpleMessage("至尊會員"), - "zhizuowancheng" : MessageLookupByLibrary.simpleMessage("製作完成"), - "zhongchakan" : MessageLookupByLibrary.simpleMessage("中查看"), - "zhongwenjianti" : MessageLookupByLibrary.simpleMessage("中文簡體"), - "zhuanlan" : MessageLookupByLibrary.simpleMessage("專欄"), - "zhuanxiangyouhuiquan" : MessageLookupByLibrary.simpleMessage("專享優惠券"), - "zhunong1" : MessageLookupByLibrary.simpleMessage("愛在回鄉,快樂助農"), - "zhunongjifen" : MessageLookupByLibrary.simpleMessage("助農積分"), - "zhunongzhuanqu" : MessageLookupByLibrary.simpleMessage("助農專區"), - "zhuxiaotixing" : MessageLookupByLibrary.simpleMessage("再次提醒:註銷帳號後不可恢復,相關資料和資訊會永久删除。"), - "zhuxiaozhanghao" : MessageLookupByLibrary.simpleMessage("註銷帳號"), - "ziqu" : MessageLookupByLibrary.simpleMessage("自取"), - "ziti" : MessageLookupByLibrary.simpleMessage("自提"), - "zitidizhi" : MessageLookupByLibrary.simpleMessage("自提地址"), - "zitiduihuanquan" : MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), - "zitishijian" : MessageLookupByLibrary.simpleMessage("自提時間"), - "zongzichan" : MessageLookupByLibrary.simpleMessage("總資產"), - "zongzichanyuan" : MessageLookupByLibrary.simpleMessage("總資產(元)"), - "zuanshihuiyuan" : MessageLookupByLibrary.simpleMessage("鑽石會員"), - "zuixinwenzhang" : MessageLookupByLibrary.simpleMessage("最新文章"), - "zuorenwudejifen" : MessageLookupByLibrary.simpleMessage("做任務得積分"), - "zuozhe" : m44 - }; + static Map _notInlinedMessages(_) => { + "bainianchuanjiao": MessageLookupByLibrary.simpleMessage("百年川椒"), + "baiyin": MessageLookupByLibrary.simpleMessage("白银"), + "baiyinhuiyuan": MessageLookupByLibrary.simpleMessage("白銀會員"), + "banben": m0, + "bangdingfuka": MessageLookupByLibrary.simpleMessage("綁定副卡"), + "bangdingshouji": MessageLookupByLibrary.simpleMessage("綁定手機"), + "bangong": MessageLookupByLibrary.simpleMessage("辦公"), + "bangzhuyufankui": MessageLookupByLibrary.simpleMessage("幫助與反饋"), + "baocun": MessageLookupByLibrary.simpleMessage("保存"), + "baocunchenggong": MessageLookupByLibrary.simpleMessage("保存成功"), + "baocunsaoma": MessageLookupByLibrary.simpleMessage( + "截屏保存下方二維碼,邀請他人微信掃一掃識別,長按關注後,完成小遊戲,領取優惠券後,即邀請成功哦!"), + "beiyaoqingdejiangli": MessageLookupByLibrary.simpleMessage( + "每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張"), + "beizhu": MessageLookupByLibrary.simpleMessage("備注"), + "beizhuxinxi": MessageLookupByLibrary.simpleMessage("備注信息"), + "benzhouquanbao": MessageLookupByLibrary.simpleMessage("本周券包"), + "bianjidizhi": MessageLookupByLibrary.simpleMessage("編輯地址"), + "biaojiweiyidu": MessageLookupByLibrary.simpleMessage("標為已讀"), + "biaoweiyidu": MessageLookupByLibrary.simpleMessage("標爲已讀"), + "bodadianhua": MessageLookupByLibrary.simpleMessage("撥打電話"), + "bojin": MessageLookupByLibrary.simpleMessage("铂金"), + "brand_yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峽姐妹"), + "buzhichikaipiao": MessageLookupByLibrary.simpleMessage("不支持開票"), + "canyingfuwu": MessageLookupByLibrary.simpleMessage("餐飲服務"), + "chakan": MessageLookupByLibrary.simpleMessage("查看"), + "chakangengduo": MessageLookupByLibrary.simpleMessage("查看更多"), + "chakanhexiaoma": MessageLookupByLibrary.simpleMessage("查看核銷碼"), + "chakanquanyi": MessageLookupByLibrary.simpleMessage("查看權益"), + "chakanshixiaoquan": MessageLookupByLibrary.simpleMessage("查看失效券"), + "chakanwodekabao": MessageLookupByLibrary.simpleMessage("查看我的卡包"), + "chakanwodekaquan": MessageLookupByLibrary.simpleMessage("查看我的卡券"), + "chakanwuliu": MessageLookupByLibrary.simpleMessage("查看物流"), + "chakanxiangqing": MessageLookupByLibrary.simpleMessage("查看詳情"), + "changjianwenti": MessageLookupByLibrary.simpleMessage("常見問題"), + "changqiyouxiao": MessageLookupByLibrary.simpleMessage("長期有效"), + "chaojiyouhuiquan": MessageLookupByLibrary.simpleMessage("超值优惠券"), + "chaungshirengushi": MessageLookupByLibrary.simpleMessage("創始人故事"), + "chenggongdengluzhuce": + MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), + "chengjiu": MessageLookupByLibrary.simpleMessage("成就"), + "chengjiuhuizhang": MessageLookupByLibrary.simpleMessage("成就徽章"), + "chengshixuanze": MessageLookupByLibrary.simpleMessage("城市選擇"), + "chengweidianpuzhuanshuhuiyuan": + MessageLookupByLibrary.simpleMessage("成為專屬會員,享專屬權益"), + "chi": MessageLookupByLibrary.simpleMessage("吃"), + "chijiankang": MessageLookupByLibrary.simpleMessage("吃健康"), + "chongzhi": MessageLookupByLibrary.simpleMessage("充值"), + "chongzhichenggong": MessageLookupByLibrary.simpleMessage("充值成功"), + "chongzhifuliduo": MessageLookupByLibrary.simpleMessage("充值福利多"), + "chongzhixiaoxi": MessageLookupByLibrary.simpleMessage("充值消息"), + "chongzhizuixiaojine": m1, + "chuangjianshijian": m2, + "chuangshirendegushi": MessageLookupByLibrary.simpleMessage("創始人的故事-"), + "chuangshirendegushi1": MessageLookupByLibrary.simpleMessage("創始人的故事"), + "chuzhiyouhui": MessageLookupByLibrary.simpleMessage("儲值優惠"), + "code_error": MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"), + "cunchu": MessageLookupByLibrary.simpleMessage("存儲"), + "cunchutishixinxi": MessageLookupByLibrary.simpleMessage( + "為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"), + "dabaodaodianqu": MessageLookupByLibrary.simpleMessage("打包到店取"), + "daifukuan": MessageLookupByLibrary.simpleMessage("待付款"), + "daipeisong": MessageLookupByLibrary.simpleMessage("待配送"), + "daiqucan": MessageLookupByLibrary.simpleMessage("待取餐"), + "daiqueren": MessageLookupByLibrary.simpleMessage("待確認"), + "daizhifu": MessageLookupByLibrary.simpleMessage("待支付"), + "daizhizuo": MessageLookupByLibrary.simpleMessage("待製作"), + "dajiadouzaiduihuan": MessageLookupByLibrary.simpleMessage("大家都在兌換"), + "dakaidingwei": MessageLookupByLibrary.simpleMessage("打開定位"), + "dangqianbanben": MessageLookupByLibrary.simpleMessage("當前版本"), + "dangqiandengji": MessageLookupByLibrary.simpleMessage("當前等級"), + "dangqianjifen": MessageLookupByLibrary.simpleMessage("當前積分:"), + "dangqianshangpinduihuanhexiaoma": + MessageLookupByLibrary.simpleMessage("當前商品兌換核銷碼已核銷完成 "), + "dangqianzhukadengji": MessageLookupByLibrary.simpleMessage("當前主卡等級"), + "daodianziqu": MessageLookupByLibrary.simpleMessage("到店自取"), + "daopinglunliebiaodingbu": + MessageLookupByLibrary.simpleMessage("到評論列表頂部"), + "daoxiayidengji": MessageLookupByLibrary.simpleMessage("到下一等級"), + "dengdaishangjiaqueren": MessageLookupByLibrary.simpleMessage("等待商家確認"), + "dengdaiyonghuqucan": MessageLookupByLibrary.simpleMessage("等待用戶取餐"), + "denglu": MessageLookupByLibrary.simpleMessage("登錄"), + "diancan": MessageLookupByLibrary.simpleMessage("點餐"), + "diandan": MessageLookupByLibrary.simpleMessage("點單"), + "dianhua": MessageLookupByLibrary.simpleMessage("電話"), + "dianjidenglu": MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩信息"), + "dianneiyongcan": MessageLookupByLibrary.simpleMessage("店内用餐"), + "dianpuchongzhi": MessageLookupByLibrary.simpleMessage("店鋪充值"), + "dianputuijian": MessageLookupByLibrary.simpleMessage("店鋪推薦"), + "dianpuyue": MessageLookupByLibrary.simpleMessage("店鋪餘額"), + "dianwolingqu": MessageLookupByLibrary.simpleMessage("點我領取"), + "dianzan": MessageLookupByLibrary.simpleMessage("點贊"), + "dianzanxihuan_": m3, + "dingdan": MessageLookupByLibrary.simpleMessage("訂單"), + "dingdanbianhao": MessageLookupByLibrary.simpleMessage("訂單編號"), + "dingdandaifahuo": MessageLookupByLibrary.simpleMessage("訂單待發貨"), + "dingdandaizhifu": MessageLookupByLibrary.simpleMessage("訂單待支付"), + "dingdangenzong": MessageLookupByLibrary.simpleMessage("訂單跟蹤"), + "dingdanhao": MessageLookupByLibrary.simpleMessage("訂單號"), + "dingdanjiesuan": MessageLookupByLibrary.simpleMessage("訂單結算"), + "dingdanqueren": MessageLookupByLibrary.simpleMessage("订单确认"), + "dingdantongzhi": MessageLookupByLibrary.simpleMessage("訂單通知"), + "dingdanxiaoxi": MessageLookupByLibrary.simpleMessage("訂單消息"), + "dingdanyisongda": MessageLookupByLibrary.simpleMessage("訂單送達"), + "dingdanyituikuan": MessageLookupByLibrary.simpleMessage("訂單已退款"), + "dingdanyiwancheng": MessageLookupByLibrary.simpleMessage("訂單已完成"), + "dingdanyizhifu": MessageLookupByLibrary.simpleMessage("訂單已支付"), + "dingwei": MessageLookupByLibrary.simpleMessage("定位"), + "dizhi": MessageLookupByLibrary.simpleMessage("地址"), + "dongtai": MessageLookupByLibrary.simpleMessage("動態"), + "dongtaitishi": MessageLookupByLibrary.simpleMessage( + "用戶發佈內容需要等待系統稽核,稽核通過後才會在推薦廣場展示"), + "dongtaixiangqing": MessageLookupByLibrary.simpleMessage("動態詳情"), + "duihuan": MessageLookupByLibrary.simpleMessage("兑换"), + "duihuanchenggong": MessageLookupByLibrary.simpleMessage("兑换成功"), + "duihuanguize": MessageLookupByLibrary.simpleMessage("兑换规则"), + "duihuanhoufahuo": MessageLookupByLibrary.simpleMessage("兌換物商品"), + "duihuanhouwugegongzuori": + MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), + "duihuanliangdidaogao": MessageLookupByLibrary.simpleMessage("兌換量從低到高"), + "duihuanlianggaodaodi": MessageLookupByLibrary.simpleMessage("兌換量從高到低"), + "duihuanlishi": MessageLookupByLibrary.simpleMessage("兌換歷史"), + "duihuanquan": MessageLookupByLibrary.simpleMessage("兌換券"), + "duihuanshangpinxiangqing": + MessageLookupByLibrary.simpleMessage("兑换商品详情"), + "duihuanxinxi": MessageLookupByLibrary.simpleMessage("兑换信息"), + "duozhongyouhui": MessageLookupByLibrary.simpleMessage("多種優惠券等你拿"), + "fabu": MessageLookupByLibrary.simpleMessage("發佈"), + "fangshier": MessageLookupByLibrary.simpleMessage("方式二"), + "fangshiyi": MessageLookupByLibrary.simpleMessage("方式一"), + "fanhuiduihuanlishi": MessageLookupByLibrary.simpleMessage("返回兌換歷史"), + "fanhuishequn": MessageLookupByLibrary.simpleMessage("返回社群"), + "fanhuishouye": MessageLookupByLibrary.simpleMessage("返回首頁"), + "fankui": MessageLookupByLibrary.simpleMessage("反饋"), + "fankuilizi": + MessageLookupByLibrary.simpleMessage("您可以在這裡輸入迴響內容,例如產品建議,功能异常等"), + "fantizhongwen": MessageLookupByLibrary.simpleMessage("繁体中文"), + "fapiao": MessageLookupByLibrary.simpleMessage("發票"), + "fapiaozhushou": MessageLookupByLibrary.simpleMessage("發票助手"), + "fasong": MessageLookupByLibrary.simpleMessage("發送"), + "fasongduanxin": MessageLookupByLibrary.simpleMessage("發送短信"), + "faxingshijian": m4, + "feishiwuduihuanma": MessageLookupByLibrary.simpleMessage("非實物兌換碼"), + "feishiwushangpin": + MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用!"), + "fensi": MessageLookupByLibrary.simpleMessage("粉絲"), + "fenxiang": MessageLookupByLibrary.simpleMessage("分享"), + "fenxiangdao": MessageLookupByLibrary.simpleMessage("分享到"), + "fenxiangjiankang": MessageLookupByLibrary.simpleMessage("分享健康"), + "fenxiangyaoqing": + MessageLookupByLibrary.simpleMessage("也可以直接點擊右上方的分享給到你想要邀請的人。"), + "fenxiangyaoqingma": MessageLookupByLibrary.simpleMessage( + "將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。"), + "fenxiangzhiweixin": MessageLookupByLibrary.simpleMessage("分享至微信"), + "fukashoujihao": MessageLookupByLibrary.simpleMessage("副卡手機號"), + "fuliduihuan": MessageLookupByLibrary.simpleMessage("福利兌換"), + "fulizhongxin": MessageLookupByLibrary.simpleMessage("福利中心"), + "ge": m5, + "geiwopingfen": MessageLookupByLibrary.simpleMessage("給我評分"), + "gengduo": MessageLookupByLibrary.simpleMessage("更多"), + "gengduohaoquan": MessageLookupByLibrary.simpleMessage("更多好券"), + "gengduoyouhuiquan": MessageLookupByLibrary.simpleMessage("更多優惠券"), + "genggaibangdingshoujihao": + MessageLookupByLibrary.simpleMessage("更改綁定手機號"), + "genghuanbeijing": MessageLookupByLibrary.simpleMessage("更換背景"), + "genghuantouxiang": MessageLookupByLibrary.simpleMessage("更换头像"), + "gengyouhui": MessageLookupByLibrary.simpleMessage("更優惠"), + "gerenxinxi": MessageLookupByLibrary.simpleMessage("個人信息"), + "gexingqianming": MessageLookupByLibrary.simpleMessage("個性簽名"), + "gong": MessageLookupByLibrary.simpleMessage("共"), + "gongchuanghuiyuan": MessageLookupByLibrary.simpleMessage("共创会员"), + "gongjijian": m6, + "gongjijianshangpin": m7, + "gongli": m8, + "gongxinchengwei": MessageLookupByLibrary.simpleMessage("恭喜您成爲"), + "gongxinichengweibendianhuiyuan": + MessageLookupByLibrary.simpleMessage("恭喜您,成為本店會員,快去享受超多的會員權益吧。"), + "gouxuanxieyi": + MessageLookupByLibrary.simpleMessage("請勾選同意隱私服務和一心回鄉服務協定"), + "guanlidizhi": MessageLookupByLibrary.simpleMessage("管理地址"), + "guanyu": MessageLookupByLibrary.simpleMessage("關於"), + "guanyuchuangshiren": MessageLookupByLibrary.simpleMessage("關於創始人"), + "guanyuhuixiang": MessageLookupByLibrary.simpleMessage("關於回鄉"), + "guanzhu": MessageLookupByLibrary.simpleMessage("關注"), + "guojiankangyoujishenghuo": + MessageLookupByLibrary.simpleMessage("過健康有機生活"), + "haimeiyouxiaoxi": MessageLookupByLibrary.simpleMessage("還沒有消息~"), + "haimeiyouyouhuiquankeyilingqu": + MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"), + "haixiajiemei": MessageLookupByLibrary.simpleMessage("海峽姐妹"), + "haowu": MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize": MessageLookupByLibrary.simpleMessage("好友獎勵規則"), + "he": MessageLookupByLibrary.simpleMessage("喝"), + "heji": MessageLookupByLibrary.simpleMessage("合計:"), + "hejiankang": MessageLookupByLibrary.simpleMessage("喝健康"), + "hexiaochenggong": MessageLookupByLibrary.simpleMessage("核銷成功"), + "hexiaomaxiangqing": MessageLookupByLibrary.simpleMessage("核銷碼詳情"), + "huangjin": MessageLookupByLibrary.simpleMessage("黄金"), + "huangjinhuiyuan": MessageLookupByLibrary.simpleMessage("黃金會員"), + "huifu": MessageLookupByLibrary.simpleMessage("回復"), + "huifu_": m9, + "huixiangVIPka": MessageLookupByLibrary.simpleMessage("回鄉VIP卡"), + "huixiangqianbao": MessageLookupByLibrary.simpleMessage("回鄉錢包"), + "huixiangrenyimendian": + MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), + "huixiangtoutiao": MessageLookupByLibrary.simpleMessage("回鄉頭條"), + "huixiangvipkazhuanxiang": + MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"), + "huixiangxieyi": MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"), + "huiyuandengji": MessageLookupByLibrary.simpleMessage("會員等級"), + "huiyuandengjishuoming": MessageLookupByLibrary.simpleMessage("會員等級説明"), + "huiyuanguize": MessageLookupByLibrary.simpleMessage("會員規則説明"), + "huiyuanhuodejifen": MessageLookupByLibrary.simpleMessage("會員如何獲得積分"), + "huiyuanjia": MessageLookupByLibrary.simpleMessage("會員價"), + "huiyuanjibieduizhao": MessageLookupByLibrary.simpleMessage("會員級別對照表"), + "huiyuanjifen": MessageLookupByLibrary.simpleMessage("會員積分"), + "huiyuanka": MessageLookupByLibrary.simpleMessage("會員卡"), + "huiyuankaxiangqing": MessageLookupByLibrary.simpleMessage("會員卡詳情"), + "huiyuanma": MessageLookupByLibrary.simpleMessage("會員碼"), + "huiyuanquanyi": MessageLookupByLibrary.simpleMessage("會員權益"), + "huiyuanyue": MessageLookupByLibrary.simpleMessage("會員餘額"), + "huiyuanzhongxin": MessageLookupByLibrary.simpleMessage("會員中心"), + "huiyuanzhuanxiangjiage": + MessageLookupByLibrary.simpleMessage("會員專享價格"), + "huode": MessageLookupByLibrary.simpleMessage("獲得"), + "huodequanyi": MessageLookupByLibrary.simpleMessage("獲得權益"), + "huodong": MessageLookupByLibrary.simpleMessage("活動"), + "huodongguize": MessageLookupByLibrary.simpleMessage("活動規則"), + "huodongjianmianpeisongfei": m10, + "huodongjinxingzhong": MessageLookupByLibrary.simpleMessage("活動進行中"), + "huodongliebiao": MessageLookupByLibrary.simpleMessage("活動列表"), + "huodongyue": MessageLookupByLibrary.simpleMessage("活動餘額"), + "huodongyue_": m11, + "huodongzixun": MessageLookupByLibrary.simpleMessage("活動資訊"), + "huopinyisongda": MessageLookupByLibrary.simpleMessage("貨品已送達"), + "huozan": MessageLookupByLibrary.simpleMessage("獲贊"), + "input_code": MessageLookupByLibrary.simpleMessage("手機驗證碼"), + "input_code_hide": MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "input_invite_code_hide": MessageLookupByLibrary.simpleMessage("填寫邀請碼"), + "input_phone": MessageLookupByLibrary.simpleMessage("輸入手機號"), + "input_phone_hide": MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), + "invite_code_error": MessageLookupByLibrary.simpleMessage("邀請碼輸入錯誤"), + "jiajifen": m12, + "jian": MessageLookupByLibrary.simpleMessage("件"), + "jiangli": MessageLookupByLibrary.simpleMessage("獎勵"), + "jiangshi": MessageLookupByLibrary.simpleMessage("講師"), + "jianjie": m13, + "jiazaishibai": MessageLookupByLibrary.simpleMessage("加載失敗"), + "jiesuan": MessageLookupByLibrary.simpleMessage("結算"), + "jiesuanjine": MessageLookupByLibrary.simpleMessage("結算金額"), + "jifen": MessageLookupByLibrary.simpleMessage("積分"), + "jifen_": m14, + "jifenbuzu": MessageLookupByLibrary.simpleMessage("您的積分不足"), + "jifendaoxiayidengji": m15, + "jifendejisuanshuoming": + MessageLookupByLibrary.simpleMessage("積分的計算説明"), + "jifendidaogao": MessageLookupByLibrary.simpleMessage("積分從低到高"), + "jifengaodaodi": MessageLookupByLibrary.simpleMessage("積分從高到低"), + "jifenhuanquan": MessageLookupByLibrary.simpleMessage("積分換券"), + "jifenmingxi": MessageLookupByLibrary.simpleMessage("積分明細"), + "jifenshangcheng": MessageLookupByLibrary.simpleMessage("積分商城"), + "jifenxiangqing": MessageLookupByLibrary.simpleMessage("積分詳情"), + "jihuanka": MessageLookupByLibrary.simpleMessage("集換卡"), + "jingbilianmenghuiyuandian": + MessageLookupByLibrary.simpleMessage("淨弼聯盟會員店"), + "jingxuanhaowen": MessageLookupByLibrary.simpleMessage("精選好文"), + "jingxuanhuodong": MessageLookupByLibrary.simpleMessage("精選活動"), + "jinkahuiyuan": MessageLookupByLibrary.simpleMessage("金卡会员"), + "jinrihuiyuanrenwu": MessageLookupByLibrary.simpleMessage("今日會員任務"), + "jinrushangdian": MessageLookupByLibrary.simpleMessage("進入商店"), + "jinruzhuanqu": MessageLookupByLibrary.simpleMessage("進入專區"), + "jinxingbangdingfuka": MessageLookupByLibrary.simpleMessage("進行綁定副卡"), + "jinxingfukabangding": MessageLookupByLibrary.simpleMessage("進行副卡綁定"), + "jinxingzhanghaozhuxiao": + MessageLookupByLibrary.simpleMessage("進行賬號注銷"), + "jinxingzhongdedingdan": MessageLookupByLibrary.simpleMessage("進行中的訂單"), + "jituanchuangbanren": MessageLookupByLibrary.simpleMessage("集团创办人"), + "jituanchuangshiren": MessageLookupByLibrary.simpleMessage("集團創始人"), + "jixuduihuan": MessageLookupByLibrary.simpleMessage("继续兑换"), + "jixuzhifu": MessageLookupByLibrary.simpleMessage("繼續支付"), + "jubao": MessageLookupByLibrary.simpleMessage("舉報"), + "jubaogaineirong": MessageLookupByLibrary.simpleMessage("舉報該内容"), + "jubaotishi": MessageLookupByLibrary.simpleMessage( + "您的舉報正在等待人工稽核,我們會在7~15個工作日處理,處理結果可在"), + "jubaoyuanyin": + MessageLookupByLibrary.simpleMessage("請輸入舉報原因,以便我們更快定位問題,快速處理"), + "jujue": MessageLookupByLibrary.simpleMessage("拒絕"), + "kabao": MessageLookupByLibrary.simpleMessage("卡包"), + "kabaokeshiyong": MessageLookupByLibrary.simpleMessage("卡包-可使用"), + "kaiqiquanxian": MessageLookupByLibrary.simpleMessage("開啓權限"), + "kaitonghuixianghuoququanyi": + MessageLookupByLibrary.simpleMessage("開通回鄉VIP卡獲取更多權益"), + "kaitongriqi": m16, + "kaquan": MessageLookupByLibrary.simpleMessage("卡券"), + "kelingqudeyouhuiquan": MessageLookupByLibrary.simpleMessage("可領取的卡券"), + "keshiyong": MessageLookupByLibrary.simpleMessage("可使用"), + "keyongjifen": MessageLookupByLibrary.simpleMessage("可用积分"), + "keyongquan": MessageLookupByLibrary.simpleMessage("可用券"), + "keyongyouhuiquan": MessageLookupByLibrary.simpleMessage("可用優惠券"), + "keyongyue": MessageLookupByLibrary.simpleMessage("可用餘額"), + "kongtiao": MessageLookupByLibrary.simpleMessage("空調"), + "kuaidi": MessageLookupByLibrary.simpleMessage("快遞"), + "kuaidiwuliu": MessageLookupByLibrary.simpleMessage("快遞物流"), + "kuailezhunong": MessageLookupByLibrary.simpleMessage("快樂助農"), + "lianxikefu": MessageLookupByLibrary.simpleMessage("聯系客服"), + "lianxishoujihao": MessageLookupByLibrary.simpleMessage("聯繫手機號"), + "lianxuqiandaolingqushuangbeijifen": + MessageLookupByLibrary.simpleMessage("連續簽到領取雙倍積分"), + "liaojie": MessageLookupByLibrary.simpleMessage("瞭解"), + "liaojiejiankang": MessageLookupByLibrary.simpleMessage("瞭解健康"), + "lijicanjia": MessageLookupByLibrary.simpleMessage("立即參加"), + "lijichongzhi": MessageLookupByLibrary.simpleMessage("立即充值"), + "lijigengxin": MessageLookupByLibrary.simpleMessage("立即更新"), + "lijikaitong": MessageLookupByLibrary.simpleMessage("立即開通"), + "lijilingqu": MessageLookupByLibrary.simpleMessage("立即領取"), + "lijiqiandao": MessageLookupByLibrary.simpleMessage("立即簽到"), + "lijishiyong": MessageLookupByLibrary.simpleMessage("立即使用"), + "lijitiyan": MessageLookupByLibrary.simpleMessage("立即體驗"), + "lijiyuyue": MessageLookupByLibrary.simpleMessage("立即預約"), + "likekaitong": MessageLookupByLibrary.simpleMessage("立刻開通"), + "likexufei": MessageLookupByLibrary.simpleMessage("立刻續費"), + "likezhifu": MessageLookupByLibrary.simpleMessage("立刻支付"), + "lingqu": MessageLookupByLibrary.simpleMessage("領取"), + "lingquanzhongxin": MessageLookupByLibrary.simpleMessage("領券中心"), + "lingquchenggong": MessageLookupByLibrary.simpleMessage("領取成功"), + "lingqudaokabao": MessageLookupByLibrary.simpleMessage("領取到卡包"), + "lingqufangshi": MessageLookupByLibrary.simpleMessage("领取方式"), + "lingqushijian": m17, + "linian": MessageLookupByLibrary.simpleMessage("理念"), + "lishijilu": MessageLookupByLibrary.simpleMessage("歷史記錄"), + "liuxianinjingcaidepinglunba": + MessageLookupByLibrary.simpleMessage("留下您精彩的評論吧"), + "login": MessageLookupByLibrary.simpleMessage("登錄"), + "login_splash": MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"), + "lvbiyue": MessageLookupByLibrary.simpleMessage("綠幣餘額"), + "lvbiyue_": m18, + "lvbizhifu": MessageLookupByLibrary.simpleMessage("綠幣支付"), + "main_menu1": MessageLookupByLibrary.simpleMessage("首頁"), + "main_menu2": MessageLookupByLibrary.simpleMessage("門店"), + "main_menu3": MessageLookupByLibrary.simpleMessage("社群"), + "main_menu4": MessageLookupByLibrary.simpleMessage("我的"), + "main_menu5": MessageLookupByLibrary.simpleMessage("hi"), + "manlijiandaijinquan": m19, + "manyuankeyong": m20, + "meiriqiandao": MessageLookupByLibrary.simpleMessage("每日簽到"), + "meiyougengduohuiyuanka": + MessageLookupByLibrary.simpleMessage("沒有更多會員卡"), + "meiyougengduoshujule": MessageLookupByLibrary.simpleMessage("沒有更多數據了"), + "meiyougengduoyouhuiquan": + MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), + "meizhousangengxin": MessageLookupByLibrary.simpleMessage("每週三更新"), + "meizhousanquanbao": MessageLookupByLibrary.simpleMessage("每週三更新劵包"), + "mendianxuanzhe": MessageLookupByLibrary.simpleMessage("门店选择"), + "mendianyue": MessageLookupByLibrary.simpleMessage("門店餘額"), + "menpaihao": MessageLookupByLibrary.simpleMessage("請輸入門牌號"), + "mi": m21, + "mingxi": MessageLookupByLibrary.simpleMessage("明細"), + "morenpaixu": MessageLookupByLibrary.simpleMessage("默認排序"), + "muqianwujilu": MessageLookupByLibrary.simpleMessage("目前暫無記錄哦"), + "muqianzanwuxingdianhuodong": + MessageLookupByLibrary.simpleMessage("目前暫無星店活動"), + "nihaimeiyouchongzhihuoxiaofeijilu": + MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"), + "nincunchuquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), + "nindingweigongnengweikaiqi": + MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), + "nindingweiquanxianweiyunxu": + MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), + "ninweidenglu": MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"), + "ninxiangjiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), + "ninxiaoxiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), + "ninyichenggonglingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("您已成功領取優惠券,請在"), + "ninyilianxuqiandaotian": m22, + "ninyouyigedingdanyaolingqu": + MessageLookupByLibrary.simpleMessage("您有一個訂單需要前往門店領取"), + "ninyouyigexindedingdan": + MessageLookupByLibrary.simpleMessage("您有一個新訂單"), + "paizhao": MessageLookupByLibrary.simpleMessage("拍照"), + "peisong": MessageLookupByLibrary.simpleMessage("配送"), + "peisongfangshi": MessageLookupByLibrary.simpleMessage("配送方式"), + "peisongfei": MessageLookupByLibrary.simpleMessage("配送費"), + "peisongfuwu": MessageLookupByLibrary.simpleMessage("配送服務"), + "peisongzhong": MessageLookupByLibrary.simpleMessage("配送中"), + "phone_error": MessageLookupByLibrary.simpleMessage("手機格式錯誤"), + "pinglun": MessageLookupByLibrary.simpleMessage("評論"), + "pinglun_": m23, + "pingtaiyue": MessageLookupByLibrary.simpleMessage("平臺餘額"), + "pingtaizhifumima": MessageLookupByLibrary.simpleMessage("平臺支付密碼"), + "pinpai": MessageLookupByLibrary.simpleMessage("品牌"), + "pinpaijieshao": MessageLookupByLibrary.simpleMessage("品牌介紹"), + "privacy_policy1": MessageLookupByLibrary.simpleMessage("登錄既同意"), + "privacy_policy2": MessageLookupByLibrary.simpleMessage("《一心回鄉服務協議》"), + "privacy_policy3": MessageLookupByLibrary.simpleMessage("《隱私服務》"), + "privacy_policy4": MessageLookupByLibrary.simpleMessage("并使用本機號碼登錄"), + "qianbao": MessageLookupByLibrary.simpleMessage("錢包"), + "qiandao": MessageLookupByLibrary.simpleMessage("簽到"), + "qiandaodejifen": MessageLookupByLibrary.simpleMessage("簽到得積分"), + "qiandaolingjifen": MessageLookupByLibrary.simpleMessage("簽到領積分"), + "qiandaolingqujinfen": MessageLookupByLibrary.simpleMessage("簽到領取積分"), + "qiandaowancheng": MessageLookupByLibrary.simpleMessage("簽到完成"), + "qianjinmaiwei": MessageLookupByLibrary.simpleMessage("前進麥味"), + "qianshou": MessageLookupByLibrary.simpleMessage("已簽收"), + "qianwanghuixiangmendianduihuanhexiao": + MessageLookupByLibrary.simpleMessage( + "前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun": MessageLookupByLibrary.simpleMessage("清理緩存"), + "qingshurubeizhuyaoqiu": + MessageLookupByLibrary.simpleMessage("請輸入備注要求"), + "qingshuruchongzhijine": + MessageLookupByLibrary.simpleMessage("請輸入充值金額"), + "qingshurushoujihao": MessageLookupByLibrary.simpleMessage("請輸入手機號碼"), + "qingshuruyanzhengma": MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "qingshuruyaoqingma": MessageLookupByLibrary.simpleMessage("請輸入邀請碼"), + "qingshuruyouxiaoshoujihaoma": + MessageLookupByLibrary.simpleMessage("請輸入您的有效手機號"), + "qingshuruzhifumima": MessageLookupByLibrary.simpleMessage("請輸入支付密碼"), + "qingtianxieshoujihao": + MessageLookupByLibrary.simpleMessage("請填寫收件人手機號"), + "qingtianxiexingming": MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), + "qingtong": MessageLookupByLibrary.simpleMessage("青铜"), + "qingtonghuiyuan": MessageLookupByLibrary.simpleMessage("青銅會員"), + "qingxianxuanguige": MessageLookupByLibrary.simpleMessage("請先選規格"), + "qingxuanzeshiyongmendian": + MessageLookupByLibrary.simpleMessage("請選擇使用門店"), + "qingxuanzeshouhuodizhi": + MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), + "qingxuanzeyigemendian": + MessageLookupByLibrary.simpleMessage("請選擇一個門店"), + "qingxuanzeyuyeushijian": + MessageLookupByLibrary.simpleMessage("請選擇預約時間"), + "qingxuanzeyuyuemendian": + MessageLookupByLibrary.simpleMessage("請選擇預約門店"), + "qingxuanzhemendian": MessageLookupByLibrary.simpleMessage("请选择门店"), + "qingxuanzheninxiangshezhideyuyan": + MessageLookupByLibrary.simpleMessage("請選擇您要設置的語言"), + "qingzaiguidingshijianneizhifu": + MessageLookupByLibrary.simpleMessage("請在規定時間内完成支付"), + "qingzhuo": MessageLookupByLibrary.simpleMessage("清桌"), + "qishoupeisongzhongyujisongdashijian": + MessageLookupByLibrary.simpleMessage("騎手配送中,預計送達時間"), + "qishouyijiedanquhuozhong": + MessageLookupByLibrary.simpleMessage("騎手已接單、取貨中"), + "qita": MessageLookupByLibrary.simpleMessage("其他"), + "qiyetuanjian": MessageLookupByLibrary.simpleMessage("企業團建"), + "quanbao": MessageLookupByLibrary.simpleMessage("券包"), + "quanbu": MessageLookupByLibrary.simpleMessage("全部"), + "quanbudingdan": MessageLookupByLibrary.simpleMessage("全部訂單"), + "quanbuduihuan": MessageLookupByLibrary.simpleMessage("全部兌換"), + "quanchangtongyong": MessageLookupByLibrary.simpleMessage("全場通用"), + "quanchangzhe": m25, + "quantian": MessageLookupByLibrary.simpleMessage("全天"), + "quanxian": MessageLookupByLibrary.simpleMessage("權限"), + "quanxianshezhi": MessageLookupByLibrary.simpleMessage("權限設置"), + "quanyijishao": MessageLookupByLibrary.simpleMessage("權益介紹"), + "quanyishuoming": MessageLookupByLibrary.simpleMessage("權益説明"), + "quanyixiangqing": MessageLookupByLibrary.simpleMessage("權益詳情"), + "qucanhao": MessageLookupByLibrary.simpleMessage("取餐號"), + "qudanhao": m26, + "qudaolaiyuan": MessageLookupByLibrary.simpleMessage("渠道來源"), + "qudenglu": MessageLookupByLibrary.simpleMessage("去登錄"), + "queding": MessageLookupByLibrary.simpleMessage("確定"), + "quedingyaoshanchudongtai": + MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), + "queren": MessageLookupByLibrary.simpleMessage("确认"), + "querenbangding": MessageLookupByLibrary.simpleMessage("確認綁定"), + "querenchongzhi": MessageLookupByLibrary.simpleMessage("確認充值"), + "querenduihuan": MessageLookupByLibrary.simpleMessage("确认兑换"), + "querenshouhuo": MessageLookupByLibrary.simpleMessage("確認收貨"), + "querenyaoshanchudangqianpinglunma": + MessageLookupByLibrary.simpleMessage("確認要刪除當前評論嗎?"), + "querenzhuxiao": MessageLookupByLibrary.simpleMessage("確認注銷"), + "quhexiao": MessageLookupByLibrary.simpleMessage("去核銷"), + "quhuozhong": MessageLookupByLibrary.simpleMessage("取貨中"), + "qujianma": MessageLookupByLibrary.simpleMessage("取件碼"), + "quqiandao": MessageLookupByLibrary.simpleMessage("去簽到"), + "qushiyong": MessageLookupByLibrary.simpleMessage("去使用"), + "quwancheng": MessageLookupByLibrary.simpleMessage(" 去完成 "), + "quxiao": MessageLookupByLibrary.simpleMessage("取消"), + "quxiaodingdan": MessageLookupByLibrary.simpleMessage("取消訂單"), + "quxiaozhifu": MessageLookupByLibrary.simpleMessage("取消支付"), + "quzhifu": MessageLookupByLibrary.simpleMessage("去支付"), + "remenwenzhangshipin": MessageLookupByLibrary.simpleMessage("熱門文章視頻"), + "remenwenzhangshipinliebiao": + MessageLookupByLibrary.simpleMessage("熱門文章視頻清單"), + "ren": m27, + "renwuzhongxin": MessageLookupByLibrary.simpleMessage("任務中心"), + "resend_in_seconds": m28, + "ricahngfenxiang": MessageLookupByLibrary.simpleMessage("日常分享"), + "ruhedihuanjifen": MessageLookupByLibrary.simpleMessage("如何兌換積分"), + "ruhedihuanjifen1": MessageLookupByLibrary.simpleMessage( + "點擊淨弼,進入積分商城,點擊你想兌換的領商品,進入商品詳情後點擊下方兌換,即可兌換哦~"), + "ruhelingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("如何領取優惠券?"), + "ruhelingquyouhuiquan1": MessageLookupByLibrary.simpleMessage( + "點擊我的,進入我的頁面後,點擊下方的領取中心,進入后即可領取優惠券哦~"), + "ruheqiandao": MessageLookupByLibrary.simpleMessage("如何簽到?"), + "ruheqiandao1": MessageLookupByLibrary.simpleMessage( + "1.點擊淨弼,進入首頁,點擊上方的去簽到。\n2.點擊我的,進入我的頁面,點擊上方的積分詳情,進入後即可簽到。"), + "ruxutuikuanqingyumendianlianxi": MessageLookupByLibrary.simpleMessage( + "如需退款,請您提前準備好訂單號/取單號,並與門店人員進行聯繫"), + "saoma": MessageLookupByLibrary.simpleMessage("掃碼"), + "saomadiancan": MessageLookupByLibrary.simpleMessage("您即將進行掃碼點餐"), + "saomashibieguanzhugongzonghao": + MessageLookupByLibrary.simpleMessage("掃碼識別,關注公眾號"), + "send_code": MessageLookupByLibrary.simpleMessage("發送驗證碼"), + "shanchu": MessageLookupByLibrary.simpleMessage("刪除"), + "shanchudingdan": MessageLookupByLibrary.simpleMessage("刪除訂單"), + "shanghuruzhu": MessageLookupByLibrary.simpleMessage("商戶入駐"), + "shangjiaquan": MessageLookupByLibrary.simpleMessage("商家券"), + "shangjiaqueren": MessageLookupByLibrary.simpleMessage("商家確認"), + "shangjiayifahuo": MessageLookupByLibrary.simpleMessage("商家已發貨"), + "shangjiazhengzaipeican": + MessageLookupByLibrary.simpleMessage("商家正在配餐"), + "shanglajiazai": MessageLookupByLibrary.simpleMessage("上拉加載"), + "shangpincaigou": MessageLookupByLibrary.simpleMessage("商品採購"), + "shangpinjifen": m29, + "shangpinxiangqing": MessageLookupByLibrary.simpleMessage("商品詳情"), + "shangyidengji": MessageLookupByLibrary.simpleMessage("上一等級"), + "shenghuoyule": MessageLookupByLibrary.simpleMessage("生活娛樂"), + "shengxianzhaipei": MessageLookupByLibrary.simpleMessage("生鮮宅配"), + "shenmijifendali": MessageLookupByLibrary.simpleMessage("神秘積分大禮"), + "shenqingtuikuan": MessageLookupByLibrary.simpleMessage("申請退款"), + "shezhi": MessageLookupByLibrary.simpleMessage("設置"), + "shifangjiazaigengduo": MessageLookupByLibrary.simpleMessage("釋放加載更多"), + "shifangshuaxin": MessageLookupByLibrary.simpleMessage("釋放刷新"), + "shifujifen": m30, + "shifujihuanka": m31, + "shimingrenzheng": MessageLookupByLibrary.simpleMessage("實名認證"), + "shixiaoquan": MessageLookupByLibrary.simpleMessage("失效券"), + "shixiaoyouhuiquan": MessageLookupByLibrary.simpleMessage("失效优惠券"), + "shiyongbangzhu": MessageLookupByLibrary.simpleMessage("使用幫助"), + "shiyongmendian": MessageLookupByLibrary.simpleMessage("適用門店"), + "shiyongriqi": MessageLookupByLibrary.simpleMessage("使用日期"), + "shiyongshuoming": MessageLookupByLibrary.simpleMessage("使用说明"), + "shiyongtiaojian": MessageLookupByLibrary.simpleMessage("使用条件"), + "shiyongxiangqing": MessageLookupByLibrary.simpleMessage("使用詳情"), + "shouhuodizhi": MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"), + "shouhuodizhi1": MessageLookupByLibrary.simpleMessage("收貨地址"), + "shouhuorenshoujihao": + MessageLookupByLibrary.simpleMessage("請輸入收貨人手機號"), + "shouhuorenxiangxidizhi": + MessageLookupByLibrary.simpleMessage("請輸入收貨人詳細地址"), + "shouhuorenxingming": MessageLookupByLibrary.simpleMessage("請輸入收貨人姓名"), + "shoujihao": MessageLookupByLibrary.simpleMessage("手機號"), + "shouqi": MessageLookupByLibrary.simpleMessage("收起"), + "shouye": MessageLookupByLibrary.simpleMessage("首頁"), + "shuaxin": MessageLookupByLibrary.simpleMessage("刷新"), + "shuaxinchenggong": MessageLookupByLibrary.simpleMessage("刷新成功"), + "shuaxinshibai": MessageLookupByLibrary.simpleMessage("刷新失敗"), + "shuaxinyue": MessageLookupByLibrary.simpleMessage("刷新餘額"), + "shuaxinzhong": MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang": MessageLookupByLibrary.simpleMessage("數量"), + "shurushouhuorendizhi": + MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), + "shuruzhifumima": MessageLookupByLibrary.simpleMessage("輸入支付密碼"), + "sui": m32, + "tangshi": MessageLookupByLibrary.simpleMessage("堂食"), + "tebieshengming": MessageLookupByLibrary.simpleMessage("特別聲明"), + "tehuizhuanqu": MessageLookupByLibrary.simpleMessage("特惠專區"), + "tianjiaxinfuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tianjifuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tiantiandefuli": MessageLookupByLibrary.simpleMessage("天天得福利"), + "tiantianlingjifen": MessageLookupByLibrary.simpleMessage("天天領積分"), + "tijiao": MessageLookupByLibrary.simpleMessage("提交"), + "tijiaochenggong": MessageLookupByLibrary.simpleMessage("提交成功"), + "tingchewei": MessageLookupByLibrary.simpleMessage("停車位"), + "tixian": MessageLookupByLibrary.simpleMessage("提現"), + "tongyibingjixu": MessageLookupByLibrary.simpleMessage("同意並繼續"), + "tongzhi": MessageLookupByLibrary.simpleMessage("通知"), + "tongzhitishixinxi": MessageLookupByLibrary.simpleMessage( + "為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), + "toushuxuzhi": MessageLookupByLibrary.simpleMessage("投書須知"), + "touxiang": MessageLookupByLibrary.simpleMessage("頭像"), + "tuichudenglu": MessageLookupByLibrary.simpleMessage("退出登錄"), + "tuiguangma": MessageLookupByLibrary.simpleMessage("推廣碼"), + "tuikuan": MessageLookupByLibrary.simpleMessage("退款"), + "waidai": MessageLookupByLibrary.simpleMessage("外帶"), + "waimai": MessageLookupByLibrary.simpleMessage("外賣"), + "waimaipeisong": MessageLookupByLibrary.simpleMessage("外賣配送"), + "waisong": MessageLookupByLibrary.simpleMessage("外送"), + "wan": MessageLookupByLibrary.simpleMessage("玩"), + "wancheng": MessageLookupByLibrary.simpleMessage("完成"), + "wancheng_": m33, + "wanchengyicixiadan": MessageLookupByLibrary.simpleMessage("完成一次下單"), + "wangjimima": MessageLookupByLibrary.simpleMessage("忘記密碼"), + "wanjiankang": MessageLookupByLibrary.simpleMessage("玩健康"), + "wanshanshengrixinxi_nl": + MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "), + "wanshanshengrixinxi_yhq": + MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "), + "weidenglu": MessageLookupByLibrary.simpleMessage("未登錄"), + "weidengluxinxi": MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩資訊"), + "weihexiao": MessageLookupByLibrary.simpleMessage("未核銷"), + "weikaiqi": MessageLookupByLibrary.simpleMessage("未開啓"), + "weilegeiningenghaodefuwu": MessageLookupByLibrary.simpleMessage( + "為了給您提供更好的服務,以及享受更加精彩的信息內容,請在使用使用期間登錄"), + "weilejishishoudaohuodongxiaoxi": + MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), + "weilekaipaizhaoxuanzhetouxiang": + MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), + "weilexiangnintuijianfujindemendianxinxi": + MessageLookupByLibrary.simpleMessage( + "為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息"), + "weilexuanzhezhaopianhuancun": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), + "weiwancheng": MessageLookupByLibrary.simpleMessage(" 未完成 "), + "weixinzhifu": MessageLookupByLibrary.simpleMessage("微信支付"), + "weizhitishixinxi": MessageLookupByLibrary.simpleMessage( + "為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"), + "wentijian": MessageLookupByLibrary.simpleMessage("問題件"), + "wenzhang": MessageLookupByLibrary.simpleMessage("文章"), + "wenzhangxiangqing": MessageLookupByLibrary.simpleMessage("文章詳情"), + "wenzhangzhuanlan": MessageLookupByLibrary.simpleMessage("文章專欄"), + "weulingqu": MessageLookupByLibrary.simpleMessage("未領取"), + "wodechengjiu": MessageLookupByLibrary.simpleMessage("我的成就"), + "wodedingdan": MessageLookupByLibrary.simpleMessage("我的訂單"), + "wodedongtai": MessageLookupByLibrary.simpleMessage("我的動態"), + "wodegongju": MessageLookupByLibrary.simpleMessage("我的工具"), + "wodehuiyuandengji": MessageLookupByLibrary.simpleMessage("我的會員等級"), + "wodejifenzhi": MessageLookupByLibrary.simpleMessage("我的積分值"), + "wodekanjia": MessageLookupByLibrary.simpleMessage("我的砍價"), + "wodekaquan": MessageLookupByLibrary.simpleMessage("我的卡券"), + "wodenianling": MessageLookupByLibrary.simpleMessage("我的年齡"), + "wodepintuan": MessageLookupByLibrary.simpleMessage("我的拼團"), + "wodeqianbao": MessageLookupByLibrary.simpleMessage("我的錢包"), + "wodeshengri": MessageLookupByLibrary.simpleMessage("我的生日"), + "wodexiaoxi": MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqing": MessageLookupByLibrary.simpleMessage("我的邀請"), + "wodeyaoqingma": MessageLookupByLibrary.simpleMessage("我的邀請碼"), + "woyouyaoqingma": MessageLookupByLibrary.simpleMessage("我有邀請碼"), + "wuliudanhao": MessageLookupByLibrary.simpleMessage("物流單號:"), + "wuliugongsi": MessageLookupByLibrary.simpleMessage("物流公司:"), + "wuliuxinxi": MessageLookupByLibrary.simpleMessage("物流信息"), + "wuliuzhuangtai": MessageLookupByLibrary.simpleMessage("物流狀態:"), + "xiadanshijian": MessageLookupByLibrary.simpleMessage("下單時間"), + "xiadanshijian_": m34, + "xiadanzhuanjifen": MessageLookupByLibrary.simpleMessage("下單賺積分"), + "xialashuaxin": MessageLookupByLibrary.simpleMessage("下拉刷新"), + "xiangce": MessageLookupByLibrary.simpleMessage("相冊"), + "xiangji": MessageLookupByLibrary.simpleMessage("相機"), + "xiangjitishixinxi": MessageLookupByLibrary.simpleMessage( + "為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "), + "xiangqing": MessageLookupByLibrary.simpleMessage("詳情"), + "xiangxidizhi": MessageLookupByLibrary.simpleMessage("詳細地址"), + "xianshangfafang": MessageLookupByLibrary.simpleMessage("綫上發放"), + "xianshangshiyong": MessageLookupByLibrary.simpleMessage("線上使用"), + "xianxiashiyong": MessageLookupByLibrary.simpleMessage("線下使用"), + "xiaofei": MessageLookupByLibrary.simpleMessage("消費"), + "xiaofeijifen": MessageLookupByLibrary.simpleMessage("消费积分"), + "xiaofeijihuanka": MessageLookupByLibrary.simpleMessage("消費集換卡"), + "xiaofeijilu": MessageLookupByLibrary.simpleMessage("消費記錄"), + "xiaoxi": MessageLookupByLibrary.simpleMessage("消息"), + "xiayidengji": MessageLookupByLibrary.simpleMessage("下一等級"), + "xiazaiwancheng": MessageLookupByLibrary.simpleMessage("加載完成"), + "xiedongtai": MessageLookupByLibrary.simpleMessage("寫動態"), + "xieyitanchuang": MessageLookupByLibrary.simpleMessage("一心回鄉用戶隱私協議"), + "xihuan_": m35, + "xindianhuodong": MessageLookupByLibrary.simpleMessage("星店活動"), + "xingming": MessageLookupByLibrary.simpleMessage("姓名"), + "xitongtongzhi": MessageLookupByLibrary.simpleMessage("系統通知"), + "xitongxiaoxi": MessageLookupByLibrary.simpleMessage("系統消息"), + "xiugai": MessageLookupByLibrary.simpleMessage("修改"), + "xiugaichenggong": MessageLookupByLibrary.simpleMessage("修改成功"), + "xiugaiyonghuming": MessageLookupByLibrary.simpleMessage("修改用戶名"), + "xuanguige": MessageLookupByLibrary.simpleMessage("選規格"), + "xuanhaola": MessageLookupByLibrary.simpleMessage("選好啦"), + "xuanji": MessageLookupByLibrary.simpleMessage("選集"), + "xuanzeshangpinlingqufangshi": + MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), + "xuanzetuijianmendian": MessageLookupByLibrary.simpleMessage("選擇推薦門店"), + "xuefeihuiyuan": MessageLookupByLibrary.simpleMessage("續費會員"), + "xuexijiankang": MessageLookupByLibrary.simpleMessage("學習健康"), + "xufeihuixiangVIP": MessageLookupByLibrary.simpleMessage("續費回鄉VIP"), + "xuni": MessageLookupByLibrary.simpleMessage("虛擬"), + "yanzhengma": MessageLookupByLibrary.simpleMessage("驗證碼"), + "yaoqinghaoyou": MessageLookupByLibrary.simpleMessage("邀請好友"), + "yaoqinghaoyoudefen": MessageLookupByLibrary.simpleMessage("邀請好友得分"), + "yaoqingrenshoujihao_": m36, + "yaoqingwancheng": MessageLookupByLibrary.simpleMessage("邀請完成"), + "yibangfuka": MessageLookupByLibrary.simpleMessage("已綁副卡"), + "yiduihuan": MessageLookupByLibrary.simpleMessage("已兌換"), + "yiduihuanjian": m37, + "yifahuo": MessageLookupByLibrary.simpleMessage("已發貨"), + "yiguanzhu": MessageLookupByLibrary.simpleMessage("已關注"), + "yihouzaishuo": MessageLookupByLibrary.simpleMessage("以後再說"), + "yihuide": MessageLookupByLibrary.simpleMessage("已獲得"), + "yihujiaoqishou": MessageLookupByLibrary.simpleMessage("已呼叫騎手"), + "yikaitongzidongxufei": MessageLookupByLibrary.simpleMessage("已開通自動續費"), + "yikexiao": MessageLookupByLibrary.simpleMessage("已核銷"), + "yilingqu": MessageLookupByLibrary.simpleMessage("已領取"), + "yindao1": MessageLookupByLibrary.simpleMessage("新增多項功能,海量優惠資訊實時推送"), + "yindao2": + MessageLookupByLibrary.simpleMessage("新增多項功能,使用平臺錢包優惠多多,更有充值優惠享不停"), + "yindao3": + MessageLookupByLibrary.simpleMessage("新增會員任務得積分,消費可得綠金、積分商城換購"), + "yindao4": MessageLookupByLibrary.simpleMessage("傳遞友愛純淨健康有機環保智慧理念"), + "yindaoye1": MessageLookupByLibrary.simpleMessage("會員最新資訊搶先看"), + "yindaoye2": MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"), + "yindaoye3": MessageLookupByLibrary.simpleMessage("會員活動專區"), + "yindaoye4": MessageLookupByLibrary.simpleMessage("過健康有機生活"), + "yingwen": MessageLookupByLibrary.simpleMessage("英文"), + "yingyeshijian": m38, + "yinkahuiyuan": MessageLookupByLibrary.simpleMessage("银卡会员"), + "yinshi": MessageLookupByLibrary.simpleMessage("飲食"), + "yinsishengming": MessageLookupByLibrary.simpleMessage("隱私聲明"), + "yinsixieyi": MessageLookupByLibrary.simpleMessage("《隱私協議》"), + "yinsizhengce1": MessageLookupByLibrary.simpleMessage( + " 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉"), + "yinsizhengce2": MessageLookupByLibrary.simpleMessage( + "     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。"), + "yinzhang": MessageLookupByLibrary.simpleMessage("印章"), + "yiqiandao": MessageLookupByLibrary.simpleMessage("已簽到"), + "yiqianshou": MessageLookupByLibrary.simpleMessage("已簽收"), + "yiquxiao": MessageLookupByLibrary.simpleMessage(" 已取消 "), + "yishijiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiming": MessageLookupByLibrary.simpleMessage("已实名"), + "yishixiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiyong": MessageLookupByLibrary.simpleMessage("已使用"), + "yishouquan": MessageLookupByLibrary.simpleMessage("已授權"), + "yisongda": MessageLookupByLibrary.simpleMessage("已送達"), + "yituikuan": MessageLookupByLibrary.simpleMessage("已退款"), + "yiwancheng": MessageLookupByLibrary.simpleMessage(" 已完成 "), + "yiwanchengdingdan": MessageLookupByLibrary.simpleMessage("已完成订单"), + "yixianghuiyuanquanyi": MessageLookupByLibrary.simpleMessage("已享會員權益"), + "yixiansquanbupinglun": + MessageLookupByLibrary.simpleMessage("-已顯示全部評論-"), + "yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峽姐妹"), + "yiyoujifen": MessageLookupByLibrary.simpleMessage("已有積分"), + "yizhifu": MessageLookupByLibrary.simpleMessage("已支付"), + "yonghuming": MessageLookupByLibrary.simpleMessage("用戶名"), + "yonghuxiaofeijifen": + MessageLookupByLibrary.simpleMessage("用戶每消費1元可獲得1個積分 。"), + "youhuiquan": MessageLookupByLibrary.simpleMessage("優惠券"), + "youhuiquanlingqu": MessageLookupByLibrary.simpleMessage("優惠券領取"), + "youhuiquanwufajileijifen": MessageLookupByLibrary.simpleMessage( + "優惠金額無法累積積分,訂單撤銷或其他原因造成的未成功支付的訂單,無法獲得對應的積分。"), + "youkedenglu": MessageLookupByLibrary.simpleMessage("遊客登錄"), + "youxiaoqi": m39, + "youxiaoqixian": MessageLookupByLibrary.simpleMessage("有效期限:"), + "youxiaoqizhi": m40, + "yuan": MessageLookupByLibrary.simpleMessage("元"), + "yuan_": m41, + "yuanjia": MessageLookupByLibrary.simpleMessage("原價"), + "yue": MessageLookupByLibrary.simpleMessage("餘額"), + "yue_": m42, + "yue__": m43, + "yuemingxi": MessageLookupByLibrary.simpleMessage("餘額明細"), + "yuliudianhua": MessageLookupByLibrary.simpleMessage("預留電話"), + "yunfei": MessageLookupByLibrary.simpleMessage("運費"), + "yuyan": MessageLookupByLibrary.simpleMessage("語言"), + "zailaiyidan": MessageLookupByLibrary.simpleMessage("再來一單"), + "zaituzhong": MessageLookupByLibrary.simpleMessage("運輸中"), + "zaixiankefu": MessageLookupByLibrary.simpleMessage("在線客服"), + "zanbuzhichixianshangdiancan": + MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"), + "zanweijiesuo": MessageLookupByLibrary.simpleMessage("暫未解鎖"), + "zanweikaifang": MessageLookupByLibrary.simpleMessage("暫未開放"), + "zanweikaitong": MessageLookupByLibrary.simpleMessage("暫未開通"), + "zanwupinglun": MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"), + "zanwuxianshangjindian": MessageLookupByLibrary.simpleMessage("暫無綫上門店"), + "zanwuyouhuiquankelingqu": + MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"), + "zhanghaoanquan": MessageLookupByLibrary.simpleMessage("賬號安全"), + "zhanghaoshouquan": MessageLookupByLibrary.simpleMessage("賬號授權"), + "zhanghaoxinxi": MessageLookupByLibrary.simpleMessage("賬號信息"), + "zhanghaoyuanquan": MessageLookupByLibrary.simpleMessage("賬號與安全"), + "zhanghaozhuxiaoshuoming": + MessageLookupByLibrary.simpleMessage("賬號注銷説明"), + "zhanghuyue": MessageLookupByLibrary.simpleMessage("賬戶餘額"), + "zhankai": MessageLookupByLibrary.simpleMessage("展開"), + "zhengzaihujiaoqishou": MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), + "zhengzaijiazai": MessageLookupByLibrary.simpleMessage("正在加載"), + "zhengzaipeisong": MessageLookupByLibrary.simpleMessage("正在配送"), + "zhengzaixiazaizhong": MessageLookupByLibrary.simpleMessage("正在加載中..."), + "zhidianmendian": MessageLookupByLibrary.simpleMessage("致電門店"), + "zhifubao": MessageLookupByLibrary.simpleMessage("支付寶"), + "zhifubaozhifu": MessageLookupByLibrary.simpleMessage("支付寶支付"), + "zhifufangshi": MessageLookupByLibrary.simpleMessage("支付方式"), + "zhifuxiangqing": MessageLookupByLibrary.simpleMessage("支付详情"), + "zhizunhuiyuan": MessageLookupByLibrary.simpleMessage("至尊會員"), + "zhizuowancheng": MessageLookupByLibrary.simpleMessage("製作完成"), + "zhongchakan": MessageLookupByLibrary.simpleMessage("中查看"), + "zhongwenjianti": MessageLookupByLibrary.simpleMessage("中文簡體"), + "zhuanlan": MessageLookupByLibrary.simpleMessage("專欄"), + "zhuanxiangyouhuiquan": MessageLookupByLibrary.simpleMessage("專享優惠券"), + "zhunong1": MessageLookupByLibrary.simpleMessage("愛在回鄉,快樂助農"), + "zhunongjifen": MessageLookupByLibrary.simpleMessage("助農積分"), + "zhunongzhuanqu": MessageLookupByLibrary.simpleMessage("助農專區"), + "zhuxiaotixing": MessageLookupByLibrary.simpleMessage( + "再次提醒:註銷帳號後不可恢復,相關資料和資訊會永久删除。"), + "zhuxiaozhanghao": MessageLookupByLibrary.simpleMessage("註銷帳號"), + "ziqu": MessageLookupByLibrary.simpleMessage("自取"), + "ziti": MessageLookupByLibrary.simpleMessage("自提"), + "zitidizhi": MessageLookupByLibrary.simpleMessage("自提地址"), + "zitiduihuanquan": MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), + "zitishijian": MessageLookupByLibrary.simpleMessage("自提時間"), + "zongzichan": MessageLookupByLibrary.simpleMessage("總資產"), + "zongzichanyuan": MessageLookupByLibrary.simpleMessage("總資產(元)"), + "zuanshihuiyuan": MessageLookupByLibrary.simpleMessage("鑽石會員"), + "zuixinwenzhang": MessageLookupByLibrary.simpleMessage("最新文章"), + "zuorenwudejifen": MessageLookupByLibrary.simpleMessage("做任務得積分"), + "zuozhe": m44 + }; } diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index ac60cbb1..ee427083 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -7,7 +7,8 @@ // ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new // ignore_for_file:prefer_single_quotes,comment_references, directives_ordering // ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases -// ignore_for_file:unused_import, file_names +// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes +// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes import 'package:intl/intl.dart'; import 'package:intl/message_lookup_by_library.dart'; @@ -19,811 +20,904 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'zh_TW'; - static m0(version) => "版本:${version}"; + static String m0(version) => "版本:${version}"; - static m1(yuan) => "充值金額最小是${yuan}元"; + static String m1(yuan) => "充值金額最小是${yuan}元"; - static m2(time) => "創建時間${time}"; + static String m2(time) => "創建時間${time}"; - static m3(xihuan) => "點贊喜歡${xihuan}"; + static String m3(xihuan) => "點贊喜歡${xihuan}"; - static m4(shijian) => "發行開始時間 ${shijian}"; + static String m4(shijian) => "發行開始時間 ${shijian}"; - static m5(ge) => "${ge}g/個"; + static String m5(ge) => "${ge}g/個"; - static m6(jian) => "共${jian}件"; + static String m6(jian) => "共${jian}件"; - static m7(jian) => "共${jian}件商品"; + static String m7(jian) => "共${jian}件商品"; - static m8(km) => "${km}公里"; + static String m8(km) => "${km}公里"; - static m9(huifu) => "回復@${huifu}:"; + static String m9(huifu) => "回復@${huifu}:"; - static m10(yuan) => "活動減免${yuan}元配送費"; + static String m10(yuan) => "活動減免${yuan}元配送費"; - static m11(yue) => "活動餘額 ${yue}"; + static String m11(yue) => "活動餘額 ${yue}"; - static m12(jifen) => "+ ${jifen} 積分"; + static String m12(jifen) => "+ ${jifen} 積分"; - static m13(jianjie) => "簡介:${jianjie}"; + static String m13(jianjie) => "簡介:${jianjie}"; - static m14(jifen) => "${jifen}積分"; + static String m14(jifen) => "${jifen}積分"; - static m15(jifen) => "${jifen}積分 到下一個等級"; + static String m15(jifen) => "${jifen}積分 到下一個等級"; - static m16(date) => "開通日期:${date}"; + static String m16(date) => "開通日期:${date}"; - static m17(shijian) => "領取時間 ${shijian}"; + static String m17(shijian) => "領取時間 ${shijian}"; - static m18(yue) => "綠幣 ${yue}"; + static String m18(yue) => "綠幣 ${yue}"; - static m19(man, jian) => "滿${man}元立減${jian}元代金券"; + static String m19(man, jian) => "滿${man}元立減${jian}元代金券"; - static m20(yuan) => "滿${yuan}可用"; + static String m20(yuan) => "滿${yuan}可用"; - static m21(mi) => "${mi}米"; + static String m21(mi) => "${mi}米"; - static m22(tian) => "您已連續簽到${tian}天"; + static String m22(tian) => "您已連續簽到${tian}天"; - static m23(pinglun) => "評論(${pinglun})"; + static String m23(pinglun) => "評論(${pinglun})"; - static m25(zhe) => "全場${zhe}折"; + static String m25(zhe) => "全場${zhe}折"; - static m26(num) => "取單號${num}"; + static String m26(num) => "取單號${num}"; - static m27(ren) => "¥${ren}/人"; + static String m27(ren) => "¥${ren}/人"; - static m28(second) => "${second}s后重新發送"; + static String m28(second) => "${second}s后重新發送"; - static m29(jifen) => "商品積分 ${jifen}積分"; + static String m29(jifen) => "商品積分 ${jifen}積分"; - static m30(jifen) => "實付積分 ${jifen}積分"; + static String m30(jifen) => "實付積分 ${jifen}積分"; - static m31(jihuanka) => "實付集換卡 ${jihuanka}集換卡"; + static String m31(jihuanka) => "實付集換卡 ${jihuanka}集換卡"; - static m32(sui) => "${sui}嵗"; + static String m32(sui) => "${sui}嵗"; - static m33(num) => "完成${num}"; + static String m33(num) => "完成${num}"; - static m34(time) => "下單時間:${time}"; + static String m34(time) => "下單時間:${time}"; - static m35(xihuan) => "喜歡(${xihuan})"; + static String m35(xihuan) => "喜歡(${xihuan})"; - static m36(shoujihao) => "邀请人手機號:${shoujihao}"; + static String m36(shoujihao) => "邀请人手機號:${shoujihao}"; - static m37(jian) => "已兌換${jian}件"; + static String m37(jian) => "已兌換${jian}件"; - static m38(time) => "營業時間: ${time}"; + static String m38(time) => "營業時間: ${time}"; - static m39(date) => "有效期:${date}"; + static String m39(date) => "有效期:${date}"; - static m40(date) => "有效期至${date}"; + static String m40(date) => "有效期至${date}"; - static m41(yuan) => "${yuan}元"; + static String m41(yuan) => "${yuan}元"; - static m42(yue) => "餘額${yue}"; + static String m42(yue) => "餘額${yue}"; - static m43(yue) => "餘額 ${yue}"; + static String m43(yue) => "餘額 ${yue}"; - static m44(zuozhe) => "作者:${zuozhe}"; + static String m44(zuozhe) => "作者:${zuozhe}"; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "bainianchuanjiao" : MessageLookupByLibrary.simpleMessage("百年川椒"), - "baiyin" : MessageLookupByLibrary.simpleMessage("白银"), - "baiyinhuiyuan" : MessageLookupByLibrary.simpleMessage("白銀會員"), - "banben" : m0, - "bangdingfuka" : MessageLookupByLibrary.simpleMessage("綁定副卡"), - "bangdingshouji" : MessageLookupByLibrary.simpleMessage("綁定手機"), - "bangong" : MessageLookupByLibrary.simpleMessage("辦公"), - "bangzhuyufankui" : MessageLookupByLibrary.simpleMessage("幫助與反饋"), - "baocun" : MessageLookupByLibrary.simpleMessage("保存"), - "baocunchenggong" : MessageLookupByLibrary.simpleMessage("保存成功"), - "baocunsaoma" : MessageLookupByLibrary.simpleMessage("截屏保存下方二維碼,邀請他人微信掃一掃識別,長按關注後,完成小遊戲,領取優惠券後,即邀請成功哦!"), - "beiyaoqingdejiangli" : MessageLookupByLibrary.simpleMessage("每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張"), - "beizhu" : MessageLookupByLibrary.simpleMessage("備注"), - "beizhuxinxi" : MessageLookupByLibrary.simpleMessage("備注信息"), - "benzhouquanbao" : MessageLookupByLibrary.simpleMessage("本周券包"), - "bianjidizhi" : MessageLookupByLibrary.simpleMessage("編輯地址"), - "bianjigerenziliao" : MessageLookupByLibrary.simpleMessage("編輯個人資料"), - "biaojiweiyidu" : MessageLookupByLibrary.simpleMessage("標為已讀"), - "biaoweiyidu" : MessageLookupByLibrary.simpleMessage("標爲已讀"), - "bodadianhua" : MessageLookupByLibrary.simpleMessage("撥打電話"), - "bofangcishu" : MessageLookupByLibrary.simpleMessage("播放次數"), - "bojin" : MessageLookupByLibrary.simpleMessage("铂金"), - "brand_yixinhuixiang" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), - "buzhichikaipiao" : MessageLookupByLibrary.simpleMessage("不支持開票"), - "canyingfuwu" : MessageLookupByLibrary.simpleMessage("餐飲服務"), - "chakan" : MessageLookupByLibrary.simpleMessage("查看"), - "chakangengduo" : MessageLookupByLibrary.simpleMessage("查看更多"), - "chakanhexiaoma" : MessageLookupByLibrary.simpleMessage("查看核銷碼"), - "chakanquanyi" : MessageLookupByLibrary.simpleMessage("查看權益"), - "chakanshixiaoquan" : MessageLookupByLibrary.simpleMessage("查看失效券"), - "chakanwodekabao" : MessageLookupByLibrary.simpleMessage("查看我的卡包"), - "chakanwodekaquan" : MessageLookupByLibrary.simpleMessage("查看我的卡券"), - "chakanwuliu" : MessageLookupByLibrary.simpleMessage("查看物流"), - "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看詳情"), - "changjianwenti" : MessageLookupByLibrary.simpleMessage("常見問題"), - "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("長期有效"), - "chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"), - "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("創始人故事"), - "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), - "chengjiu" : MessageLookupByLibrary.simpleMessage("成就"), - "chengjiuhuizhang" : MessageLookupByLibrary.simpleMessage("成就徽章"), - "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市選擇"), - "chengweidianpuzhuanshuhuiyuan" : MessageLookupByLibrary.simpleMessage("成為專屬會員,享專屬權益"), - "chi" : MessageLookupByLibrary.simpleMessage("吃"), - "chijiankang" : MessageLookupByLibrary.simpleMessage("吃健康"), - "chongzhi" : MessageLookupByLibrary.simpleMessage("充值"), - "chongzhichenggong" : MessageLookupByLibrary.simpleMessage("充值成功"), - "chongzhifuliduo" : MessageLookupByLibrary.simpleMessage("充值福利多"), - "chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"), - "chongzhizuixiaojine" : m1, - "chuangjianshijian" : m2, - "chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事-"), - "chuangshirendegushi1" : MessageLookupByLibrary.simpleMessage("創始人的故事"), - "chuzhiyouhui" : MessageLookupByLibrary.simpleMessage("儲值優惠"), - "code_error" : MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"), - "cunchu" : MessageLookupByLibrary.simpleMessage("存儲"), - "cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"), - "dabaodaodianqu" : MessageLookupByLibrary.simpleMessage("打包到店取"), - "daifukuan" : MessageLookupByLibrary.simpleMessage("待付款"), - "daipeisong" : MessageLookupByLibrary.simpleMessage("待配送"), - "daiqucan" : MessageLookupByLibrary.simpleMessage("待取餐"), - "daiqueren" : MessageLookupByLibrary.simpleMessage("待確認"), - "daizhifu" : MessageLookupByLibrary.simpleMessage("待支付"), - "daizhizuo" : MessageLookupByLibrary.simpleMessage("待製作"), - "dajiadouzaiduihuan" : MessageLookupByLibrary.simpleMessage("大家都在兌換"), - "dakaidingwei" : MessageLookupByLibrary.simpleMessage("打開定位"), - "dangqianbanben" : MessageLookupByLibrary.simpleMessage("當前版本"), - "dangqiandengji" : MessageLookupByLibrary.simpleMessage("當前等級"), - "dangqianjifen" : MessageLookupByLibrary.simpleMessage("當前積分:"), - "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("當前商品兌換核銷碼已核銷完成 "), - "dangqianzhukadengji" : MessageLookupByLibrary.simpleMessage("當前主卡等級"), - "daodianziqu" : MessageLookupByLibrary.simpleMessage("到店自取"), - "daopinglunliebiaodingbu" : MessageLookupByLibrary.simpleMessage("到評論列表頂部"), - "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等級"), - "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家確認"), - "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用戶取餐"), - "denglu" : MessageLookupByLibrary.simpleMessage("登錄"), - "diancan" : MessageLookupByLibrary.simpleMessage("點餐"), - "diandan" : MessageLookupByLibrary.simpleMessage("點單"), - "dianhua" : MessageLookupByLibrary.simpleMessage("電話"), - "dianjidenglu" : MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩信息"), - "dianneiyongcan" : MessageLookupByLibrary.simpleMessage("店内用餐"), - "dianpuchongzhi" : MessageLookupByLibrary.simpleMessage("店鋪充值"), - "dianputuijian" : MessageLookupByLibrary.simpleMessage("店鋪推薦"), - "dianpuyue" : MessageLookupByLibrary.simpleMessage("店鋪餘額"), - "dianwolingqu" : MessageLookupByLibrary.simpleMessage("點我領取"), - "dianzan" : MessageLookupByLibrary.simpleMessage("點贊"), - "dianzanxihuan_" : m3, - "dingdan" : MessageLookupByLibrary.simpleMessage("訂單"), - "dingdanbianhao" : MessageLookupByLibrary.simpleMessage("訂單編號"), - "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("訂單待發貨"), - "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("訂單待支付"), - "dingdangenzong" : MessageLookupByLibrary.simpleMessage("訂單跟蹤"), - "dingdanhao" : MessageLookupByLibrary.simpleMessage("訂單號"), - "dingdanjiesuan" : MessageLookupByLibrary.simpleMessage("訂單結算"), - "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), - "dingdantongzhi" : MessageLookupByLibrary.simpleMessage("訂單通知"), - "dingdanxiaoxi" : MessageLookupByLibrary.simpleMessage("訂單消息"), - "dingdanyisongda" : MessageLookupByLibrary.simpleMessage("訂單送達"), - "dingdanyituikuan" : MessageLookupByLibrary.simpleMessage("訂單已退款"), - "dingdanyiwancheng" : MessageLookupByLibrary.simpleMessage("訂單已完成"), - "dingdanyizhifu" : MessageLookupByLibrary.simpleMessage("訂單已支付"), - "dingwei" : MessageLookupByLibrary.simpleMessage("定位"), - "dizhi" : MessageLookupByLibrary.simpleMessage("地址"), - "dongtai" : MessageLookupByLibrary.simpleMessage("動態"), - "dongtaitishi" : MessageLookupByLibrary.simpleMessage("用戶發佈內容需要等待系統稽核,稽核通過後才會在推薦廣場展示"), - "dongtaixiangqing" : MessageLookupByLibrary.simpleMessage("動態詳情"), - "duihuan" : MessageLookupByLibrary.simpleMessage("兑换"), - "duihuanchenggong" : MessageLookupByLibrary.simpleMessage("兑换成功"), - "duihuanguize" : MessageLookupByLibrary.simpleMessage("兑换规则"), - "duihuanhoufahuo" : MessageLookupByLibrary.simpleMessage("兌換物商品"), - "duihuanhouwugegongzuori" : MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), - "duihuanliangdidaogao" : MessageLookupByLibrary.simpleMessage("兌換量從低到高"), - "duihuanlianggaodaodi" : MessageLookupByLibrary.simpleMessage("兌換量從高到低"), - "duihuanlishi" : MessageLookupByLibrary.simpleMessage("兌換歷史"), - "duihuanquan" : MessageLookupByLibrary.simpleMessage("兌換券"), - "duihuanshangpinxiangqing" : MessageLookupByLibrary.simpleMessage("兑换商品详情"), - "duihuanxinxi" : MessageLookupByLibrary.simpleMessage("兑换信息"), - "duozhongyouhui" : MessageLookupByLibrary.simpleMessage("多種優惠券等你拿"), - "fabu" : MessageLookupByLibrary.simpleMessage("發佈"), - "fangshier" : MessageLookupByLibrary.simpleMessage("方式二"), - "fangshiyi" : MessageLookupByLibrary.simpleMessage("方式一"), - "fanhuiduihuanlishi" : MessageLookupByLibrary.simpleMessage("返回兌換歷史"), - "fanhuishequn" : MessageLookupByLibrary.simpleMessage("返回社群"), - "fanhuishouye" : MessageLookupByLibrary.simpleMessage("返回首頁"), - "fankui" : MessageLookupByLibrary.simpleMessage("反饋"), - "fankuilizi" : MessageLookupByLibrary.simpleMessage("您可以在這裡輸入迴響內容,例如產品建議,功能异常等"), - "fantizhongwen" : MessageLookupByLibrary.simpleMessage("繁体中文"), - "fapiao" : MessageLookupByLibrary.simpleMessage("發票"), - "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("發票助手"), - "fasong" : MessageLookupByLibrary.simpleMessage("發送"), - "fasongduanxin" : MessageLookupByLibrary.simpleMessage("發送短信"), - "faxingshijian" : m4, - "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"), - "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用!"), - "fensi" : MessageLookupByLibrary.simpleMessage("粉絲"), - "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), - "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), - "fenxiangjiankang" : MessageLookupByLibrary.simpleMessage("分享健康"), - "fenxiangyaoqing" : MessageLookupByLibrary.simpleMessage("也可以直接點擊右上方的分享給到你想要邀請的人。"), - "fenxiangyaoqingma" : MessageLookupByLibrary.simpleMessage("將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。"), - "fenxiangzhiweixin" : MessageLookupByLibrary.simpleMessage("分享至微信"), - "fukashoujihao" : MessageLookupByLibrary.simpleMessage("副卡手機號"), - "fuliduihuan" : MessageLookupByLibrary.simpleMessage("福利兌換"), - "fulizhongxin" : MessageLookupByLibrary.simpleMessage("福利中心"), - "ge" : m5, - "geiwopingfen" : MessageLookupByLibrary.simpleMessage("給我評分"), - "gengduo" : MessageLookupByLibrary.simpleMessage("更多"), - "gengduohaoquan" : MessageLookupByLibrary.simpleMessage("更多好券"), - "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多優惠券"), - "genggaibangdingshoujihao" : MessageLookupByLibrary.simpleMessage("更改綁定手機號"), - "genghuanbeijing" : MessageLookupByLibrary.simpleMessage("更換背景"), - "genghuantouxiang" : MessageLookupByLibrary.simpleMessage("更換頭像"), - "gengyouhui" : MessageLookupByLibrary.simpleMessage("更優惠"), - "gerenxinxi" : MessageLookupByLibrary.simpleMessage("個人信息"), - "gexingqianming" : MessageLookupByLibrary.simpleMessage("個性簽名"), - "gong" : MessageLookupByLibrary.simpleMessage("共"), - "gongchuanghuiyuan" : MessageLookupByLibrary.simpleMessage("共创会员"), - "gongjijian" : m6, - "gongjijianshangpin" : m7, - "gongli" : m8, - "gongxinchengwei" : MessageLookupByLibrary.simpleMessage("恭喜您成爲"), - "gongxinichengweibendianhuiyuan" : MessageLookupByLibrary.simpleMessage("恭喜您,成為本店會員,快去享受超多的會員權益吧。"), - "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("請勾選同意隱私服務和一心回鄉服務協定"), - "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), - "guanyu" : MessageLookupByLibrary.simpleMessage("關於"), - "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("關於創始人"), - "guanyuhuixiang" : MessageLookupByLibrary.simpleMessage("關於回鄉"), - "guanzhu" : MessageLookupByLibrary.simpleMessage("關注"), - "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), - "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"), - "haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"), - "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), - "haowu" : MessageLookupByLibrary.simpleMessage("好物"), - "haoyoujiangliguize" : MessageLookupByLibrary.simpleMessage("好友獎勵規則"), - "he" : MessageLookupByLibrary.simpleMessage("喝"), - "heji" : MessageLookupByLibrary.simpleMessage("合計:"), - "hejiankang" : MessageLookupByLibrary.simpleMessage("喝健康"), - "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核銷成功"), - "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核銷碼詳情"), - "huangjin" : MessageLookupByLibrary.simpleMessage("黄金"), - "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黃金會員"), - "huifu" : MessageLookupByLibrary.simpleMessage("回復"), - "huifu_" : m9, - "huixiangVIPka" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡"), - "huixiangqianbao" : MessageLookupByLibrary.simpleMessage("回鄉錢包"), - "huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), - "huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"), - "huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"), - "huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"), - "huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"), - "huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"), - "huiyuanguize" : MessageLookupByLibrary.simpleMessage("會員規則説明"), - "huiyuanhuodejifen" : MessageLookupByLibrary.simpleMessage("會員如何獲得積分"), - "huiyuanjia" : MessageLookupByLibrary.simpleMessage("會員價"), - "huiyuanjibieduizhao" : MessageLookupByLibrary.simpleMessage("會員級別對照表"), - "huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"), - "huiyuanka" : MessageLookupByLibrary.simpleMessage("會員卡"), - "huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("會員卡詳情"), - "huiyuanma" : MessageLookupByLibrary.simpleMessage("會員碼"), - "huiyuanquanyi" : MessageLookupByLibrary.simpleMessage("會員權益"), - "huiyuanyue" : MessageLookupByLibrary.simpleMessage("會員餘額"), - "huiyuanzhongxin" : MessageLookupByLibrary.simpleMessage("會員中心"), - "huiyuanzhuanxiangjiage" : MessageLookupByLibrary.simpleMessage("會員專享價格"), - "huode" : MessageLookupByLibrary.simpleMessage("獲得"), - "huodequanyi" : MessageLookupByLibrary.simpleMessage("獲得權益"), - "huodong" : MessageLookupByLibrary.simpleMessage("活動"), - "huodongguize" : MessageLookupByLibrary.simpleMessage("活動規則"), - "huodongjianmianpeisongfei" : m10, - "huodongjinxingzhong" : MessageLookupByLibrary.simpleMessage("活動進行中"), - "huodongliebiao" : MessageLookupByLibrary.simpleMessage("活動列表"), - "huodongyue" : MessageLookupByLibrary.simpleMessage("活動餘額"), - "huodongyue_" : m11, - "huodongzixun" : MessageLookupByLibrary.simpleMessage("活動資訊"), - "huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"), - "huozan" : MessageLookupByLibrary.simpleMessage("獲贊"), - "input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"), - "input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), - "input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"), - "input_phone" : MessageLookupByLibrary.simpleMessage("輸入手機號"), - "input_phone_hide" : MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), - "invite_code_error" : MessageLookupByLibrary.simpleMessage("邀請碼輸入錯誤"), - "jiajifen" : m12, - "jian" : MessageLookupByLibrary.simpleMessage("件"), - "jiangli" : MessageLookupByLibrary.simpleMessage("獎勵"), - "jiangshi" : MessageLookupByLibrary.simpleMessage("講師"), - "jianjie" : m13, - "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加載失敗"), - "jiesuan" : MessageLookupByLibrary.simpleMessage("結算"), - "jiesuanjine" : MessageLookupByLibrary.simpleMessage("結算金額"), - "jifen" : MessageLookupByLibrary.simpleMessage("積分"), - "jifen_" : m14, - "jifenbuzu" : MessageLookupByLibrary.simpleMessage("您的積分不足"), - "jifendaoxiayidengji" : m15, - "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("積分的計算説明"), - "jifendidaogao" : MessageLookupByLibrary.simpleMessage("積分從低到高"), - "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("積分從高到低"), - "jifenhuanquan" : MessageLookupByLibrary.simpleMessage("積分換券"), - "jifenmingxi" : MessageLookupByLibrary.simpleMessage("積分明細"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("積分商城"), - "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("積分詳情"), - "jihuanka" : MessageLookupByLibrary.simpleMessage("集換卡"), - "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("淨弼聯盟會員店"), - "jingxuanhaowen" : MessageLookupByLibrary.simpleMessage("精選好文"), - "jingxuanhuodong" : MessageLookupByLibrary.simpleMessage("精選活動"), - "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), - "jinrihuiyuanrenwu" : MessageLookupByLibrary.simpleMessage("今日會員任務"), - "jinrushangdian" : MessageLookupByLibrary.simpleMessage("進入商店"), - "jinruzhuanqu" : MessageLookupByLibrary.simpleMessage("進入專區"), - "jinxingbangdingfuka" : MessageLookupByLibrary.simpleMessage("進行綁定副卡"), - "jinxingfukabangding" : MessageLookupByLibrary.simpleMessage("進行副卡綁定"), - "jinxingzhanghaozhuxiao" : MessageLookupByLibrary.simpleMessage("進行賬號注銷"), - "jinxingzhongdedingdan" : MessageLookupByLibrary.simpleMessage("進行中的訂單"), - "jituanchuangbanren" : MessageLookupByLibrary.simpleMessage("集团创办人"), - "jituanchuangshiren" : MessageLookupByLibrary.simpleMessage("集團創始人"), - "jixuduihuan" : MessageLookupByLibrary.simpleMessage("继续兑换"), - "jixuzhifu" : MessageLookupByLibrary.simpleMessage("繼續支付"), - "jubao" : MessageLookupByLibrary.simpleMessage("舉報"), - "jubaogaineirong" : MessageLookupByLibrary.simpleMessage("舉報該内容"), - "jubaotishi" : MessageLookupByLibrary.simpleMessage("您的舉報正在等待人工稽核,我們會在7~15個工作日處理,處理結果可在"), - "jubaoyuanyin" : MessageLookupByLibrary.simpleMessage("請輸入舉報原因,以便我們更快定位問題,快速處理"), - "jujue" : MessageLookupByLibrary.simpleMessage("拒絕"), - "kabao" : MessageLookupByLibrary.simpleMessage("卡包"), - "kabaokeshiyong" : MessageLookupByLibrary.simpleMessage("卡包-可使用"), - "kaiqiquanxian" : MessageLookupByLibrary.simpleMessage("開啓權限"), - "kaitonghuixianghuoququanyi" : MessageLookupByLibrary.simpleMessage("開通回鄉VIP卡獲取更多權益"), - "kaitongriqi" : m16, - "kaquan" : MessageLookupByLibrary.simpleMessage("卡券"), - "kelingqudeyouhuiquan" : MessageLookupByLibrary.simpleMessage("可領取的卡券"), - "keshiyong" : MessageLookupByLibrary.simpleMessage("可使用"), - "keyongjifen" : MessageLookupByLibrary.simpleMessage("可用积分"), - "keyongquan" : MessageLookupByLibrary.simpleMessage("可用券"), - "keyongyouhuiquan" : MessageLookupByLibrary.simpleMessage("可用優惠券"), - "keyongyue" : MessageLookupByLibrary.simpleMessage("可用餘額"), - "kongtiao" : MessageLookupByLibrary.simpleMessage("空調"), - "kuaidi" : MessageLookupByLibrary.simpleMessage("快遞"), - "kuaidiwuliu" : MessageLookupByLibrary.simpleMessage("快遞物流"), - "kuailezhunong" : MessageLookupByLibrary.simpleMessage("快樂助農"), - "lianxikefu" : MessageLookupByLibrary.simpleMessage("聯系客服"), - "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("聯繫手機號"), - "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("連續簽到領取雙倍積分"), - "liaojie" : MessageLookupByLibrary.simpleMessage("瞭解"), - "liaojiejiankang" : MessageLookupByLibrary.simpleMessage("瞭解健康"), - "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即參加"), - "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), - "lijigengxin" : MessageLookupByLibrary.simpleMessage("立即更新"), - "lijikaitong" : MessageLookupByLibrary.simpleMessage("立即開通"), - "lijilingqu" : MessageLookupByLibrary.simpleMessage("立即領取"), - "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"), - "lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"), - "lijitiyan" : MessageLookupByLibrary.simpleMessage("立即體驗"), - "lijiyuyue" : MessageLookupByLibrary.simpleMessage("立即預約"), - "likekaitong" : MessageLookupByLibrary.simpleMessage("立刻開通"), - "likexufei" : MessageLookupByLibrary.simpleMessage("立刻續費"), - "likezhifu" : MessageLookupByLibrary.simpleMessage("立刻支付"), - "lingqu" : MessageLookupByLibrary.simpleMessage("領取"), - "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("領券中心"), - "lingquchenggong" : MessageLookupByLibrary.simpleMessage("領取成功"), - "lingqudaokabao" : MessageLookupByLibrary.simpleMessage("領取到卡包"), - "lingqufangshi" : MessageLookupByLibrary.simpleMessage("领取方式"), - "lingqushijian" : m17, - "linian" : MessageLookupByLibrary.simpleMessage("理念"), - "lishijilu" : MessageLookupByLibrary.simpleMessage("歷史記錄"), - "liuxianinjingcaidepinglunba" : MessageLookupByLibrary.simpleMessage("留下您精彩的評論吧"), - "login" : MessageLookupByLibrary.simpleMessage("登錄"), - "login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"), - "lvbiyue" : MessageLookupByLibrary.simpleMessage("綠幣餘額"), - "lvbiyue_" : m18, - "lvbizhifu" : MessageLookupByLibrary.simpleMessage("綠幣支付"), - "main_menu1" : MessageLookupByLibrary.simpleMessage("首頁"), - "main_menu2" : MessageLookupByLibrary.simpleMessage("門店"), - "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"), - "main_menu4" : MessageLookupByLibrary.simpleMessage("我的"), - "main_menu5" : MessageLookupByLibrary.simpleMessage("hi"), - "manlijiandaijinquan" : m19, - "manyuankeyong" : m20, - "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日簽到"), - "meiyougengduohuiyuanka" : MessageLookupByLibrary.simpleMessage("沒有更多會員卡"), - "meiyougengduoshujule" : MessageLookupByLibrary.simpleMessage("沒有更多數據了"), - "meiyougengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), - "meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每週三更新"), - "meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每週三更新劵包"), - "mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"), - "mendianyue" : MessageLookupByLibrary.simpleMessage("門店餘額"), - "menpaihao" : MessageLookupByLibrary.simpleMessage("請輸入門牌號"), - "mi" : m21, - "mingxi" : MessageLookupByLibrary.simpleMessage("明細"), - "morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"), - "muqianwujilu" : MessageLookupByLibrary.simpleMessage("目前暫無記錄哦"), - "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暫無星店活動"), - "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"), - "nincunchuquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), - "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), - "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), - "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"), - "ninxiangjiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), - "ninxiaoxiquanxianweikaiqi" : MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), - "ninyichenggonglingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("您已成功領取優惠券,請在"), - "ninyilianxuqiandaotian" : m22, - "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一個訂單需要前往門店領取"), - "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一個新訂單"), - "paizhao" : MessageLookupByLibrary.simpleMessage("拍照"), - "peisong" : MessageLookupByLibrary.simpleMessage("配送"), - "peisongfangshi" : MessageLookupByLibrary.simpleMessage("配送方式"), - "peisongfei" : MessageLookupByLibrary.simpleMessage("配送費"), - "peisongfuwu" : MessageLookupByLibrary.simpleMessage("配送服務"), - "peisongzhong" : MessageLookupByLibrary.simpleMessage("配送中"), - "phone_error" : MessageLookupByLibrary.simpleMessage("手機格式錯誤"), - "pinglun" : MessageLookupByLibrary.simpleMessage("評論"), - "pinglun_" : m23, - "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平臺餘額"), - "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平臺支付密碼"), - "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), - "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介紹"), - "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登錄既同意"), - "privacy_policy2" : MessageLookupByLibrary.simpleMessage("《一心回鄉服務協議》"), - "privacy_policy3" : MessageLookupByLibrary.simpleMessage("《隱私服務》"), - "privacy_policy4" : MessageLookupByLibrary.simpleMessage("并使用本機號碼登錄"), - "qianbao" : MessageLookupByLibrary.simpleMessage("錢包"), - "qiandao" : MessageLookupByLibrary.simpleMessage("簽到"), - "qiandaodejifen" : MessageLookupByLibrary.simpleMessage("簽到得積分"), - "qiandaolingjifen" : MessageLookupByLibrary.simpleMessage("簽到領積分"), - "qiandaolingqujinfen" : MessageLookupByLibrary.simpleMessage("簽到領取積分"), - "qiandaowancheng" : MessageLookupByLibrary.simpleMessage("簽到完成"), - "qianjinmaiwei" : MessageLookupByLibrary.simpleMessage("前進麥味"), - "qianshou" : MessageLookupByLibrary.simpleMessage("已簽收"), - "qianwanghuixiangmendianduihuanhexiao" : MessageLookupByLibrary.simpleMessage("前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), - "qinglihuancun" : MessageLookupByLibrary.simpleMessage("清理緩存"), - "qingshurubeizhuyaoqiu" : MessageLookupByLibrary.simpleMessage("請輸入備注要求"), - "qingshuruchongzhijine" : MessageLookupByLibrary.simpleMessage("請輸入充值金額"), - "qingshurushoujihao" : MessageLookupByLibrary.simpleMessage("請輸入手機號碼"), - "qingshuruyanzhengma" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), - "qingshuruyaoqingma" : MessageLookupByLibrary.simpleMessage("請輸入邀請碼"), - "qingshuruyouxiaoshoujihaoma" : MessageLookupByLibrary.simpleMessage("請輸入您的有效手機號"), - "qingshuruzhifumima" : MessageLookupByLibrary.simpleMessage("請輸入支付密碼"), - "qingtianxieshoujihao" : MessageLookupByLibrary.simpleMessage("請填寫收件人手機號"), - "qingtianxiexingming" : MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), - "qingtong" : MessageLookupByLibrary.simpleMessage("青铜"), - "qingtonghuiyuan" : MessageLookupByLibrary.simpleMessage("青銅會員"), - "qingxianxuanguige" : MessageLookupByLibrary.simpleMessage("請先選規格"), - "qingxuanzeshiyongmendian" : MessageLookupByLibrary.simpleMessage("請選擇使用門店"), - "qingxuanzeshouhuodizhi" : MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), - "qingxuanzeyigemendian" : MessageLookupByLibrary.simpleMessage("請選擇一個門店"), - "qingxuanzeyuyeushijian" : MessageLookupByLibrary.simpleMessage("請選擇預約時間"), - "qingxuanzeyuyuemendian" : MessageLookupByLibrary.simpleMessage("請選擇預約門店"), - "qingxuanzhemendian" : MessageLookupByLibrary.simpleMessage("请选择门店"), - "qingxuanzheninxiangshezhideyuyan" : MessageLookupByLibrary.simpleMessage("請選擇您要設置的語言"), - "qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("請在規定時間内完成支付"), - "qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"), - "qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("騎手配送中,預計送達時間"), - "qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("騎手已接單、取貨中"), - "qita" : MessageLookupByLibrary.simpleMessage("其他"), - "qiyetuanjian" : MessageLookupByLibrary.simpleMessage("企業團建"), - "quanbao" : MessageLookupByLibrary.simpleMessage("券包"), - "quanbu" : MessageLookupByLibrary.simpleMessage("全部"), - "quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部訂單"), - "quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兌換"), - "quanchangtongyong" : MessageLookupByLibrary.simpleMessage("全場通用"), - "quanchangzhe" : m25, - "quantian" : MessageLookupByLibrary.simpleMessage("全天"), - "quanxian" : MessageLookupByLibrary.simpleMessage("權限"), - "quanxianshezhi" : MessageLookupByLibrary.simpleMessage("權限設置"), - "quanyijishao" : MessageLookupByLibrary.simpleMessage("權益介紹"), - "quanyishuoming" : MessageLookupByLibrary.simpleMessage("權益説明"), - "quanyixiangqing" : MessageLookupByLibrary.simpleMessage("權益詳情"), - "qucanhao" : MessageLookupByLibrary.simpleMessage("取餐號"), - "qudanhao" : m26, - "qudaolaiyuan" : MessageLookupByLibrary.simpleMessage("渠道來源"), - "qudenglu" : MessageLookupByLibrary.simpleMessage("去登錄"), - "queding" : MessageLookupByLibrary.simpleMessage("確定"), - "quedingyaoshanchudongtai" : MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), - "queren" : MessageLookupByLibrary.simpleMessage("确认"), - "querenbangding" : MessageLookupByLibrary.simpleMessage("確認綁定"), - "querenchongzhi" : MessageLookupByLibrary.simpleMessage("確認充值"), - "querenduihuan" : MessageLookupByLibrary.simpleMessage("确认兑换"), - "querenshouhuo" : MessageLookupByLibrary.simpleMessage("確認收貨"), - "querenyaoshanchudangqianpinglunma" : MessageLookupByLibrary.simpleMessage("確認要刪除當前評論嗎?"), - "querenzhuxiao" : MessageLookupByLibrary.simpleMessage("確認注銷"), - "quhexiao" : MessageLookupByLibrary.simpleMessage("去核銷"), - "quhuozhong" : MessageLookupByLibrary.simpleMessage("取貨中"), - "qujianma" : MessageLookupByLibrary.simpleMessage("取件碼"), - "quqiandao" : MessageLookupByLibrary.simpleMessage("去簽到"), - "qushiyong" : MessageLookupByLibrary.simpleMessage("去使用"), - "quwancheng" : MessageLookupByLibrary.simpleMessage(" 去完成 "), - "quxiao" : MessageLookupByLibrary.simpleMessage("取消"), - "quxiaodingdan" : MessageLookupByLibrary.simpleMessage("取消訂單"), - "quxiaozhifu" : MessageLookupByLibrary.simpleMessage("取消支付"), - "quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"), - "remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("熱門文章視頻"), - "remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("熱門文章視頻清單"), - "ren" : m27, - "renwuzhongxin" : MessageLookupByLibrary.simpleMessage("任務中心"), - "resend_in_seconds" : m28, - "ricahngfenxiang" : MessageLookupByLibrary.simpleMessage("日常分享"), - "ruhedihuanjifen" : MessageLookupByLibrary.simpleMessage("如何兌換積分"), - "ruhedihuanjifen1" : MessageLookupByLibrary.simpleMessage("點擊淨弼,進入積分商城,點擊你想兌換的領商品,進入商品詳情後點擊下方兌換,即可兌換哦~"), - "ruhelingquyouhuiquan" : MessageLookupByLibrary.simpleMessage("如何領取優惠券?"), - "ruhelingquyouhuiquan1" : MessageLookupByLibrary.simpleMessage("點擊我的,進入我的頁面後,點擊下方的領取中心,進入后即可領取優惠券哦~"), - "ruheqiandao" : MessageLookupByLibrary.simpleMessage("如何簽到?"), - "ruheqiandao1" : MessageLookupByLibrary.simpleMessage("1.點擊淨弼,進入首頁,點擊上方的去簽到。\n2.點擊我的,進入我的頁面,點擊上方的積分詳情,進入後即可簽到。"), - "ruxutuikuanqingyumendianlianxi" : MessageLookupByLibrary.simpleMessage("如需退款,請您提前準備好訂單號/取單號,並與門店人員進行聯繫"), - "saoma" : MessageLookupByLibrary.simpleMessage("掃碼"), - "saomadiancan" : MessageLookupByLibrary.simpleMessage("您即將進行掃碼點餐"), - "saomashibieguanzhugongzonghao" : MessageLookupByLibrary.simpleMessage("掃碼識別,關注公眾號"), - "send_code" : MessageLookupByLibrary.simpleMessage("發送驗證碼"), - "shanchu" : MessageLookupByLibrary.simpleMessage("刪除"), - "shanchudingdan" : MessageLookupByLibrary.simpleMessage("刪除訂單"), - "shanghuruzhu" : MessageLookupByLibrary.simpleMessage("商戶入駐"), - "shangjiaquan" : MessageLookupByLibrary.simpleMessage("商家券"), - "shangjiaqueren" : MessageLookupByLibrary.simpleMessage("商家確認"), - "shangjiayifahuo" : MessageLookupByLibrary.simpleMessage("商家已發貨"), - "shangjiazhengzaipeican" : MessageLookupByLibrary.simpleMessage("商家正在配餐"), - "shanglajiazai" : MessageLookupByLibrary.simpleMessage("上拉加載"), - "shangpincaigou" : MessageLookupByLibrary.simpleMessage("商品採購"), - "shangpinjifen" : m29, - "shangpinxiangqing" : MessageLookupByLibrary.simpleMessage("商品詳情"), - "shangyidengji" : MessageLookupByLibrary.simpleMessage("上一等級"), - "shenghuoyule" : MessageLookupByLibrary.simpleMessage("生活娛樂"), - "shengxianzhaipei" : MessageLookupByLibrary.simpleMessage("生鮮宅配"), - "shenmijifendali" : MessageLookupByLibrary.simpleMessage("神秘積分大禮"), - "shenqingtuikuan" : MessageLookupByLibrary.simpleMessage("申請退款"), - "shezhi" : MessageLookupByLibrary.simpleMessage("設置"), - "shifangjiazaigengduo" : MessageLookupByLibrary.simpleMessage("釋放加載更多"), - "shifangshuaxin" : MessageLookupByLibrary.simpleMessage("釋放刷新"), - "shifujifen" : m30, - "shifujihuanka" : m31, - "shimingrenzheng" : MessageLookupByLibrary.simpleMessage("實名認證"), - "shixiaoquan" : MessageLookupByLibrary.simpleMessage("失效券"), - "shixiaoyouhuiquan" : MessageLookupByLibrary.simpleMessage("失效优惠券"), - "shiyongbangzhu" : MessageLookupByLibrary.simpleMessage("使用幫助"), - "shiyongmendian" : MessageLookupByLibrary.simpleMessage("適用門店"), - "shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"), - "shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"), - "shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"), - "shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用詳情"), - "shouhuodi" : MessageLookupByLibrary.simpleMessage("收貨地址"), - "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"), - "shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收貨地址"), - "shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("請輸入收貨人手機號"), - "shouhuorenxiangxidizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人詳細地址"), - "shouhuorenxingming" : MessageLookupByLibrary.simpleMessage("請輸入收貨人姓名"), - "shoujihao" : MessageLookupByLibrary.simpleMessage("手機號"), - "shouqi" : MessageLookupByLibrary.simpleMessage("收起"), - "shouye" : MessageLookupByLibrary.simpleMessage("首頁"), - "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), - "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), - "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), - "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), - "shuaxinzhong" : MessageLookupByLibrary.simpleMessage("刷新中...."), - "shuliang" : MessageLookupByLibrary.simpleMessage("數量"), - "shurushouhuorendizhi" : MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), - "shuruzhifumima" : MessageLookupByLibrary.simpleMessage("輸入支付密碼"), - "sui" : m32, - "tangshi" : MessageLookupByLibrary.simpleMessage("堂食"), - "tebieshengming" : MessageLookupByLibrary.simpleMessage("特別聲明"), - "tehuizhuanqu" : MessageLookupByLibrary.simpleMessage("特惠專區"), - "tianjiaxinfuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tianjifuka" : MessageLookupByLibrary.simpleMessage("添加新副卡"), - "tiantiandefuli" : MessageLookupByLibrary.simpleMessage("天天得福利"), - "tiantianlingjifen" : MessageLookupByLibrary.simpleMessage("天天領積分"), - "tijiao" : MessageLookupByLibrary.simpleMessage("提交"), - "tijiaochenggong" : MessageLookupByLibrary.simpleMessage("提交成功"), - "tingchewei" : MessageLookupByLibrary.simpleMessage("停車位"), - "tixian" : MessageLookupByLibrary.simpleMessage("提現"), - "tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意並繼續"), - "tongzhi" : MessageLookupByLibrary.simpleMessage("通知"), - "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), - "toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投書須知"), - "touxiang" : MessageLookupByLibrary.simpleMessage("頭像"), - "tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登錄"), - "tuiguangma" : MessageLookupByLibrary.simpleMessage("推廣碼"), - "tuikuan" : MessageLookupByLibrary.simpleMessage("退款"), - "waidai" : MessageLookupByLibrary.simpleMessage("外帶"), - "waimai" : MessageLookupByLibrary.simpleMessage("外賣"), - "waimaipeisong" : MessageLookupByLibrary.simpleMessage("外賣配送"), - "waisong" : MessageLookupByLibrary.simpleMessage("外送"), - "wan" : MessageLookupByLibrary.simpleMessage("玩"), - "wancheng" : MessageLookupByLibrary.simpleMessage("完成"), - "wancheng_" : m33, - "wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下單"), - "wangjimima" : MessageLookupByLibrary.simpleMessage("忘記密碼"), - "wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"), - "wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "), - "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "), - "weidenglu" : MessageLookupByLibrary.simpleMessage("未登錄"), - "weidengluxinxi" : MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩資訊"), - "weihexiao" : MessageLookupByLibrary.simpleMessage("未核銷"), - "weikaiqi" : MessageLookupByLibrary.simpleMessage("未開啓"), - "weilegeiningenghaodefuwu" : MessageLookupByLibrary.simpleMessage("為了給您提供更好的服務,以及享受更加精彩的信息內容,請在使用使用期間登錄"), - "weilejishishoudaohuodongxiaoxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), - "weilekaipaizhaoxuanzhetouxiang" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), - "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息"), - "weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), - "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), - "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), - "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"), - "wentijian" : MessageLookupByLibrary.simpleMessage("問題件"), - "wenzhang" : MessageLookupByLibrary.simpleMessage("文章"), - "wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"), - "wenzhangzhuanlan" : MessageLookupByLibrary.simpleMessage("文章專欄"), - "weulingqu" : MessageLookupByLibrary.simpleMessage("未領取"), - "wodechengjiu" : MessageLookupByLibrary.simpleMessage("我的成就"), - "wodedingdan" : MessageLookupByLibrary.simpleMessage("我的訂單"), - "wodedongtai" : MessageLookupByLibrary.simpleMessage("我的動態"), - "wodegongju" : MessageLookupByLibrary.simpleMessage("我的工具"), - "wodehuiyuandengji" : MessageLookupByLibrary.simpleMessage("我的會員等級"), - "wodejifenzhi" : MessageLookupByLibrary.simpleMessage("我的積分值"), - "wodekanjia" : MessageLookupByLibrary.simpleMessage("我的砍價"), - "wodekaquan" : MessageLookupByLibrary.simpleMessage("我的卡券"), - "wodenianling" : MessageLookupByLibrary.simpleMessage("我的年齡"), - "wodepintuan" : MessageLookupByLibrary.simpleMessage("我的拼團"), - "wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的錢包"), - "wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"), - "wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"), - "wodeyaoqing" : MessageLookupByLibrary.simpleMessage("我的邀請"), - "wodeyaoqingma" : MessageLookupByLibrary.simpleMessage("我的邀請碼"), - "woyouyaoqingma" : MessageLookupByLibrary.simpleMessage("我有邀請碼"), - "wuliudanhao" : MessageLookupByLibrary.simpleMessage("物流單號:"), - "wuliugongsi" : MessageLookupByLibrary.simpleMessage("物流公司:"), - "wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"), - "wuliuzhuangtai" : MessageLookupByLibrary.simpleMessage("物流狀態:"), - "xiadanshijian" : MessageLookupByLibrary.simpleMessage("下單時間"), - "xiadanshijian_" : m34, - "xiadanzhuanjifen" : MessageLookupByLibrary.simpleMessage("下單賺積分"), - "xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"), - "xiangce" : MessageLookupByLibrary.simpleMessage("相冊"), - "xiangji" : MessageLookupByLibrary.simpleMessage("相機"), - "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "), - "xiangqing" : MessageLookupByLibrary.simpleMessage("詳情"), - "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("詳細地址"), - "xianshangfafang" : MessageLookupByLibrary.simpleMessage("綫上發放"), - "xianshangshiyong" : MessageLookupByLibrary.simpleMessage("線上使用"), - "xianxiashiyong" : MessageLookupByLibrary.simpleMessage("線下使用"), - "xiaofei" : MessageLookupByLibrary.simpleMessage("消費"), - "xiaofeijifen" : MessageLookupByLibrary.simpleMessage("消费积分"), - "xiaofeijihuanka" : MessageLookupByLibrary.simpleMessage("消費集換卡"), - "xiaofeijilu" : MessageLookupByLibrary.simpleMessage("消費記錄"), - "xiaoxi" : MessageLookupByLibrary.simpleMessage("消息"), - "xiayidengji" : MessageLookupByLibrary.simpleMessage("下一等級"), - "xiazaiwancheng" : MessageLookupByLibrary.simpleMessage("加載完成"), - "xiedongtai" : MessageLookupByLibrary.simpleMessage("寫動態"), - "xieyitanchuang" : MessageLookupByLibrary.simpleMessage("一心回鄉用戶隱私協議"), - "xihuan_" : m35, - "xindianhuodong" : MessageLookupByLibrary.simpleMessage("星店活動"), - "xingming" : MessageLookupByLibrary.simpleMessage("姓名"), - "xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系統通知"), - "xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系統消息"), - "xiugai" : MessageLookupByLibrary.simpleMessage("修改"), - "xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"), - "xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"), - "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), - "xuanhaola" : MessageLookupByLibrary.simpleMessage("選好啦"), - "xuanji" : MessageLookupByLibrary.simpleMessage("選集"), - "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), - "xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"), - "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"), - "xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"), - "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"), - "xuni" : MessageLookupByLibrary.simpleMessage("虛擬"), - "yanzhengma" : MessageLookupByLibrary.simpleMessage("驗證碼"), - "yaoqinghaoyou" : MessageLookupByLibrary.simpleMessage("邀請好友"), - "yaoqinghaoyoudefen" : MessageLookupByLibrary.simpleMessage("邀請好友得分"), - "yaoqingrenshoujihao_" : m36, - "yaoqingwancheng" : MessageLookupByLibrary.simpleMessage("邀請完成"), - "yibangfuka" : MessageLookupByLibrary.simpleMessage("已綁副卡"), - "yiduihuan" : MessageLookupByLibrary.simpleMessage("已兌換"), - "yiduihuanjian" : m37, - "yifahuo" : MessageLookupByLibrary.simpleMessage("已發貨"), - "yiguanzhu" : MessageLookupByLibrary.simpleMessage("已關注"), - "yihouzaishuo" : MessageLookupByLibrary.simpleMessage("以後再說"), - "yihuide" : MessageLookupByLibrary.simpleMessage("已獲得"), - "yihujiaoqishou" : MessageLookupByLibrary.simpleMessage("已呼叫騎手"), - "yikaitongzidongxufei" : MessageLookupByLibrary.simpleMessage("已開通自動續費"), - "yikexiao" : MessageLookupByLibrary.simpleMessage("已核銷"), - "yilingqu" : MessageLookupByLibrary.simpleMessage("已領取"), - "yindao1" : MessageLookupByLibrary.simpleMessage("新增多項功能,海量優惠資訊實時推送"), - "yindao2" : MessageLookupByLibrary.simpleMessage("新增多項功能,使用平臺錢包優惠多多,更有充值優惠享不停"), - "yindao3" : MessageLookupByLibrary.simpleMessage("新增會員任務得積分,消費可得綠金、積分商城換購"), - "yindao4" : MessageLookupByLibrary.simpleMessage("傳遞友愛純淨健康有機環保智慧理念"), - "yindaoye1" : MessageLookupByLibrary.simpleMessage("會員最新資訊搶先看"), - "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"), - "yindaoye3" : MessageLookupByLibrary.simpleMessage("會員活動專區"), - "yindaoye4" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), - "yingwen" : MessageLookupByLibrary.simpleMessage("英文"), - "yingyeshijian" : m38, - "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), - "yinshi" : MessageLookupByLibrary.simpleMessage("飲食"), - "yinsishengming" : MessageLookupByLibrary.simpleMessage("隱私聲明"), - "yinsixieyi" : MessageLookupByLibrary.simpleMessage("《隱私協議》"), - "yinsizhengce1" : MessageLookupByLibrary.simpleMessage(" 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉"), - "yinsizhengce2" : MessageLookupByLibrary.simpleMessage("     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。"), - "yinzhang" : MessageLookupByLibrary.simpleMessage("印章"), - "yiqiandao" : MessageLookupByLibrary.simpleMessage("已簽到"), - "yiqianshou" : MessageLookupByLibrary.simpleMessage("已簽收"), - "yiquxiao" : MessageLookupByLibrary.simpleMessage(" 已取消 "), - "yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiming" : MessageLookupByLibrary.simpleMessage("已实名"), - "yishixiao" : MessageLookupByLibrary.simpleMessage("已失效"), - "yishiyong" : MessageLookupByLibrary.simpleMessage("已使用"), - "yishouquan" : MessageLookupByLibrary.simpleMessage("已授權"), - "yisongda" : MessageLookupByLibrary.simpleMessage("已送達"), - "yituikuan" : MessageLookupByLibrary.simpleMessage("已退款"), - "yiwancheng" : MessageLookupByLibrary.simpleMessage(" 已完成 "), - "yiwanchengdingdan" : MessageLookupByLibrary.simpleMessage("已完成订单"), - "yixianghuiyuanquanyi" : MessageLookupByLibrary.simpleMessage("已享會員權益"), - "yixiansquanbupinglun" : MessageLookupByLibrary.simpleMessage("-已顯示全部評論-"), - "yixinhuixiang" : MessageLookupByLibrary.simpleMessage("一心迴響"), - "yiyoujifen" : MessageLookupByLibrary.simpleMessage("已有積分"), - "yizhifu" : MessageLookupByLibrary.simpleMessage("已支付"), - "yonghuming" : MessageLookupByLibrary.simpleMessage("用戶名"), - "yonghuxiaofeijifen" : MessageLookupByLibrary.simpleMessage("用戶每消費1元可獲得1個積分 。"), - "youhuiquan" : MessageLookupByLibrary.simpleMessage("優惠券"), - "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("優惠券領取"), - "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("優惠金額無法累積積分,訂單撤銷或其他原因造成的未成功支付的訂單,無法獲得對應的積分。"), - "youkedenglu" : MessageLookupByLibrary.simpleMessage("遊客登錄"), - "youxiaoqi" : m39, - "youxiaoqixian" : MessageLookupByLibrary.simpleMessage("有效期限:"), - "youxiaoqizhi" : m40, - "yuan" : MessageLookupByLibrary.simpleMessage("元"), - "yuan_" : m41, - "yuanjia" : MessageLookupByLibrary.simpleMessage("原價"), - "yue" : MessageLookupByLibrary.simpleMessage("餘額"), - "yue_" : m42, - "yue__" : m43, - "yuemingxi" : MessageLookupByLibrary.simpleMessage("餘額明細"), - "yuliudianhua" : MessageLookupByLibrary.simpleMessage("預留電話"), - "yunfei" : MessageLookupByLibrary.simpleMessage("運費"), - "yuyan" : MessageLookupByLibrary.simpleMessage("語言"), - "zailaiyidan" : MessageLookupByLibrary.simpleMessage("再來一單"), - "zaituzhong" : MessageLookupByLibrary.simpleMessage("運輸中"), - "zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"), - "zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"), - "zanweijiesuo" : MessageLookupByLibrary.simpleMessage("暫未解鎖"), - "zanweikaifang" : MessageLookupByLibrary.simpleMessage("暫未開放"), - "zanweikaitong" : MessageLookupByLibrary.simpleMessage("暫未開通"), - "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"), - "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"), - "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"), - "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("賬號安全"), - "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("賬號授權"), - "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("賬號信息"), - "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("賬號與安全"), - "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("賬號注銷説明"), - "zhanghuyue" : MessageLookupByLibrary.simpleMessage("賬戶餘額"), - "zhankai" : MessageLookupByLibrary.simpleMessage("展開"), - "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), - "zhengzaijiazai" : MessageLookupByLibrary.simpleMessage("正在加載"), - "zhengzaipeisong" : MessageLookupByLibrary.simpleMessage("正在配送"), - "zhengzaixiazaizhong" : MessageLookupByLibrary.simpleMessage("正在加載中..."), - "zhidianmendian" : MessageLookupByLibrary.simpleMessage("致電門店"), - "zhifubao" : MessageLookupByLibrary.simpleMessage("支付寶"), - "zhifubaozhifu" : MessageLookupByLibrary.simpleMessage("支付寶支付"), - "zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"), - "zhifuxiangqing" : MessageLookupByLibrary.simpleMessage("支付详情"), - "zhizunhuiyuan" : MessageLookupByLibrary.simpleMessage("至尊會員"), - "zhizuowancheng" : MessageLookupByLibrary.simpleMessage("製作完成"), - "zhongchakan" : MessageLookupByLibrary.simpleMessage("中查看"), - "zhongwenjianti" : MessageLookupByLibrary.simpleMessage("中文簡體"), - "zhuanlan" : MessageLookupByLibrary.simpleMessage("專欄"), - "zhuanxiangyouhuiquan" : MessageLookupByLibrary.simpleMessage("專享優惠券"), - "zhunong1" : MessageLookupByLibrary.simpleMessage("愛在回鄉,快樂助農"), - "zhunongjifen" : MessageLookupByLibrary.simpleMessage("助農積分"), - "zhunongzhuanqu" : MessageLookupByLibrary.simpleMessage("助農專區"), - "zhuxiaotixing" : MessageLookupByLibrary.simpleMessage("再次提醒:註銷帳號後不可恢復,相關資料和資訊會永久删除。"), - "zhuxiaozhanghao" : MessageLookupByLibrary.simpleMessage("註銷帳號"), - "ziqu" : MessageLookupByLibrary.simpleMessage("自取"), - "ziti" : MessageLookupByLibrary.simpleMessage("自提"), - "zitidizhi" : MessageLookupByLibrary.simpleMessage("自提地址"), - "zitiduihuanquan" : MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), - "zitishijian" : MessageLookupByLibrary.simpleMessage("自提時間"), - "zongzichan" : MessageLookupByLibrary.simpleMessage("總資產"), - "zongzichanyuan" : MessageLookupByLibrary.simpleMessage("總資產(元)"), - "zuanshihuiyuan" : MessageLookupByLibrary.simpleMessage("鑽石會員"), - "zuixinwenzhang" : MessageLookupByLibrary.simpleMessage("最新文章"), - "zuorenwudejifen" : MessageLookupByLibrary.simpleMessage("做任務得積分"), - "zuozhe" : m44 - }; + static Map _notInlinedMessages(_) => { + "bainianchuanjiao": MessageLookupByLibrary.simpleMessage("百年川椒"), + "baiyin": MessageLookupByLibrary.simpleMessage("白银"), + "baiyinhuiyuan": MessageLookupByLibrary.simpleMessage("白銀會員"), + "banben": m0, + "bangdingfuka": MessageLookupByLibrary.simpleMessage("綁定副卡"), + "bangdingshouji": MessageLookupByLibrary.simpleMessage("綁定手機"), + "bangong": MessageLookupByLibrary.simpleMessage("辦公"), + "bangzhuyufankui": MessageLookupByLibrary.simpleMessage("幫助與反饋"), + "baocun": MessageLookupByLibrary.simpleMessage("保存"), + "baocunchenggong": MessageLookupByLibrary.simpleMessage("保存成功"), + "baocunsaoma": MessageLookupByLibrary.simpleMessage( + "截屏保存下方二維碼,邀請他人微信掃一掃識別,長按關注後,完成小遊戲,領取優惠券後,即邀請成功哦!"), + "beiyaoqingdejiangli": MessageLookupByLibrary.simpleMessage( + "每一位被邀請的用戶,在輸入邀請碼之後可獲得前進麥味10元代金券一張"), + "beizhu": MessageLookupByLibrary.simpleMessage("備注"), + "beizhuxinxi": MessageLookupByLibrary.simpleMessage("備注信息"), + "benzhouquanbao": MessageLookupByLibrary.simpleMessage("本周券包"), + "bianjidizhi": MessageLookupByLibrary.simpleMessage("編輯地址"), + "bianjigerenziliao": MessageLookupByLibrary.simpleMessage("編輯個人資料"), + "biaojiweiyidu": MessageLookupByLibrary.simpleMessage("標為已讀"), + "biaoweiyidu": MessageLookupByLibrary.simpleMessage("標爲已讀"), + "bodadianhua": MessageLookupByLibrary.simpleMessage("撥打電話"), + "bofangcishu": MessageLookupByLibrary.simpleMessage("播放次數"), + "bojin": MessageLookupByLibrary.simpleMessage("铂金"), + "brand_yixinhuixiang": MessageLookupByLibrary.simpleMessage("海峽姐妹"), + "buzhichikaipiao": MessageLookupByLibrary.simpleMessage("不支持開票"), + "canyingfuwu": MessageLookupByLibrary.simpleMessage("餐飲服務"), + "chakan": MessageLookupByLibrary.simpleMessage("查看"), + "chakangengduo": MessageLookupByLibrary.simpleMessage("查看更多"), + "chakanhexiaoma": MessageLookupByLibrary.simpleMessage("查看核銷碼"), + "chakanquanyi": MessageLookupByLibrary.simpleMessage("查看權益"), + "chakanshixiaoquan": MessageLookupByLibrary.simpleMessage("查看失效券"), + "chakanwodekabao": MessageLookupByLibrary.simpleMessage("查看我的卡包"), + "chakanwodekaquan": MessageLookupByLibrary.simpleMessage("查看我的卡券"), + "chakanwuliu": MessageLookupByLibrary.simpleMessage("查看物流"), + "chakanxiangqing": MessageLookupByLibrary.simpleMessage("查看詳情"), + "changjianwenti": MessageLookupByLibrary.simpleMessage("常見問題"), + "changqiyouxiao": MessageLookupByLibrary.simpleMessage("長期有效"), + "chaojiyouhuiquan": MessageLookupByLibrary.simpleMessage("超值优惠券"), + "chaungshirengushi": MessageLookupByLibrary.simpleMessage("創始人故事"), + "chenggongdengluzhuce": + MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), + "chengjiu": MessageLookupByLibrary.simpleMessage("成就"), + "chengjiuhuizhang": MessageLookupByLibrary.simpleMessage("成就徽章"), + "chengshixuanze": MessageLookupByLibrary.simpleMessage("城市選擇"), + "chengweidianpuzhuanshuhuiyuan": + MessageLookupByLibrary.simpleMessage("成為專屬會員,享專屬權益"), + "chi": MessageLookupByLibrary.simpleMessage("吃"), + "chijiankang": MessageLookupByLibrary.simpleMessage("吃健康"), + "chongzhi": MessageLookupByLibrary.simpleMessage("充值"), + "chongzhichenggong": MessageLookupByLibrary.simpleMessage("充值成功"), + "chongzhifuliduo": MessageLookupByLibrary.simpleMessage("充值福利多"), + "chongzhixiaoxi": MessageLookupByLibrary.simpleMessage("充值消息"), + "chongzhizuixiaojine": m1, + "chuangjianshijian": m2, + "chuangshirendegushi": MessageLookupByLibrary.simpleMessage("創始人的故事-"), + "chuangshirendegushi1": MessageLookupByLibrary.simpleMessage("創始人的故事"), + "chuzhiyouhui": MessageLookupByLibrary.simpleMessage("儲值優惠"), + "code_error": MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"), + "cunchu": MessageLookupByLibrary.simpleMessage("存儲"), + "cunchutishixinxi": MessageLookupByLibrary.simpleMessage( + "為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"), + "dabaodaodianqu": MessageLookupByLibrary.simpleMessage("打包到店取"), + "daifukuan": MessageLookupByLibrary.simpleMessage("待付款"), + "daipeisong": MessageLookupByLibrary.simpleMessage("待配送"), + "daiqucan": MessageLookupByLibrary.simpleMessage("待取餐"), + "daiqueren": MessageLookupByLibrary.simpleMessage("待確認"), + "daizhifu": MessageLookupByLibrary.simpleMessage("待支付"), + "daizhizuo": MessageLookupByLibrary.simpleMessage("待製作"), + "dajiadouzaiduihuan": MessageLookupByLibrary.simpleMessage("大家都在兌換"), + "dakaidingwei": MessageLookupByLibrary.simpleMessage("打開定位"), + "dangqianbanben": MessageLookupByLibrary.simpleMessage("當前版本"), + "dangqiandengji": MessageLookupByLibrary.simpleMessage("當前等級"), + "dangqianjifen": MessageLookupByLibrary.simpleMessage("當前積分:"), + "dangqianshangpinduihuanhexiaoma": + MessageLookupByLibrary.simpleMessage("當前商品兌換核銷碼已核銷完成 "), + "dangqianzhukadengji": MessageLookupByLibrary.simpleMessage("當前主卡等級"), + "daodianziqu": MessageLookupByLibrary.simpleMessage("到店自取"), + "daopinglunliebiaodingbu": + MessageLookupByLibrary.simpleMessage("到評論列表頂部"), + "daoxiayidengji": MessageLookupByLibrary.simpleMessage("到下一等級"), + "dengdaishangjiaqueren": MessageLookupByLibrary.simpleMessage("等待商家確認"), + "dengdaiyonghuqucan": MessageLookupByLibrary.simpleMessage("等待用戶取餐"), + "denglu": MessageLookupByLibrary.simpleMessage("登錄"), + "diancan": MessageLookupByLibrary.simpleMessage("點餐"), + "diandan": MessageLookupByLibrary.simpleMessage("點單"), + "dianhua": MessageLookupByLibrary.simpleMessage("電話"), + "dianjidenglu": MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩信息"), + "dianneiyongcan": MessageLookupByLibrary.simpleMessage("店内用餐"), + "dianpuchongzhi": MessageLookupByLibrary.simpleMessage("店鋪充值"), + "dianputuijian": MessageLookupByLibrary.simpleMessage("店鋪推薦"), + "dianpuyue": MessageLookupByLibrary.simpleMessage("店鋪餘額"), + "dianwolingqu": MessageLookupByLibrary.simpleMessage("點我領取"), + "dianzan": MessageLookupByLibrary.simpleMessage("點贊"), + "dianzanxihuan_": m3, + "dingdan": MessageLookupByLibrary.simpleMessage("訂單"), + "dingdanbianhao": MessageLookupByLibrary.simpleMessage("訂單編號"), + "dingdandaifahuo": MessageLookupByLibrary.simpleMessage("訂單待發貨"), + "dingdandaizhifu": MessageLookupByLibrary.simpleMessage("訂單待支付"), + "dingdangenzong": MessageLookupByLibrary.simpleMessage("訂單跟蹤"), + "dingdanhao": MessageLookupByLibrary.simpleMessage("訂單號"), + "dingdanjiesuan": MessageLookupByLibrary.simpleMessage("訂單結算"), + "dingdanqueren": MessageLookupByLibrary.simpleMessage("订单确认"), + "dingdantongzhi": MessageLookupByLibrary.simpleMessage("訂單通知"), + "dingdanxiaoxi": MessageLookupByLibrary.simpleMessage("訂單消息"), + "dingdanyisongda": MessageLookupByLibrary.simpleMessage("訂單送達"), + "dingdanyituikuan": MessageLookupByLibrary.simpleMessage("訂單已退款"), + "dingdanyiwancheng": MessageLookupByLibrary.simpleMessage("訂單已完成"), + "dingdanyizhifu": MessageLookupByLibrary.simpleMessage("訂單已支付"), + "dingwei": MessageLookupByLibrary.simpleMessage("定位"), + "dizhi": MessageLookupByLibrary.simpleMessage("地址"), + "dongtai": MessageLookupByLibrary.simpleMessage("動態"), + "dongtaitishi": MessageLookupByLibrary.simpleMessage( + "用戶發佈內容需要等待系統稽核,稽核通過後才會在推薦廣場展示"), + "dongtaixiangqing": MessageLookupByLibrary.simpleMessage("動態詳情"), + "duihuan": MessageLookupByLibrary.simpleMessage("兑换"), + "duihuanchenggong": MessageLookupByLibrary.simpleMessage("兑换成功"), + "duihuanguize": MessageLookupByLibrary.simpleMessage("兑换规则"), + "duihuanhoufahuo": MessageLookupByLibrary.simpleMessage("兌換物商品"), + "duihuanhouwugegongzuori": + MessageLookupByLibrary.simpleMessage("兑换后五个工作日内可前往门店"), + "duihuanliangdidaogao": MessageLookupByLibrary.simpleMessage("兌換量從低到高"), + "duihuanlianggaodaodi": MessageLookupByLibrary.simpleMessage("兌換量從高到低"), + "duihuanlishi": MessageLookupByLibrary.simpleMessage("兌換歷史"), + "duihuanquan": MessageLookupByLibrary.simpleMessage("兌換券"), + "duihuanshangpinxiangqing": + MessageLookupByLibrary.simpleMessage("兑换商品详情"), + "duihuanxinxi": MessageLookupByLibrary.simpleMessage("兑换信息"), + "duozhongyouhui": MessageLookupByLibrary.simpleMessage("多種優惠券等你拿"), + "fabu": MessageLookupByLibrary.simpleMessage("發佈"), + "fangshier": MessageLookupByLibrary.simpleMessage("方式二"), + "fangshiyi": MessageLookupByLibrary.simpleMessage("方式一"), + "fanhuiduihuanlishi": MessageLookupByLibrary.simpleMessage("返回兌換歷史"), + "fanhuishequn": MessageLookupByLibrary.simpleMessage("返回社群"), + "fanhuishouye": MessageLookupByLibrary.simpleMessage("返回首頁"), + "fankui": MessageLookupByLibrary.simpleMessage("反饋"), + "fankuilizi": + MessageLookupByLibrary.simpleMessage("您可以在這裡輸入迴響內容,例如產品建議,功能异常等"), + "fantizhongwen": MessageLookupByLibrary.simpleMessage("繁体中文"), + "fapiao": MessageLookupByLibrary.simpleMessage("發票"), + "fapiaozhushou": MessageLookupByLibrary.simpleMessage("發票助手"), + "fasong": MessageLookupByLibrary.simpleMessage("發送"), + "fasongduanxin": MessageLookupByLibrary.simpleMessage("發送短信"), + "faxingshijian": m4, + "feishiwuduihuanma": MessageLookupByLibrary.simpleMessage("非實物兌換碼"), + "feishiwushangpin": + MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用!"), + "fensi": MessageLookupByLibrary.simpleMessage("粉絲"), + "fenxiang": MessageLookupByLibrary.simpleMessage("分享"), + "fenxiangdao": MessageLookupByLibrary.simpleMessage("分享到"), + "fenxiangjiankang": MessageLookupByLibrary.simpleMessage("分享健康"), + "fenxiangyaoqing": + MessageLookupByLibrary.simpleMessage("也可以直接點擊右上方的分享給到你想要邀請的人。"), + "fenxiangyaoqingma": MessageLookupByLibrary.simpleMessage( + "將邀請碼分享給好友,對方在一心回鄉App登入頁輸入邀請碼,即可邀請成功。"), + "fenxiangzhiweixin": MessageLookupByLibrary.simpleMessage("分享至微信"), + "fukashoujihao": MessageLookupByLibrary.simpleMessage("副卡手機號"), + "fuliduihuan": MessageLookupByLibrary.simpleMessage("福利兌換"), + "fulizhongxin": MessageLookupByLibrary.simpleMessage("福利中心"), + "ge": m5, + "geiwopingfen": MessageLookupByLibrary.simpleMessage("給我評分"), + "gengduo": MessageLookupByLibrary.simpleMessage("更多"), + "gengduohaoquan": MessageLookupByLibrary.simpleMessage("更多好券"), + "gengduoyouhuiquan": MessageLookupByLibrary.simpleMessage("更多優惠券"), + "genggaibangdingshoujihao": + MessageLookupByLibrary.simpleMessage("更改綁定手機號"), + "genghuanbeijing": MessageLookupByLibrary.simpleMessage("更換背景"), + "genghuantouxiang": MessageLookupByLibrary.simpleMessage("更換頭像"), + "gengyouhui": MessageLookupByLibrary.simpleMessage("更優惠"), + "gerenxinxi": MessageLookupByLibrary.simpleMessage("個人信息"), + "gexingqianming": MessageLookupByLibrary.simpleMessage("個性簽名"), + "gong": MessageLookupByLibrary.simpleMessage("共"), + "gongchuanghuiyuan": MessageLookupByLibrary.simpleMessage("共创会员"), + "gongjijian": m6, + "gongjijianshangpin": m7, + "gongli": m8, + "gongxinchengwei": MessageLookupByLibrary.simpleMessage("恭喜您成爲"), + "gongxinichengweibendianhuiyuan": + MessageLookupByLibrary.simpleMessage("恭喜您,成為本店會員,快去享受超多的會員權益吧。"), + "gouxuanxieyi": + MessageLookupByLibrary.simpleMessage("請勾選同意隱私服務和一心回鄉服務協定"), + "guanlidizhi": MessageLookupByLibrary.simpleMessage("管理地址"), + "guanyu": MessageLookupByLibrary.simpleMessage("關於"), + "guanyuchuangshiren": MessageLookupByLibrary.simpleMessage("關於創始人"), + "guanyuhuixiang": MessageLookupByLibrary.simpleMessage("關於回鄉"), + "guanzhu": MessageLookupByLibrary.simpleMessage("關注"), + "guojiankangyoujishenghuo": + MessageLookupByLibrary.simpleMessage("過健康有機生活"), + "haimeiyouxiaoxi": MessageLookupByLibrary.simpleMessage("還沒有消息~"), + "haimeiyouyouhuiquankeyilingqu": + MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"), + "haixiajiemei": MessageLookupByLibrary.simpleMessage("海峽姐妹"), + "haowu": MessageLookupByLibrary.simpleMessage("好物"), + "haoyoujiangliguize": MessageLookupByLibrary.simpleMessage("好友獎勵規則"), + "he": MessageLookupByLibrary.simpleMessage("喝"), + "heji": MessageLookupByLibrary.simpleMessage("合計:"), + "hejiankang": MessageLookupByLibrary.simpleMessage("喝健康"), + "hexiaochenggong": MessageLookupByLibrary.simpleMessage("核銷成功"), + "hexiaomaxiangqing": MessageLookupByLibrary.simpleMessage("核銷碼詳情"), + "huangjin": MessageLookupByLibrary.simpleMessage("黄金"), + "huangjinhuiyuan": MessageLookupByLibrary.simpleMessage("黃金會員"), + "huifu": MessageLookupByLibrary.simpleMessage("回復"), + "huifu_": m9, + "huixiangVIPka": MessageLookupByLibrary.simpleMessage("回鄉VIP卡"), + "huixiangqianbao": MessageLookupByLibrary.simpleMessage("回鄉錢包"), + "huixiangrenyimendian": + MessageLookupByLibrary.simpleMessage("适用于:海峡姐妹任意门店"), + "huixiangtoutiao": MessageLookupByLibrary.simpleMessage("回鄉頭條"), + "huixiangvipkazhuanxiang": + MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"), + "huixiangxieyi": MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"), + "huiyuandengji": MessageLookupByLibrary.simpleMessage("會員等級"), + "huiyuandengjishuoming": MessageLookupByLibrary.simpleMessage("會員等級説明"), + "huiyuanguize": MessageLookupByLibrary.simpleMessage("會員規則説明"), + "huiyuanhuodejifen": MessageLookupByLibrary.simpleMessage("會員如何獲得積分"), + "huiyuanjia": MessageLookupByLibrary.simpleMessage("會員價"), + "huiyuanjibieduizhao": MessageLookupByLibrary.simpleMessage("會員級別對照表"), + "huiyuanjifen": MessageLookupByLibrary.simpleMessage("會員積分"), + "huiyuanka": MessageLookupByLibrary.simpleMessage("會員卡"), + "huiyuankaxiangqing": MessageLookupByLibrary.simpleMessage("會員卡詳情"), + "huiyuanma": MessageLookupByLibrary.simpleMessage("會員碼"), + "huiyuanquanyi": MessageLookupByLibrary.simpleMessage("會員權益"), + "huiyuanyue": MessageLookupByLibrary.simpleMessage("會員餘額"), + "huiyuanzhongxin": MessageLookupByLibrary.simpleMessage("會員中心"), + "huiyuanzhuanxiangjiage": + MessageLookupByLibrary.simpleMessage("會員專享價格"), + "huode": MessageLookupByLibrary.simpleMessage("獲得"), + "huodequanyi": MessageLookupByLibrary.simpleMessage("獲得權益"), + "huodong": MessageLookupByLibrary.simpleMessage("活動"), + "huodongguize": MessageLookupByLibrary.simpleMessage("活動規則"), + "huodongjianmianpeisongfei": m10, + "huodongjinxingzhong": MessageLookupByLibrary.simpleMessage("活動進行中"), + "huodongliebiao": MessageLookupByLibrary.simpleMessage("活動列表"), + "huodongyue": MessageLookupByLibrary.simpleMessage("活動餘額"), + "huodongyue_": m11, + "huodongzixun": MessageLookupByLibrary.simpleMessage("活動資訊"), + "huopinyisongda": MessageLookupByLibrary.simpleMessage("貨品已送達"), + "huozan": MessageLookupByLibrary.simpleMessage("獲贊"), + "input_code": MessageLookupByLibrary.simpleMessage("手機驗證碼"), + "input_code_hide": MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "input_invite_code_hide": MessageLookupByLibrary.simpleMessage("填寫邀請碼"), + "input_phone": MessageLookupByLibrary.simpleMessage("輸入手機號"), + "input_phone_hide": MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), + "invite_code_error": MessageLookupByLibrary.simpleMessage("邀請碼輸入錯誤"), + "jiajifen": m12, + "jian": MessageLookupByLibrary.simpleMessage("件"), + "jiangli": MessageLookupByLibrary.simpleMessage("獎勵"), + "jiangshi": MessageLookupByLibrary.simpleMessage("講師"), + "jianjie": m13, + "jiazaishibai": MessageLookupByLibrary.simpleMessage("加載失敗"), + "jiesuan": MessageLookupByLibrary.simpleMessage("結算"), + "jiesuanjine": MessageLookupByLibrary.simpleMessage("結算金額"), + "jifen": MessageLookupByLibrary.simpleMessage("積分"), + "jifen_": m14, + "jifenbuzu": MessageLookupByLibrary.simpleMessage("您的積分不足"), + "jifendaoxiayidengji": m15, + "jifendejisuanshuoming": + MessageLookupByLibrary.simpleMessage("積分的計算説明"), + "jifendidaogao": MessageLookupByLibrary.simpleMessage("積分從低到高"), + "jifengaodaodi": MessageLookupByLibrary.simpleMessage("積分從高到低"), + "jifenhuanquan": MessageLookupByLibrary.simpleMessage("積分換券"), + "jifenmingxi": MessageLookupByLibrary.simpleMessage("積分明細"), + "jifenshangcheng": MessageLookupByLibrary.simpleMessage("積分商城"), + "jifenxiangqing": MessageLookupByLibrary.simpleMessage("積分詳情"), + "jihuanka": MessageLookupByLibrary.simpleMessage("集換卡"), + "jingbilianmenghuiyuandian": + MessageLookupByLibrary.simpleMessage("淨弼聯盟會員店"), + "jingxuanhaowen": MessageLookupByLibrary.simpleMessage("精選好文"), + "jingxuanhuodong": MessageLookupByLibrary.simpleMessage("精選活動"), + "jinkahuiyuan": MessageLookupByLibrary.simpleMessage("金卡会员"), + "jinrihuiyuanrenwu": MessageLookupByLibrary.simpleMessage("今日會員任務"), + "jinrushangdian": MessageLookupByLibrary.simpleMessage("進入商店"), + "jinruzhuanqu": MessageLookupByLibrary.simpleMessage("進入專區"), + "jinxingbangdingfuka": MessageLookupByLibrary.simpleMessage("進行綁定副卡"), + "jinxingfukabangding": MessageLookupByLibrary.simpleMessage("進行副卡綁定"), + "jinxingzhanghaozhuxiao": + MessageLookupByLibrary.simpleMessage("進行賬號注銷"), + "jinxingzhongdedingdan": MessageLookupByLibrary.simpleMessage("進行中的訂單"), + "jituanchuangbanren": MessageLookupByLibrary.simpleMessage("集团创办人"), + "jituanchuangshiren": MessageLookupByLibrary.simpleMessage("集團創始人"), + "jixuduihuan": MessageLookupByLibrary.simpleMessage("继续兑换"), + "jixuzhifu": MessageLookupByLibrary.simpleMessage("繼續支付"), + "jubao": MessageLookupByLibrary.simpleMessage("舉報"), + "jubaogaineirong": MessageLookupByLibrary.simpleMessage("舉報該内容"), + "jubaotishi": MessageLookupByLibrary.simpleMessage( + "您的舉報正在等待人工稽核,我們會在7~15個工作日處理,處理結果可在"), + "jubaoyuanyin": + MessageLookupByLibrary.simpleMessage("請輸入舉報原因,以便我們更快定位問題,快速處理"), + "jujue": MessageLookupByLibrary.simpleMessage("拒絕"), + "kabao": MessageLookupByLibrary.simpleMessage("卡包"), + "kabaokeshiyong": MessageLookupByLibrary.simpleMessage("卡包-可使用"), + "kaiqiquanxian": MessageLookupByLibrary.simpleMessage("開啓權限"), + "kaitonghuixianghuoququanyi": + MessageLookupByLibrary.simpleMessage("開通回鄉VIP卡獲取更多權益"), + "kaitongriqi": m16, + "kaquan": MessageLookupByLibrary.simpleMessage("卡券"), + "kelingqudeyouhuiquan": MessageLookupByLibrary.simpleMessage("可領取的卡券"), + "keshiyong": MessageLookupByLibrary.simpleMessage("可使用"), + "keyongjifen": MessageLookupByLibrary.simpleMessage("可用积分"), + "keyongquan": MessageLookupByLibrary.simpleMessage("可用券"), + "keyongyouhuiquan": MessageLookupByLibrary.simpleMessage("可用優惠券"), + "keyongyue": MessageLookupByLibrary.simpleMessage("可用餘額"), + "kongtiao": MessageLookupByLibrary.simpleMessage("空調"), + "kuaidi": MessageLookupByLibrary.simpleMessage("快遞"), + "kuaidiwuliu": MessageLookupByLibrary.simpleMessage("快遞物流"), + "kuailezhunong": MessageLookupByLibrary.simpleMessage("快樂助農"), + "lianxikefu": MessageLookupByLibrary.simpleMessage("聯系客服"), + "lianxishoujihao": MessageLookupByLibrary.simpleMessage("聯繫手機號"), + "lianxuqiandaolingqushuangbeijifen": + MessageLookupByLibrary.simpleMessage("連續簽到領取雙倍積分"), + "liaojie": MessageLookupByLibrary.simpleMessage("瞭解"), + "liaojiejiankang": MessageLookupByLibrary.simpleMessage("瞭解健康"), + "lijicanjia": MessageLookupByLibrary.simpleMessage("立即參加"), + "lijichongzhi": MessageLookupByLibrary.simpleMessage("立即充值"), + "lijigengxin": MessageLookupByLibrary.simpleMessage("立即更新"), + "lijikaitong": MessageLookupByLibrary.simpleMessage("立即開通"), + "lijilingqu": MessageLookupByLibrary.simpleMessage("立即領取"), + "lijiqiandao": MessageLookupByLibrary.simpleMessage("立即簽到"), + "lijishiyong": MessageLookupByLibrary.simpleMessage("立即使用"), + "lijitiyan": MessageLookupByLibrary.simpleMessage("立即體驗"), + "lijiyuyue": MessageLookupByLibrary.simpleMessage("立即預約"), + "likekaitong": MessageLookupByLibrary.simpleMessage("立刻開通"), + "likexufei": MessageLookupByLibrary.simpleMessage("立刻續費"), + "likezhifu": MessageLookupByLibrary.simpleMessage("立刻支付"), + "lingqu": MessageLookupByLibrary.simpleMessage("領取"), + "lingquanzhongxin": MessageLookupByLibrary.simpleMessage("領券中心"), + "lingquchenggong": MessageLookupByLibrary.simpleMessage("領取成功"), + "lingqudaokabao": MessageLookupByLibrary.simpleMessage("領取到卡包"), + "lingqufangshi": MessageLookupByLibrary.simpleMessage("领取方式"), + "lingqushijian": m17, + "linian": MessageLookupByLibrary.simpleMessage("理念"), + "lishijilu": MessageLookupByLibrary.simpleMessage("歷史記錄"), + "liuxianinjingcaidepinglunba": + MessageLookupByLibrary.simpleMessage("留下您精彩的評論吧"), + "login": MessageLookupByLibrary.simpleMessage("登錄"), + "login_splash": MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"), + "lvbiyue": MessageLookupByLibrary.simpleMessage("綠幣餘額"), + "lvbiyue_": m18, + "lvbizhifu": MessageLookupByLibrary.simpleMessage("綠幣支付"), + "main_menu1": MessageLookupByLibrary.simpleMessage("首頁"), + "main_menu2": MessageLookupByLibrary.simpleMessage("門店"), + "main_menu3": MessageLookupByLibrary.simpleMessage("社群"), + "main_menu4": MessageLookupByLibrary.simpleMessage("我的"), + "main_menu5": MessageLookupByLibrary.simpleMessage("hi"), + "manlijiandaijinquan": m19, + "manyuankeyong": m20, + "meiriqiandao": MessageLookupByLibrary.simpleMessage("每日簽到"), + "meiyougengduohuiyuanka": + MessageLookupByLibrary.simpleMessage("沒有更多會員卡"), + "meiyougengduoshujule": MessageLookupByLibrary.simpleMessage("沒有更多數據了"), + "meiyougengduoyouhuiquan": + MessageLookupByLibrary.simpleMessage("没有更多优惠券了"), + "meizhousangengxin": MessageLookupByLibrary.simpleMessage("每週三更新"), + "meizhousanquanbao": MessageLookupByLibrary.simpleMessage("每週三更新劵包"), + "mendianxuanzhe": MessageLookupByLibrary.simpleMessage("门店选择"), + "mendianyue": MessageLookupByLibrary.simpleMessage("門店餘額"), + "menpaihao": MessageLookupByLibrary.simpleMessage("請輸入門牌號"), + "mi": m21, + "mingxi": MessageLookupByLibrary.simpleMessage("明細"), + "morenpaixu": MessageLookupByLibrary.simpleMessage("默認排序"), + "muqianwujilu": MessageLookupByLibrary.simpleMessage("目前暫無記錄哦"), + "muqianzanwuxingdianhuodong": + MessageLookupByLibrary.simpleMessage("目前暫無星店活動"), + "nihaimeiyouchongzhihuoxiaofeijilu": + MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"), + "nincunchuquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启存储权限,请点击开启"), + "nindingweigongnengweikaiqi": + MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), + "nindingweiquanxianweiyunxu": + MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), + "ninweidenglu": MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"), + "ninxiangjiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启相机权限,请点击开启"), + "ninxiaoxiquanxianweikaiqi": + MessageLookupByLibrary.simpleMessage("您未开启消息通知权限,请点击开启"), + "ninyichenggonglingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("您已成功領取優惠券,請在"), + "ninyilianxuqiandaotian": m22, + "ninyouyigedingdanyaolingqu": + MessageLookupByLibrary.simpleMessage("您有一個訂單需要前往門店領取"), + "ninyouyigexindedingdan": + MessageLookupByLibrary.simpleMessage("您有一個新訂單"), + "paizhao": MessageLookupByLibrary.simpleMessage("拍照"), + "peisong": MessageLookupByLibrary.simpleMessage("配送"), + "peisongfangshi": MessageLookupByLibrary.simpleMessage("配送方式"), + "peisongfei": MessageLookupByLibrary.simpleMessage("配送費"), + "peisongfuwu": MessageLookupByLibrary.simpleMessage("配送服務"), + "peisongzhong": MessageLookupByLibrary.simpleMessage("配送中"), + "phone_error": MessageLookupByLibrary.simpleMessage("手機格式錯誤"), + "pinglun": MessageLookupByLibrary.simpleMessage("評論"), + "pinglun_": m23, + "pingtaiyue": MessageLookupByLibrary.simpleMessage("平臺餘額"), + "pingtaizhifumima": MessageLookupByLibrary.simpleMessage("平臺支付密碼"), + "pinpai": MessageLookupByLibrary.simpleMessage("品牌"), + "pinpaijieshao": MessageLookupByLibrary.simpleMessage("品牌介紹"), + "privacy_policy1": MessageLookupByLibrary.simpleMessage("登錄既同意"), + "privacy_policy2": MessageLookupByLibrary.simpleMessage("《一心回鄉服務協議》"), + "privacy_policy3": MessageLookupByLibrary.simpleMessage("《隱私服務》"), + "privacy_policy4": MessageLookupByLibrary.simpleMessage("并使用本機號碼登錄"), + "qianbao": MessageLookupByLibrary.simpleMessage("錢包"), + "qiandao": MessageLookupByLibrary.simpleMessage("簽到"), + "qiandaodejifen": MessageLookupByLibrary.simpleMessage("簽到得積分"), + "qiandaolingjifen": MessageLookupByLibrary.simpleMessage("簽到領積分"), + "qiandaolingqujinfen": MessageLookupByLibrary.simpleMessage("簽到領取積分"), + "qiandaowancheng": MessageLookupByLibrary.simpleMessage("簽到完成"), + "qianjinmaiwei": MessageLookupByLibrary.simpleMessage("前進麥味"), + "qianshou": MessageLookupByLibrary.simpleMessage("已簽收"), + "qianwanghuixiangmendianduihuanhexiao": + MessageLookupByLibrary.simpleMessage( + "前往海峡姐妹旗下任意门店对工作人员出示商品兑换码,核实无误后,可领取对应商品"), + "qinglihuancun": MessageLookupByLibrary.simpleMessage("清理緩存"), + "qingshurubeizhuyaoqiu": + MessageLookupByLibrary.simpleMessage("請輸入備注要求"), + "qingshuruchongzhijine": + MessageLookupByLibrary.simpleMessage("請輸入充值金額"), + "qingshurushoujihao": MessageLookupByLibrary.simpleMessage("請輸入手機號碼"), + "qingshuruyanzhengma": MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), + "qingshuruyaoqingma": MessageLookupByLibrary.simpleMessage("請輸入邀請碼"), + "qingshuruyouxiaoshoujihaoma": + MessageLookupByLibrary.simpleMessage("請輸入您的有效手機號"), + "qingshuruzhifumima": MessageLookupByLibrary.simpleMessage("請輸入支付密碼"), + "qingtianxieshoujihao": + MessageLookupByLibrary.simpleMessage("請填寫收件人手機號"), + "qingtianxiexingming": MessageLookupByLibrary.simpleMessage("請填寫收件人姓名"), + "qingtong": MessageLookupByLibrary.simpleMessage("青铜"), + "qingtonghuiyuan": MessageLookupByLibrary.simpleMessage("青銅會員"), + "qingxianxuanguige": MessageLookupByLibrary.simpleMessage("請先選規格"), + "qingxuanzeshiyongmendian": + MessageLookupByLibrary.simpleMessage("請選擇使用門店"), + "qingxuanzeshouhuodizhi": + MessageLookupByLibrary.simpleMessage("請選擇收貨地址"), + "qingxuanzeyigemendian": + MessageLookupByLibrary.simpleMessage("請選擇一個門店"), + "qingxuanzeyuyeushijian": + MessageLookupByLibrary.simpleMessage("請選擇預約時間"), + "qingxuanzeyuyuemendian": + MessageLookupByLibrary.simpleMessage("請選擇預約門店"), + "qingxuanzhemendian": MessageLookupByLibrary.simpleMessage("请选择门店"), + "qingxuanzheninxiangshezhideyuyan": + MessageLookupByLibrary.simpleMessage("請選擇您要設置的語言"), + "qingzaiguidingshijianneizhifu": + MessageLookupByLibrary.simpleMessage("請在規定時間内完成支付"), + "qingzhuo": MessageLookupByLibrary.simpleMessage("清桌"), + "qishoupeisongzhongyujisongdashijian": + MessageLookupByLibrary.simpleMessage("騎手配送中,預計送達時間"), + "qishouyijiedanquhuozhong": + MessageLookupByLibrary.simpleMessage("騎手已接單、取貨中"), + "qita": MessageLookupByLibrary.simpleMessage("其他"), + "qiyetuanjian": MessageLookupByLibrary.simpleMessage("企業團建"), + "quanbao": MessageLookupByLibrary.simpleMessage("券包"), + "quanbu": MessageLookupByLibrary.simpleMessage("全部"), + "quanbudingdan": MessageLookupByLibrary.simpleMessage("全部訂單"), + "quanbuduihuan": MessageLookupByLibrary.simpleMessage("全部兌換"), + "quanchangtongyong": MessageLookupByLibrary.simpleMessage("全場通用"), + "quanchangzhe": m25, + "quantian": MessageLookupByLibrary.simpleMessage("全天"), + "quanxian": MessageLookupByLibrary.simpleMessage("權限"), + "quanxianshezhi": MessageLookupByLibrary.simpleMessage("權限設置"), + "quanyijishao": MessageLookupByLibrary.simpleMessage("權益介紹"), + "quanyishuoming": MessageLookupByLibrary.simpleMessage("權益説明"), + "quanyixiangqing": MessageLookupByLibrary.simpleMessage("權益詳情"), + "qucanhao": MessageLookupByLibrary.simpleMessage("取餐號"), + "qudanhao": m26, + "qudaolaiyuan": MessageLookupByLibrary.simpleMessage("渠道來源"), + "qudenglu": MessageLookupByLibrary.simpleMessage("去登錄"), + "queding": MessageLookupByLibrary.simpleMessage("確定"), + "quedingyaoshanchudongtai": + MessageLookupByLibrary.simpleMessage("確定要刪除這條動態?"), + "queren": MessageLookupByLibrary.simpleMessage("确认"), + "querenbangding": MessageLookupByLibrary.simpleMessage("確認綁定"), + "querenchongzhi": MessageLookupByLibrary.simpleMessage("確認充值"), + "querenduihuan": MessageLookupByLibrary.simpleMessage("确认兑换"), + "querenshouhuo": MessageLookupByLibrary.simpleMessage("確認收貨"), + "querenyaoshanchudangqianpinglunma": + MessageLookupByLibrary.simpleMessage("確認要刪除當前評論嗎?"), + "querenzhuxiao": MessageLookupByLibrary.simpleMessage("確認注銷"), + "quhexiao": MessageLookupByLibrary.simpleMessage("去核銷"), + "quhuozhong": MessageLookupByLibrary.simpleMessage("取貨中"), + "qujianma": MessageLookupByLibrary.simpleMessage("取件碼"), + "quqiandao": MessageLookupByLibrary.simpleMessage("去簽到"), + "qushiyong": MessageLookupByLibrary.simpleMessage("去使用"), + "quwancheng": MessageLookupByLibrary.simpleMessage(" 去完成 "), + "quxiao": MessageLookupByLibrary.simpleMessage("取消"), + "quxiaodingdan": MessageLookupByLibrary.simpleMessage("取消訂單"), + "quxiaozhifu": MessageLookupByLibrary.simpleMessage("取消支付"), + "quzhifu": MessageLookupByLibrary.simpleMessage("去支付"), + "remenwenzhangshipin": MessageLookupByLibrary.simpleMessage("熱門文章視頻"), + "remenwenzhangshipinliebiao": + MessageLookupByLibrary.simpleMessage("熱門文章視頻清單"), + "ren": m27, + "renwuzhongxin": MessageLookupByLibrary.simpleMessage("任務中心"), + "resend_in_seconds": m28, + "ricahngfenxiang": MessageLookupByLibrary.simpleMessage("日常分享"), + "ruhedihuanjifen": MessageLookupByLibrary.simpleMessage("如何兌換積分"), + "ruhedihuanjifen1": MessageLookupByLibrary.simpleMessage( + "點擊淨弼,進入積分商城,點擊你想兌換的領商品,進入商品詳情後點擊下方兌換,即可兌換哦~"), + "ruhelingquyouhuiquan": + MessageLookupByLibrary.simpleMessage("如何領取優惠券?"), + "ruhelingquyouhuiquan1": MessageLookupByLibrary.simpleMessage( + "點擊我的,進入我的頁面後,點擊下方的領取中心,進入后即可領取優惠券哦~"), + "ruheqiandao": MessageLookupByLibrary.simpleMessage("如何簽到?"), + "ruheqiandao1": MessageLookupByLibrary.simpleMessage( + "1.點擊淨弼,進入首頁,點擊上方的去簽到。\n2.點擊我的,進入我的頁面,點擊上方的積分詳情,進入後即可簽到。"), + "ruxutuikuanqingyumendianlianxi": MessageLookupByLibrary.simpleMessage( + "如需退款,請您提前準備好訂單號/取單號,並與門店人員進行聯繫"), + "saoma": MessageLookupByLibrary.simpleMessage("掃碼"), + "saomadiancan": MessageLookupByLibrary.simpleMessage("您即將進行掃碼點餐"), + "saomashibieguanzhugongzonghao": + MessageLookupByLibrary.simpleMessage("掃碼識別,關注公眾號"), + "send_code": MessageLookupByLibrary.simpleMessage("發送驗證碼"), + "shanchu": MessageLookupByLibrary.simpleMessage("刪除"), + "shanchudingdan": MessageLookupByLibrary.simpleMessage("刪除訂單"), + "shanghuruzhu": MessageLookupByLibrary.simpleMessage("商戶入駐"), + "shangjiaquan": MessageLookupByLibrary.simpleMessage("商家券"), + "shangjiaqueren": MessageLookupByLibrary.simpleMessage("商家確認"), + "shangjiayifahuo": MessageLookupByLibrary.simpleMessage("商家已發貨"), + "shangjiazhengzaipeican": + MessageLookupByLibrary.simpleMessage("商家正在配餐"), + "shanglajiazai": MessageLookupByLibrary.simpleMessage("上拉加載"), + "shangpincaigou": MessageLookupByLibrary.simpleMessage("商品採購"), + "shangpinjifen": m29, + "shangpinxiangqing": MessageLookupByLibrary.simpleMessage("商品詳情"), + "shangyidengji": MessageLookupByLibrary.simpleMessage("上一等級"), + "shenghuoyule": MessageLookupByLibrary.simpleMessage("生活娛樂"), + "shengxianzhaipei": MessageLookupByLibrary.simpleMessage("生鮮宅配"), + "shenmijifendali": MessageLookupByLibrary.simpleMessage("神秘積分大禮"), + "shenqingtuikuan": MessageLookupByLibrary.simpleMessage("申請退款"), + "shezhi": MessageLookupByLibrary.simpleMessage("設置"), + "shifangjiazaigengduo": MessageLookupByLibrary.simpleMessage("釋放加載更多"), + "shifangshuaxin": MessageLookupByLibrary.simpleMessage("釋放刷新"), + "shifujifen": m30, + "shifujihuanka": m31, + "shimingrenzheng": MessageLookupByLibrary.simpleMessage("實名認證"), + "shixiaoquan": MessageLookupByLibrary.simpleMessage("失效券"), + "shixiaoyouhuiquan": MessageLookupByLibrary.simpleMessage("失效优惠券"), + "shiyongbangzhu": MessageLookupByLibrary.simpleMessage("使用幫助"), + "shiyongmendian": MessageLookupByLibrary.simpleMessage("適用門店"), + "shiyongriqi": MessageLookupByLibrary.simpleMessage("使用日期"), + "shiyongshuoming": MessageLookupByLibrary.simpleMessage("使用说明"), + "shiyongtiaojian": MessageLookupByLibrary.simpleMessage("使用条件"), + "shiyongxiangqing": MessageLookupByLibrary.simpleMessage("使用詳情"), + "shouhuodi": MessageLookupByLibrary.simpleMessage("收貨地址"), + "shouhuodizhi": MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"), + "shouhuodizhi1": MessageLookupByLibrary.simpleMessage("收貨地址"), + "shouhuorenshoujihao": + MessageLookupByLibrary.simpleMessage("請輸入收貨人手機號"), + "shouhuorenxiangxidizhi": + MessageLookupByLibrary.simpleMessage("請輸入收貨人詳細地址"), + "shouhuorenxingming": MessageLookupByLibrary.simpleMessage("請輸入收貨人姓名"), + "shoujihao": MessageLookupByLibrary.simpleMessage("手機號"), + "shouqi": MessageLookupByLibrary.simpleMessage("收起"), + "shouye": MessageLookupByLibrary.simpleMessage("首頁"), + "shuaxin": MessageLookupByLibrary.simpleMessage("刷新"), + "shuaxinchenggong": MessageLookupByLibrary.simpleMessage("刷新成功"), + "shuaxinshibai": MessageLookupByLibrary.simpleMessage("刷新失敗"), + "shuaxinyue": MessageLookupByLibrary.simpleMessage("刷新餘額"), + "shuaxinzhong": MessageLookupByLibrary.simpleMessage("刷新中...."), + "shuliang": MessageLookupByLibrary.simpleMessage("數量"), + "shurushouhuorendizhi": + MessageLookupByLibrary.simpleMessage("請輸入收貨人地址"), + "shuruzhifumima": MessageLookupByLibrary.simpleMessage("輸入支付密碼"), + "sui": m32, + "tangshi": MessageLookupByLibrary.simpleMessage("堂食"), + "tebieshengming": MessageLookupByLibrary.simpleMessage("特別聲明"), + "tehuizhuanqu": MessageLookupByLibrary.simpleMessage("特惠專區"), + "tianjiaxinfuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tianjifuka": MessageLookupByLibrary.simpleMessage("添加新副卡"), + "tiantiandefuli": MessageLookupByLibrary.simpleMessage("天天得福利"), + "tiantianlingjifen": MessageLookupByLibrary.simpleMessage("天天領積分"), + "tijiao": MessageLookupByLibrary.simpleMessage("提交"), + "tijiaochenggong": MessageLookupByLibrary.simpleMessage("提交成功"), + "tingchewei": MessageLookupByLibrary.simpleMessage("停車位"), + "tixian": MessageLookupByLibrary.simpleMessage("提現"), + "tongyibingjixu": MessageLookupByLibrary.simpleMessage("同意並繼續"), + "tongzhi": MessageLookupByLibrary.simpleMessage("通知"), + "tongzhitishixinxi": MessageLookupByLibrary.simpleMessage( + "為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), + "toushuxuzhi": MessageLookupByLibrary.simpleMessage("投書須知"), + "touxiang": MessageLookupByLibrary.simpleMessage("頭像"), + "tuichudenglu": MessageLookupByLibrary.simpleMessage("退出登錄"), + "tuiguangma": MessageLookupByLibrary.simpleMessage("推廣碼"), + "tuikuan": MessageLookupByLibrary.simpleMessage("退款"), + "waidai": MessageLookupByLibrary.simpleMessage("外帶"), + "waimai": MessageLookupByLibrary.simpleMessage("外賣"), + "waimaipeisong": MessageLookupByLibrary.simpleMessage("外賣配送"), + "waisong": MessageLookupByLibrary.simpleMessage("外送"), + "wan": MessageLookupByLibrary.simpleMessage("玩"), + "wancheng": MessageLookupByLibrary.simpleMessage("完成"), + "wancheng_": m33, + "wanchengyicixiadan": MessageLookupByLibrary.simpleMessage("完成一次下單"), + "wangjimima": MessageLookupByLibrary.simpleMessage("忘記密碼"), + "wanjiankang": MessageLookupByLibrary.simpleMessage("玩健康"), + "wanshanshengrixinxi_nl": + MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "), + "wanshanshengrixinxi_yhq": + MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "), + "weidenglu": MessageLookupByLibrary.simpleMessage("未登錄"), + "weidengluxinxi": MessageLookupByLibrary.simpleMessage("點擊登錄,享受更多精彩資訊"), + "weihexiao": MessageLookupByLibrary.simpleMessage("未核銷"), + "weikaiqi": MessageLookupByLibrary.simpleMessage("未開啓"), + "weilegeiningenghaodefuwu": MessageLookupByLibrary.simpleMessage( + "為了給您提供更好的服務,以及享受更加精彩的信息內容,請在使用使用期間登錄"), + "weilejishishoudaohuodongxiaoxi": + MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,请您开启消息通知权限"), + "weilekaipaizhaoxuanzhetouxiang": + MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中更换头像,请您开启相机使用权限"), + "weilexiangnintuijianfujindemendianxinxi": + MessageLookupByLibrary.simpleMessage( + "為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息"), + "weilexuanzhezhaopianhuancun": MessageLookupByLibrary.simpleMessage( + "为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"), + "weiwancheng": MessageLookupByLibrary.simpleMessage(" 未完成 "), + "weixinzhifu": MessageLookupByLibrary.simpleMessage("微信支付"), + "weizhitishixinxi": MessageLookupByLibrary.simpleMessage( + "為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"), + "wentijian": MessageLookupByLibrary.simpleMessage("問題件"), + "wenzhang": MessageLookupByLibrary.simpleMessage("文章"), + "wenzhangxiangqing": MessageLookupByLibrary.simpleMessage("文章詳情"), + "wenzhangzhuanlan": MessageLookupByLibrary.simpleMessage("文章專欄"), + "weulingqu": MessageLookupByLibrary.simpleMessage("未領取"), + "wodechengjiu": MessageLookupByLibrary.simpleMessage("我的成就"), + "wodedingdan": MessageLookupByLibrary.simpleMessage("我的訂單"), + "wodedongtai": MessageLookupByLibrary.simpleMessage("我的動態"), + "wodegongju": MessageLookupByLibrary.simpleMessage("我的工具"), + "wodehuiyuandengji": MessageLookupByLibrary.simpleMessage("我的會員等級"), + "wodejifenzhi": MessageLookupByLibrary.simpleMessage("我的積分值"), + "wodekanjia": MessageLookupByLibrary.simpleMessage("我的砍價"), + "wodekaquan": MessageLookupByLibrary.simpleMessage("我的卡券"), + "wodenianling": MessageLookupByLibrary.simpleMessage("我的年齡"), + "wodepintuan": MessageLookupByLibrary.simpleMessage("我的拼團"), + "wodeqianbao": MessageLookupByLibrary.simpleMessage("我的錢包"), + "wodeshengri": MessageLookupByLibrary.simpleMessage("我的生日"), + "wodexiaoxi": MessageLookupByLibrary.simpleMessage("我的消息"), + "wodeyaoqing": MessageLookupByLibrary.simpleMessage("我的邀請"), + "wodeyaoqingma": MessageLookupByLibrary.simpleMessage("我的邀請碼"), + "woyouyaoqingma": MessageLookupByLibrary.simpleMessage("我有邀請碼"), + "wuliudanhao": MessageLookupByLibrary.simpleMessage("物流單號:"), + "wuliugongsi": MessageLookupByLibrary.simpleMessage("物流公司:"), + "wuliuxinxi": MessageLookupByLibrary.simpleMessage("物流信息"), + "wuliuzhuangtai": MessageLookupByLibrary.simpleMessage("物流狀態:"), + "xiadanshijian": MessageLookupByLibrary.simpleMessage("下單時間"), + "xiadanshijian_": m34, + "xiadanzhuanjifen": MessageLookupByLibrary.simpleMessage("下單賺積分"), + "xialashuaxin": MessageLookupByLibrary.simpleMessage("下拉刷新"), + "xiangce": MessageLookupByLibrary.simpleMessage("相冊"), + "xiangji": MessageLookupByLibrary.simpleMessage("相機"), + "xiangjitishixinxi": MessageLookupByLibrary.simpleMessage( + "為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "), + "xiangqing": MessageLookupByLibrary.simpleMessage("詳情"), + "xiangxidizhi": MessageLookupByLibrary.simpleMessage("詳細地址"), + "xianshangfafang": MessageLookupByLibrary.simpleMessage("綫上發放"), + "xianshangshiyong": MessageLookupByLibrary.simpleMessage("線上使用"), + "xianxiashiyong": MessageLookupByLibrary.simpleMessage("線下使用"), + "xiaofei": MessageLookupByLibrary.simpleMessage("消費"), + "xiaofeijifen": MessageLookupByLibrary.simpleMessage("消费积分"), + "xiaofeijihuanka": MessageLookupByLibrary.simpleMessage("消費集換卡"), + "xiaofeijilu": MessageLookupByLibrary.simpleMessage("消費記錄"), + "xiaoxi": MessageLookupByLibrary.simpleMessage("消息"), + "xiayidengji": MessageLookupByLibrary.simpleMessage("下一等級"), + "xiazaiwancheng": MessageLookupByLibrary.simpleMessage("加載完成"), + "xiedongtai": MessageLookupByLibrary.simpleMessage("寫動態"), + "xieyitanchuang": MessageLookupByLibrary.simpleMessage("一心回鄉用戶隱私協議"), + "xihuan_": m35, + "xindianhuodong": MessageLookupByLibrary.simpleMessage("星店活動"), + "xingming": MessageLookupByLibrary.simpleMessage("姓名"), + "xitongtongzhi": MessageLookupByLibrary.simpleMessage("系統通知"), + "xitongxiaoxi": MessageLookupByLibrary.simpleMessage("系統消息"), + "xiugai": MessageLookupByLibrary.simpleMessage("修改"), + "xiugaichenggong": MessageLookupByLibrary.simpleMessage("修改成功"), + "xiugaiyonghuming": MessageLookupByLibrary.simpleMessage("修改用戶名"), + "xuanguige": MessageLookupByLibrary.simpleMessage("選規格"), + "xuanhaola": MessageLookupByLibrary.simpleMessage("選好啦"), + "xuanji": MessageLookupByLibrary.simpleMessage("選集"), + "xuanzeshangpinlingqufangshi": + MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), + "xuanzetuijianmendian": MessageLookupByLibrary.simpleMessage("選擇推薦門店"), + "xuefeihuiyuan": MessageLookupByLibrary.simpleMessage("續費會員"), + "xuexijiankang": MessageLookupByLibrary.simpleMessage("學習健康"), + "xufeihuixiangVIP": MessageLookupByLibrary.simpleMessage("續費回鄉VIP"), + "xuni": MessageLookupByLibrary.simpleMessage("虛擬"), + "yanzhengma": MessageLookupByLibrary.simpleMessage("驗證碼"), + "yaoqinghaoyou": MessageLookupByLibrary.simpleMessage("邀請好友"), + "yaoqinghaoyoudefen": MessageLookupByLibrary.simpleMessage("邀請好友得分"), + "yaoqingrenshoujihao_": m36, + "yaoqingwancheng": MessageLookupByLibrary.simpleMessage("邀請完成"), + "yibangfuka": MessageLookupByLibrary.simpleMessage("已綁副卡"), + "yiduihuan": MessageLookupByLibrary.simpleMessage("已兌換"), + "yiduihuanjian": m37, + "yifahuo": MessageLookupByLibrary.simpleMessage("已發貨"), + "yiguanzhu": MessageLookupByLibrary.simpleMessage("已關注"), + "yihouzaishuo": MessageLookupByLibrary.simpleMessage("以後再說"), + "yihuide": MessageLookupByLibrary.simpleMessage("已獲得"), + "yihujiaoqishou": MessageLookupByLibrary.simpleMessage("已呼叫騎手"), + "yikaitongzidongxufei": MessageLookupByLibrary.simpleMessage("已開通自動續費"), + "yikexiao": MessageLookupByLibrary.simpleMessage("已核銷"), + "yilingqu": MessageLookupByLibrary.simpleMessage("已領取"), + "yindao1": MessageLookupByLibrary.simpleMessage("新增多項功能,海量優惠資訊實時推送"), + "yindao2": + MessageLookupByLibrary.simpleMessage("新增多項功能,使用平臺錢包優惠多多,更有充值優惠享不停"), + "yindao3": + MessageLookupByLibrary.simpleMessage("新增會員任務得積分,消費可得綠金、積分商城換購"), + "yindao4": MessageLookupByLibrary.simpleMessage("傳遞友愛純淨健康有機環保智慧理念"), + "yindaoye1": MessageLookupByLibrary.simpleMessage("會員最新資訊搶先看"), + "yindaoye2": MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"), + "yindaoye3": MessageLookupByLibrary.simpleMessage("會員活動專區"), + "yindaoye4": MessageLookupByLibrary.simpleMessage("過健康有機生活"), + "yingwen": MessageLookupByLibrary.simpleMessage("英文"), + "yingyeshijian": m38, + "yinkahuiyuan": MessageLookupByLibrary.simpleMessage("银卡会员"), + "yinshi": MessageLookupByLibrary.simpleMessage("飲食"), + "yinsishengming": MessageLookupByLibrary.simpleMessage("隱私聲明"), + "yinsixieyi": MessageLookupByLibrary.simpleMessage("《隱私協議》"), + "yinsizhengce1": MessageLookupByLibrary.simpleMessage( + " 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉"), + "yinsizhengce2": MessageLookupByLibrary.simpleMessage( + "     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。"), + "yinzhang": MessageLookupByLibrary.simpleMessage("印章"), + "yiqiandao": MessageLookupByLibrary.simpleMessage("已簽到"), + "yiqianshou": MessageLookupByLibrary.simpleMessage("已簽收"), + "yiquxiao": MessageLookupByLibrary.simpleMessage(" 已取消 "), + "yishijiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiming": MessageLookupByLibrary.simpleMessage("已实名"), + "yishixiao": MessageLookupByLibrary.simpleMessage("已失效"), + "yishiyong": MessageLookupByLibrary.simpleMessage("已使用"), + "yishouquan": MessageLookupByLibrary.simpleMessage("已授權"), + "yisongda": MessageLookupByLibrary.simpleMessage("已送達"), + "yituikuan": MessageLookupByLibrary.simpleMessage("已退款"), + "yiwancheng": MessageLookupByLibrary.simpleMessage(" 已完成 "), + "yiwanchengdingdan": MessageLookupByLibrary.simpleMessage("已完成订单"), + "yixianghuiyuanquanyi": MessageLookupByLibrary.simpleMessage("已享會員權益"), + "yixiansquanbupinglun": + MessageLookupByLibrary.simpleMessage("-已顯示全部評論-"), + "yixinhuixiang": MessageLookupByLibrary.simpleMessage("一心迴響"), + "yiyoujifen": MessageLookupByLibrary.simpleMessage("已有積分"), + "yizhifu": MessageLookupByLibrary.simpleMessage("已支付"), + "yonghuming": MessageLookupByLibrary.simpleMessage("用戶名"), + "yonghuxiaofeijifen": + MessageLookupByLibrary.simpleMessage("用戶每消費1元可獲得1個積分 。"), + "youhuiquan": MessageLookupByLibrary.simpleMessage("優惠券"), + "youhuiquanlingqu": MessageLookupByLibrary.simpleMessage("優惠券領取"), + "youhuiquanwufajileijifen": MessageLookupByLibrary.simpleMessage( + "優惠金額無法累積積分,訂單撤銷或其他原因造成的未成功支付的訂單,無法獲得對應的積分。"), + "youkedenglu": MessageLookupByLibrary.simpleMessage("遊客登錄"), + "youxiaoqi": m39, + "youxiaoqixian": MessageLookupByLibrary.simpleMessage("有效期限:"), + "youxiaoqizhi": m40, + "yuan": MessageLookupByLibrary.simpleMessage("元"), + "yuan_": m41, + "yuanjia": MessageLookupByLibrary.simpleMessage("原價"), + "yue": MessageLookupByLibrary.simpleMessage("餘額"), + "yue_": m42, + "yue__": m43, + "yuemingxi": MessageLookupByLibrary.simpleMessage("餘額明細"), + "yuliudianhua": MessageLookupByLibrary.simpleMessage("預留電話"), + "yunfei": MessageLookupByLibrary.simpleMessage("運費"), + "yuyan": MessageLookupByLibrary.simpleMessage("語言"), + "zailaiyidan": MessageLookupByLibrary.simpleMessage("再來一單"), + "zaituzhong": MessageLookupByLibrary.simpleMessage("運輸中"), + "zaixiankefu": MessageLookupByLibrary.simpleMessage("在線客服"), + "zanbuzhichixianshangdiancan": + MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"), + "zanweijiesuo": MessageLookupByLibrary.simpleMessage("暫未解鎖"), + "zanweikaifang": MessageLookupByLibrary.simpleMessage("暫未開放"), + "zanweikaitong": MessageLookupByLibrary.simpleMessage("暫未開通"), + "zanwupinglun": MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"), + "zanwuxianshangjindian": MessageLookupByLibrary.simpleMessage("暫無綫上門店"), + "zanwuyouhuiquankelingqu": + MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"), + "zhanghaoanquan": MessageLookupByLibrary.simpleMessage("賬號安全"), + "zhanghaoshouquan": MessageLookupByLibrary.simpleMessage("賬號授權"), + "zhanghaoxinxi": MessageLookupByLibrary.simpleMessage("賬號信息"), + "zhanghaoyuanquan": MessageLookupByLibrary.simpleMessage("賬號與安全"), + "zhanghaozhuxiaoshuoming": + MessageLookupByLibrary.simpleMessage("賬號注銷説明"), + "zhanghuyue": MessageLookupByLibrary.simpleMessage("賬戶餘額"), + "zhankai": MessageLookupByLibrary.simpleMessage("展開"), + "zhengzaihujiaoqishou": MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), + "zhengzaijiazai": MessageLookupByLibrary.simpleMessage("正在加載"), + "zhengzaipeisong": MessageLookupByLibrary.simpleMessage("正在配送"), + "zhengzaixiazaizhong": MessageLookupByLibrary.simpleMessage("正在加載中..."), + "zhidianmendian": MessageLookupByLibrary.simpleMessage("致電門店"), + "zhifubao": MessageLookupByLibrary.simpleMessage("支付寶"), + "zhifubaozhifu": MessageLookupByLibrary.simpleMessage("支付寶支付"), + "zhifufangshi": MessageLookupByLibrary.simpleMessage("支付方式"), + "zhifuxiangqing": MessageLookupByLibrary.simpleMessage("支付详情"), + "zhizunhuiyuan": MessageLookupByLibrary.simpleMessage("至尊會員"), + "zhizuowancheng": MessageLookupByLibrary.simpleMessage("製作完成"), + "zhongchakan": MessageLookupByLibrary.simpleMessage("中查看"), + "zhongwenjianti": MessageLookupByLibrary.simpleMessage("中文簡體"), + "zhuanlan": MessageLookupByLibrary.simpleMessage("專欄"), + "zhuanxiangyouhuiquan": MessageLookupByLibrary.simpleMessage("專享優惠券"), + "zhunong1": MessageLookupByLibrary.simpleMessage("愛在回鄉,快樂助農"), + "zhunongjifen": MessageLookupByLibrary.simpleMessage("助農積分"), + "zhunongzhuanqu": MessageLookupByLibrary.simpleMessage("助農專區"), + "zhuxiaotixing": MessageLookupByLibrary.simpleMessage( + "再次提醒:註銷帳號後不可恢復,相關資料和資訊會永久删除。"), + "zhuxiaozhanghao": MessageLookupByLibrary.simpleMessage("註銷帳號"), + "ziqu": MessageLookupByLibrary.simpleMessage("自取"), + "ziti": MessageLookupByLibrary.simpleMessage("自提"), + "zitidizhi": MessageLookupByLibrary.simpleMessage("自提地址"), + "zitiduihuanquan": MessageLookupByLibrary.simpleMessage("券类型:自提兑换券"), + "zitishijian": MessageLookupByLibrary.simpleMessage("自提時間"), + "zongzichan": MessageLookupByLibrary.simpleMessage("總資產"), + "zongzichanyuan": MessageLookupByLibrary.simpleMessage("總資產(元)"), + "zuanshihuiyuan": MessageLookupByLibrary.simpleMessage("鑽石會員"), + "zuixinwenzhang": MessageLookupByLibrary.simpleMessage("最新文章"), + "zuorenwudejifen": MessageLookupByLibrary.simpleMessage("做任務得積分"), + "zuozhe": m44 + }; } diff --git a/lib/generated/json/achivement_detail_list.g.dart b/lib/generated/json/achivement_detail_list.g.dart new file mode 100644 index 00000000..0701377d --- /dev/null +++ b/lib/generated/json/achivement_detail_list.g.dart @@ -0,0 +1,251 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/achivement_detail_list.dart'; + +AchivementDetailList $AchivementDetailListFromJson(Map json) { + final AchivementDetailList achivementDetailList = AchivementDetailList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + achivementDetailList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + achivementDetailList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + achivementDetailList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + achivementDetailList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + achivementDetailList.updateUser = updateUser; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + achivementDetailList.categoryId = categoryId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + achivementDetailList.name = name; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + achivementDetailList.level = level; + } + final String? icon = jsonConvert.convert(json['icon']); + if (icon != null) { + achivementDetailList.icon = icon; + } + final int? score = jsonConvert.convert(json['score']); + if (score != null) { + achivementDetailList.score = score; + } + final bool? actived = jsonConvert.convert(json['actived']); + if (actived != null) { + achivementDetailList.actived = actived; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + achivementDetailList.sort = sort; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + achivementDetailList.isDelete = isDelete; + } + final String? lessScore = jsonConvert.convert(json['lessScore']); + if (lessScore != null) { + achivementDetailList.lessScore = lessScore; + } + final List? rewardList = (json['rewardList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as RewardList) + .toList(); + if (rewardList != null) { + achivementDetailList.rewardList = rewardList; + } + final bool? max = jsonConvert.convert(json['max']); + if (max != null) { + achivementDetailList.max = max; + } + final bool? get = jsonConvert.convert(json['get']); + if (get != null) { + achivementDetailList.get = get; + } + return achivementDetailList; +} + +Map $AchivementDetailListToJson(AchivementDetailList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['categoryId'] = entity.categoryId; + data['name'] = entity.name; + data['level'] = entity.level; + data['icon'] = entity.icon; + data['score'] = entity.score; + data['actived'] = entity.actived; + data['sort'] = entity.sort; + data['isDelete'] = entity.isDelete; + data['lessScore'] = entity.lessScore; + data['rewardList'] = entity.rewardList?.map((v) => v.toJson()).toList(); + data['max'] = entity.max; + data['get'] = entity.get; + return data; +} + +extension AchivementDetailListExtension on AchivementDetailList { + AchivementDetailList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? categoryId, + String? name, + int? level, + String? icon, + int? score, + bool? actived, + int? sort, + int? isDelete, + String? lessScore, + List? rewardList, + bool? max, + bool? get, + }) { + return AchivementDetailList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..categoryId = categoryId ?? this.categoryId + ..name = name ?? this.name + ..level = level ?? this.level + ..icon = icon ?? this.icon + ..score = score ?? this.score + ..actived = actived ?? this.actived + ..sort = sort ?? this.sort + ..isDelete = isDelete ?? this.isDelete + ..lessScore = lessScore ?? this.lessScore + ..rewardList = rewardList ?? this.rewardList + ..max = max ?? this.max + ..get = get ?? this.get; + } +} + +RewardList $RewardListFromJson(Map json) { + final RewardList rewardList = RewardList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + rewardList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + rewardList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + rewardList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + rewardList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + rewardList.updateUser = updateUser; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + rewardList.categoryId = categoryId; + } + final String? achievementId = jsonConvert.convert( + json['achievementId']); + if (achievementId != null) { + rewardList.achievementId = achievementId; + } + final int? rewardType = jsonConvert.convert(json['rewardType']); + if (rewardType != null) { + rewardList.rewardType = rewardType; + } + final String? refId = jsonConvert.convert(json['refId']); + if (refId != null) { + rewardList.refId = refId; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + rewardList.isDelete = isDelete; + } + final dynamic achievementCategoryName = json['achievementCategoryName']; + if (achievementCategoryName != null) { + rewardList.achievementCategoryName = achievementCategoryName; + } + final dynamic achievementName = json['achievementName']; + if (achievementName != null) { + rewardList.achievementName = achievementName; + } + final dynamic couponName = json['couponName']; + if (couponName != null) { + rewardList.couponName = couponName; + } + return rewardList; +} + +Map $RewardListToJson(RewardList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['categoryId'] = entity.categoryId; + data['achievementId'] = entity.achievementId; + data['rewardType'] = entity.rewardType; + data['refId'] = entity.refId; + data['isDelete'] = entity.isDelete; + data['achievementCategoryName'] = entity.achievementCategoryName; + data['achievementName'] = entity.achievementName; + data['couponName'] = entity.couponName; + return data; +} + +extension RewardListExtension on RewardList { + RewardList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? categoryId, + String? achievementId, + int? rewardType, + String? refId, + int? isDelete, + dynamic achievementCategoryName, + dynamic achievementName, + dynamic couponName, + }) { + return RewardList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..categoryId = categoryId ?? this.categoryId + ..achievementId = achievementId ?? this.achievementId + ..rewardType = rewardType ?? this.rewardType + ..refId = refId ?? this.refId + ..isDelete = isDelete ?? this.isDelete + ..achievementCategoryName = achievementCategoryName ?? + this.achievementCategoryName + ..achievementName = achievementName ?? this.achievementName + ..couponName = couponName ?? this.couponName; + } +} \ No newline at end of file diff --git a/lib/generated/json/act_info.g.dart b/lib/generated/json/act_info.g.dart new file mode 100644 index 00000000..600ee45e --- /dev/null +++ b/lib/generated/json/act_info.g.dart @@ -0,0 +1,78 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/act_info.dart'; + +ActInfo $ActInfoFromJson(Map json) { + final ActInfo actInfo = ActInfo(); + final String? couponDiscountAmount = jsonConvert.convert( + json['couponDiscountAmount']); + if (couponDiscountAmount != null) { + actInfo.couponDiscountAmount = couponDiscountAmount; + } + final int? couponDiscountRate = jsonConvert.convert( + json['couponDiscountRate']); + if (couponDiscountRate != null) { + actInfo.couponDiscountRate = couponDiscountRate; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + actInfo.couponId = couponId; + } + final int? couponType = jsonConvert.convert(json['couponType']); + if (couponType != null) { + actInfo.couponType = couponType; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + actInfo.discountAmount = discountAmount; + } + final int? discountRate = jsonConvert.convert(json['discountRate']); + if (discountRate != null) { + actInfo.discountRate = discountRate; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + actInfo.promotionId = promotionId; + } + final int? promotionType = jsonConvert.convert(json['promotionType']); + if (promotionType != null) { + actInfo.promotionType = promotionType; + } + return actInfo; +} + +Map $ActInfoToJson(ActInfo entity) { + final Map data = {}; + data['couponDiscountAmount'] = entity.couponDiscountAmount; + data['couponDiscountRate'] = entity.couponDiscountRate; + data['couponId'] = entity.couponId; + data['couponType'] = entity.couponType; + data['discountAmount'] = entity.discountAmount; + data['discountRate'] = entity.discountRate; + data['promotionId'] = entity.promotionId; + data['promotionType'] = entity.promotionType; + return data; +} + +extension ActInfoExtension on ActInfo { + ActInfo copyWith({ + String? couponDiscountAmount, + int? couponDiscountRate, + String? couponId, + int? couponType, + String? discountAmount, + int? discountRate, + String? promotionId, + int? promotionType, + }) { + return ActInfo() + ..couponDiscountAmount = couponDiscountAmount ?? this.couponDiscountAmount + ..couponDiscountRate = couponDiscountRate ?? this.couponDiscountRate + ..couponId = couponId ?? this.couponId + ..couponType = couponType ?? this.couponType + ..discountAmount = discountAmount ?? this.discountAmount + ..discountRate = discountRate ?? this.discountRate + ..promotionId = promotionId ?? this.promotionId + ..promotionType = promotionType ?? this.promotionType; + } +} \ No newline at end of file diff --git a/lib/generated/json/act_product.g.dart b/lib/generated/json/act_product.g.dart new file mode 100644 index 00000000..3206855e --- /dev/null +++ b/lib/generated/json/act_product.g.dart @@ -0,0 +1,179 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/act_product.dart'; +import 'package:huixiang/data/sku_json.dart'; + + +ActProduct $ActProductFromJson(Map json) { + final ActProduct actProduct = ActProduct(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + actProduct.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + actProduct.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + actProduct.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + actProduct.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + actProduct.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + actProduct.storeId = storeId; + } + final String? templateId = jsonConvert.convert(json['templateId']); + if (templateId != null) { + actProduct.templateId = templateId; + } + final String? timeId = jsonConvert.convert(json['timeId']); + if (timeId != null) { + actProduct.timeId = timeId; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + actProduct.productId = productId; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + actProduct.productName = productName; + } + final String? productImg = jsonConvert.convert(json['productImg']); + if (productImg != null) { + actProduct.productImg = productImg; + } + final String? productPrice = jsonConvert.convert( + json['productPrice']); + if (productPrice != null) { + actProduct.productPrice = productPrice; + } + final String? promotionPrice = jsonConvert.convert( + json['promotionPrice']); + if (promotionPrice != null) { + actProduct.promotionPrice = promotionPrice; + } + final int? productStock = jsonConvert.convert(json['productStock']); + if (productStock != null) { + actProduct.productStock = productStock; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + actProduct.sellCount = sellCount; + } + final List? skuJson = (json['skuJson'] as List?)?.map( + (e) => jsonConvert.convert(e) as SkuJson).toList(); + if (skuJson != null) { + actProduct.skuJson = skuJson; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + actProduct.isDelete = isDelete; + } + final String? shortName = jsonConvert.convert(json['shortName']); + if (shortName != null) { + actProduct.shortName = shortName; + } + final String? supplierName = jsonConvert.convert( + json['supplierName']); + if (supplierName != null) { + actProduct.supplierName = supplierName; + } + final String? detail = jsonConvert.convert(json['detail']); + if (detail != null) { + actProduct.detail = detail; + } + final String? details = jsonConvert.convert(json['details']); + if (details != null) { + actProduct.details = details; + } + final String? rightImg = jsonConvert.convert(json['rightImg']); + if (rightImg != null) { + actProduct.rightImg = rightImg; + } + return actProduct; +} + +Map $ActProductToJson(ActProduct entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['templateId'] = entity.templateId; + data['timeId'] = entity.timeId; + data['productId'] = entity.productId; + data['productName'] = entity.productName; + data['productImg'] = entity.productImg; + data['productPrice'] = entity.productPrice; + data['promotionPrice'] = entity.promotionPrice; + data['productStock'] = entity.productStock; + data['sellCount'] = entity.sellCount; + data['skuJson'] = entity.skuJson?.map((v) => v.toJson()).toList(); + data['isDelete'] = entity.isDelete; + data['shortName'] = entity.shortName; + data['supplierName'] = entity.supplierName; + data['detail'] = entity.detail; + data['details'] = entity.details; + data['rightImg'] = entity.rightImg; + return data; +} + +extension ActProductExtension on ActProduct { + ActProduct copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? templateId, + String? timeId, + String? productId, + String? productName, + String? productImg, + String? productPrice, + String? promotionPrice, + int? productStock, + int? sellCount, + List? skuJson, + int? isDelete, + String? shortName, + String? supplierName, + String? detail, + String? details, + String? rightImg, + }) { + return ActProduct() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..templateId = templateId ?? this.templateId + ..timeId = timeId ?? this.timeId + ..productId = productId ?? this.productId + ..productName = productName ?? this.productName + ..productImg = productImg ?? this.productImg + ..productPrice = productPrice ?? this.productPrice + ..promotionPrice = promotionPrice ?? this.promotionPrice + ..productStock = productStock ?? this.productStock + ..sellCount = sellCount ?? this.sellCount + ..skuJson = skuJson ?? this.skuJson + ..isDelete = isDelete ?? this.isDelete + ..shortName = shortName ?? this.shortName + ..supplierName = supplierName ?? this.supplierName + ..detail = detail ?? this.detail + ..details = details ?? this.details + ..rightImg = rightImg ?? this.rightImg; + } +} \ No newline at end of file diff --git a/lib/generated/json/act_record.g.dart b/lib/generated/json/act_record.g.dart new file mode 100644 index 00000000..2274cf7f --- /dev/null +++ b/lib/generated/json/act_record.g.dart @@ -0,0 +1,161 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/act_record.dart'; + +ActRecord $ActRecordFromJson(Map json) { + final ActRecord actRecord = ActRecord(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + actRecord.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + actRecord.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + actRecord.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + actRecord.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + actRecord.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + actRecord.storeId = storeId; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + actRecord.type = type; + } + final String? actTemplateId = jsonConvert.convert( + json['actTemplateId']); + if (actTemplateId != null) { + actRecord.actTemplateId = actTemplateId; + } + final String? actTimeId = jsonConvert.convert(json['actTimeId']); + if (actTimeId != null) { + actRecord.actTimeId = actTimeId; + } + final String? actProductId = jsonConvert.convert( + json['actProductId']); + if (actProductId != null) { + actRecord.actProductId = actProductId; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + actRecord.mid = mid; + } + final int? joinNum = jsonConvert.convert(json['joinNum']); + if (joinNum != null) { + actRecord.joinNum = joinNum; + } + final String? startTime = jsonConvert.convert(json['startTime']); + if (startTime != null) { + actRecord.startTime = startTime; + } + final String? endTime = jsonConvert.convert(json['endTime']); + if (endTime != null) { + actRecord.endTime = endTime; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + actRecord.state = state; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + actRecord.isDelete = isDelete; + } + final int? tempDay = jsonConvert.convert(json['tempDay']); + if (tempDay != null) { + actRecord.tempDay = tempDay; + } + final int? tempHour = jsonConvert.convert(json['tempHour']); + if (tempHour != null) { + actRecord.tempHour = tempHour; + } + final int? tempM = jsonConvert.convert(json['tempM']); + if (tempM != null) { + actRecord.tempM = tempM; + } + final int? tempS = jsonConvert.convert(json['tempS']); + if (tempS != null) { + actRecord.tempS = tempS; + } + return actRecord; +} + +Map $ActRecordToJson(ActRecord entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['type'] = entity.type; + data['actTemplateId'] = entity.actTemplateId; + data['actTimeId'] = entity.actTimeId; + data['actProductId'] = entity.actProductId; + data['mid'] = entity.mid; + data['joinNum'] = entity.joinNum; + data['startTime'] = entity.startTime; + data['endTime'] = entity.endTime; + data['state'] = entity.state; + data['isDelete'] = entity.isDelete; + data['tempDay'] = entity.tempDay; + data['tempHour'] = entity.tempHour; + data['tempM'] = entity.tempM; + data['tempS'] = entity.tempS; + return data; +} + +extension ActRecordExtension on ActRecord { + ActRecord copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + int? type, + String? actTemplateId, + String? actTimeId, + String? actProductId, + String? mid, + int? joinNum, + String? startTime, + String? endTime, + int? state, + int? isDelete, + int? tempDay, + int? tempHour, + int? tempM, + int? tempS, + }) { + return ActRecord() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..type = type ?? this.type + ..actTemplateId = actTemplateId ?? this.actTemplateId + ..actTimeId = actTimeId ?? this.actTimeId + ..actProductId = actProductId ?? this.actProductId + ..mid = mid ?? this.mid + ..joinNum = joinNum ?? this.joinNum + ..startTime = startTime ?? this.startTime + ..endTime = endTime ?? this.endTime + ..state = state ?? this.state + ..isDelete = isDelete ?? this.isDelete + ..tempDay = tempDay ?? this.tempDay + ..tempHour = tempHour ?? this.tempHour + ..tempM = tempM ?? this.tempM + ..tempS = tempS ?? this.tempS; + } +} \ No newline at end of file diff --git a/lib/generated/json/act_record_and_join_dto_list.g.dart b/lib/generated/json/act_record_and_join_dto_list.g.dart new file mode 100644 index 00000000..2f0e483b --- /dev/null +++ b/lib/generated/json/act_record_and_join_dto_list.g.dart @@ -0,0 +1,46 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/act_record_and_join_dto_list.dart'; +import 'package:huixiang/data/act_record.dart'; + +import 'package:huixiang/data/act_record_join_list.dart'; + + +ActRecordAndJoinlDTOList $ActRecordAndJoinlDTOListFromJson( + Map json) { + final ActRecordAndJoinlDTOList actRecordAndJoinlDTOList = ActRecordAndJoinlDTOList(); + final ActRecord? actRecord = jsonConvert.convert( + json['actRecord']); + if (actRecord != null) { + actRecordAndJoinlDTOList.actRecord = actRecord; + } + final List< + ActRecordJoinList>? actRecordJoinList = (json['actRecordJoinList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ActRecordJoinList) + .toList(); + if (actRecordJoinList != null) { + actRecordAndJoinlDTOList.actRecordJoinList = actRecordJoinList; + } + return actRecordAndJoinlDTOList; +} + +Map $ActRecordAndJoinlDTOListToJson( + ActRecordAndJoinlDTOList entity) { + final Map data = {}; + data['actRecord'] = entity.actRecord?.toJson(); + data['actRecordJoinList'] = + entity.actRecordJoinList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ActRecordAndJoinlDTOListExtension on ActRecordAndJoinlDTOList { + ActRecordAndJoinlDTOList copyWith({ + ActRecord? actRecord, + List? actRecordJoinList, + }) { + return ActRecordAndJoinlDTOList() + ..actRecord = actRecord ?? this.actRecord + ..actRecordJoinList = actRecordJoinList ?? this.actRecordJoinList; + } +} \ No newline at end of file diff --git a/lib/generated/json/act_record_join_list.g.dart b/lib/generated/json/act_record_join_list.g.dart new file mode 100644 index 00000000..018b8636 --- /dev/null +++ b/lib/generated/json/act_record_join_list.g.dart @@ -0,0 +1,148 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/act_record_join_list.dart'; + +ActRecordJoinList $ActRecordJoinListFromJson(Map json) { + final ActRecordJoinList actRecordJoinList = ActRecordJoinList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + actRecordJoinList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + actRecordJoinList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + actRecordJoinList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + actRecordJoinList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + actRecordJoinList.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + actRecordJoinList.storeId = storeId; + } + final String? actTemplateId = jsonConvert.convert( + json['actTemplateId']); + if (actTemplateId != null) { + actRecordJoinList.actTemplateId = actTemplateId; + } + final String? actTimeId = jsonConvert.convert(json['actTimeId']); + if (actTimeId != null) { + actRecordJoinList.actTimeId = actTimeId; + } + final String? actRecordId = jsonConvert.convert(json['actRecordId']); + if (actRecordId != null) { + actRecordJoinList.actRecordId = actRecordId; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + actRecordJoinList.mid = mid; + } + final String? orderId = jsonConvert.convert(json['orderId']); + if (orderId != null) { + actRecordJoinList.orderId = orderId; + } + final bool? isLeader = jsonConvert.convert(json['isLeader']); + if (isLeader != null) { + actRecordJoinList.isLeader = isLeader; + } + final String? memberAvatar = jsonConvert.convert( + json['memberAvatar']); + if (memberAvatar != null) { + actRecordJoinList.memberAvatar = memberAvatar; + } + final String? memberNickname = jsonConvert.convert( + json['memberNickname']); + if (memberNickname != null) { + actRecordJoinList.memberNickname = memberNickname; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + actRecordJoinList.productId = productId; + } + final String? actPrice = jsonConvert.convert(json['actPrice']); + if (actPrice != null) { + actRecordJoinList.actPrice = actPrice; + } + final bool? state = jsonConvert.convert(json['state']); + if (state != null) { + actRecordJoinList.state = state; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + actRecordJoinList.isDelete = isDelete; + } + return actRecordJoinList; +} + +Map $ActRecordJoinListToJson(ActRecordJoinList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['actTemplateId'] = entity.actTemplateId; + data['actTimeId'] = entity.actTimeId; + data['actRecordId'] = entity.actRecordId; + data['mid'] = entity.mid; + data['orderId'] = entity.orderId; + data['isLeader'] = entity.isLeader; + data['memberAvatar'] = entity.memberAvatar; + data['memberNickname'] = entity.memberNickname; + data['productId'] = entity.productId; + data['actPrice'] = entity.actPrice; + data['state'] = entity.state; + data['isDelete'] = entity.isDelete; + return data; +} + +extension ActRecordJoinListExtension on ActRecordJoinList { + ActRecordJoinList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? actTemplateId, + String? actTimeId, + String? actRecordId, + String? mid, + String? orderId, + bool? isLeader, + String? memberAvatar, + String? memberNickname, + String? productId, + String? actPrice, + bool? state, + int? isDelete, + }) { + return ActRecordJoinList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..actTemplateId = actTemplateId ?? this.actTemplateId + ..actTimeId = actTimeId ?? this.actTimeId + ..actRecordId = actRecordId ?? this.actRecordId + ..mid = mid ?? this.mid + ..orderId = orderId ?? this.orderId + ..isLeader = isLeader ?? this.isLeader + ..memberAvatar = memberAvatar ?? this.memberAvatar + ..memberNickname = memberNickname ?? this.memberNickname + ..productId = productId ?? this.productId + ..actPrice = actPrice ?? this.actPrice + ..state = state ?? this.state + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/activity.g.dart b/lib/generated/json/activity.g.dart new file mode 100644 index 00000000..d182f35f --- /dev/null +++ b/lib/generated/json/activity.g.dart @@ -0,0 +1,152 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/activity.dart'; + +Activity $ActivityFromJson(Map json) { + final Activity activity = Activity(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + activity.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + activity.createTime = createTime; + } + final dynamic createUser = json['createUser']; + if (createUser != null) { + activity.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + activity.updateTime = updateTime; + } + final dynamic updateUser = json['updateUser']; + if (updateUser != null) { + activity.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + activity.storeId = storeId; + } + final String? mainTitle = jsonConvert.convert(json['mainTitle']); + if (mainTitle != null) { + activity.mainTitle = mainTitle; + } + final String? viceTitle = jsonConvert.convert(json['viceTitle']); + if (viceTitle != null) { + activity.viceTitle = viceTitle; + } + final String? content = jsonConvert.convert(json['content']); + if (content != null) { + activity.content = content; + } + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + activity.coverImg = coverImg; + } + final String? startTime = jsonConvert.convert(json['startTime']); + if (startTime != null) { + activity.startTime = startTime; + } + final String? endTime = jsonConvert.convert(json['endTime']); + if (endTime != null) { + activity.endTime = endTime; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + activity.categoryId = categoryId; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + activity.state = state; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + activity.isDelete = isDelete; + } + final int? likes = jsonConvert.convert(json['likes']); + if (likes != null) { + activity.likes = likes; + } + final bool? liked = jsonConvert.convert(json['liked']); + if (liked != null) { + activity.liked = liked; + } + final int? viewers = jsonConvert.convert(json['viewers']); + if (viewers != null) { + activity.viewers = viewers; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + activity.storeName = storeName; + } + return activity; +} + +Map $ActivityToJson(Activity entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['mainTitle'] = entity.mainTitle; + data['viceTitle'] = entity.viceTitle; + data['content'] = entity.content; + data['coverImg'] = entity.coverImg; + data['startTime'] = entity.startTime; + data['endTime'] = entity.endTime; + data['categoryId'] = entity.categoryId; + data['state'] = entity.state; + data['isDelete'] = entity.isDelete; + data['likes'] = entity.likes; + data['liked'] = entity.liked; + data['viewers'] = entity.viewers; + data['storeName'] = entity.storeName; + return data; +} + +extension ActivityExtension on Activity { + Activity copyWith({ + String? id, + String? createTime, + dynamic createUser, + String? updateTime, + dynamic updateUser, + String? storeId, + String? mainTitle, + String? viceTitle, + String? content, + String? coverImg, + String? startTime, + String? endTime, + String? categoryId, + int? state, + int? isDelete, + int? likes, + bool? liked, + int? viewers, + String? storeName, + }) { + return Activity() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..mainTitle = mainTitle ?? this.mainTitle + ..viceTitle = viceTitle ?? this.viceTitle + ..content = content ?? this.content + ..coverImg = coverImg ?? this.coverImg + ..startTime = startTime ?? this.startTime + ..endTime = endTime ?? this.endTime + ..categoryId = categoryId ?? this.categoryId + ..state = state ?? this.state + ..isDelete = isDelete ?? this.isDelete + ..likes = likes ?? this.likes + ..liked = liked ?? this.liked + ..viewers = viewers ?? this.viewers + ..storeName = storeName ?? this.storeName; + } +} \ No newline at end of file diff --git a/lib/generated/json/activity_act_record_details.g.dart b/lib/generated/json/activity_act_record_details.g.dart new file mode 100644 index 00000000..5fef355e --- /dev/null +++ b/lib/generated/json/activity_act_record_details.g.dart @@ -0,0 +1,84 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/activity_act_record_details.dart'; +import 'package:huixiang/data/act_product.dart'; + +import 'package:huixiang/data/act_record.dart'; + +import 'package:huixiang/data/act_record_join_list.dart'; + + +ActivityActRecordDetails $ActivityActRecordDetailsFromJson( + Map json) { + final ActivityActRecordDetails activityActRecordDetails = ActivityActRecordDetails(); + final ActRecord? actRecord = jsonConvert.convert( + json['actRecord']); + if (actRecord != null) { + activityActRecordDetails.actRecord = actRecord; + } + final List< + ActRecordJoinList>? actRecordJoinList = (json['actRecordJoinList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ActRecordJoinList) + .toList(); + if (actRecordJoinList != null) { + activityActRecordDetails.actRecordJoinList = actRecordJoinList; + } + final ActProduct? actProduct = jsonConvert.convert( + json['actProduct']); + if (actProduct != null) { + activityActRecordDetails.actProduct = actProduct; + } + final dynamic skuName = json['skuName']; + if (skuName != null) { + activityActRecordDetails.skuName = skuName; + } + final String? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + activityActRecordDetails.skuId = skuId; + } + final bool? isBargain = jsonConvert.convert(json['isBargain']); + if (isBargain != null) { + activityActRecordDetails.isBargain = isBargain; + } + final int? successNumber = jsonConvert.convert(json['successNumber']); + if (successNumber != null) { + activityActRecordDetails.successNumber = successNumber; + } + return activityActRecordDetails; +} + +Map $ActivityActRecordDetailsToJson( + ActivityActRecordDetails entity) { + final Map data = {}; + data['actRecord'] = entity.actRecord?.toJson(); + data['actRecordJoinList'] = + entity.actRecordJoinList?.map((v) => v.toJson()).toList(); + data['actProduct'] = entity.actProduct?.toJson(); + data['skuName'] = entity.skuName; + data['skuId'] = entity.skuId; + data['isBargain'] = entity.isBargain; + data['successNumber'] = entity.successNumber; + return data; +} + +extension ActivityActRecordDetailsExtension on ActivityActRecordDetails { + ActivityActRecordDetails copyWith({ + ActRecord? actRecord, + List? actRecordJoinList, + ActProduct? actProduct, + dynamic skuName, + String? skuId, + bool? isBargain, + int? successNumber, + }) { + return ActivityActRecordDetails() + ..actRecord = actRecord ?? this.actRecord + ..actRecordJoinList = actRecordJoinList ?? this.actRecordJoinList + ..actProduct = actProduct ?? this.actProduct + ..skuName = skuName ?? this.skuName + ..skuId = skuId ?? this.skuId + ..isBargain = isBargain ?? this.isBargain + ..successNumber = successNumber ?? this.successNumber; + } +} \ No newline at end of file diff --git a/lib/generated/json/activity_area_list.g.dart b/lib/generated/json/activity_area_list.g.dart new file mode 100644 index 00000000..cec8f17a --- /dev/null +++ b/lib/generated/json/activity_area_list.g.dart @@ -0,0 +1,324 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/activity_area_list.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; + +import 'package:huixiang/data/sku_json.dart'; + + +ActivityAreaList $ActivityAreaListFromJson(Map json) { + final ActivityAreaList activityAreaList = ActivityAreaList(); + final ActTemplate? actTemplate = jsonConvert.convert( + json['actTemplate']); + if (actTemplate != null) { + activityAreaList.actTemplate = actTemplate; + } + final List< + TimeProductList>? timeProductList = (json['timeProductList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as TimeProductList) + .toList(); + if (timeProductList != null) { + activityAreaList.timeProductList = timeProductList; + } + return activityAreaList; +} + +Map $ActivityAreaListToJson(ActivityAreaList entity) { + final Map data = {}; + data['actTemplate'] = entity.actTemplate?.toJson(); + data['timeProductList'] = + entity.timeProductList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ActivityAreaListExtension on ActivityAreaList { + ActivityAreaList copyWith({ + ActTemplate? actTemplate, + List? timeProductList, + }) { + return ActivityAreaList() + ..actTemplate = actTemplate ?? this.actTemplate + ..timeProductList = timeProductList ?? this.timeProductList; + } +} + +ActTemplate $ActTemplateFromJson(Map json) { + final ActTemplate actTemplate = ActTemplate(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + actTemplate.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + actTemplate.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + actTemplate.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + actTemplate.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + actTemplate.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + actTemplate.storeId = storeId; + } + final String? actName = jsonConvert.convert(json['actName']); + if (actName != null) { + actTemplate.actName = actName; + } + final String? actDesc = jsonConvert.convert(json['actDesc']); + if (actDesc != null) { + actTemplate.actDesc = actDesc; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + actTemplate.type = type; + } + final int? limitTime = jsonConvert.convert(json['limitTime']); + if (limitTime != null) { + actTemplate.limitTime = limitTime; + } + final int? limitNumber = jsonConvert.convert(json['limitNumber']); + if (limitNumber != null) { + actTemplate.limitNumber = limitNumber; + } + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + actTemplate.coverImg = coverImg; + } + final String? shareImg = jsonConvert.convert(json['shareImg']); + if (shareImg != null) { + actTemplate.shareImg = shareImg; + } + final String? bannerImg = jsonConvert.convert(json['bannerImg']); + if (bannerImg != null) { + actTemplate.bannerImg = bannerImg; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + actTemplate.state = state; + } + final bool? allDay = jsonConvert.convert(json['allDay']); + if (allDay != null) { + actTemplate.allDay = allDay; + } + final String? startTime = jsonConvert.convert(json['startTime']); + if (startTime != null) { + actTemplate.startTime = startTime; + } + final String? endTime = jsonConvert.convert(json['endTime']); + if (endTime != null) { + actTemplate.endTime = endTime; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + actTemplate.isDelete = isDelete; + } + return actTemplate; +} + +Map $ActTemplateToJson(ActTemplate entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['actName'] = entity.actName; + data['actDesc'] = entity.actDesc; + data['type'] = entity.type; + data['limitTime'] = entity.limitTime; + data['limitNumber'] = entity.limitNumber; + data['coverImg'] = entity.coverImg; + data['shareImg'] = entity.shareImg; + data['bannerImg'] = entity.bannerImg; + data['state'] = entity.state; + data['allDay'] = entity.allDay; + data['startTime'] = entity.startTime; + data['endTime'] = entity.endTime; + data['isDelete'] = entity.isDelete; + return data; +} + +extension ActTemplateExtension on ActTemplate { + ActTemplate copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? actName, + String? actDesc, + int? type, + int? limitTime, + int? limitNumber, + String? coverImg, + String? shareImg, + String? bannerImg, + int? state, + bool? allDay, + String? startTime, + String? endTime, + int? isDelete, + }) { + return ActTemplate() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..actName = actName ?? this.actName + ..actDesc = actDesc ?? this.actDesc + ..type = type ?? this.type + ..limitTime = limitTime ?? this.limitTime + ..limitNumber = limitNumber ?? this.limitNumber + ..coverImg = coverImg ?? this.coverImg + ..shareImg = shareImg ?? this.shareImg + ..bannerImg = bannerImg ?? this.bannerImg + ..state = state ?? this.state + ..allDay = allDay ?? this.allDay + ..startTime = startTime ?? this.startTime + ..endTime = endTime ?? this.endTime + ..isDelete = isDelete ?? this.isDelete; + } +} + +TimeProductList $TimeProductListFromJson(Map json) { + final TimeProductList timeProductList = TimeProductList(); + final ActTime? actTime = jsonConvert.convert(json['actTime']); + if (actTime != null) { + timeProductList.actTime = actTime; + } + final List? productList = (json['productList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as ShopHomeProductList) + .toList(); + if (productList != null) { + timeProductList.productList = productList; + } + return timeProductList; +} + +Map $TimeProductListToJson(TimeProductList entity) { + final Map data = {}; + data['actTime'] = entity.actTime?.toJson(); + data['productList'] = entity.productList?.map((v) => v.toJson()).toList(); + return data; +} + +extension TimeProductListExtension on TimeProductList { + TimeProductList copyWith({ + ActTime? actTime, + List? productList, + }) { + return TimeProductList() + ..actTime = actTime ?? this.actTime + ..productList = productList ?? this.productList; + } +} + +ActTime $ActTimeFromJson(Map json) { + final ActTime actTime = ActTime(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + actTime.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + actTime.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + actTime.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + actTime.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + actTime.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + actTime.storeId = storeId; + } + final String? templateId = jsonConvert.convert(json['templateId']); + if (templateId != null) { + actTime.templateId = templateId; + } + final bool? allDay = jsonConvert.convert(json['allDay']); + if (allDay != null) { + actTime.allDay = allDay; + } + final dynamic startHour = json['startHour']; + if (startHour != null) { + actTime.startHour = startHour; + } + final dynamic endHour = json['endHour']; + if (endHour != null) { + actTime.endHour = endHour; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + actTime.isDelete = isDelete; + } + return actTime; +} + +Map $ActTimeToJson(ActTime entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['templateId'] = entity.templateId; + data['allDay'] = entity.allDay; + data['startHour'] = entity.startHour; + data['endHour'] = entity.endHour; + data['isDelete'] = entity.isDelete; + return data; +} + +extension ActTimeExtension on ActTime { + ActTime copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? templateId, + bool? allDay, + dynamic startHour, + dynamic endHour, + int? isDelete, + }) { + return ActTime() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..templateId = templateId ?? this.templateId + ..allDay = allDay ?? this.allDay + ..startHour = startHour ?? this.startHour + ..endHour = endHour ?? this.endHour + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/activity_details.g.dart b/lib/generated/json/activity_details.g.dart new file mode 100644 index 00000000..a7147041 --- /dev/null +++ b/lib/generated/json/activity_details.g.dart @@ -0,0 +1,52 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/activity_details.dart'; +import 'package:huixiang/data/act_product.dart'; + +import 'package:huixiang/data/act_record_and_join_dto_list.dart'; + + +ActivityDetails $ActivityDetailsFromJson(Map json) { + final ActivityDetails activityDetails = ActivityDetails(); + final String? endTime = jsonConvert.convert(json['endTime']); + if (endTime != null) { + activityDetails.endTime = endTime; + } + final ActProduct? actProduct = jsonConvert.convert( + json['actProduct']); + if (actProduct != null) { + activityDetails.actProduct = actProduct; + } + final List< + ActRecordAndJoinlDTOList>? actRecordAndJoinlDTOList = (json['actRecordAndJoinlDTOList'] as List< + dynamic>?)?.map( + (e) => + jsonConvert.convert( + e) as ActRecordAndJoinlDTOList).toList(); + if (actRecordAndJoinlDTOList != null) { + activityDetails.actRecordAndJoinlDTOList = actRecordAndJoinlDTOList; + } + return activityDetails; +} + +Map $ActivityDetailsToJson(ActivityDetails entity) { + final Map data = {}; + data['endTime'] = entity.endTime; + data['actProduct'] = entity.actProduct?.toJson(); + data['actRecordAndJoinlDTOList'] = + entity.actRecordAndJoinlDTOList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ActivityDetailsExtension on ActivityDetails { + ActivityDetails copyWith({ + String? endTime, + ActProduct? actProduct, + List? actRecordAndJoinlDTOList, + }) { + return ActivityDetails() + ..endTime = endTime ?? this.endTime + ..actProduct = actProduct ?? this.actProduct + ..actRecordAndJoinlDTOList = actRecordAndJoinlDTOList ?? + this.actRecordAndJoinlDTOList; + } +} \ No newline at end of file diff --git a/lib/generated/json/activity_order.g.dart b/lib/generated/json/activity_order.g.dart new file mode 100644 index 00000000..fefe6bfa --- /dev/null +++ b/lib/generated/json/activity_order.g.dart @@ -0,0 +1,119 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/activity_order.dart'; + +ActivityOrder $ActivityOrderFromJson(Map json) { + final ActivityOrder activityOrder = ActivityOrder(); + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + activityOrder.storeId = storeId; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + activityOrder.storeName = storeName; + } + final String? joinTime = jsonConvert.convert(json['joinTime']); + if (joinTime != null) { + activityOrder.joinTime = joinTime; + } + final String? productImg = jsonConvert.convert(json['productImg']); + if (productImg != null) { + activityOrder.productImg = productImg; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + activityOrder.productName = productName; + } + final String? productSkuName = jsonConvert.convert( + json['productSkuName']); + if (productSkuName != null) { + activityOrder.productSkuName = productSkuName; + } + final String? actRecordId = jsonConvert.convert(json['actRecordId']); + if (actRecordId != null) { + activityOrder.actRecordId = actRecordId; + } + final int? actRecordState = jsonConvert.convert(json['actRecordState']); + if (actRecordState != null) { + activityOrder.actRecordState = actRecordState; + } + final bool? actRecordJoinState = jsonConvert.convert( + json['actRecordJoinState']); + if (actRecordJoinState != null) { + activityOrder.actRecordJoinState = actRecordJoinState; + } + final int? howManyMore = jsonConvert.convert(json['howManyMore']); + if (howManyMore != null) { + activityOrder.howManyMore = howManyMore; + } + final int? successNumber = jsonConvert.convert(json['successNumber']); + if (successNumber != null) { + activityOrder.successNumber = successNumber; + } + final dynamic orderSum = json['orderSum']; + if (orderSum != null) { + activityOrder.orderSum = orderSum; + } + final dynamic bargainMoney = json['bargainMoney']; + if (bargainMoney != null) { + activityOrder.bargainMoney = bargainMoney; + } + final dynamic howManyMoney = json['howManyMoney']; + if (howManyMoney != null) { + activityOrder.howManyMoney = howManyMoney; + } + return activityOrder; +} + +Map $ActivityOrderToJson(ActivityOrder entity) { + final Map data = {}; + data['storeId'] = entity.storeId; + data['storeName'] = entity.storeName; + data['joinTime'] = entity.joinTime; + data['productImg'] = entity.productImg; + data['productName'] = entity.productName; + data['productSkuName'] = entity.productSkuName; + data['actRecordId'] = entity.actRecordId; + data['actRecordState'] = entity.actRecordState; + data['actRecordJoinState'] = entity.actRecordJoinState; + data['howManyMore'] = entity.howManyMore; + data['successNumber'] = entity.successNumber; + data['orderSum'] = entity.orderSum; + data['bargainMoney'] = entity.bargainMoney; + data['howManyMoney'] = entity.howManyMoney; + return data; +} + +extension ActivityOrderExtension on ActivityOrder { + ActivityOrder copyWith({ + String? storeId, + String? storeName, + String? joinTime, + String? productImg, + String? productName, + String? productSkuName, + String? actRecordId, + int? actRecordState, + bool? actRecordJoinState, + int? howManyMore, + int? successNumber, + dynamic orderSum, + dynamic bargainMoney, + dynamic howManyMoney, + }) { + return ActivityOrder() + ..storeId = storeId ?? this.storeId + ..storeName = storeName ?? this.storeName + ..joinTime = joinTime ?? this.joinTime + ..productImg = productImg ?? this.productImg + ..productName = productName ?? this.productName + ..productSkuName = productSkuName ?? this.productSkuName + ..actRecordId = actRecordId ?? this.actRecordId + ..actRecordState = actRecordState ?? this.actRecordState + ..actRecordJoinState = actRecordJoinState ?? this.actRecordJoinState + ..howManyMore = howManyMore ?? this.howManyMore + ..successNumber = successNumber ?? this.successNumber + ..orderSum = orderSum ?? this.orderSum + ..bargainMoney = bargainMoney ?? this.bargainMoney + ..howManyMoney = howManyMoney ?? this.howManyMoney; + } +} \ No newline at end of file diff --git a/lib/generated/json/activity_pos.g.dart b/lib/generated/json/activity_pos.g.dart new file mode 100644 index 00000000..71bb945c --- /dev/null +++ b/lib/generated/json/activity_pos.g.dart @@ -0,0 +1,54 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/activity_pos.dart'; + +ActivityPos $ActivityPosFromJson(Map json) { + final ActivityPos activityPos = ActivityPos(); + final bool? enabled = jsonConvert.convert(json['enabled']); + if (enabled != null) { + activityPos.enabled = enabled; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + activityPos.code = code; + } + final String? showImage = jsonConvert.convert(json['showImage']); + if (showImage != null) { + activityPos.showImage = showImage; + } + final int? jumpType = jsonConvert.convert(json['jumpType']); + if (jumpType != null) { + activityPos.jumpType = jumpType; + } + final String? jumpUrl = jsonConvert.convert(json['jumpUrl']); + if (jumpUrl != null) { + activityPos.jumpUrl = jumpUrl; + } + return activityPos; +} + +Map $ActivityPosToJson(ActivityPos entity) { + final Map data = {}; + data['enabled'] = entity.enabled; + data['code'] = entity.code; + data['showImage'] = entity.showImage; + data['jumpType'] = entity.jumpType; + data['jumpUrl'] = entity.jumpUrl; + return data; +} + +extension ActivityPosExtension on ActivityPos { + ActivityPos copyWith({ + bool? enabled, + String? code, + String? showImage, + int? jumpType, + String? jumpUrl, + }) { + return ActivityPos() + ..enabled = enabled ?? this.enabled + ..code = code ?? this.code + ..showImage = showImage ?? this.showImage + ..jumpType = jumpType ?? this.jumpType + ..jumpUrl = jumpUrl ?? this.jumpUrl; + } +} \ No newline at end of file diff --git a/lib/generated/json/add_vip_info.g.dart b/lib/generated/json/add_vip_info.g.dart new file mode 100644 index 00000000..a283c792 --- /dev/null +++ b/lib/generated/json/add_vip_info.g.dart @@ -0,0 +1,243 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/add_vip_info.dart'; + +AddVipInfo $AddVipInfoFromJson(Map json) { + final AddVipInfo addVipInfo = AddVipInfo(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + addVipInfo.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + addVipInfo.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + addVipInfo.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + addVipInfo.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + addVipInfo.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + addVipInfo.mid = mid; + } + final dynamic masterId = json['masterId']; + if (masterId != null) { + addVipInfo.masterId = masterId; + } + final String? openid = jsonConvert.convert(json['openid']); + if (openid != null) { + addVipInfo.openid = openid; + } + final dynamic aliOpenid = json['aliOpenid']; + if (aliOpenid != null) { + addVipInfo.aliOpenid = aliOpenid; + } + final dynamic douyinOpenid = json['douyinOpenid']; + if (douyinOpenid != null) { + addVipInfo.douyinOpenid = douyinOpenid; + } + final dynamic nickname = json['nickname']; + if (nickname != null) { + addVipInfo.nickname = nickname; + } + final dynamic headimg = json['headimg']; + if (headimg != null) { + addVipInfo.headimg = headimg; + } + final dynamic rankId = json['rankId']; + if (rankId != null) { + addVipInfo.rankId = rankId; + } + final dynamic rankExpireTime = json['rankExpireTime']; + if (rankExpireTime != null) { + addVipInfo.rankExpireTime = rankExpireTime; + } + final dynamic balance = json['balance']; + if (balance != null) { + addVipInfo.balance = balance; + } + final dynamic realRecharge = json['realRecharge']; + if (realRecharge != null) { + addVipInfo.realRecharge = realRecharge; + } + final dynamic sex = json['sex']; + if (sex != null) { + addVipInfo.sex = sex; + } + final dynamic status = json['status']; + if (status != null) { + addVipInfo.status = status; + } + final dynamic onCredit = json['onCredit']; + if (onCredit != null) { + addVipInfo.onCredit = onCredit; + } + final String? loginTime = jsonConvert.convert(json['loginTime']); + if (loginTime != null) { + addVipInfo.loginTime = loginTime; + } + final dynamic loginNum = json['loginNum']; + if (loginNum != null) { + addVipInfo.loginNum = loginNum; + } + final dynamic tenantCode = json['tenantCode']; + if (tenantCode != null) { + addVipInfo.tenantCode = tenantCode; + } + final dynamic source = json['source']; + if (source != null) { + addVipInfo.source = source; + } + final dynamic expendAmount = json['expendAmount']; + if (expendAmount != null) { + addVipInfo.expendAmount = expendAmount; + } + final dynamic buyTimes = json['buyTimes']; + if (buyTimes != null) { + addVipInfo.buyTimes = buyTimes; + } + final dynamic lastBuyTime = json['lastBuyTime']; + if (lastBuyTime != null) { + addVipInfo.lastBuyTime = lastBuyTime; + } + final String? vipNo = jsonConvert.convert(json['vip_no']); + if (vipNo != null) { + addVipInfo.vipNo = vipNo; + } + final String? expireTime = jsonConvert.convert(json['expireTime']); + if (expireTime != null) { + addVipInfo.expireTime = expireTime; + } + final dynamic integral = json['integral']; + if (integral != null) { + addVipInfo.integral = integral; + } + final dynamic level = json['level']; + if (level != null) { + addVipInfo.level = level; + } + final dynamic vipRegStore = json['vipRegStore']; + if (vipRegStore != null) { + addVipInfo.vipRegStore = vipRegStore; + } + final dynamic certification = json['certification']; + if (certification != null) { + addVipInfo.certification = certification; + } + return addVipInfo; +} + +Map $AddVipInfoToJson(AddVipInfo entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['masterId'] = entity.masterId; + data['openid'] = entity.openid; + data['aliOpenid'] = entity.aliOpenid; + data['douyinOpenid'] = entity.douyinOpenid; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['rankId'] = entity.rankId; + data['rankExpireTime'] = entity.rankExpireTime; + data['balance'] = entity.balance; + data['realRecharge'] = entity.realRecharge; + data['sex'] = entity.sex; + data['status'] = entity.status; + data['onCredit'] = entity.onCredit; + data['loginTime'] = entity.loginTime; + data['loginNum'] = entity.loginNum; + data['tenantCode'] = entity.tenantCode; + data['source'] = entity.source; + data['expendAmount'] = entity.expendAmount; + data['buyTimes'] = entity.buyTimes; + data['lastBuyTime'] = entity.lastBuyTime; + data['vip_no'] = entity.vipNo; + data['expireTime'] = entity.expireTime; + data['integral'] = entity.integral; + data['level'] = entity.level; + data['vipRegStore'] = entity.vipRegStore; + data['certification'] = entity.certification; + return data; +} + +extension AddVipInfoExtension on AddVipInfo { + AddVipInfo copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + dynamic masterId, + String? openid, + dynamic aliOpenid, + dynamic douyinOpenid, + dynamic nickname, + dynamic headimg, + dynamic rankId, + dynamic rankExpireTime, + dynamic balance, + dynamic realRecharge, + dynamic sex, + dynamic status, + dynamic onCredit, + String? loginTime, + dynamic loginNum, + dynamic tenantCode, + dynamic source, + dynamic expendAmount, + dynamic buyTimes, + dynamic lastBuyTime, + String? vipNo, + String? expireTime, + dynamic integral, + dynamic level, + dynamic vipRegStore, + dynamic certification, + }) { + return AddVipInfo() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..masterId = masterId ?? this.masterId + ..openid = openid ?? this.openid + ..aliOpenid = aliOpenid ?? this.aliOpenid + ..douyinOpenid = douyinOpenid ?? this.douyinOpenid + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..rankId = rankId ?? this.rankId + ..rankExpireTime = rankExpireTime ?? this.rankExpireTime + ..balance = balance ?? this.balance + ..realRecharge = realRecharge ?? this.realRecharge + ..sex = sex ?? this.sex + ..status = status ?? this.status + ..onCredit = onCredit ?? this.onCredit + ..loginTime = loginTime ?? this.loginTime + ..loginNum = loginNum ?? this.loginNum + ..tenantCode = tenantCode ?? this.tenantCode + ..source = source ?? this.source + ..expendAmount = expendAmount ?? this.expendAmount + ..buyTimes = buyTimes ?? this.buyTimes + ..lastBuyTime = lastBuyTime ?? this.lastBuyTime + ..vipNo = vipNo ?? this.vipNo + ..expireTime = expireTime ?? this.expireTime + ..integral = integral ?? this.integral + ..level = level ?? this.level + ..vipRegStore = vipRegStore ?? this.vipRegStore + ..certification = certification ?? this.certification; + } +} \ No newline at end of file diff --git a/lib/generated/json/additional_comment.g.dart b/lib/generated/json/additional_comment.g.dart new file mode 100644 index 00000000..9379b3a9 --- /dev/null +++ b/lib/generated/json/additional_comment.g.dart @@ -0,0 +1,146 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/additional_comment.dart'; + +AdditionalComment $AdditionalCommentFromJson(Map json) { + final AdditionalComment additionalComment = AdditionalComment(); + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + additionalComment.bizType = bizType; + } + final String? commentImgs = jsonConvert.convert(json['commentImgs']); + if (commentImgs != null) { + additionalComment.commentImgs = commentImgs; + } + final bool? commentImgsFlag = jsonConvert.convert( + json['commentImgsFlag']); + if (commentImgsFlag != null) { + additionalComment.commentImgsFlag = commentImgsFlag; + } + final int? commentStar = jsonConvert.convert(json['commentStar']); + if (commentStar != null) { + additionalComment.commentStar = commentStar; + } + final String? commentText = jsonConvert.convert(json['commentText']); + if (commentText != null) { + additionalComment.commentText = commentText; + } + final int? descStar = jsonConvert.convert(json['descStar']); + if (descStar != null) { + additionalComment.descStar = descStar; + } + final bool? hideFlag = jsonConvert.convert(json['hideFlag']); + if (hideFlag != null) { + additionalComment.hideFlag = hideFlag; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + additionalComment.id = id; + } + final bool? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + additionalComment.isDelete = isDelete; + } + final int? likeNum = jsonConvert.convert(json['likeNum']); + if (likeNum != null) { + additionalComment.likeNum = likeNum; + } + final int? logisticsStar = jsonConvert.convert(json['logisticsStar']); + if (logisticsStar != null) { + additionalComment.logisticsStar = logisticsStar; + } + final int? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + additionalComment.mid = mid; + } + final int? orderProductId = jsonConvert.convert(json['orderProductId']); + if (orderProductId != null) { + additionalComment.orderProductId = orderProductId; + } + final int? parentId = jsonConvert.convert(json['parentId']); + if (parentId != null) { + additionalComment.parentId = parentId; + } + final int? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + additionalComment.productId = productId; + } + final bool? sensitiveFlag = jsonConvert.convert(json['sensitiveFlag']); + if (sensitiveFlag != null) { + additionalComment.sensitiveFlag = sensitiveFlag; + } + final int? serviceStar = jsonConvert.convert(json['serviceStar']); + if (serviceStar != null) { + additionalComment.serviceStar = serviceStar; + } + final int? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + additionalComment.storeId = storeId; + } + return additionalComment; +} + +Map $AdditionalCommentToJson(AdditionalComment entity) { + final Map data = {}; + data['bizType'] = entity.bizType; + data['commentImgs'] = entity.commentImgs; + data['commentImgsFlag'] = entity.commentImgsFlag; + data['commentStar'] = entity.commentStar; + data['commentText'] = entity.commentText; + data['descStar'] = entity.descStar; + data['hideFlag'] = entity.hideFlag; + data['id'] = entity.id; + data['isDelete'] = entity.isDelete; + data['likeNum'] = entity.likeNum; + data['logisticsStar'] = entity.logisticsStar; + data['mid'] = entity.mid; + data['orderProductId'] = entity.orderProductId; + data['parentId'] = entity.parentId; + data['productId'] = entity.productId; + data['sensitiveFlag'] = entity.sensitiveFlag; + data['serviceStar'] = entity.serviceStar; + data['storeId'] = entity.storeId; + return data; +} + +extension AdditionalCommentExtension on AdditionalComment { + AdditionalComment copyWith({ + int? bizType, + String? commentImgs, + bool? commentImgsFlag, + int? commentStar, + String? commentText, + int? descStar, + bool? hideFlag, + int? id, + bool? isDelete, + int? likeNum, + int? logisticsStar, + int? mid, + int? orderProductId, + int? parentId, + int? productId, + bool? sensitiveFlag, + int? serviceStar, + int? storeId, + }) { + return AdditionalComment() + ..bizType = bizType ?? this.bizType + ..commentImgs = commentImgs ?? this.commentImgs + ..commentImgsFlag = commentImgsFlag ?? this.commentImgsFlag + ..commentStar = commentStar ?? this.commentStar + ..commentText = commentText ?? this.commentText + ..descStar = descStar ?? this.descStar + ..hideFlag = hideFlag ?? this.hideFlag + ..id = id ?? this.id + ..isDelete = isDelete ?? this.isDelete + ..likeNum = likeNum ?? this.likeNum + ..logisticsStar = logisticsStar ?? this.logisticsStar + ..mid = mid ?? this.mid + ..orderProductId = orderProductId ?? this.orderProductId + ..parentId = parentId ?? this.parentId + ..productId = productId ?? this.productId + ..sensitiveFlag = sensitiveFlag ?? this.sensitiveFlag + ..serviceStar = serviceStar ?? this.serviceStar + ..storeId = storeId ?? this.storeId; + } +} \ No newline at end of file diff --git a/lib/generated/json/address.g.dart b/lib/generated/json/address.g.dart new file mode 100644 index 00000000..2dea3dfc --- /dev/null +++ b/lib/generated/json/address.g.dart @@ -0,0 +1,110 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/address.dart'; + +Address $AddressFromJson(Map json) { + final Address address = Address(); + final String? addressStr = jsonConvert.convert(json['address']); + if (address != null) { + address.addressStr = addressStr; + } + final String? area = jsonConvert.convert(json['area']); + if (area != null) { + address.area = area; + } + final String? city = jsonConvert.convert(json['city']); + if (city != null) { + address.city = city; + } + final String? cityInfo = jsonConvert.convert(json['cityInfo']); + if (cityInfo != null) { + address.cityInfo = cityInfo; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + address.id = id; + } + final bool? isDefault = jsonConvert.convert(json['isDefault']); + if (isDefault != null) { + address.isDefault = isDefault; + } + final String? latitude = jsonConvert.convert(json['latitude']); + if (latitude != null) { + address.latitude = latitude; + } + final String? longitude = jsonConvert.convert(json['longitude']); + if (longitude != null) { + address.longitude = longitude; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + address.mid = mid; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + address.phone = phone; + } + final String? province = jsonConvert.convert(json['province']); + if (province != null) { + address.province = province; + } + final String? tag = jsonConvert.convert(json['tag']); + if (tag != null) { + address.tag = tag; + } + final String? username = jsonConvert.convert(json['username']); + if (username != null) { + address.username = username; + } + return address; +} + +Map $AddressToJson(Address entity) { + final Map data = {}; + data['address'] = entity.addressStr; + data['area'] = entity.area; + data['city'] = entity.city; + data['cityInfo'] = entity.cityInfo; + data['id'] = entity.id; + data['isDefault'] = entity.isDefault; + data['latitude'] = entity.latitude; + data['longitude'] = entity.longitude; + data['mid'] = entity.mid; + data['phone'] = entity.phone; + data['province'] = entity.province; + data['tag'] = entity.tag; + data['username'] = entity.username; + return data; +} + +extension AddressExtension on Address { + Address copyWith({ + String? address, + String? area, + String? city, + String? cityInfo, + String? id, + bool? isDefault, + String? latitude, + String? longitude, + String? mid, + String? phone, + String? province, + String? tag, + String? username, + }) { + return Address() + ..addressStr = addressStr ?? this.addressStr + ..area = area ?? this.area + ..city = city ?? this.city + ..cityInfo = cityInfo ?? this.cityInfo + ..id = id ?? this.id + ..isDefault = isDefault ?? this.isDefault + ..latitude = latitude ?? this.latitude + ..longitude = longitude ?? this.longitude + ..mid = mid ?? this.mid + ..phone = phone ?? this.phone + ..province = province ?? this.province + ..tag = tag ?? this.tag + ..username = username ?? this.username; + } +} \ No newline at end of file diff --git a/lib/generated/json/app_update.g.dart b/lib/generated/json/app_update.g.dart new file mode 100644 index 00000000..0cc991a6 --- /dev/null +++ b/lib/generated/json/app_update.g.dart @@ -0,0 +1,52 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/app_update.dart'; + +AppUpdate $AppUpdateFromJson(Map json) { + final AppUpdate appUpdate = AppUpdate(); + final String? appLastVersion = jsonConvert.convert( + json['appLastVersion']); + if (appLastVersion != null) { + appUpdate.appLastVersion = appLastVersion; + } + final String? appLastVersionUrl = jsonConvert.convert( + json['appLastVersionUrl']); + if (appLastVersionUrl != null) { + appUpdate.appLastVersionUrl = appLastVersionUrl; + } + final String? appLastVersionUp = jsonConvert.convert( + json['appLastVersionUp']); + if (appLastVersionUp != null) { + appUpdate.appLastVersionUp = appLastVersionUp; + } + final String? appLastVersionExplain = jsonConvert.convert( + json['appLastVersionExplain']); + if (appLastVersionExplain != null) { + appUpdate.appLastVersionExplain = appLastVersionExplain; + } + return appUpdate; +} + +Map $AppUpdateToJson(AppUpdate entity) { + final Map data = {}; + data['appLastVersion'] = entity.appLastVersion; + data['appLastVersionUrl'] = entity.appLastVersionUrl; + data['appLastVersionUp'] = entity.appLastVersionUp; + data['appLastVersionExplain'] = entity.appLastVersionExplain; + return data; +} + +extension AppUpdateExtension on AppUpdate { + AppUpdate copyWith({ + String? appLastVersion, + String? appLastVersionUrl, + String? appLastVersionUp, + String? appLastVersionExplain, + }) { + return AppUpdate() + ..appLastVersion = appLastVersion ?? this.appLastVersion + ..appLastVersionUrl = appLastVersionUrl ?? this.appLastVersionUrl + ..appLastVersionUp = appLastVersionUp ?? this.appLastVersionUp + ..appLastVersionExplain = appLastVersionExplain ?? + this.appLastVersionExplain; + } +} \ No newline at end of file diff --git a/lib/generated/json/article.g.dart b/lib/generated/json/article.g.dart new file mode 100644 index 00000000..b6ee5724 --- /dev/null +++ b/lib/generated/json/article.g.dart @@ -0,0 +1,239 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/author.dart'; + + +Article $ArticleFromJson(Map json) { + final Article article = Article(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + article.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + article.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + article.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + article.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + article.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + article.storeId = storeId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + article.categoryId = categoryId; + } + final String? mainTitle = jsonConvert.convert(json['mainTitle']); + if (mainTitle != null) { + article.mainTitle = mainTitle; + } + final dynamic viceTitle = json['viceTitle']; + if (viceTitle != null) { + article.viceTitle = viceTitle; + } + final String? content = jsonConvert.convert(json['content']); + if (content != null) { + article.content = content; + } + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + article.coverImg = coverImg; + } + final Author? author = jsonConvert.convert(json['author']); + if (author != null) { + article.author = author; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + article.type = type; + } + final int? likes = jsonConvert.convert(json['likes']); + if (likes != null) { + article.likes = likes; + } + final int? viewers = jsonConvert.convert(json['viewers']); + if (viewers != null) { + article.viewers = viewers; + } + final String? startTime = jsonConvert.convert(json['startTime']); + if (startTime != null) { + article.startTime = startTime; + } + final String? endTime = jsonConvert.convert(json['endTime']); + if (endTime != null) { + article.endTime = endTime; + } + final bool? isHot = jsonConvert.convert(json['isHot']); + if (isHot != null) { + article.isHot = isHot; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + article.state = state; + } + final String? location = jsonConvert.convert(json['location']); + if (location != null) { + article.location = location; + } + final String? longitude = jsonConvert.convert(json['longitude']); + if (longitude != null) { + article.longitude = longitude; + } + final String? latitude = jsonConvert.convert(json['latitude']); + if (latitude != null) { + article.latitude = latitude; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + article.remark = remark; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + article.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + article.tenantCode = tenantCode; + } + final dynamic storeName = json['storeName']; + if (storeName != null) { + article.storeName = storeName; + } + final bool? liked = jsonConvert.convert(json['liked']); + if (liked != null) { + article.liked = liked; + } + final bool? followed = jsonConvert.convert(json['followed']); + if (followed != null) { + article.followed = followed; + } + final dynamic comments = json['comments']; + if (comments != null) { + article.comments = comments; + } + final String? authorName = jsonConvert.convert(json['authorName']); + if (authorName != null) { + article.authorName = authorName; + } + final String? authorHeadImg = jsonConvert.convert( + json['authorHeadImg']); + if (authorHeadImg != null) { + article.authorHeadImg = authorHeadImg; + } + return article; +} + +Map $ArticleToJson(Article entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['categoryId'] = entity.categoryId; + data['mainTitle'] = entity.mainTitle; + data['viceTitle'] = entity.viceTitle; + data['content'] = entity.content; + data['coverImg'] = entity.coverImg; + data['author'] = entity.author?.toJson(); + data['type'] = entity.type; + data['likes'] = entity.likes; + data['viewers'] = entity.viewers; + data['startTime'] = entity.startTime; + data['endTime'] = entity.endTime; + data['isHot'] = entity.isHot; + data['state'] = entity.state; + data['location'] = entity.location; + data['longitude'] = entity.longitude; + data['latitude'] = entity.latitude; + data['remark'] = entity.remark; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['storeName'] = entity.storeName; + data['liked'] = entity.liked; + data['followed'] = entity.followed; + data['comments'] = entity.comments; + data['authorName'] = entity.authorName; + data['authorHeadImg'] = entity.authorHeadImg; + return data; +} + +extension ArticleExtension on Article { + Article copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? categoryId, + String? mainTitle, + dynamic viceTitle, + String? content, + String? coverImg, + Author? author, + int? type, + int? likes, + int? viewers, + String? startTime, + String? endTime, + bool? isHot, + int? state, + String? location, + String? longitude, + String? latitude, + String? remark, + int? isDelete, + String? tenantCode, + dynamic storeName, + bool? liked, + bool? followed, + dynamic comments, + String? authorName, + String? authorHeadImg, + }) { + return Article() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..categoryId = categoryId ?? this.categoryId + ..mainTitle = mainTitle ?? this.mainTitle + ..viceTitle = viceTitle ?? this.viceTitle + ..content = content ?? this.content + ..coverImg = coverImg ?? this.coverImg + ..author = author ?? this.author + ..type = type ?? this.type + ..likes = likes ?? this.likes + ..viewers = viewers ?? this.viewers + ..startTime = startTime ?? this.startTime + ..endTime = endTime ?? this.endTime + ..isHot = isHot ?? this.isHot + ..state = state ?? this.state + ..location = location ?? this.location + ..longitude = longitude ?? this.longitude + ..latitude = latitude ?? this.latitude + ..remark = remark ?? this.remark + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..storeName = storeName ?? this.storeName + ..liked = liked ?? this.liked + ..followed = followed ?? this.followed + ..comments = comments ?? this.comments + ..authorName = authorName ?? this.authorName + ..authorHeadImg = authorHeadImg ?? this.authorHeadImg; + } +} \ No newline at end of file diff --git a/lib/generated/json/author.g.dart b/lib/generated/json/author.g.dart new file mode 100644 index 00000000..08e4cda5 --- /dev/null +++ b/lib/generated/json/author.g.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/author.dart'; + +Author $AuthorFromJson(Map json) { + final Author author = Author(); + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + author.name = name; + } + final String? avatar = jsonConvert.convert(json['avatar']); + if (avatar != null) { + author.avatar = avatar; + } + return author; +} + +Map $AuthorToJson(Author entity) { + final Map data = {}; + data['name'] = entity.name; + data['avatar'] = entity.avatar; + return data; +} + +extension AuthorExtension on Author { + Author copyWith({ + String? name, + String? avatar, + }) { + return Author() + ..name = name ?? this.name + ..avatar = avatar ?? this.avatar; + } +} \ No newline at end of file diff --git a/lib/generated/json/balance_change_list.g.dart b/lib/generated/json/balance_change_list.g.dart new file mode 100644 index 00000000..ee6dbcc5 --- /dev/null +++ b/lib/generated/json/balance_change_list.g.dart @@ -0,0 +1,187 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/balance_change_list.dart'; + +BalanceChangeRecords $BalanceChangeRecordsFromJson(Map json) { + final BalanceChangeRecords balanceChangeRecords = BalanceChangeRecords(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + balanceChangeRecords.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + balanceChangeRecords.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + balanceChangeRecords.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + balanceChangeRecords.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + balanceChangeRecords.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + balanceChangeRecords.mid = mid; + } + final String? linkId = jsonConvert.convert(json['linkId']); + if (linkId != null) { + balanceChangeRecords.linkId = linkId; + } + final int? pm = jsonConvert.convert(json['pm']); + if (pm != null) { + balanceChangeRecords.pm = pm; + } + final String? title = jsonConvert.convert(json['title']); + if (title != null) { + balanceChangeRecords.title = title; + } + final String? category = jsonConvert.convert(json['category']); + if (category != null) { + balanceChangeRecords.category = category; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + balanceChangeRecords.type = type; + } + final String? number = jsonConvert.convert(json['number']); + if (number != null) { + balanceChangeRecords.number = number; + } + final String? realNumber = jsonConvert.convert(json['realNumber']); + if (realNumber != null) { + balanceChangeRecords.realNumber = realNumber; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + balanceChangeRecords.balance = balance; + } + final String? mark = jsonConvert.convert(json['mark']); + if (mark != null) { + balanceChangeRecords.mark = mark; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + balanceChangeRecords.status = status; + } + final bool? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + balanceChangeRecords.isDeleted = isDeleted; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + balanceChangeRecords.storeName = storeName; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + balanceChangeRecords.nickname = nickname; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + balanceChangeRecords.phone = phone; + } + final dynamic startTime = json['startTime']; + if (startTime != null) { + balanceChangeRecords.startTime = startTime; + } + final dynamic endTime = json['endTime']; + if (endTime != null) { + balanceChangeRecords.endTime = endTime; + } + final dynamic tenantCode = json['tenantCode']; + if (tenantCode != null) { + balanceChangeRecords.tenantCode = tenantCode; + } + final dynamic storeId = json['storeId']; + if (storeId != null) { + balanceChangeRecords.storeId = storeId; + } + return balanceChangeRecords; +} + +Map $BalanceChangeRecordsToJson(BalanceChangeRecords entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['linkId'] = entity.linkId; + data['pm'] = entity.pm; + data['title'] = entity.title; + data['category'] = entity.category; + data['type'] = entity.type; + data['number'] = entity.number; + data['realNumber'] = entity.realNumber; + data['balance'] = entity.balance; + data['mark'] = entity.mark; + data['status'] = entity.status; + data['isDeleted'] = entity.isDeleted; + data['storeName'] = entity.storeName; + data['nickname'] = entity.nickname; + data['phone'] = entity.phone; + data['startTime'] = entity.startTime; + data['endTime'] = entity.endTime; + data['tenantCode'] = entity.tenantCode; + data['storeId'] = entity.storeId; + return data; +} + +extension BalanceChangeRecordsExtension on BalanceChangeRecords { + BalanceChangeRecords copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? linkId, + int? pm, + String? title, + String? category, + String? type, + String? number, + String? realNumber, + String? balance, + String? mark, + bool? status, + bool? isDeleted, + String? storeName, + String? nickname, + String? phone, + dynamic startTime, + dynamic endTime, + dynamic tenantCode, + dynamic storeId, + }) { + return BalanceChangeRecords() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..linkId = linkId ?? this.linkId + ..pm = pm ?? this.pm + ..title = title ?? this.title + ..category = category ?? this.category + ..type = type ?? this.type + ..number = number ?? this.number + ..realNumber = realNumber ?? this.realNumber + ..balance = balance ?? this.balance + ..mark = mark ?? this.mark + ..status = status ?? this.status + ..isDeleted = isDeleted ?? this.isDeleted + ..storeName = storeName ?? this.storeName + ..nickname = nickname ?? this.nickname + ..phone = phone ?? this.phone + ..startTime = startTime ?? this.startTime + ..endTime = endTime ?? this.endTime + ..tenantCode = tenantCode ?? this.tenantCode + ..storeId = storeId ?? this.storeId; + } +} \ No newline at end of file diff --git a/lib/generated/json/balance_consumption_ranking.g.dart b/lib/generated/json/balance_consumption_ranking.g.dart new file mode 100644 index 00000000..339dc58f --- /dev/null +++ b/lib/generated/json/balance_consumption_ranking.g.dart @@ -0,0 +1,49 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/balance_consumption_ranking.dart'; + +BalanceConsumptionRanking $BalanceConsumptionRankingFromJson( + Map json) { + final BalanceConsumptionRanking balanceConsumptionRanking = BalanceConsumptionRanking(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + balanceConsumptionRanking.id = id; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + balanceConsumptionRanking.name = name; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + balanceConsumptionRanking.phone = phone; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + balanceConsumptionRanking.money = money; + } + return balanceConsumptionRanking; +} + +Map $BalanceConsumptionRankingToJson( + BalanceConsumptionRanking entity) { + final Map data = {}; + data['id'] = entity.id; + data['name'] = entity.name; + data['phone'] = entity.phone; + data['money'] = entity.money; + return data; +} + +extension BalanceConsumptionRankingExtension on BalanceConsumptionRanking { + BalanceConsumptionRanking copyWith({ + String? id, + String? name, + String? phone, + String? money, + }) { + return BalanceConsumptionRanking() + ..id = id ?? this.id + ..name = name ?? this.name + ..phone = phone ?? this.phone + ..money = money ?? this.money; + } +} \ No newline at end of file diff --git a/lib/generated/json/banner.g.dart b/lib/generated/json/banner.g.dart new file mode 100644 index 00000000..9d42d15e --- /dev/null +++ b/lib/generated/json/banner.g.dart @@ -0,0 +1,103 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/banner.dart'; + +BannerData $BannerDataFromJson(Map json) { + final BannerData bannerData = BannerData(); + final String? content = jsonConvert.convert(json['content']); + if (content != null) { + bannerData.content = content; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + bannerData.createTime = createTime; + } + final int? contentType = jsonConvert.convert(json['contentType']); + if (contentType != null) { + bannerData.contentType = contentType; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + bannerData.createUser = createUser; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + bannerData.id = id; + } + final String? imgUrl = jsonConvert.convert(json['imgUrl']); + if (imgUrl != null) { + bannerData.imgUrl = imgUrl; + } + final bool? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + bannerData.isDelete = isDelete; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + bannerData.storeId = storeId; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + bannerData.tenantCode = tenantCode; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + bannerData.type = type; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + bannerData.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + bannerData.updateUser = updateUser; + } + return bannerData; +} + +Map $BannerDataToJson(BannerData entity) { + final Map data = {}; + data['content'] = entity.content; + data['createTime'] = entity.createTime; + data['contentType'] = entity.contentType; + data['createUser'] = entity.createUser; + data['id'] = entity.id; + data['imgUrl'] = entity.imgUrl; + data['isDelete'] = entity.isDelete; + data['storeId'] = entity.storeId; + data['tenantCode'] = entity.tenantCode; + data['type'] = entity.type; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + return data; +} + +extension BannerDataExtension on BannerData { + BannerData copyWith({ + String? content, + String? createTime, + int? contentType, + String? createUser, + String? id, + String? imgUrl, + bool? isDelete, + String? storeId, + String? tenantCode, + String? type, + String? updateTime, + String? updateUser, + }) { + return BannerData() + ..content = content ?? this.content + ..createTime = createTime ?? this.createTime + ..contentType = contentType ?? this.contentType + ..createUser = createUser ?? this.createUser + ..id = id ?? this.id + ..imgUrl = imgUrl ?? this.imgUrl + ..isDelete = isDelete ?? this.isDelete + ..storeId = storeId ?? this.storeId + ..tenantCode = tenantCode ?? this.tenantCode + ..type = type ?? this.type + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser; + } +} \ No newline at end of file diff --git a/lib/generated/json/base/json_convert_content.dart b/lib/generated/json/base/json_convert_content.dart new file mode 100644 index 00000000..92086c7e --- /dev/null +++ b/lib/generated/json/base/json_convert_content.dart @@ -0,0 +1,1396 @@ +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: camel_case_types +// ignore_for_file: prefer_single_quotes + +// This file is automatically generated. DO NOT EDIT, all your changes would be lost. +import 'package:flutter/material.dart' show debugPrint; +import 'package:huixiang/data/achivement_detail_list.dart'; +import 'package:huixiang/data/act_info.dart'; +import 'package:huixiang/data/act_product.dart'; +import 'package:huixiang/data/act_record.dart'; +import 'package:huixiang/data/act_record_and_join_dto_list.dart'; +import 'package:huixiang/data/act_record_join_list.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/activity_act_record_details.dart'; +import 'package:huixiang/data/activity_area_list.dart'; +import 'package:huixiang/data/activity_details.dart'; +import 'package:huixiang/data/activity_order.dart'; +import 'package:huixiang/data/activity_pos.dart'; +import 'package:huixiang/data/add_vip_info.dart'; +import 'package:huixiang/data/additional_comment.dart'; +import 'package:huixiang/data/address.dart'; +import 'package:huixiang/data/app_update.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/author.dart'; +import 'package:huixiang/data/balance_change_list.dart'; +import 'package:huixiang/data/balance_consumption_ranking.dart'; +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/brand.dart'; +import 'package:huixiang/data/brand_data.dart'; +import 'package:huixiang/data/bus_recharge.dart'; +import 'package:huixiang/data/category_select.dart'; +import 'package:huixiang/data/channels.dart'; +import 'package:huixiang/data/chapter.dart'; +import 'package:huixiang/data/clerk_manage.dart'; +import 'package:huixiang/data/collect_class.dart'; +import 'package:huixiang/data/comment.dart'; +import 'package:huixiang/data/comunity_comment.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/coupon_detail.dart'; +import 'package:huixiang/data/coupon_list.dart'; +import 'package:huixiang/data/coupon_vo.dart'; +import 'package:huixiang/data/course.dart'; +import 'package:huixiang/data/course_details.dart'; +import 'package:huixiang/data/dat_count.dart'; +import 'package:huixiang/data/data_type.dart'; +import 'package:huixiang/data/day_flow.dart'; +import 'package:huixiang/data/delivery_info.dart'; +import 'package:huixiang/data/down_order.dart'; +import 'package:huixiang/data/exchange_order.dart'; +import 'package:huixiang/data/exchange_order_goods.dart'; +import 'package:huixiang/data/farmers.dart'; +import 'package:huixiang/data/find_mini_group.dart'; +import 'package:huixiang/data/follow.dart'; +import 'package:huixiang/data/founder.dart'; +import 'package:huixiang/data/good_list.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/goods_category.dart'; +import 'package:huixiang/data/goods_category_list.dart'; +import 'package:huixiang/data/goods_type_sales.dart'; +import 'package:huixiang/data/headlines.dart'; +import 'package:huixiang/data/headlines_details.dart'; +import 'package:huixiang/data/home_rank.dart'; +import 'package:huixiang/data/home_recommend_list.dart'; +import 'package:huixiang/data/invitation.dart'; +import 'package:huixiang/data/ip_data.dart'; +import 'package:huixiang/data/launch_join_act.dart'; +import 'package:huixiang/data/login_info.dart'; +import 'package:huixiang/data/logistics.dart'; +import 'package:huixiang/data/member_comment.dart'; +import 'package:huixiang/data/member_info.dart'; +import 'package:huixiang/data/member_infor.dart'; +import 'package:huixiang/data/member_rank.dart'; +import 'package:huixiang/data/member_recharge.dart'; +import 'package:huixiang/data/member_source.dart'; +import 'package:huixiang/data/member_vo.dart'; +import 'package:huixiang/data/message.dart'; +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/data/mini.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/msg_stats.dart'; +import 'package:huixiang/data/order_info.dart'; +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/data/order_trend.dart'; +import 'package:huixiang/data/order_user_detail.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/page_list.dart'; +import 'package:huixiang/data/phone_query_member_info.dart'; +import 'package:huixiang/data/pickup_type.dart'; +import 'package:huixiang/data/place_order_first.dart'; +import 'package:huixiang/data/platter.dart'; +import 'package:huixiang/data/popular_sales.dart'; +import 'package:huixiang/data/preferential.dart'; +import 'package:huixiang/data/product.dart'; +import 'package:huixiang/data/product_group.dart'; +import 'package:huixiang/data/product_set_meals.dart'; +import 'package:huixiang/data/product_show.dart'; +import 'package:huixiang/data/product_sku_list.dart'; +import 'package:huixiang/data/promotion.dart'; +import 'package:huixiang/data/promotion_info.dart'; +import 'package:huixiang/data/rank.dart'; +import 'package:huixiang/data/recharge.dart'; +import 'package:huixiang/data/recharge_act.dart'; +import 'package:huixiang/data/recharge_flow.dart'; +import 'package:huixiang/data/refund_reason.dart'; +import 'package:huixiang/data/second_card.dart'; +import 'package:huixiang/data/service_bug.dart'; +import 'package:huixiang/data/set_meal_data.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/settlement.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; +import 'package:huixiang/data/shopping_cart.dart'; +import 'package:huixiang/data/sign_in.dart'; +import 'package:huixiang/data/sign_info.dart'; +import 'package:huixiang/data/single_sales.dart'; +import 'package:huixiang/data/sku_attr_list.dart'; +import 'package:huixiang/data/sku_json.dart'; +import 'package:huixiang/data/social_info.dart'; +import 'package:huixiang/data/store.dart'; +import 'package:huixiang/data/store_info.dart'; +import 'package:huixiang/data/store_time_info.dart'; +import 'package:huixiang/data/store_total_money_info.dart'; +import 'package:huixiang/data/store_type.dart'; +import 'package:huixiang/data/subscribe_param.dart'; +import 'package:huixiang/data/task.dart'; +import 'package:huixiang/data/tenant_info.dart'; +import 'package:huixiang/data/tenant_package.dart'; +import 'package:huixiang/data/tenant_package_calculate_details.dart'; +import 'package:huixiang/data/ticket.dart'; +import 'package:huixiang/data/ticket_details.dart'; +import 'package:huixiang/data/ticket_item.dart'; +import 'package:huixiang/data/ticket_record.dart'; +import 'package:huixiang/data/ticket_show.dart'; +import 'package:huixiang/data/ticket_stats.dart'; +import 'package:huixiang/data/trade_summary.dart'; +import 'package:huixiang/data/upload_result.dart'; +import 'package:huixiang/data/user_bill.dart'; +import 'package:huixiang/data/user_entity.dart'; +import 'package:huixiang/data/user_info.dart'; +import 'package:huixiang/data/user_info_edit.dart'; +import 'package:huixiang/data/verify_code.dart'; +import 'package:huixiang/data/vip_badges.dart'; +import 'package:huixiang/data/vip_benefit.dart'; +import 'package:huixiang/data/vip_card.dart'; +import 'package:huixiang/data/vip_card_home.dart'; +import 'package:huixiang/data/vip_counts_info.dart'; +import 'package:huixiang/data/vip_record_details.dart'; +import 'package:huixiang/data/vip_rule_details.dart'; +import 'package:huixiang/data/wx_pay.dart'; + +JsonConvert jsonConvert = JsonConvert(); + +typedef JsonConvertFunction = T Function(Map json); +typedef EnumConvertFunction = T Function(String value); +typedef ConvertExceptionHandler = void Function(Object error, StackTrace stackTrace); +extension MapSafeExt on Map { + T? getOrNull(K? key) { + if (!containsKey(key) || key == null) { + return null; + } else { + return this[key] as T?; + } + } +} + +class JsonConvert { + static ConvertExceptionHandler? onError; + JsonConvertClassCollection convertFuncMap = JsonConvertClassCollection(); + + /// When you are in the development, to generate a new model class, hot-reload doesn't find new generation model class, you can build on MaterialApp method called jsonConvert. ReassembleConvertFuncMap (); This method only works in a development environment + /// https://flutter.cn/docs/development/tools/hot-reload + /// class MyApp extends StatelessWidget { + /// const MyApp({Key? key}) + /// : super(key: key); + /// + /// @override + /// Widget build(BuildContext context) { + /// jsonConvert.reassembleConvertFuncMap(); + /// return MaterialApp(); + /// } + /// } + void reassembleConvertFuncMap() { + bool isReleaseMode = const bool.fromEnvironment('dart.vm.product'); + if (!isReleaseMode) { + convertFuncMap = JsonConvertClassCollection(); + } + } + + T? convert(dynamic value, {EnumConvertFunction? enumConvert}) { + if (value == null) { + return null; + } + if (value is T) { + return value; + } + try { + return _asT(value, enumConvert: enumConvert); + } catch (e, stackTrace) { + debugPrint('asT<$T> $e $stackTrace'); + if (onError != null) { + onError!(e, stackTrace); + } + return null; + } + } + + List? convertList(List? value, + {EnumConvertFunction? enumConvert}) { + if (value == null) { + return null; + } + try { + return value.map((dynamic e) => _asT(e, enumConvert: enumConvert)) + .toList(); + } catch (e, stackTrace) { + debugPrint('asT<$T> $e $stackTrace'); + if (onError != null) { + onError!(e, stackTrace); + } + return []; + } + } + + List? convertListNotNull(dynamic value, + {EnumConvertFunction? enumConvert}) { + if (value == null) { + return null; + } + try { + return (value as List).map((dynamic e) => + _asT(e, enumConvert: enumConvert)!).toList(); + } catch (e, stackTrace) { + debugPrint('asT<$T> $e $stackTrace'); + if (onError != null) { + onError!(e, stackTrace); + } + return []; + } + } + + T? _asT(dynamic value, + {EnumConvertFunction? enumConvert}) { + final String type = T.toString(); + final String valueS = value.toString(); + if (enumConvert != null) { + return enumConvert(valueS) as T; + } else if (type == "String") { + return valueS as T; + } else if (type == "int") { + final int? intValue = int.tryParse(valueS); + if (intValue == null) { + return double.tryParse(valueS)?.toInt() as T?; + } else { + return intValue as T; + } + } else if (type == "double") { + return double.parse(valueS) as T; + } else if (type == "DateTime") { + return DateTime.parse(valueS) as T; + } else if (type == "bool") { + if (valueS == '0' || valueS == '1') { + return (valueS == '1') as T; + } + return (valueS == 'true') as T; + } else if (type == "Map" || type.startsWith("Map<")) { + return value as T; + } else if (type == "List" || type.startsWith("List<")) { + return fromJsonAsT(value); + } else { + if (convertFuncMap.containsKey(type)) { + if (value == null) { + return null; + } + return convertFuncMap[type]!(value as Map) as T; + } else { + throw UnimplementedError( + '$type unimplemented,you can try running the app again'); + } + } + } + + //list is returned by type + static M? _getListChildType(List> data) { + if ([] is M) { + return data.map((Map e) => + AchivementDetailList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + RewardList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => ActInfo.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActProduct.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActRecord.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActRecordAndJoinlDTOList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActRecordJoinList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Activity.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActivityActRecordDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActivityAreaList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActTemplate.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TimeProductList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => ActTime.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActivityDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActivityOrder.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ActivityPos.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + AddVipInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + AdditionalComment.fromJson(e)).toList() as M; + } + if (
[] is M) { + return data.map
((Map e) => Address.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + AppUpdate.fromJson(e)).toList() as M; + } + if (
[] is M) { + return data.map
((Map e) => Article.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => Author.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + BalanceChangeRecords.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + BalanceConsumptionRanking.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + BannerData.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + BaseData.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Brand.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + BrandData.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + BusRecharge.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CategorySelect.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Channels.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Chapter.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => Content.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ClerkManage.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Sex.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => Nation.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Education.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PositionStatus.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CollectClass.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Comment.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ComunityComment.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SubjectInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ComunityMemberInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Coupon.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CouponDetail.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CouponList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CouponVo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Course.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CourseDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + DatCount.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + DataType.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => DayFlow.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + DeliveryInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + DownOrder.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ExchangeOrder.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ExchangeOrderGoods.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Farmers.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + FindMiniGroup.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductListBean.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Follow.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => Founder.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + GoodList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Goods.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + GoodsCategory.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + GoodsCategoryList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + GoodsTypeSales.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Headlines.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + HeadlinesDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + HomeRank.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CommodityList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CommodityZone.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + HomeRecommendList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Invitation.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => IpData.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + LaunchJoinAct.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + LoginInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + AuthInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + InterviewCouponList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + FirstLoginCouponList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Logistics.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Traces.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberComment.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberInfor.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberRank.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberRecharge.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberSource.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberVo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Message.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MinOrderInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + OrderInfoVo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberVO.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MemberRankVo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Mini.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MiniDetail.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + StoreDTO.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + AttrList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + AttrValueList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductSkuVOList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + MsgStats.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + OrderInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + AddressExt.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => StoreVO.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + StoreVOPosType.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + OrderDetail.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + OrderProductVO.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + OrderTrend.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + OrderUserDetail.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PageInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PageList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Orders.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PhoneQueryMemberInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + UseableConponList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PickupType.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PlaceOrderFirst.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PromotionInfoDTOBean.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Platter.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PopularSales.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + DashMemberList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SaleProductList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ChangeData.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PreferentialList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Product.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductGroup.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductGroupProfitSharing.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductSetMeals.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SetMealsProductInfoList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SkuInfoList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductSkuAttrList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductAttrInfoList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductShow.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductSkuList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Promotion.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + DetailBean.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PromotionInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PromotionInfoPromotionDetail.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Rank.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Recharge.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + RechargeAct.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + RechargeFlow.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + RefundReason.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SecondCard.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ServiceBug.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SetMealData.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductInfoList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SettleOrderInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CouponListBean.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PromotionInfoListBean.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PromotionDetailBean.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + Settlement.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + OrderProductVOList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PromotionInfoDTO.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ShopingHomeConfig.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SpecialArea.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ShopHomeProductList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ShopHomeProductSkuVOList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ShopHomeAttrList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ShopHomeAttrValueList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + QuickEntry.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + CategoryGroup.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + GroupList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ShoppingCart.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SkuItemList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + PlatterList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => SignIn.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SignInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SingleSales.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SkuAttrList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => SkuJson.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SocialInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Store.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + StoreInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + StoreTimeInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + StoreTotalMoneyInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + StoreType.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SubscribeParam.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Task.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TenantInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Type.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => Status.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => PosType.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TenantPackage.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TenantPackageSale.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TenantPackageCalculateDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Ticket.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TicketDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TicketItemList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TicketItems.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TicketRecord.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TicketShow.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TicketStats.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + InfoList.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + TradeSummary.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + SaleBusinessAnalysisVOS.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + UploadResult.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + UserBill.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + UserEntity.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + UserInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + UserInfoEdit.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + UserInfoEditSex.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + VerifyCode.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + VipBadges.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + VipBenefit.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => VipCard.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + VipCardHome.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => Member.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => Cards.fromJson(e)) + .toList() as M; + } + if ([] is M) { + return data.map((Map e) => + ProductVips.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + VipCountsInfo.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + VipRecordDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => + VipRuleDetails.fromJson(e)).toList() as M; + } + if ([] is M) { + return data.map((Map e) => WxPay.fromJson(e)) + .toList() as M; + } + + debugPrint("$M not found"); + + return null; + } + + static M? fromJsonAsT(dynamic json) { + if (json is M) { + return json; + } + if (json is List) { + return _getListChildType( + json.map((dynamic e) => e as Map).toList()); + } else { + return jsonConvert.convert(json); + } + } +} + +class JsonConvertClassCollection { + Map convertFuncMap = { + (AchivementDetailList).toString(): AchivementDetailList.fromJson, + (RewardList).toString(): RewardList.fromJson, + (ActInfo).toString(): ActInfo.fromJson, + (ActProduct).toString(): ActProduct.fromJson, + (ActRecord).toString(): ActRecord.fromJson, + (ActRecordAndJoinlDTOList).toString(): ActRecordAndJoinlDTOList.fromJson, + (ActRecordJoinList).toString(): ActRecordJoinList.fromJson, + (Activity).toString(): Activity.fromJson, + (ActivityActRecordDetails).toString(): ActivityActRecordDetails.fromJson, + (ActivityAreaList).toString(): ActivityAreaList.fromJson, + (ActTemplate).toString(): ActTemplate.fromJson, + (TimeProductList).toString(): TimeProductList.fromJson, + (ActTime).toString(): ActTime.fromJson, + (ActivityDetails).toString(): ActivityDetails.fromJson, + (ActivityOrder).toString(): ActivityOrder.fromJson, + (ActivityPos).toString(): ActivityPos.fromJson, + (AddVipInfo).toString(): AddVipInfo.fromJson, + (AdditionalComment).toString(): AdditionalComment.fromJson, + (Address).toString(): Address.fromJson, + (AppUpdate).toString(): AppUpdate.fromJson, + (Article).toString(): Article.fromJson, + (Author).toString(): Author.fromJson, + (BalanceChangeRecords).toString(): BalanceChangeRecords.fromJson, + (BalanceConsumptionRanking).toString(): BalanceConsumptionRanking.fromJson, + (BannerData).toString(): BannerData.fromJson, + (BaseData).toString(): BaseData.fromJson, + (Brand).toString(): Brand.fromJson, + (BrandData).toString(): BrandData.fromJson, + (BusRecharge).toString(): BusRecharge.fromJson, + (CategorySelect).toString(): CategorySelect.fromJson, + (Channels).toString(): Channels.fromJson, + (Chapter).toString(): Chapter.fromJson, + (Content).toString(): Content.fromJson, + (ClerkManage).toString(): ClerkManage.fromJson, + (Sex).toString(): Sex.fromJson, + (Nation).toString(): Nation.fromJson, + (Education).toString(): Education.fromJson, + (PositionStatus).toString(): PositionStatus.fromJson, + (CollectClass).toString(): CollectClass.fromJson, + (Comment).toString(): Comment.fromJson, + (ComunityComment).toString(): ComunityComment.fromJson, + (SubjectInfo).toString(): SubjectInfo.fromJson, + (ComunityMemberInfo).toString(): ComunityMemberInfo.fromJson, + (Coupon).toString(): Coupon.fromJson, + (CouponDetail).toString(): CouponDetail.fromJson, + (CouponList).toString(): CouponList.fromJson, + (CouponVo).toString(): CouponVo.fromJson, + (Course).toString(): Course.fromJson, + (CourseDetails).toString(): CourseDetails.fromJson, + (DatCount).toString(): DatCount.fromJson, + (DataType).toString(): DataType.fromJson, + (DayFlow).toString(): DayFlow.fromJson, + (DeliveryInfo).toString(): DeliveryInfo.fromJson, + (DownOrder).toString(): DownOrder.fromJson, + (ExchangeOrder).toString(): ExchangeOrder.fromJson, + (ExchangeOrderGoods).toString(): ExchangeOrderGoods.fromJson, + (Farmers).toString(): Farmers.fromJson, + (FindMiniGroup).toString(): FindMiniGroup.fromJson, + (ProductListBean).toString(): ProductListBean.fromJson, + (Follow).toString(): Follow.fromJson, + (Founder).toString(): Founder.fromJson, + (GoodList).toString(): GoodList.fromJson, + (Goods).toString(): Goods.fromJson, + (GoodsCategory).toString(): GoodsCategory.fromJson, + (GoodsCategoryList).toString(): GoodsCategoryList.fromJson, + (GoodsTypeSales).toString(): GoodsTypeSales.fromJson, + (Headlines).toString(): Headlines.fromJson, + (HeadlinesDetails).toString(): HeadlinesDetails.fromJson, + (HomeRank).toString(): HomeRank.fromJson, + (CommodityList).toString(): CommodityList.fromJson, + (CommodityZone).toString(): CommodityZone.fromJson, + (HomeRecommendList).toString(): HomeRecommendList.fromJson, + (Invitation).toString(): Invitation.fromJson, + (IpData).toString(): IpData.fromJson, + (LaunchJoinAct).toString(): LaunchJoinAct.fromJson, + (LoginInfo).toString(): LoginInfo.fromJson, + (AuthInfo).toString(): AuthInfo.fromJson, + (InterviewCouponList).toString(): InterviewCouponList.fromJson, + (FirstLoginCouponList).toString(): FirstLoginCouponList.fromJson, + (Logistics).toString(): Logistics.fromJson, + (Traces).toString(): Traces.fromJson, + (MemberComment).toString(): MemberComment.fromJson, + (MemberInfo).toString(): MemberInfo.fromJson, + (MemberInfor).toString(): MemberInfor.fromJson, + (MemberRank).toString(): MemberRank.fromJson, + (MemberRecharge).toString(): MemberRecharge.fromJson, + (MemberSource).toString(): MemberSource.fromJson, + (MemberVo).toString(): MemberVo.fromJson, + (Message).toString(): Message.fromJson, + (MinOrderInfo).toString(): MinOrderInfo.fromJson, + (OrderInfoVo).toString(): OrderInfoVo.fromJson, + (MemberVO).toString(): MemberVO.fromJson, + (MemberRankVo).toString(): MemberRankVo.fromJson, + (Mini).toString(): Mini.fromJson, + (MiniDetail).toString(): MiniDetail.fromJson, + (StoreDTO).toString(): StoreDTO.fromJson, + (AttrList).toString(): AttrList.fromJson, + (AttrValueList).toString(): AttrValueList.fromJson, + (ProductSkuVOList).toString(): ProductSkuVOList.fromJson, + (MsgStats).toString(): MsgStats.fromJson, + (OrderInfo).toString(): OrderInfo.fromJson, + (AddressExt).toString(): AddressExt.fromJson, + (StoreVO).toString(): StoreVO.fromJson, + (StoreVOPosType).toString(): StoreVOPosType.fromJson, + (OrderDetail).toString(): OrderDetail.fromJson, + (OrderProductVO).toString(): OrderProductVO.fromJson, + (OrderTrend).toString(): OrderTrend.fromJson, + (OrderUserDetail).toString(): OrderUserDetail.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo
).toString(): PageInfo
.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageInfo).toString(): PageInfo.fromJson, + (PageList).toString(): PageList.fromJson, + (Orders).toString(): Orders.fromJson, + (PhoneQueryMemberInfo).toString(): PhoneQueryMemberInfo.fromJson, + (UseableConponList).toString(): UseableConponList.fromJson, + (ProductList).toString(): ProductList.fromJson, + (PickupType).toString(): PickupType.fromJson, + (PlaceOrderFirst).toString(): PlaceOrderFirst.fromJson, + (PromotionInfoDTOBean).toString(): PromotionInfoDTOBean.fromJson, + (Platter).toString(): Platter.fromJson, + (PopularSales).toString(): PopularSales.fromJson, + (DashMemberList).toString(): DashMemberList.fromJson, + (SaleProductList).toString(): SaleProductList.fromJson, + (ChangeData).toString(): ChangeData.fromJson, + (PreferentialList).toString(): PreferentialList.fromJson, + (Product).toString(): Product.fromJson, + (ProductGroup).toString(): ProductGroup.fromJson, + (ProductGroupProfitSharing).toString(): ProductGroupProfitSharing.fromJson, + (ProductSetMeals).toString(): ProductSetMeals.fromJson, + (SetMealsProductInfoList).toString(): SetMealsProductInfoList.fromJson, + (SkuInfoList).toString(): SkuInfoList.fromJson, + (ProductSkuAttrList).toString(): ProductSkuAttrList.fromJson, + (ProductAttrInfoList).toString(): ProductAttrInfoList.fromJson, + (ProductShow).toString(): ProductShow.fromJson, + (ProductSkuList).toString(): ProductSkuList.fromJson, + (Promotion).toString(): Promotion.fromJson, + (DetailBean).toString(): DetailBean.fromJson, + (PromotionInfo).toString(): PromotionInfo.fromJson, + (PromotionInfoPromotionDetail).toString(): PromotionInfoPromotionDetail + .fromJson, + (Rank).toString(): Rank.fromJson, + (Recharge).toString(): Recharge.fromJson, + (RechargeAct).toString(): RechargeAct.fromJson, + (RechargeFlow).toString(): RechargeFlow.fromJson, + (RefundReason).toString(): RefundReason.fromJson, + (SecondCard).toString(): SecondCard.fromJson, + (ServiceBug).toString(): ServiceBug.fromJson, + (SetMealData).toString(): SetMealData.fromJson, + (ProductInfoList).toString(): ProductInfoList.fromJson, + (SettleOrderInfo).toString(): SettleOrderInfo.fromJson, + (CouponListBean).toString(): CouponListBean.fromJson, + (PromotionInfoListBean).toString(): PromotionInfoListBean.fromJson, + (PromotionDetailBean).toString(): PromotionDetailBean.fromJson, + (Settlement).toString(): Settlement.fromJson, + (OrderProductVOList).toString(): OrderProductVOList.fromJson, + (PromotionInfoDTO).toString(): PromotionInfoDTO.fromJson, + (ShopingHomeConfig).toString(): ShopingHomeConfig.fromJson, + (SpecialArea).toString(): SpecialArea.fromJson, + (ShopHomeProductList).toString(): ShopHomeProductList.fromJson, + (ShopHomeProductSkuVOList).toString(): ShopHomeProductSkuVOList.fromJson, + (ShopHomeAttrList).toString(): ShopHomeAttrList.fromJson, + (ShopHomeAttrValueList).toString(): ShopHomeAttrValueList.fromJson, + (QuickEntry).toString(): QuickEntry.fromJson, + (CategoryGroup).toString(): CategoryGroup.fromJson, + (GroupList).toString(): GroupList.fromJson, + (ShoppingCart).toString(): ShoppingCart.fromJson, + (SkuItemList).toString(): SkuItemList.fromJson, + (PlatterList).toString(): PlatterList.fromJson, + (SignIn).toString(): SignIn.fromJson, + (SignInfo).toString(): SignInfo.fromJson, + (SingleSales).toString(): SingleSales.fromJson, + (SkuAttrList).toString(): SkuAttrList.fromJson, + (SkuJson).toString(): SkuJson.fromJson, + (SocialInfo).toString(): SocialInfo.fromJson, + (Store).toString(): Store.fromJson, + (StoreInfo).toString(): StoreInfo.fromJson, + (StoreTimeInfo).toString(): StoreTimeInfo.fromJson, + (StoreTotalMoneyInfo).toString(): StoreTotalMoneyInfo.fromJson, + (StoreType).toString(): StoreType.fromJson, + (SubscribeParam).toString(): SubscribeParam.fromJson, + (Task).toString(): Task.fromJson, + (TenantInfo).toString(): TenantInfo.fromJson, + (Type).toString(): Type.fromJson, + (Status).toString(): Status.fromJson, + (PosType).toString(): PosType.fromJson, + (TenantPackage).toString(): TenantPackage.fromJson, + (TenantPackageSale).toString(): TenantPackageSale.fromJson, + (TenantPackageCalculateDetails).toString(): TenantPackageCalculateDetails + .fromJson, + (Ticket).toString(): Ticket.fromJson, + (TicketDetails).toString(): TicketDetails.fromJson, + (TicketItemList).toString(): TicketItemList.fromJson, + (TicketItems).toString(): TicketItems.fromJson, + (TicketRecord).toString(): TicketRecord.fromJson, + (TicketShow).toString(): TicketShow.fromJson, + (TicketStats).toString(): TicketStats.fromJson, + (InfoList).toString(): InfoList.fromJson, + (TradeSummary).toString(): TradeSummary.fromJson, + (SaleBusinessAnalysisVOS).toString(): SaleBusinessAnalysisVOS.fromJson, + (UploadResult).toString(): UploadResult.fromJson, + (UserBill).toString(): UserBill.fromJson, + (UserEntity).toString(): UserEntity.fromJson, + (UserInfo).toString(): UserInfo.fromJson, + (UserInfoEdit).toString(): UserInfoEdit.fromJson, + (UserInfoEditSex).toString(): UserInfoEditSex.fromJson, + (VerifyCode).toString(): VerifyCode.fromJson, + (VipBadges).toString(): VipBadges.fromJson, + (VipBenefit).toString(): VipBenefit.fromJson, + (VipCard).toString(): VipCard.fromJson, + (VipCardHome).toString(): VipCardHome.fromJson, + (Member).toString(): Member.fromJson, + (Cards).toString(): Cards.fromJson, + (ProductVips).toString(): ProductVips.fromJson, + (VipCountsInfo).toString(): VipCountsInfo.fromJson, + (VipRecordDetails).toString(): VipRecordDetails.fromJson, + (VipRuleDetails).toString(): VipRuleDetails.fromJson, + (WxPay).toString(): WxPay.fromJson, + }; + + bool containsKey(String type) { + return convertFuncMap.containsKey(type); + } + + JsonConvertFunction? operator [](String key) { + return convertFuncMap[key]; + } +} \ No newline at end of file diff --git a/lib/generated/json/base/json_field.dart b/lib/generated/json/base/json_field.dart new file mode 100644 index 00000000..8c967d4c --- /dev/null +++ b/lib/generated/json/base/json_field.dart @@ -0,0 +1,32 @@ +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: camel_case_types +// ignore_for_file: prefer_single_quotes + +// This file is automatically generated. DO NOT EDIT, all your changes would be lost. + +import 'package:meta/meta_meta.dart'; + +@Target({TargetKind.classType}) +class JsonSerializable { + const JsonSerializable(); +} + +@Target({TargetKind.field}) +class JSONField { + //Specify the parse field name + final String? name; + + //Whether to participate in toJson + final bool? serialize; + + //Whether to participate in fromMap + final bool? deserialize; + + //Whether to participate in copyWith + final bool? copyWith; + + //Enumeration or not + final bool? isEnum; + + const JSONField({this.name, this.serialize, this.deserialize, this.isEnum, this.copyWith}); +} diff --git a/lib/generated/json/base_data.g.dart b/lib/generated/json/base_data.g.dart new file mode 100644 index 00000000..0091e1c0 --- /dev/null +++ b/lib/generated/json/base_data.g.dart @@ -0,0 +1,77 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:json_annotation/json_annotation.dart'; + + +BaseData $BaseDataFromJson(Map json) { + final BaseData baseData = BaseData(); + final int? code = jsonConvert.convert(json['code']); + if (code != null) { + baseData.code = code; + } + final T? data = jsonConvert.convert(json['data']); + if (data != null) { + baseData.data = data; + } + final dynamic extra = json['extra']; + if (extra != null) { + baseData.extra = extra; + } + final bool? isError = jsonConvert.convert(json['isError']); + if (isError != null) { + baseData.isError = isError; + } + final bool? isSuccess = jsonConvert.convert(json['isSuccess']); + if (isSuccess != null) { + baseData.isSuccess = isSuccess; + } + final String? msg = jsonConvert.convert(json['msg']); + if (msg != null) { + baseData.msg = msg; + } + final String? path = jsonConvert.convert(json['path']); + if (path != null) { + baseData.path = path; + } + final String? timestamp = jsonConvert.convert(json['timestamp']); + if (timestamp != null) { + baseData.timestamp = timestamp; + } + return baseData; +} + +Map $BaseDataToJson(BaseData entity) { + final Map data = {}; + data['code'] = entity.code; + data['data'] = entity.data?.toJson(); + data['extra'] = entity.extra; + data['isError'] = entity.isError; + data['isSuccess'] = entity.isSuccess; + data['msg'] = entity.msg; + data['path'] = entity.path; + data['timestamp'] = entity.timestamp; + return data; +} + +extension BaseDataExtension on BaseData { + BaseData copyWith({ + int? code, + T? data, + dynamic extra, + bool? isError, + bool? isSuccess, + String? msg, + String? path, + String? timestamp, + }) { + return BaseData() + ..code = code ?? this.code + ..data = data ?? this.data + ..extra = extra ?? this.extra + ..isError = isError ?? this.isError + ..isSuccess = isSuccess ?? this.isSuccess + ..msg = msg ?? this.msg + ..path = path ?? this.path + ..timestamp = timestamp ?? this.timestamp; + } +} \ No newline at end of file diff --git a/lib/generated/json/brand.g.dart b/lib/generated/json/brand.g.dart new file mode 100644 index 00000000..7e5e340d --- /dev/null +++ b/lib/generated/json/brand.g.dart @@ -0,0 +1,75 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/brand.dart'; + +Brand $BrandFromJson(Map json) { + final Brand brand = Brand(); + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + brand.name = name; + } + final String? image = jsonConvert.convert(json['image']); + if (image != null) { + brand.image = image; + } + final String? video = jsonConvert.convert(json['video']); + if (video != null) { + brand.video = video; + } + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + brand.desc = desc; + } + final String? content = jsonConvert.convert(json['content']); + if (content != null) { + brand.content = content; + } + final String? icon = jsonConvert.convert(json['icon']); + if (icon != null) { + brand.icon = icon; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + brand.sort = sort; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + brand.storeId = storeId; + } + return brand; +} + +Map $BrandToJson(Brand entity) { + final Map data = {}; + data['name'] = entity.name; + data['image'] = entity.image; + data['video'] = entity.video; + data['desc'] = entity.desc; + data['content'] = entity.content; + data['icon'] = entity.icon; + data['sort'] = entity.sort; + data['storeId'] = entity.storeId; + return data; +} + +extension BrandExtension on Brand { + Brand copyWith({ + String? name, + String? image, + String? video, + String? desc, + String? content, + String? icon, + int? sort, + String? storeId, + }) { + return Brand() + ..name = name ?? this.name + ..image = image ?? this.image + ..video = video ?? this.video + ..desc = desc ?? this.desc + ..content = content ?? this.content + ..icon = icon ?? this.icon + ..sort = sort ?? this.sort + ..storeId = storeId ?? this.storeId; + } +} \ No newline at end of file diff --git a/lib/generated/json/brand_data.g.dart b/lib/generated/json/brand_data.g.dart new file mode 100644 index 00000000..cee15a13 --- /dev/null +++ b/lib/generated/json/brand_data.g.dart @@ -0,0 +1,88 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/brand_data.dart'; +import 'package:huixiang/data/banner.dart'; + + +BrandData $BrandDataFromJson(Map json) { + final BrandData brandData = BrandData(); + final List? bannerList = (json['bannerList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as BannerData) + .toList(); + if (bannerList != null) { + brandData.bannerList = bannerList; + } + final String? company = jsonConvert.convert(json['company']); + if (company != null) { + brandData.company = company; + } + final String? companyDesc = jsonConvert.convert(json['companyDesc']); + if (companyDesc != null) { + brandData.companyDesc = companyDesc; + } + final String? originAvatar = jsonConvert.convert( + json['originAvatar']); + if (originAvatar != null) { + brandData.originAvatar = originAvatar; + } + final String? originDesc = jsonConvert.convert(json['originDesc']); + if (originDesc != null) { + brandData.originDesc = originDesc; + } + final String? originator = jsonConvert.convert(json['originator']); + if (originator != null) { + brandData.originator = originator; + } + final bool? inviteNewShow = jsonConvert.convert(json['inviteNewShow']); + if (inviteNewShow != null) { + brandData.inviteNewShow = inviteNewShow; + } + final dynamic contents = json['contents']; + if (contents != null) { + brandData.contents = contents; + } + final dynamic ideals = json['ideals']; + if (ideals != null) { + brandData.ideals = ideals; + } + return brandData; +} + +Map $BrandDataToJson(BrandData entity) { + final Map data = {}; + data['bannerList'] = entity.bannerList?.map((v) => v.toJson()).toList(); + data['company'] = entity.company; + data['companyDesc'] = entity.companyDesc; + data['originAvatar'] = entity.originAvatar; + data['originDesc'] = entity.originDesc; + data['originator'] = entity.originator; + data['inviteNewShow'] = entity.inviteNewShow; + data['contents'] = entity.contents; + data['ideals'] = entity.ideals; + return data; +} + +extension BrandDataExtension on BrandData { + BrandData copyWith({ + List? bannerList, + String? company, + String? companyDesc, + String? originAvatar, + String? originDesc, + String? originator, + bool? inviteNewShow, + dynamic contents, + dynamic ideals, + }) { + return BrandData() + ..bannerList = bannerList ?? this.bannerList + ..company = company ?? this.company + ..companyDesc = companyDesc ?? this.companyDesc + ..originAvatar = originAvatar ?? this.originAvatar + ..originDesc = originDesc ?? this.originDesc + ..originator = originator ?? this.originator + ..inviteNewShow = inviteNewShow ?? this.inviteNewShow + ..contents = contents ?? this.contents + ..ideals = ideals ?? this.ideals; + } +} \ No newline at end of file diff --git a/lib/generated/json/bus_recharge.g.dart b/lib/generated/json/bus_recharge.g.dart new file mode 100644 index 00000000..48a850ea --- /dev/null +++ b/lib/generated/json/bus_recharge.g.dart @@ -0,0 +1,139 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/bus_recharge.dart'; + +BusRecharge $BusRechargeFromJson(Map json) { + final BusRecharge busRecharge = BusRecharge(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + busRecharge.id = id; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + busRecharge.rechargeMoney = rechargeMoney; + } + final String? giftdMoney = jsonConvert.convert(json['giftdMoney']); + if (giftdMoney != null) { + busRecharge.giftdMoney = giftdMoney; + } + final int? limitNum = jsonConvert.convert(json['limitNum']); + if (limitNum != null) { + busRecharge.limitNum = limitNum; + } + final dynamic gitfdCouponId = json['gitfdCouponId']; + if (gitfdCouponId != null) { + busRecharge.gitfdCouponId = gitfdCouponId; + } + final dynamic startDate = json['startDate']; + if (startDate != null) { + busRecharge.startDate = startDate; + } + final dynamic endDate = json['endDate']; + if (endDate != null) { + busRecharge.endDate = endDate; + } + final dynamic startTime = json['startTime']; + if (startTime != null) { + busRecharge.startTime = startTime; + } + final dynamic endTime = json['endTime']; + if (endTime != null) { + busRecharge.endTime = endTime; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + busRecharge.tenantCode = tenantCode; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + busRecharge.createTime = createTime; + } + final int? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + busRecharge.isDeleted = isDeleted; + } + final int? rechargeType = jsonConvert.convert(json['rechargeType']); + if (rechargeType != null) { + busRecharge.rechargeType = rechargeType; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + busRecharge.remark = remark; + } + final int? sortValue = jsonConvert.convert(json['sortValue']); + if (sortValue != null) { + busRecharge.sortValue = sortValue; + } + final int? useNum = jsonConvert.convert(json['useNum']); + if (useNum != null) { + busRecharge.useNum = useNum; + } + final dynamic mid = json['mid']; + if (mid != null) { + busRecharge.mid = mid; + } + return busRecharge; +} + +Map $BusRechargeToJson(BusRecharge entity) { + final Map data = {}; + data['id'] = entity.id; + data['rechargeMoney'] = entity.rechargeMoney; + data['giftdMoney'] = entity.giftdMoney; + data['limitNum'] = entity.limitNum; + data['gitfdCouponId'] = entity.gitfdCouponId; + data['startDate'] = entity.startDate; + data['endDate'] = entity.endDate; + data['startTime'] = entity.startTime; + data['endTime'] = entity.endTime; + data['tenantCode'] = entity.tenantCode; + data['createTime'] = entity.createTime; + data['isDeleted'] = entity.isDeleted; + data['rechargeType'] = entity.rechargeType; + data['remark'] = entity.remark; + data['sortValue'] = entity.sortValue; + data['useNum'] = entity.useNum; + data['mid'] = entity.mid; + return data; +} + +extension BusRechargeExtension on BusRecharge { + BusRecharge copyWith({ + String? id, + String? rechargeMoney, + String? giftdMoney, + int? limitNum, + dynamic gitfdCouponId, + dynamic startDate, + dynamic endDate, + dynamic startTime, + dynamic endTime, + String? tenantCode, + String? createTime, + int? isDeleted, + int? rechargeType, + String? remark, + int? sortValue, + int? useNum, + dynamic mid, + }) { + return BusRecharge() + ..id = id ?? this.id + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..giftdMoney = giftdMoney ?? this.giftdMoney + ..limitNum = limitNum ?? this.limitNum + ..gitfdCouponId = gitfdCouponId ?? this.gitfdCouponId + ..startDate = startDate ?? this.startDate + ..endDate = endDate ?? this.endDate + ..startTime = startTime ?? this.startTime + ..endTime = endTime ?? this.endTime + ..tenantCode = tenantCode ?? this.tenantCode + ..createTime = createTime ?? this.createTime + ..isDeleted = isDeleted ?? this.isDeleted + ..rechargeType = rechargeType ?? this.rechargeType + ..remark = remark ?? this.remark + ..sortValue = sortValue ?? this.sortValue + ..useNum = useNum ?? this.useNum + ..mid = mid ?? this.mid; + } +} \ No newline at end of file diff --git a/lib/generated/json/category_select.g.dart b/lib/generated/json/category_select.g.dart new file mode 100644 index 00000000..907c379c --- /dev/null +++ b/lib/generated/json/category_select.g.dart @@ -0,0 +1,82 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/category_select.dart'; + +CategorySelect $CategorySelectFromJson(Map json) { + final CategorySelect categorySelect = CategorySelect(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + categorySelect.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + categorySelect.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + categorySelect.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + categorySelect.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + categorySelect.updateUser = updateUser; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + categorySelect.name = name; + } + final bool? isTop = jsonConvert.convert(json['isTop']); + if (isTop != null) { + categorySelect.isTop = isTop; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + categorySelect.sort = sort; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + categorySelect.isDelete = isDelete; + } + return categorySelect; +} + +Map $CategorySelectToJson(CategorySelect entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['name'] = entity.name; + data['isTop'] = entity.isTop; + data['sort'] = entity.sort; + data['isDelete'] = entity.isDelete; + return data; +} + +extension CategorySelectExtension on CategorySelect { + CategorySelect copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? name, + bool? isTop, + int? sort, + int? isDelete, + }) { + return CategorySelect() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..name = name ?? this.name + ..isTop = isTop ?? this.isTop + ..sort = sort ?? this.sort + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/channels.g.dart b/lib/generated/json/channels.g.dart new file mode 100644 index 00000000..90641bf6 --- /dev/null +++ b/lib/generated/json/channels.g.dart @@ -0,0 +1,49 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/channels.dart'; +import 'package:huixiang/data/preferential.dart'; + + +Channels $ChannelsFromJson(Map json) { + final Channels channels = Channels(); + final List? channel = (json['channels'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (channel != null) { + channels.channel = channel; + } + final bool? isOpen = jsonConvert.convert(json['isOpen']); + if (isOpen != null) { + channels.isOpen = isOpen; + } + final List< + PreferentialList>? preferentialList = (json['preferentialList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as PreferentialList) + .toList(); + if (preferentialList != null) { + channels.preferentialList = preferentialList; + } + return channels; +} + +Map $ChannelsToJson(Channels entity) { + final Map data = {}; + data['channels'] = entity.channel; + data['isOpen'] = entity.isOpen; + data['preferentialList'] = + entity.preferentialList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ChannelsExtension on Channels { + Channels copyWith({ + List? channel, + bool? isOpen, + List? preferentialList, + }) { + return Channels() + ..channel = channel ?? this.channel + ..isOpen = isOpen ?? this.isOpen + ..preferentialList = preferentialList ?? this.preferentialList; + } +} \ No newline at end of file diff --git a/lib/generated/json/chapter.g.dart b/lib/generated/json/chapter.g.dart new file mode 100644 index 00000000..f395470e --- /dev/null +++ b/lib/generated/json/chapter.g.dart @@ -0,0 +1,127 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/chapter.dart'; + +Chapter $ChapterFromJson(Map json) { + final Chapter chapter = Chapter(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + chapter.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + chapter.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + chapter.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + chapter.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + chapter.updateUser = updateUser; + } + final String? courseId = jsonConvert.convert(json['courseId']); + if (courseId != null) { + chapter.courseId = courseId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + chapter.name = name; + } + final Content? content = jsonConvert.convert(json['content']); + if (content != null) { + chapter.content = content; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + chapter.sort = sort; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + chapter.isDelete = isDelete; + } + return chapter; +} + +Map $ChapterToJson(Chapter entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['courseId'] = entity.courseId; + data['name'] = entity.name; + data['content'] = entity.content?.toJson(); + data['sort'] = entity.sort; + data['isDelete'] = entity.isDelete; + return data; +} + +extension ChapterExtension on Chapter { + Chapter copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? courseId, + String? name, + Content? content, + int? sort, + int? isDelete, + }) { + return Chapter() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..courseId = courseId ?? this.courseId + ..name = name ?? this.name + ..content = content ?? this.content + ..sort = sort ?? this.sort + ..isDelete = isDelete ?? this.isDelete; + } +} + +Content $ContentFromJson(Map json) { + final Content content = Content(); + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + content.coverImg = coverImg; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + content.remark = remark; + } + final String? fileUrl = jsonConvert.convert(json['fileUrl']); + if (fileUrl != null) { + content.fileUrl = fileUrl; + } + return content; +} + +Map $ContentToJson(Content entity) { + final Map data = {}; + data['coverImg'] = entity.coverImg; + data['remark'] = entity.remark; + data['fileUrl'] = entity.fileUrl; + return data; +} + +extension ContentExtension on Content { + Content copyWith({ + String? coverImg, + String? remark, + String? fileUrl, + }) { + return Content() + ..coverImg = coverImg ?? this.coverImg + ..remark = remark ?? this.remark + ..fileUrl = fileUrl ?? this.fileUrl; + } +} \ No newline at end of file diff --git a/lib/generated/json/clerk_manage.g.dart b/lib/generated/json/clerk_manage.g.dart new file mode 100644 index 00000000..a7684be3 --- /dev/null +++ b/lib/generated/json/clerk_manage.g.dart @@ -0,0 +1,316 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/clerk_manage.dart'; + +ClerkManage $ClerkManageFromJson(Map json) { + final ClerkManage clerkManage = ClerkManage(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + clerkManage.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + clerkManage.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + clerkManage.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + clerkManage.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + clerkManage.updateUser = updateUser; + } + final String? account = jsonConvert.convert(json['account']); + if (account != null) { + clerkManage.account = account; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + clerkManage.name = name; + } + final dynamic org = json['org']; + if (org != null) { + clerkManage.org = org; + } + final dynamic station = json['station']; + if (station != null) { + clerkManage.station = station; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + clerkManage.type = type; + } + final String? email = jsonConvert.convert(json['email']); + if (email != null) { + clerkManage.email = email; + } + final String? mobile = jsonConvert.convert(json['mobile']); + if (mobile != null) { + clerkManage.mobile = mobile; + } + final Sex? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + clerkManage.sex = sex; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + clerkManage.status = status; + } + final String? avatar = jsonConvert.convert(json['avatar']); + if (avatar != null) { + clerkManage.avatar = avatar; + } + final Nation? nation = jsonConvert.convert(json['nation']); + if (nation != null) { + clerkManage.nation = nation; + } + final Education? education = jsonConvert.convert( + json['education']); + if (education != null) { + clerkManage.education = education; + } + final PositionStatus? positionStatus = jsonConvert.convert( + json['positionStatus']); + if (positionStatus != null) { + clerkManage.positionStatus = positionStatus; + } + final String? workDescribe = jsonConvert.convert( + json['workDescribe']); + if (workDescribe != null) { + clerkManage.workDescribe = workDescribe; + } + final dynamic passwordErrorLastTime = json['passwordErrorLastTime']; + if (passwordErrorLastTime != null) { + clerkManage.passwordErrorLastTime = passwordErrorLastTime; + } + final int? passwordErrorNum = jsonConvert.convert( + json['passwordErrorNum']); + if (passwordErrorNum != null) { + clerkManage.passwordErrorNum = passwordErrorNum; + } + final dynamic passwordExpireTime = json['passwordExpireTime']; + if (passwordExpireTime != null) { + clerkManage.passwordExpireTime = passwordExpireTime; + } + final String? password = jsonConvert.convert(json['password']); + if (password != null) { + clerkManage.password = password; + } + final dynamic lastLoginTime = json['lastLoginTime']; + if (lastLoginTime != null) { + clerkManage.lastLoginTime = lastLoginTime; + } + return clerkManage; +} + +Map $ClerkManageToJson(ClerkManage entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['account'] = entity.account; + data['name'] = entity.name; + data['org'] = entity.org; + data['station'] = entity.station; + data['type'] = entity.type; + data['email'] = entity.email; + data['mobile'] = entity.mobile; + data['sex'] = entity.sex?.toJson(); + data['status'] = entity.status; + data['avatar'] = entity.avatar; + data['nation'] = entity.nation?.toJson(); + data['education'] = entity.education?.toJson(); + data['positionStatus'] = entity.positionStatus?.toJson(); + data['workDescribe'] = entity.workDescribe; + data['passwordErrorLastTime'] = entity.passwordErrorLastTime; + data['passwordErrorNum'] = entity.passwordErrorNum; + data['passwordExpireTime'] = entity.passwordExpireTime; + data['password'] = entity.password; + data['lastLoginTime'] = entity.lastLoginTime; + return data; +} + +extension ClerkManageExtension on ClerkManage { + ClerkManage copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? account, + String? name, + dynamic org, + dynamic station, + int? type, + String? email, + String? mobile, + Sex? sex, + bool? status, + String? avatar, + Nation? nation, + Education? education, + PositionStatus? positionStatus, + String? workDescribe, + dynamic passwordErrorLastTime, + int? passwordErrorNum, + dynamic passwordExpireTime, + String? password, + dynamic lastLoginTime, + }) { + return ClerkManage() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..account = account ?? this.account + ..name = name ?? this.name + ..org = org ?? this.org + ..station = station ?? this.station + ..type = type ?? this.type + ..email = email ?? this.email + ..mobile = mobile ?? this.mobile + ..sex = sex ?? this.sex + ..status = status ?? this.status + ..avatar = avatar ?? this.avatar + ..nation = nation ?? this.nation + ..education = education ?? this.education + ..positionStatus = positionStatus ?? this.positionStatus + ..workDescribe = workDescribe ?? this.workDescribe + ..passwordErrorLastTime = passwordErrorLastTime ?? + this.passwordErrorLastTime + ..passwordErrorNum = passwordErrorNum ?? this.passwordErrorNum + ..passwordExpireTime = passwordExpireTime ?? this.passwordExpireTime + ..password = password ?? this.password + ..lastLoginTime = lastLoginTime ?? this.lastLoginTime; + } +} + +Sex $SexFromJson(Map json) { + final Sex sex = Sex(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + sex.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + sex.code = code; + } + return sex; +} + +Map $SexToJson(Sex entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension SexExtension on Sex { + Sex copyWith({ + String? desc, + String? code, + }) { + return Sex() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} + +Nation $NationFromJson(Map json) { + final Nation nation = Nation(); + final dynamic key = json['key']; + if (key != null) { + nation.key = key; + } + final String? data = jsonConvert.convert(json['data']); + if (data != null) { + nation.data = data; + } + return nation; +} + +Map $NationToJson(Nation entity) { + final Map data = {}; + data['key'] = entity.key; + data['data'] = entity.data; + return data; +} + +extension NationExtension on Nation { + Nation copyWith({ + dynamic key, + String? data, + }) { + return Nation() + ..key = key ?? this.key + ..data = data ?? this.data; + } +} + +Education $EducationFromJson(Map json) { + final Education education = Education(); + final dynamic key = json['key']; + if (key != null) { + education.key = key; + } + final String? data = jsonConvert.convert(json['data']); + if (data != null) { + education.data = data; + } + return education; +} + +Map $EducationToJson(Education entity) { + final Map data = {}; + data['key'] = entity.key; + data['data'] = entity.data; + return data; +} + +extension EducationExtension on Education { + Education copyWith({ + dynamic key, + String? data, + }) { + return Education() + ..key = key ?? this.key + ..data = data ?? this.data; + } +} + +PositionStatus $PositionStatusFromJson(Map json) { + final PositionStatus positionStatus = PositionStatus(); + final dynamic key = json['key']; + if (key != null) { + positionStatus.key = key; + } + final String? data = jsonConvert.convert(json['data']); + if (data != null) { + positionStatus.data = data; + } + return positionStatus; +} + +Map $PositionStatusToJson(PositionStatus entity) { + final Map data = {}; + data['key'] = entity.key; + data['data'] = entity.data; + return data; +} + +extension PositionStatusExtension on PositionStatus { + PositionStatus copyWith({ + dynamic key, + String? data, + }) { + return PositionStatus() + ..key = key ?? this.key + ..data = data ?? this.data; + } +} \ No newline at end of file diff --git a/lib/generated/json/collect_class.g.dart b/lib/generated/json/collect_class.g.dart new file mode 100644 index 00000000..3128559a --- /dev/null +++ b/lib/generated/json/collect_class.g.dart @@ -0,0 +1,82 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/collect_class.dart'; + +CollectClass $CollectClassFromJson(Map json) { + final CollectClass collectClass = CollectClass(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + collectClass.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + collectClass.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + collectClass.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + collectClass.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + collectClass.updateUser = updateUser; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + collectClass.name = name; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + collectClass.sort = sort; + } + final bool? enabled = jsonConvert.convert(json['enabled']); + if (enabled != null) { + collectClass.enabled = enabled; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + collectClass.isDelete = isDelete; + } + return collectClass; +} + +Map $CollectClassToJson(CollectClass entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['name'] = entity.name; + data['sort'] = entity.sort; + data['enabled'] = entity.enabled; + data['isDelete'] = entity.isDelete; + return data; +} + +extension CollectClassExtension on CollectClass { + CollectClass copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? name, + int? sort, + bool? enabled, + int? isDelete, + }) { + return CollectClass() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..name = name ?? this.name + ..sort = sort ?? this.sort + ..enabled = enabled ?? this.enabled + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/comment.g.dart b/lib/generated/json/comment.g.dart new file mode 100644 index 00000000..683195d4 --- /dev/null +++ b/lib/generated/json/comment.g.dart @@ -0,0 +1,146 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/comment.dart'; + +Comment $CommentFromJson(Map json) { + final Comment comment = Comment(); + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + comment.bizType = bizType; + } + final String? commentImgs = jsonConvert.convert(json['commentImgs']); + if (commentImgs != null) { + comment.commentImgs = commentImgs; + } + final bool? commentImgsFlag = jsonConvert.convert( + json['commentImgsFlag']); + if (commentImgsFlag != null) { + comment.commentImgsFlag = commentImgsFlag; + } + final int? commentStar = jsonConvert.convert(json['commentStar']); + if (commentStar != null) { + comment.commentStar = commentStar; + } + final String? commentText = jsonConvert.convert(json['commentText']); + if (commentText != null) { + comment.commentText = commentText; + } + final int? descStar = jsonConvert.convert(json['descStar']); + if (descStar != null) { + comment.descStar = descStar; + } + final bool? hideFlag = jsonConvert.convert(json['hideFlag']); + if (hideFlag != null) { + comment.hideFlag = hideFlag; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + comment.id = id; + } + final bool? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + comment.isDelete = isDelete; + } + final int? likeNum = jsonConvert.convert(json['likeNum']); + if (likeNum != null) { + comment.likeNum = likeNum; + } + final int? logisticsStar = jsonConvert.convert(json['logisticsStar']); + if (logisticsStar != null) { + comment.logisticsStar = logisticsStar; + } + final int? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + comment.mid = mid; + } + final int? orderProductId = jsonConvert.convert(json['orderProductId']); + if (orderProductId != null) { + comment.orderProductId = orderProductId; + } + final int? parentId = jsonConvert.convert(json['parentId']); + if (parentId != null) { + comment.parentId = parentId; + } + final int? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + comment.productId = productId; + } + final bool? sensitiveFlag = jsonConvert.convert(json['sensitiveFlag']); + if (sensitiveFlag != null) { + comment.sensitiveFlag = sensitiveFlag; + } + final int? serviceStar = jsonConvert.convert(json['serviceStar']); + if (serviceStar != null) { + comment.serviceStar = serviceStar; + } + final int? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + comment.storeId = storeId; + } + return comment; +} + +Map $CommentToJson(Comment entity) { + final Map data = {}; + data['bizType'] = entity.bizType; + data['commentImgs'] = entity.commentImgs; + data['commentImgsFlag'] = entity.commentImgsFlag; + data['commentStar'] = entity.commentStar; + data['commentText'] = entity.commentText; + data['descStar'] = entity.descStar; + data['hideFlag'] = entity.hideFlag; + data['id'] = entity.id; + data['isDelete'] = entity.isDelete; + data['likeNum'] = entity.likeNum; + data['logisticsStar'] = entity.logisticsStar; + data['mid'] = entity.mid; + data['orderProductId'] = entity.orderProductId; + data['parentId'] = entity.parentId; + data['productId'] = entity.productId; + data['sensitiveFlag'] = entity.sensitiveFlag; + data['serviceStar'] = entity.serviceStar; + data['storeId'] = entity.storeId; + return data; +} + +extension CommentExtension on Comment { + Comment copyWith({ + int? bizType, + String? commentImgs, + bool? commentImgsFlag, + int? commentStar, + String? commentText, + int? descStar, + bool? hideFlag, + int? id, + bool? isDelete, + int? likeNum, + int? logisticsStar, + int? mid, + int? orderProductId, + int? parentId, + int? productId, + bool? sensitiveFlag, + int? serviceStar, + int? storeId, + }) { + return Comment() + ..bizType = bizType ?? this.bizType + ..commentImgs = commentImgs ?? this.commentImgs + ..commentImgsFlag = commentImgsFlag ?? this.commentImgsFlag + ..commentStar = commentStar ?? this.commentStar + ..commentText = commentText ?? this.commentText + ..descStar = descStar ?? this.descStar + ..hideFlag = hideFlag ?? this.hideFlag + ..id = id ?? this.id + ..isDelete = isDelete ?? this.isDelete + ..likeNum = likeNum ?? this.likeNum + ..logisticsStar = logisticsStar ?? this.logisticsStar + ..mid = mid ?? this.mid + ..orderProductId = orderProductId ?? this.orderProductId + ..parentId = parentId ?? this.parentId + ..productId = productId ?? this.productId + ..sensitiveFlag = sensitiveFlag ?? this.sensitiveFlag + ..serviceStar = serviceStar ?? this.serviceStar + ..storeId = storeId ?? this.storeId; + } +} \ No newline at end of file diff --git a/lib/generated/json/comunity_comment.g.dart b/lib/generated/json/comunity_comment.g.dart new file mode 100644 index 00000000..e66b8152 --- /dev/null +++ b/lib/generated/json/comunity_comment.g.dart @@ -0,0 +1,175 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/comunity_comment.dart'; + +ComunityComment $ComunityCommentFromJson(Map json) { + final ComunityComment comunityComment = ComunityComment(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + comunityComment.id = id; + } + final String? subject = jsonConvert.convert(json['subject']); + if (subject != null) { + comunityComment.subject = subject; + } + final String? location = jsonConvert.convert(json['location']); + if (location != null) { + comunityComment.location = location; + } + final SubjectInfo? subjectInfo = jsonConvert.convert( + json['subjectInfo']); + if (subjectInfo != null) { + comunityComment.subjectInfo = subjectInfo; + } + final ComunityMemberInfo? memberInfo = jsonConvert.convert< + ComunityMemberInfo>(json['memberInfo']); + if (memberInfo != null) { + comunityComment.memberInfo = memberInfo; + } + final int? likes = jsonConvert.convert(json['likes']); + if (likes != null) { + comunityComment.likes = likes; + } + final int? viewers = jsonConvert.convert(json['viewers']); + if (viewers != null) { + comunityComment.viewers = viewers; + } + final int? comments = jsonConvert.convert(json['comments']); + if (comments != null) { + comunityComment.comments = comments; + } + final bool? selfLike = jsonConvert.convert(json['selfLike']); + if (selfLike != null) { + comunityComment.selfLike = selfLike; + } + final bool? selfFollow = jsonConvert.convert(json['selfFollow']); + if (selfFollow != null) { + comunityComment.selfFollow = selfFollow; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + comunityComment.createTime = createTime; + } + return comunityComment; +} + +Map $ComunityCommentToJson(ComunityComment entity) { + final Map data = {}; + data['id'] = entity.id; + data['subject'] = entity.subject; + data['location'] = entity.location; + data['subjectInfo'] = entity.subjectInfo?.toJson(); + data['memberInfo'] = entity.memberInfo?.toJson(); + data['likes'] = entity.likes; + data['viewers'] = entity.viewers; + data['comments'] = entity.comments; + data['selfLike'] = entity.selfLike; + data['selfFollow'] = entity.selfFollow; + data['createTime'] = entity.createTime; + return data; +} + +extension ComunityCommentExtension on ComunityComment { + ComunityComment copyWith({ + String? id, + String? subject, + String? location, + SubjectInfo? subjectInfo, + ComunityMemberInfo? memberInfo, + int? likes, + int? viewers, + int? comments, + bool? selfLike, + bool? selfFollow, + String? createTime, + }) { + return ComunityComment() + ..id = id ?? this.id + ..subject = subject ?? this.subject + ..location = location ?? this.location + ..subjectInfo = subjectInfo ?? this.subjectInfo + ..memberInfo = memberInfo ?? this.memberInfo + ..likes = likes ?? this.likes + ..viewers = viewers ?? this.viewers + ..comments = comments ?? this.comments + ..selfLike = selfLike ?? this.selfLike + ..selfFollow = selfFollow ?? this.selfFollow + ..createTime = createTime ?? this.createTime; + } +} + +SubjectInfo $SubjectInfoFromJson(Map json) { + final SubjectInfo subjectInfo = SubjectInfo(); + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + subjectInfo.type = type; + } + final List? images = (json['images'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (images != null) { + subjectInfo.images = images; + } + final String? video = jsonConvert.convert(json['video']); + if (video != null) { + subjectInfo.video = video; + } + return subjectInfo; +} + +Map $SubjectInfoToJson(SubjectInfo entity) { + final Map data = {}; + data['type'] = entity.type; + data['images'] = entity.images; + data['video'] = entity.video; + return data; +} + +extension SubjectInfoExtension on SubjectInfo { + SubjectInfo copyWith({ + String? type, + List? images, + String? video, + }) { + return SubjectInfo() + ..type = type ?? this.type + ..images = images ?? this.images + ..video = video ?? this.video; + } +} + +ComunityMemberInfo $ComunityMemberInfoFromJson(Map json) { + final ComunityMemberInfo comunityMemberInfo = ComunityMemberInfo(); + final dynamic mid = json['mid']; + if (mid != null) { + comunityMemberInfo.mid = mid; + } + final dynamic nickname = json['nickname']; + if (nickname != null) { + comunityMemberInfo.nickname = nickname; + } + final String? avatar = jsonConvert.convert(json['avatar']); + if (avatar != null) { + comunityMemberInfo.avatar = avatar; + } + return comunityMemberInfo; +} + +Map $ComunityMemberInfoToJson(ComunityMemberInfo entity) { + final Map data = {}; + data['mid'] = entity.mid; + data['nickname'] = entity.nickname; + data['avatar'] = entity.avatar; + return data; +} + +extension ComunityMemberInfoExtension on ComunityMemberInfo { + ComunityMemberInfo copyWith({ + dynamic mid, + dynamic nickname, + String? avatar, + }) { + return ComunityMemberInfo() + ..mid = mid ?? this.mid + ..nickname = nickname ?? this.nickname + ..avatar = avatar ?? this.avatar; + } +} \ No newline at end of file diff --git a/lib/generated/json/coupon.g.dart b/lib/generated/json/coupon.g.dart new file mode 100644 index 00000000..8787c555 --- /dev/null +++ b/lib/generated/json/coupon.g.dart @@ -0,0 +1,248 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/store.dart'; + + +Coupon $CouponFromJson(Map json) { + final Coupon coupon = Coupon(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + coupon.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + coupon.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + coupon.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + coupon.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + coupon.updateUser = updateUser; + } + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + coupon.bizType = bizType; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + coupon.fullAmount = fullAmount; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + coupon.discountAmount = discountAmount; + } + final int? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + coupon.discountPercent = discountPercent; + } + final String? bizId = jsonConvert.convert(json['bizId']); + if (bizId != null) { + coupon.bizId = bizId; + } + final String? publishStartTime = jsonConvert.convert( + json['publishStartTime']); + if (publishStartTime != null) { + coupon.publishStartTime = publishStartTime; + } + final String? publishEndTime = jsonConvert.convert( + json['publishEndTime']); + if (publishEndTime != null) { + coupon.publishEndTime = publishEndTime; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + coupon.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + coupon.useEndTime = useEndTime; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + coupon.promotionId = promotionId; + } + final bool? centreDisplay = jsonConvert.convert(json['centreDisplay']); + if (centreDisplay != null) { + coupon.centreDisplay = centreDisplay; + } + final bool? allProduct = jsonConvert.convert(json['allProduct']); + if (allProduct != null) { + coupon.allProduct = allProduct; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + coupon.tenantCode = tenantCode; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + coupon.remark = remark; + } + final String? tenantName = jsonConvert.convert(json['tenantName']); + if (tenantName != null) { + coupon.tenantName = tenantName; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + coupon.isDelete = isDelete; + } + final String? couponName = jsonConvert.convert(json['couponName']); + if (couponName != null) { + coupon.couponName = couponName; + } + final String? limitAmount = jsonConvert.convert(json['limitAmount']); + if (limitAmount != null) { + coupon.limitAmount = limitAmount; + } + final String? couponImg = jsonConvert.convert(json['couponImg']); + if (couponImg != null) { + coupon.couponImg = couponImg; + } + final String? couponDescription = jsonConvert.convert( + json['couponDescription']); + if (couponDescription != null) { + coupon.couponDescription = couponDescription; + } + final String? memberCouponId = jsonConvert.convert( + json['memberCouponId']); + if (memberCouponId != null) { + coupon.memberCouponId = memberCouponId; + } + final String? receiveTime = jsonConvert.convert(json['receiveTime']); + if (receiveTime != null) { + coupon.receiveTime = receiveTime; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + coupon.storeId = storeId; + } + final dynamic useTime = json['useTime']; + if (useTime != null) { + coupon.useTime = useTime; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + coupon.status = status; + } + final List? storeList = (json['storeList'] as List?)?.map( + (e) => jsonConvert.convert(e) as Store).toList(); + if (storeList != null) { + coupon.storeList = storeList; + } + return coupon; +} + +Map $CouponToJson(Coupon entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['bizType'] = entity.bizType; + data['fullAmount'] = entity.fullAmount; + data['discountAmount'] = entity.discountAmount; + data['discountPercent'] = entity.discountPercent; + data['bizId'] = entity.bizId; + data['publishStartTime'] = entity.publishStartTime; + data['publishEndTime'] = entity.publishEndTime; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['promotionId'] = entity.promotionId; + data['centreDisplay'] = entity.centreDisplay; + data['allProduct'] = entity.allProduct; + data['tenantCode'] = entity.tenantCode; + data['remark'] = entity.remark; + data['tenantName'] = entity.tenantName; + data['isDelete'] = entity.isDelete; + data['couponName'] = entity.couponName; + data['limitAmount'] = entity.limitAmount; + data['couponImg'] = entity.couponImg; + data['couponDescription'] = entity.couponDescription; + data['memberCouponId'] = entity.memberCouponId; + data['receiveTime'] = entity.receiveTime; + data['storeId'] = entity.storeId; + data['useTime'] = entity.useTime; + data['status'] = entity.status; + data['storeList'] = entity.storeList?.map((v) => v.toJson()).toList(); + return data; +} + +extension CouponExtension on Coupon { + Coupon copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + int? bizType, + String? fullAmount, + String? discountAmount, + int? discountPercent, + String? bizId, + String? publishStartTime, + String? publishEndTime, + String? useStartTime, + String? useEndTime, + String? promotionId, + bool? centreDisplay, + bool? allProduct, + String? tenantCode, + String? remark, + String? tenantName, + int? isDelete, + String? couponName, + String? limitAmount, + String? couponImg, + String? couponDescription, + String? memberCouponId, + String? receiveTime, + String? storeId, + dynamic useTime, + int? status, + List? storeList, + bool? isEx, + }) { + return Coupon() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..bizType = bizType ?? this.bizType + ..fullAmount = fullAmount ?? this.fullAmount + ..discountAmount = discountAmount ?? this.discountAmount + ..discountPercent = discountPercent ?? this.discountPercent + ..bizId = bizId ?? this.bizId + ..publishStartTime = publishStartTime ?? this.publishStartTime + ..publishEndTime = publishEndTime ?? this.publishEndTime + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..promotionId = promotionId ?? this.promotionId + ..centreDisplay = centreDisplay ?? this.centreDisplay + ..allProduct = allProduct ?? this.allProduct + ..tenantCode = tenantCode ?? this.tenantCode + ..remark = remark ?? this.remark + ..tenantName = tenantName ?? this.tenantName + ..isDelete = isDelete ?? this.isDelete + ..couponName = couponName ?? this.couponName + ..limitAmount = limitAmount ?? this.limitAmount + ..couponImg = couponImg ?? this.couponImg + ..couponDescription = couponDescription ?? this.couponDescription + ..memberCouponId = memberCouponId ?? this.memberCouponId + ..receiveTime = receiveTime ?? this.receiveTime + ..storeId = storeId ?? this.storeId + ..useTime = useTime ?? this.useTime + ..status = status ?? this.status + ..storeList = storeList ?? this.storeList + ..isEx = isEx ?? this.isEx; + } +} \ No newline at end of file diff --git a/lib/generated/json/coupon_detail.g.dart b/lib/generated/json/coupon_detail.g.dart new file mode 100644 index 00000000..4b69d3fd --- /dev/null +++ b/lib/generated/json/coupon_detail.g.dart @@ -0,0 +1,125 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/coupon_detail.dart'; + +CouponDetail $CouponDetailFromJson(Map json) { + final CouponDetail couponDetail = CouponDetail(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + couponDetail.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + couponDetail.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + couponDetail.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + couponDetail.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + couponDetail.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + couponDetail.mid = mid; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + couponDetail.couponId = couponId; + } + final String? receiveTime = jsonConvert.convert(json['receiveTime']); + if (receiveTime != null) { + couponDetail.receiveTime = receiveTime; + } + final dynamic useTime = json['useTime']; + if (useTime != null) { + couponDetail.useTime = useTime; + } + final String? useTimeStart = jsonConvert.convert( + json['useTimeStart']); + if (useTimeStart != null) { + couponDetail.useTimeStart = useTimeStart; + } + final String? useTimeEnd = jsonConvert.convert(json['useTimeEnd']); + if (useTimeEnd != null) { + couponDetail.useTimeEnd = useTimeEnd; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + couponDetail.status = status; + } + final bool? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + couponDetail.isDeleted = isDeleted; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + couponDetail.tenantCode = tenantCode; + } + final String? couponCode = jsonConvert.convert(json['couponCode']); + if (couponCode != null) { + couponDetail.couponCode = couponCode; + } + return couponDetail; +} + +Map $CouponDetailToJson(CouponDetail entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['couponId'] = entity.couponId; + data['receiveTime'] = entity.receiveTime; + data['useTime'] = entity.useTime; + data['useTimeStart'] = entity.useTimeStart; + data['useTimeEnd'] = entity.useTimeEnd; + data['status'] = entity.status; + data['isDeleted'] = entity.isDeleted; + data['tenantCode'] = entity.tenantCode; + data['couponCode'] = entity.couponCode; + return data; +} + +extension CouponDetailExtension on CouponDetail { + CouponDetail copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? couponId, + String? receiveTime, + dynamic useTime, + String? useTimeStart, + String? useTimeEnd, + int? status, + bool? isDeleted, + String? tenantCode, + String? couponCode, + }) { + return CouponDetail() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..couponId = couponId ?? this.couponId + ..receiveTime = receiveTime ?? this.receiveTime + ..useTime = useTime ?? this.useTime + ..useTimeStart = useTimeStart ?? this.useTimeStart + ..useTimeEnd = useTimeEnd ?? this.useTimeEnd + ..status = status ?? this.status + ..isDeleted = isDeleted ?? this.isDeleted + ..tenantCode = tenantCode ?? this.tenantCode + ..couponCode = couponCode ?? this.couponCode; + } +} \ No newline at end of file diff --git a/lib/generated/json/coupon_list.g.dart b/lib/generated/json/coupon_list.g.dart new file mode 100644 index 00000000..0be10801 --- /dev/null +++ b/lib/generated/json/coupon_list.g.dart @@ -0,0 +1,200 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/coupon_list.dart'; + +CouponList $CouponListFromJson(Map json) { + final CouponList couponList = CouponList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + couponList.id = id; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + couponList.storeId = storeId; + } + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + couponList.bizType = bizType; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + couponList.fullAmount = fullAmount; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + couponList.discountAmount = discountAmount; + } + final int? fullNumber = jsonConvert.convert(json['fullNumber']); + if (fullNumber != null) { + couponList.fullNumber = fullNumber; + } + final int? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + couponList.discountPercent = discountPercent; + } + final String? bizId = jsonConvert.convert(json['bizId']); + if (bizId != null) { + couponList.bizId = bizId; + } + final String? publishStartTime = jsonConvert.convert( + json['publishStartTime']); + if (publishStartTime != null) { + couponList.publishStartTime = publishStartTime; + } + final String? publishEndTime = jsonConvert.convert( + json['publishEndTime']); + if (publishEndTime != null) { + couponList.publishEndTime = publishEndTime; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + couponList.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + couponList.useEndTime = useEndTime; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + couponList.promotionId = promotionId; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + couponList.mid = mid; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + couponList.couponId = couponId; + } + final String? receiveTime = jsonConvert.convert(json['receiveTime']); + if (receiveTime != null) { + couponList.receiveTime = receiveTime; + } + final dynamic useTime = json['useTime']; + if (useTime != null) { + couponList.useTime = useTime; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + couponList.status = status; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + couponList.tenantCode = tenantCode; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + couponList.type = type; + } + final String? promotionName = jsonConvert.convert( + json['promotionName']); + if (promotionName != null) { + couponList.promotionName = promotionName; + } + final bool? usable = jsonConvert.convert(json['usable']); + if (usable != null) { + couponList.usable = usable; + } + final bool? allProduct = jsonConvert.convert(json['allProduct']); + if (allProduct != null) { + couponList.allProduct = allProduct; + } + final bool? isMaxCoupon = jsonConvert.convert(json['isMaxCoupon']); + if (isMaxCoupon != null) { + couponList.isMaxCoupon = isMaxCoupon; + } + final dynamic productList = json['productList']; + if (productList != null) { + couponList.productList = productList; + } + return couponList; +} + +Map $CouponListToJson(CouponList entity) { + final Map data = {}; + data['id'] = entity.id; + data['storeId'] = entity.storeId; + data['bizType'] = entity.bizType; + data['fullAmount'] = entity.fullAmount; + data['discountAmount'] = entity.discountAmount; + data['fullNumber'] = entity.fullNumber; + data['discountPercent'] = entity.discountPercent; + data['bizId'] = entity.bizId; + data['publishStartTime'] = entity.publishStartTime; + data['publishEndTime'] = entity.publishEndTime; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['promotionId'] = entity.promotionId; + data['mid'] = entity.mid; + data['couponId'] = entity.couponId; + data['receiveTime'] = entity.receiveTime; + data['useTime'] = entity.useTime; + data['status'] = entity.status; + data['tenantCode'] = entity.tenantCode; + data['type'] = entity.type; + data['promotionName'] = entity.promotionName; + data['usable'] = entity.usable; + data['allProduct'] = entity.allProduct; + data['isMaxCoupon'] = entity.isMaxCoupon; + data['productList'] = entity.productList; + return data; +} + +extension CouponListExtension on CouponList { + CouponList copyWith({ + String? id, + String? storeId, + int? bizType, + String? fullAmount, + String? discountAmount, + int? fullNumber, + int? discountPercent, + String? bizId, + String? publishStartTime, + String? publishEndTime, + String? useStartTime, + String? useEndTime, + String? promotionId, + String? mid, + String? couponId, + String? receiveTime, + dynamic useTime, + int? status, + String? tenantCode, + int? type, + String? promotionName, + bool? usable, + bool? allProduct, + bool? isMaxCoupon, + dynamic productList, + }) { + return CouponList() + ..id = id ?? this.id + ..storeId = storeId ?? this.storeId + ..bizType = bizType ?? this.bizType + ..fullAmount = fullAmount ?? this.fullAmount + ..discountAmount = discountAmount ?? this.discountAmount + ..fullNumber = fullNumber ?? this.fullNumber + ..discountPercent = discountPercent ?? this.discountPercent + ..bizId = bizId ?? this.bizId + ..publishStartTime = publishStartTime ?? this.publishStartTime + ..publishEndTime = publishEndTime ?? this.publishEndTime + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..promotionId = promotionId ?? this.promotionId + ..mid = mid ?? this.mid + ..couponId = couponId ?? this.couponId + ..receiveTime = receiveTime ?? this.receiveTime + ..useTime = useTime ?? this.useTime + ..status = status ?? this.status + ..tenantCode = tenantCode ?? this.tenantCode + ..type = type ?? this.type + ..promotionName = promotionName ?? this.promotionName + ..usable = usable ?? this.usable + ..allProduct = allProduct ?? this.allProduct + ..isMaxCoupon = isMaxCoupon ?? this.isMaxCoupon + ..productList = productList ?? this.productList; + } +} \ No newline at end of file diff --git a/lib/generated/json/coupon_vo.g.dart b/lib/generated/json/coupon_vo.g.dart new file mode 100644 index 00000000..b0a30890 --- /dev/null +++ b/lib/generated/json/coupon_vo.g.dart @@ -0,0 +1,208 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/coupon_vo.dart'; + +CouponVo $CouponVoFromJson(Map json) { + final CouponVo couponVo = CouponVo(); + final String? bizId = jsonConvert.convert(json['bizId']); + if (bizId != null) { + couponVo.bizId = bizId; + } + final num? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + couponVo.bizType = bizType; + } + final bool? centreDisplay = jsonConvert.convert(json['centreDisplay']); + if (centreDisplay != null) { + couponVo.centreDisplay = centreDisplay; + } + final String? couponDescription = jsonConvert.convert( + json['couponDescription']); + if (couponDescription != null) { + couponVo.couponDescription = couponDescription; + } + final String? couponImg = jsonConvert.convert(json['couponImg']); + if (couponImg != null) { + couponVo.couponImg = couponImg; + } + final String? couponName = jsonConvert.convert(json['couponName']); + if (couponName != null) { + couponVo.couponName = couponName; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + couponVo.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + couponVo.createUser = createUser; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + couponVo.discountAmount = discountAmount; + } + final num? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + couponVo.discountPercent = discountPercent; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + couponVo.fullAmount = fullAmount; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + couponVo.id = id; + } + final num? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + couponVo.isDelete = isDelete; + } + final String? memberCouponId = jsonConvert.convert( + json['memberCouponId']); + if (memberCouponId != null) { + couponVo.memberCouponId = memberCouponId; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + couponVo.promotionId = promotionId; + } + final String? publishEndTime = jsonConvert.convert( + json['publishEndTime']); + if (publishEndTime != null) { + couponVo.publishEndTime = publishEndTime; + } + final String? publishStartTime = jsonConvert.convert( + json['publishStartTime']); + if (publishStartTime != null) { + couponVo.publishStartTime = publishStartTime; + } + final String? receiveTime = jsonConvert.convert(json['receiveTime']); + if (receiveTime != null) { + couponVo.receiveTime = receiveTime; + } + final bool? received = jsonConvert.convert(json['received']); + if (received != null) { + couponVo.received = received; + } + final num? status = jsonConvert.convert(json['status']); + if (status != null) { + couponVo.status = status; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + couponVo.tenantCode = tenantCode; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + couponVo.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + couponVo.updateUser = updateUser; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + couponVo.useEndTime = useEndTime; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + couponVo.useStartTime = useStartTime; + } + final String? useTime = jsonConvert.convert(json['useTime']); + if (useTime != null) { + couponVo.useTime = useTime; + } + return couponVo; +} + +Map $CouponVoToJson(CouponVo entity) { + final Map data = {}; + data['bizId'] = entity.bizId; + data['bizType'] = entity.bizType; + data['centreDisplay'] = entity.centreDisplay; + data['couponDescription'] = entity.couponDescription; + data['couponImg'] = entity.couponImg; + data['couponName'] = entity.couponName; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['discountAmount'] = entity.discountAmount; + data['discountPercent'] = entity.discountPercent; + data['fullAmount'] = entity.fullAmount; + data['id'] = entity.id; + data['isDelete'] = entity.isDelete; + data['memberCouponId'] = entity.memberCouponId; + data['promotionId'] = entity.promotionId; + data['publishEndTime'] = entity.publishEndTime; + data['publishStartTime'] = entity.publishStartTime; + data['receiveTime'] = entity.receiveTime; + data['received'] = entity.received; + data['status'] = entity.status; + data['tenantCode'] = entity.tenantCode; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['useEndTime'] = entity.useEndTime; + data['useStartTime'] = entity.useStartTime; + data['useTime'] = entity.useTime; + return data; +} + +extension CouponVoExtension on CouponVo { + CouponVo copyWith({ + String? bizId, + num? bizType, + bool? centreDisplay, + String? couponDescription, + String? couponImg, + String? couponName, + String? createTime, + String? createUser, + String? discountAmount, + num? discountPercent, + String? fullAmount, + String? id, + num? isDelete, + String? memberCouponId, + String? promotionId, + String? publishEndTime, + String? publishStartTime, + String? receiveTime, + bool? received, + num? status, + String? tenantCode, + String? updateTime, + String? updateUser, + String? useEndTime, + String? useStartTime, + String? useTime, + }) { + return CouponVo() + ..bizId = bizId ?? this.bizId + ..bizType = bizType ?? this.bizType + ..centreDisplay = centreDisplay ?? this.centreDisplay + ..couponDescription = couponDescription ?? this.couponDescription + ..couponImg = couponImg ?? this.couponImg + ..couponName = couponName ?? this.couponName + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..discountAmount = discountAmount ?? this.discountAmount + ..discountPercent = discountPercent ?? this.discountPercent + ..fullAmount = fullAmount ?? this.fullAmount + ..id = id ?? this.id + ..isDelete = isDelete ?? this.isDelete + ..memberCouponId = memberCouponId ?? this.memberCouponId + ..promotionId = promotionId ?? this.promotionId + ..publishEndTime = publishEndTime ?? this.publishEndTime + ..publishStartTime = publishStartTime ?? this.publishStartTime + ..receiveTime = receiveTime ?? this.receiveTime + ..received = received ?? this.received + ..status = status ?? this.status + ..tenantCode = tenantCode ?? this.tenantCode + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..useEndTime = useEndTime ?? this.useEndTime + ..useStartTime = useStartTime ?? this.useStartTime + ..useTime = useTime ?? this.useTime; + } +} \ No newline at end of file diff --git a/lib/generated/json/course.g.dart b/lib/generated/json/course.g.dart new file mode 100644 index 00000000..61a4a591 --- /dev/null +++ b/lib/generated/json/course.g.dart @@ -0,0 +1,127 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/course.dart'; +import 'package:huixiang/data/author.dart'; + + +Course $CourseFromJson(Map json) { + final Course course = Course(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + course.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + course.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + course.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + course.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + course.updateUser = updateUser; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + course.categoryId = categoryId; + } + final String? subject = jsonConvert.convert(json['subject']); + if (subject != null) { + course.subject = subject; + } + final List? tags = (json['tags'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (tags != null) { + course.tags = tags; + } + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + course.coverImg = coverImg; + } + final Author? author = jsonConvert.convert(json['author']); + if (author != null) { + course.author = author; + } + final String? introduce = jsonConvert.convert(json['introduce']); + if (introduce != null) { + course.introduce = introduce; + } + final int? viewers = jsonConvert.convert(json['viewers']); + if (viewers != null) { + course.viewers = viewers; + } + final int? likes = jsonConvert.convert(json['likes']); + if (likes != null) { + course.likes = likes; + } + final bool? state = jsonConvert.convert(json['state']); + if (state != null) { + course.state = state; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + course.isDelete = isDelete; + } + return course; +} + +Map $CourseToJson(Course entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['categoryId'] = entity.categoryId; + data['subject'] = entity.subject; + data['tags'] = entity.tags; + data['coverImg'] = entity.coverImg; + data['author'] = entity.author?.toJson(); + data['introduce'] = entity.introduce; + data['viewers'] = entity.viewers; + data['likes'] = entity.likes; + data['state'] = entity.state; + data['isDelete'] = entity.isDelete; + return data; +} + +extension CourseExtension on Course { + Course copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? categoryId, + String? subject, + List? tags, + String? coverImg, + Author? author, + String? introduce, + int? viewers, + int? likes, + bool? state, + int? isDelete, + }) { + return Course() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..categoryId = categoryId ?? this.categoryId + ..subject = subject ?? this.subject + ..tags = tags ?? this.tags + ..coverImg = coverImg ?? this.coverImg + ..author = author ?? this.author + ..introduce = introduce ?? this.introduce + ..viewers = viewers ?? this.viewers + ..likes = likes ?? this.likes + ..state = state ?? this.state + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/course_details.g.dart b/lib/generated/json/course_details.g.dart new file mode 100644 index 00000000..3c61d792 --- /dev/null +++ b/lib/generated/json/course_details.g.dart @@ -0,0 +1,134 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/course_details.dart'; +import 'package:huixiang/data/author.dart'; + + +CourseDetails $CourseDetailsFromJson(Map json) { + final CourseDetails courseDetails = CourseDetails(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + courseDetails.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + courseDetails.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + courseDetails.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + courseDetails.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + courseDetails.updateUser = updateUser; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + courseDetails.categoryId = categoryId; + } + final String? subject = jsonConvert.convert(json['subject']); + if (subject != null) { + courseDetails.subject = subject; + } + final List? tags = (json['tags'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (tags != null) { + courseDetails.tags = tags; + } + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + courseDetails.coverImg = coverImg; + } + final Author? author = jsonConvert.convert(json['author']); + if (author != null) { + courseDetails.author = author; + } + final String? introduce = jsonConvert.convert(json['introduce']); + if (introduce != null) { + courseDetails.introduce = introduce; + } + final int? viewers = jsonConvert.convert(json['viewers']); + if (viewers != null) { + courseDetails.viewers = viewers; + } + final int? likes = jsonConvert.convert(json['likes']); + if (likes != null) { + courseDetails.likes = likes; + } + final bool? selfLiked = jsonConvert.convert(json['selfLiked']); + if (selfLiked != null) { + courseDetails.selfLiked = selfLiked; + } + final bool? state = jsonConvert.convert(json['state']); + if (state != null) { + courseDetails.state = state; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + courseDetails.isDelete = isDelete; + } + return courseDetails; +} + +Map $CourseDetailsToJson(CourseDetails entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['categoryId'] = entity.categoryId; + data['subject'] = entity.subject; + data['tags'] = entity.tags; + data['coverImg'] = entity.coverImg; + data['author'] = entity.author?.toJson(); + data['introduce'] = entity.introduce; + data['viewers'] = entity.viewers; + data['likes'] = entity.likes; + data['selfLiked'] = entity.selfLiked; + data['state'] = entity.state; + data['isDelete'] = entity.isDelete; + return data; +} + +extension CourseDetailsExtension on CourseDetails { + CourseDetails copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? categoryId, + String? subject, + List? tags, + String? coverImg, + Author? author, + String? introduce, + int? viewers, + int? likes, + bool? selfLiked, + bool? state, + int? isDelete, + }) { + return CourseDetails() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..categoryId = categoryId ?? this.categoryId + ..subject = subject ?? this.subject + ..tags = tags ?? this.tags + ..coverImg = coverImg ?? this.coverImg + ..author = author ?? this.author + ..introduce = introduce ?? this.introduce + ..viewers = viewers ?? this.viewers + ..likes = likes ?? this.likes + ..selfLiked = selfLiked ?? this.selfLiked + ..state = state ?? this.state + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/dat_count.g.dart b/lib/generated/json/dat_count.g.dart new file mode 100644 index 00000000..50f95805 --- /dev/null +++ b/lib/generated/json/dat_count.g.dart @@ -0,0 +1,149 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/dat_count.dart'; + +DatCount $DatCountFromJson(Map json) { + final DatCount datCount = DatCount(); + final String? summaryDate = jsonConvert.convert(json['summaryDate']); + if (summaryDate != null) { + datCount.summaryDate = summaryDate; + } + final String? dayMoney = jsonConvert.convert(json['dayMoney']); + if (dayMoney != null) { + datCount.dayMoney = dayMoney; + } + final String? discountSum = jsonConvert.convert(json['discountSum']); + if (discountSum != null) { + datCount.discountSum = discountSum; + } + final String? paySum = jsonConvert.convert(json['paySum']); + if (paySum != null) { + datCount.paySum = paySum; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + datCount.rechargeMoney = rechargeMoney; + } + final String? refundMoney = jsonConvert.convert(json['refundMoney']); + if (refundMoney != null) { + datCount.refundMoney = refundMoney; + } + final int? orderNum = jsonConvert.convert(json['orderNum']); + if (orderNum != null) { + datCount.orderNum = orderNum; + } + final int? rechargeOrderNum = jsonConvert.convert( + json['rechargeOrderNum']); + if (rechargeOrderNum != null) { + datCount.rechargeOrderNum = rechargeOrderNum; + } + final int? refundOrderNum = jsonConvert.convert(json['refundOrderNum']); + if (refundOrderNum != null) { + datCount.refundOrderNum = refundOrderNum; + } + final int? payOrderNum = jsonConvert.convert(json['payOrderNum']); + if (payOrderNum != null) { + datCount.payOrderNum = payOrderNum; + } + final int? discountOrderNum = jsonConvert.convert( + json['discountOrderNum']); + if (discountOrderNum != null) { + datCount.discountOrderNum = discountOrderNum; + } + final dynamic startDate = json['startDate']; + if (startDate != null) { + datCount.startDate = startDate; + } + final dynamic endDate = json['endDate']; + if (endDate != null) { + datCount.endDate = endDate; + } + final dynamic tablePerConsumption = json['tablePerConsumption']; + if (tablePerConsumption != null) { + datCount.tablePerConsumption = tablePerConsumption; + } + final int? numberOfPeople = jsonConvert.convert(json['numberOfPeople']); + if (numberOfPeople != null) { + datCount.numberOfPeople = numberOfPeople; + } + final String? peoplePerConsumption = jsonConvert.convert( + json['peoplePerConsumption']); + if (peoplePerConsumption != null) { + datCount.peoplePerConsumption = peoplePerConsumption; + } + final dynamic realDiscountPer = json['realDiscountPer']; + if (realDiscountPer != null) { + datCount.realDiscountPer = realDiscountPer; + } + final dynamic tableRate = json['tableRate']; + if (tableRate != null) { + datCount.tableRate = tableRate; + } + return datCount; +} + +Map $DatCountToJson(DatCount entity) { + final Map data = {}; + data['summaryDate'] = entity.summaryDate; + data['dayMoney'] = entity.dayMoney; + data['discountSum'] = entity.discountSum; + data['paySum'] = entity.paySum; + data['rechargeMoney'] = entity.rechargeMoney; + data['refundMoney'] = entity.refundMoney; + data['orderNum'] = entity.orderNum; + data['rechargeOrderNum'] = entity.rechargeOrderNum; + data['refundOrderNum'] = entity.refundOrderNum; + data['payOrderNum'] = entity.payOrderNum; + data['discountOrderNum'] = entity.discountOrderNum; + data['startDate'] = entity.startDate; + data['endDate'] = entity.endDate; + data['tablePerConsumption'] = entity.tablePerConsumption; + data['numberOfPeople'] = entity.numberOfPeople; + data['peoplePerConsumption'] = entity.peoplePerConsumption; + data['realDiscountPer'] = entity.realDiscountPer; + data['tableRate'] = entity.tableRate; + return data; +} + +extension DatCountExtension on DatCount { + DatCount copyWith({ + String? summaryDate, + String? dayMoney, + String? discountSum, + String? paySum, + String? rechargeMoney, + String? refundMoney, + int? orderNum, + int? rechargeOrderNum, + int? refundOrderNum, + int? payOrderNum, + int? discountOrderNum, + dynamic startDate, + dynamic endDate, + dynamic tablePerConsumption, + int? numberOfPeople, + String? peoplePerConsumption, + dynamic realDiscountPer, + dynamic tableRate, + }) { + return DatCount() + ..summaryDate = summaryDate ?? this.summaryDate + ..dayMoney = dayMoney ?? this.dayMoney + ..discountSum = discountSum ?? this.discountSum + ..paySum = paySum ?? this.paySum + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..refundMoney = refundMoney ?? this.refundMoney + ..orderNum = orderNum ?? this.orderNum + ..rechargeOrderNum = rechargeOrderNum ?? this.rechargeOrderNum + ..refundOrderNum = refundOrderNum ?? this.refundOrderNum + ..payOrderNum = payOrderNum ?? this.payOrderNum + ..discountOrderNum = discountOrderNum ?? this.discountOrderNum + ..startDate = startDate ?? this.startDate + ..endDate = endDate ?? this.endDate + ..tablePerConsumption = tablePerConsumption ?? this.tablePerConsumption + ..numberOfPeople = numberOfPeople ?? this.numberOfPeople + ..peoplePerConsumption = peoplePerConsumption ?? this.peoplePerConsumption + ..realDiscountPer = realDiscountPer ?? this.realDiscountPer + ..tableRate = tableRate ?? this.tableRate; + } +} \ No newline at end of file diff --git a/lib/generated/json/data_type.g.dart b/lib/generated/json/data_type.g.dart new file mode 100644 index 00000000..158dc15d --- /dev/null +++ b/lib/generated/json/data_type.g.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/data_type.dart'; + +DataType $DataTypeFromJson(Map json) { + final DataType dataType = DataType(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + dataType.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + dataType.code = code; + } + return dataType; +} + +Map $DataTypeToJson(DataType entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension DataTypeExtension on DataType { + DataType copyWith({ + String? desc, + String? code, + }) { + return DataType() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} \ No newline at end of file diff --git a/lib/generated/json/day_flow.g.dart b/lib/generated/json/day_flow.g.dart new file mode 100644 index 00000000..61ad0260 --- /dev/null +++ b/lib/generated/json/day_flow.g.dart @@ -0,0 +1,77 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/day_flow.dart'; + +DayFlow $DayFlowFromJson(Map json) { + final DayFlow dayFlow = DayFlow(); + final dynamic localDate = json['localDate']; + if (localDate != null) { + dayFlow.localDate = localDate; + } + final String? localDateTime = jsonConvert.convert( + json['localDateTime']); + if (localDateTime != null) { + dayFlow.localDateTime = localDateTime; + } + final int? count = jsonConvert.convert(json['count']); + if (count != null) { + dayFlow.count = count; + } + final String? amount = jsonConvert.convert(json['amount']); + if (amount != null) { + dayFlow.amount = amount; + } + final String? refundAmount = jsonConvert.convert( + json['refundAmount']); + if (refundAmount != null) { + dayFlow.refundAmount = refundAmount; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + dayFlow.storeName = storeName; + } + final dynamic nickname = json['nickname']; + if (nickname != null) { + dayFlow.nickname = nickname; + } + final dynamic phone = json['phone']; + if (phone != null) { + dayFlow.phone = phone; + } + return dayFlow; +} + +Map $DayFlowToJson(DayFlow entity) { + final Map data = {}; + data['localDate'] = entity.localDate; + data['localDateTime'] = entity.localDateTime; + data['count'] = entity.count; + data['amount'] = entity.amount; + data['refundAmount'] = entity.refundAmount; + data['storeName'] = entity.storeName; + data['nickname'] = entity.nickname; + data['phone'] = entity.phone; + return data; +} + +extension DayFlowExtension on DayFlow { + DayFlow copyWith({ + dynamic localDate, + String? localDateTime, + int? count, + String? amount, + String? refundAmount, + String? storeName, + dynamic nickname, + dynamic phone, + }) { + return DayFlow() + ..localDate = localDate ?? this.localDate + ..localDateTime = localDateTime ?? this.localDateTime + ..count = count ?? this.count + ..amount = amount ?? this.amount + ..refundAmount = refundAmount ?? this.refundAmount + ..storeName = storeName ?? this.storeName + ..nickname = nickname ?? this.nickname + ..phone = phone ?? this.phone; + } +} \ No newline at end of file diff --git a/lib/generated/json/delivery_info.g.dart b/lib/generated/json/delivery_info.g.dart new file mode 100644 index 00000000..5f2ae65c --- /dev/null +++ b/lib/generated/json/delivery_info.g.dart @@ -0,0 +1,72 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/delivery_info.dart'; + +DeliveryInfo $DeliveryInfoFromJson(Map json) { + final DeliveryInfo deliveryInfo = DeliveryInfo(); + final bool? dadaRegStatus = jsonConvert.convert(json['dadaRegStatus']); + if (dadaRegStatus != null) { + deliveryInfo.dadaRegStatus = dadaRegStatus; + } + final String? dadaSourceId = jsonConvert.convert( + json['dadaSourceId']); + if (dadaSourceId != null) { + deliveryInfo.dadaSourceId = dadaSourceId; + } + final bool? dadaStatus = jsonConvert.convert(json['dadaStatus']); + if (dadaStatus != null) { + deliveryInfo.dadaStatus = dadaStatus; + } + final bool? dianwodaRegStatus = jsonConvert.convert( + json['dianwodaRegStatus']); + if (dianwodaRegStatus != null) { + deliveryInfo.dianwodaRegStatus = dianwodaRegStatus; + } + final bool? dianwodaStatus = jsonConvert.convert( + json['dianwodaStatus']); + if (dianwodaStatus != null) { + deliveryInfo.dianwodaStatus = dianwodaStatus; + } + final bool? meituanRegStatus = jsonConvert.convert( + json['meituanRegStatus']); + if (meituanRegStatus != null) { + deliveryInfo.meituanRegStatus = meituanRegStatus; + } + final bool? meituanStatus = jsonConvert.convert(json['meituanStatus']); + if (meituanStatus != null) { + deliveryInfo.meituanStatus = meituanStatus; + } + return deliveryInfo; +} + +Map $DeliveryInfoToJson(DeliveryInfo entity) { + final Map data = {}; + data['dadaRegStatus'] = entity.dadaRegStatus; + data['dadaSourceId'] = entity.dadaSourceId; + data['dadaStatus'] = entity.dadaStatus; + data['dianwodaRegStatus'] = entity.dianwodaRegStatus; + data['dianwodaStatus'] = entity.dianwodaStatus; + data['meituanRegStatus'] = entity.meituanRegStatus; + data['meituanStatus'] = entity.meituanStatus; + return data; +} + +extension DeliveryInfoExtension on DeliveryInfo { + DeliveryInfo copyWith({ + bool? dadaRegStatus, + String? dadaSourceId, + bool? dadaStatus, + bool? dianwodaRegStatus, + bool? dianwodaStatus, + bool? meituanRegStatus, + bool? meituanStatus, + }) { + return DeliveryInfo() + ..dadaRegStatus = dadaRegStatus ?? this.dadaRegStatus + ..dadaSourceId = dadaSourceId ?? this.dadaSourceId + ..dadaStatus = dadaStatus ?? this.dadaStatus + ..dianwodaRegStatus = dianwodaRegStatus ?? this.dianwodaRegStatus + ..dianwodaStatus = dianwodaStatus ?? this.dianwodaStatus + ..meituanRegStatus = meituanRegStatus ?? this.meituanRegStatus + ..meituanStatus = meituanStatus ?? this.meituanStatus; + } +} \ No newline at end of file diff --git a/lib/generated/json/down_order.g.dart b/lib/generated/json/down_order.g.dart new file mode 100644 index 00000000..a3eb6969 --- /dev/null +++ b/lib/generated/json/down_order.g.dart @@ -0,0 +1,181 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/down_order.dart'; +import 'package:huixiang/data/order_product_vo.dart'; + + +DownOrder $DownOrderFromJson(Map json) { + final DownOrder downOrder = DownOrder(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + downOrder.id = id; + } + final String? orderCode = jsonConvert.convert(json['orderCode']); + if (orderCode != null) { + downOrder.orderCode = orderCode; + } + final dynamic storeId = json['storeId']; + if (storeId != null) { + downOrder.storeId = storeId; + } + final dynamic storeName = json['storeName']; + if (storeName != null) { + downOrder.storeName = storeName; + } + final dynamic orderStatus = json['orderStatus']; + if (orderStatus != null) { + downOrder.orderStatus = orderStatus; + } + final dynamic returnType = json['returnType']; + if (returnType != null) { + downOrder.returnType = returnType; + } + final dynamic shipperCode = json['shipperCode']; + if (shipperCode != null) { + downOrder.shipperCode = shipperCode; + } + final dynamic logisticsNum = json['logisticsNum']; + if (logisticsNum != null) { + downOrder.logisticsNum = logisticsNum; + } + final String? orderSum = jsonConvert.convert(json['orderSum']); + if (orderSum != null) { + downOrder.orderSum = orderSum; + } + final dynamic accountPay = json['accountPay']; + if (accountPay != null) { + downOrder.accountPay = accountPay; + } + final dynamic discountAmount = json['discountAmount']; + if (discountAmount != null) { + downOrder.discountAmount = discountAmount; + } + final dynamic postFee = json['postFee']; + if (postFee != null) { + downOrder.postFee = postFee; + } + final dynamic paySum = json['paySum']; + if (paySum != null) { + downOrder.paySum = paySum; + } + final dynamic overTime = json['overTime']; + if (overTime != null) { + downOrder.overTime = overTime; + } + final List< + OrderProductVO>? orderProductVOList = (json['orderProductVOList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as OrderProductVO) + .toList(); + if (orderProductVOList != null) { + downOrder.orderProductVOList = orderProductVOList; + } + final dynamic moneyReturnList = json['moneyReturnList']; + if (moneyReturnList != null) { + downOrder.moneyReturnList = moneyReturnList; + } + final dynamic goodsReturnList = json['goodsReturnList']; + if (goodsReturnList != null) { + downOrder.goodsReturnList = goodsReturnList; + } + final dynamic tablePrice = json['tablePrice']; + if (tablePrice != null) { + downOrder.tablePrice = tablePrice; + } + final dynamic parentCode = json['parentCode']; + if (parentCode != null) { + downOrder.parentCode = parentCode; + } + final String? parentId = jsonConvert.convert(json['parentId']); + if (parentId != null) { + downOrder.parentId = parentId; + } + final dynamic peopleNum = json['peopleNum']; + if (peopleNum != null) { + downOrder.peopleNum = peopleNum; + } + final int? orderSource = jsonConvert.convert(json['orderSource']); + if (orderSource != null) { + downOrder.orderSource = orderSource; + } + return downOrder; +} + +Map $DownOrderToJson(DownOrder entity) { + final Map data = {}; + data['id'] = entity.id; + data['orderCode'] = entity.orderCode; + data['storeId'] = entity.storeId; + data['storeName'] = entity.storeName; + data['orderStatus'] = entity.orderStatus; + data['returnType'] = entity.returnType; + data['shipperCode'] = entity.shipperCode; + data['logisticsNum'] = entity.logisticsNum; + data['orderSum'] = entity.orderSum; + data['accountPay'] = entity.accountPay; + data['discountAmount'] = entity.discountAmount; + data['postFee'] = entity.postFee; + data['paySum'] = entity.paySum; + data['overTime'] = entity.overTime; + data['orderProductVOList'] = + entity.orderProductVOList?.map((v) => v.toJson()).toList(); + data['moneyReturnList'] = entity.moneyReturnList; + data['goodsReturnList'] = entity.goodsReturnList; + data['tablePrice'] = entity.tablePrice; + data['parentCode'] = entity.parentCode; + data['parentId'] = entity.parentId; + data['peopleNum'] = entity.peopleNum; + data['orderSource'] = entity.orderSource; + return data; +} + +extension DownOrderExtension on DownOrder { + DownOrder copyWith({ + String? id, + String? orderCode, + dynamic storeId, + dynamic storeName, + dynamic orderStatus, + dynamic returnType, + dynamic shipperCode, + dynamic logisticsNum, + String? orderSum, + dynamic accountPay, + dynamic discountAmount, + dynamic postFee, + dynamic paySum, + dynamic overTime, + List? orderProductVOList, + dynamic moneyReturnList, + dynamic goodsReturnList, + dynamic tablePrice, + dynamic parentCode, + String? parentId, + dynamic peopleNum, + int? orderSource, + }) { + return DownOrder() + ..id = id ?? this.id + ..orderCode = orderCode ?? this.orderCode + ..storeId = storeId ?? this.storeId + ..storeName = storeName ?? this.storeName + ..orderStatus = orderStatus ?? this.orderStatus + ..returnType = returnType ?? this.returnType + ..shipperCode = shipperCode ?? this.shipperCode + ..logisticsNum = logisticsNum ?? this.logisticsNum + ..orderSum = orderSum ?? this.orderSum + ..accountPay = accountPay ?? this.accountPay + ..discountAmount = discountAmount ?? this.discountAmount + ..postFee = postFee ?? this.postFee + ..paySum = paySum ?? this.paySum + ..overTime = overTime ?? this.overTime + ..orderProductVOList = orderProductVOList ?? this.orderProductVOList + ..moneyReturnList = moneyReturnList ?? this.moneyReturnList + ..goodsReturnList = goodsReturnList ?? this.goodsReturnList + ..tablePrice = tablePrice ?? this.tablePrice + ..parentCode = parentCode ?? this.parentCode + ..parentId = parentId ?? this.parentId + ..peopleNum = peopleNum ?? this.peopleNum + ..orderSource = orderSource ?? this.orderSource; + } +} \ No newline at end of file diff --git a/lib/generated/json/exchange_order.g.dart b/lib/generated/json/exchange_order.g.dart new file mode 100644 index 00000000..15a5c3f3 --- /dev/null +++ b/lib/generated/json/exchange_order.g.dart @@ -0,0 +1,169 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/exchange_order.dart'; +import 'package:huixiang/data/exchange_order_goods.dart'; + + +ExchangeOrder $ExchangeOrderFromJson(Map json) { + final ExchangeOrder exchangeOrder = ExchangeOrder(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + exchangeOrder.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + exchangeOrder.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + exchangeOrder.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + exchangeOrder.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + exchangeOrder.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + exchangeOrder.storeId = storeId; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + exchangeOrder.mid = mid; + } + final String? orderCode = jsonConvert.convert(json['orderCode']); + if (orderCode != null) { + exchangeOrder.orderCode = orderCode; + } + final String? amount = jsonConvert.convert(json['amount']); + if (amount != null) { + exchangeOrder.amount = amount; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + exchangeOrder.money = money; + } + final int? payStatus = jsonConvert.convert(json['payStatus']); + if (payStatus != null) { + exchangeOrder.payStatus = payStatus; + } + final int? payType = jsonConvert.convert(json['payType']); + if (payType != null) { + exchangeOrder.payType = payType; + } + final int? sendStatus = jsonConvert.convert(json['sendStatus']); + if (sendStatus != null) { + exchangeOrder.sendStatus = sendStatus; + } + final String? address = jsonConvert.convert(json['address']); + if (address != null) { + exchangeOrder.address = address; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + exchangeOrder.storeName = storeName; + } + final String? recAddress = jsonConvert.convert(json['recAddress']); + if (recAddress != null) { + exchangeOrder.recAddress = recAddress; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + exchangeOrder.state = state; + } + final int? useTyped = jsonConvert.convert(json['useTyped']); + if (useTyped != null) { + exchangeOrder.useTyped = useTyped; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + exchangeOrder.isDelete = isDelete; + } + final List< + ExchangeOrderGoods>? creditOrderDetailList = (json['creditOrderDetailList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as ExchangeOrderGoods) + .toList(); + if (creditOrderDetailList != null) { + exchangeOrder.creditOrderDetailList = creditOrderDetailList; + } + return exchangeOrder; +} + +Map $ExchangeOrderToJson(ExchangeOrder entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['mid'] = entity.mid; + data['orderCode'] = entity.orderCode; + data['amount'] = entity.amount; + data['money'] = entity.money; + data['payStatus'] = entity.payStatus; + data['payType'] = entity.payType; + data['sendStatus'] = entity.sendStatus; + data['address'] = entity.address; + data['storeName'] = entity.storeName; + data['recAddress'] = entity.recAddress; + data['state'] = entity.state; + data['useTyped'] = entity.useTyped; + data['isDelete'] = entity.isDelete; + data['creditOrderDetailList'] = + entity.creditOrderDetailList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ExchangeOrderExtension on ExchangeOrder { + ExchangeOrder copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? mid, + String? orderCode, + String? amount, + String? money, + int? payStatus, + int? payType, + int? sendStatus, + String? address, + String? storeName, + String? recAddress, + int? state, + int? useTyped, + int? isDelete, + List? creditOrderDetailList, + }) { + return ExchangeOrder() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..mid = mid ?? this.mid + ..orderCode = orderCode ?? this.orderCode + ..amount = amount ?? this.amount + ..money = money ?? this.money + ..payStatus = payStatus ?? this.payStatus + ..payType = payType ?? this.payType + ..sendStatus = sendStatus ?? this.sendStatus + ..address = address ?? this.address + ..storeName = storeName ?? this.storeName + ..recAddress = recAddress ?? this.recAddress + ..state = state ?? this.state + ..useTyped = useTyped ?? this.useTyped + ..isDelete = isDelete ?? this.isDelete + ..creditOrderDetailList = creditOrderDetailList ?? + this.creditOrderDetailList; + } +} \ No newline at end of file diff --git a/lib/generated/json/exchange_order_goods.g.dart b/lib/generated/json/exchange_order_goods.g.dart new file mode 100644 index 00000000..356ec303 --- /dev/null +++ b/lib/generated/json/exchange_order_goods.g.dart @@ -0,0 +1,161 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/exchange_order_goods.dart'; + +ExchangeOrderGoods $ExchangeOrderGoodsFromJson(Map json) { + final ExchangeOrderGoods exchangeOrderGoods = ExchangeOrderGoods(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + exchangeOrderGoods.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + exchangeOrderGoods.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + exchangeOrderGoods.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + exchangeOrderGoods.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + exchangeOrderGoods.updateUser = updateUser; + } + final String? orderId = jsonConvert.convert(json['orderId']); + if (orderId != null) { + exchangeOrderGoods.orderId = orderId; + } + final String? goodsId = jsonConvert.convert(json['goodsId']); + if (goodsId != null) { + exchangeOrderGoods.goodsId = goodsId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + exchangeOrderGoods.categoryId = categoryId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + exchangeOrderGoods.name = name; + } + final String? description = jsonConvert.convert(json['description']); + if (description != null) { + exchangeOrderGoods.description = description; + } + final String? worth = jsonConvert.convert(json['worth']); + if (worth != null) { + exchangeOrderGoods.worth = worth; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + exchangeOrderGoods.price = price; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + exchangeOrderGoods.money = money; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + exchangeOrderGoods.couponId = couponId; + } + final bool? canPick = jsonConvert.convert(json['canPick']); + if (canPick != null) { + exchangeOrderGoods.canPick = canPick; + } + final bool? canDelivery = jsonConvert.convert(json['canDelivery']); + if (canDelivery != null) { + exchangeOrderGoods.canDelivery = canDelivery; + } + final String? goodsMainImg = jsonConvert.convert( + json['goodsMainImg']); + if (goodsMainImg != null) { + exchangeOrderGoods.goodsMainImg = goodsMainImg; + } + final String? goodsViceImg = jsonConvert.convert( + json['goodsViceImg']); + if (goodsViceImg != null) { + exchangeOrderGoods.goodsViceImg = goodsViceImg; + } + final int? goodsNumber = jsonConvert.convert(json['goodsNumber']); + if (goodsNumber != null) { + exchangeOrderGoods.goodsNumber = goodsNumber; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + exchangeOrderGoods.isDelete = isDelete; + } + return exchangeOrderGoods; +} + +Map $ExchangeOrderGoodsToJson(ExchangeOrderGoods entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['orderId'] = entity.orderId; + data['goodsId'] = entity.goodsId; + data['categoryId'] = entity.categoryId; + data['name'] = entity.name; + data['description'] = entity.description; + data['worth'] = entity.worth; + data['price'] = entity.price; + data['money'] = entity.money; + data['couponId'] = entity.couponId; + data['canPick'] = entity.canPick; + data['canDelivery'] = entity.canDelivery; + data['goodsMainImg'] = entity.goodsMainImg; + data['goodsViceImg'] = entity.goodsViceImg; + data['goodsNumber'] = entity.goodsNumber; + data['isDelete'] = entity.isDelete; + return data; +} + +extension ExchangeOrderGoodsExtension on ExchangeOrderGoods { + ExchangeOrderGoods copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? orderId, + String? goodsId, + String? categoryId, + String? name, + String? description, + String? worth, + String? price, + String? money, + String? couponId, + bool? canPick, + bool? canDelivery, + String? goodsMainImg, + String? goodsViceImg, + int? goodsNumber, + int? isDelete, + }) { + return ExchangeOrderGoods() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..orderId = orderId ?? this.orderId + ..goodsId = goodsId ?? this.goodsId + ..categoryId = categoryId ?? this.categoryId + ..name = name ?? this.name + ..description = description ?? this.description + ..worth = worth ?? this.worth + ..price = price ?? this.price + ..money = money ?? this.money + ..couponId = couponId ?? this.couponId + ..canPick = canPick ?? this.canPick + ..canDelivery = canDelivery ?? this.canDelivery + ..goodsMainImg = goodsMainImg ?? this.goodsMainImg + ..goodsViceImg = goodsViceImg ?? this.goodsViceImg + ..goodsNumber = goodsNumber ?? this.goodsNumber + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/farmers.g.dart b/lib/generated/json/farmers.g.dart new file mode 100644 index 00000000..d6f8875d --- /dev/null +++ b/lib/generated/json/farmers.g.dart @@ -0,0 +1,44 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/farmers.dart'; +import 'package:huixiang/data/good_list.dart'; + + +Farmers $FarmersFromJson(Map json) { + final Farmers farmers = Farmers(); + final List? goodList = (json['goodList'] as List?)?.map( + (e) => jsonConvert.convert(e) as GoodList).toList(); + if (goodList != null) { + farmers.goodList = goodList; + } + final String? typeName = jsonConvert.convert(json['typeName']); + if (typeName != null) { + farmers.typeName = typeName; + } + final String? agriculturaListImg = jsonConvert.convert( + json['agriculturaListImg']); + if (agriculturaListImg != null) { + farmers.agriculturaListImg = agriculturaListImg; + } + return farmers; +} + +Map $FarmersToJson(Farmers entity) { + final Map data = {}; + data['goodList'] = entity.goodList?.map((v) => v.toJson()).toList(); + data['typeName'] = entity.typeName; + data['agriculturaListImg'] = entity.agriculturaListImg; + return data; +} + +extension FarmersExtension on Farmers { + Farmers copyWith({ + List? goodList, + String? typeName, + String? agriculturaListImg, + }) { + return Farmers() + ..goodList = goodList ?? this.goodList + ..typeName = typeName ?? this.typeName + ..agriculturaListImg = agriculturaListImg ?? this.agriculturaListImg; + } +} \ No newline at end of file diff --git a/lib/generated/json/find_mini_group.g.dart b/lib/generated/json/find_mini_group.g.dart new file mode 100644 index 00000000..f6c91772 --- /dev/null +++ b/lib/generated/json/find_mini_group.g.dart @@ -0,0 +1,317 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/find_mini_group.dart'; +import 'package:huixiang/data/subscribe_param.dart'; + + +FindMiniGroup $FindMiniGroupFromJson(Map json) { + final FindMiniGroup findMiniGroup = FindMiniGroup(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + findMiniGroup.id = id; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + findMiniGroup.storeId = storeId; + } + final String? groupName = jsonConvert.convert(json['groupName']); + if (groupName != null) { + findMiniGroup.groupName = groupName; + } + final String? groupImg = jsonConvert.convert(json['groupImg']); + if (groupImg != null) { + findMiniGroup.groupImg = groupImg; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + findMiniGroup.sort = sort; + } + final int? goodsIndex = jsonConvert.convert(json['goodsIndex']); + if (goodsIndex != null) { + findMiniGroup.goodsIndex = goodsIndex; + } + final int? height = jsonConvert.convert(json['height']); + if (height != null) { + findMiniGroup.height = height; + } + final List? productList = (json['productList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductListBean) + .toList(); + if (productList != null) { + findMiniGroup.productList = productList; + } + final dynamic productPageVO = json['productPageVO']; + if (productPageVO != null) { + findMiniGroup.productPageVO = productPageVO; + } + return findMiniGroup; +} + +Map $FindMiniGroupToJson(FindMiniGroup entity) { + final Map data = {}; + data['id'] = entity.id; + data['storeId'] = entity.storeId; + data['groupName'] = entity.groupName; + data['groupImg'] = entity.groupImg; + data['sort'] = entity.sort; + data['goodsIndex'] = entity.goodsIndex; + data['height'] = entity.height; + data['productList'] = entity.productList?.map((v) => v.toJson()).toList(); + data['productPageVO'] = entity.productPageVO; + return data; +} + +extension FindMiniGroupExtension on FindMiniGroup { + FindMiniGroup copyWith({ + String? id, + String? storeId, + String? groupName, + String? groupImg, + int? sort, + int? goodsIndex, + int? height, + List? productList, + dynamic productPageVO, + }) { + return FindMiniGroup() + ..id = id ?? this.id + ..storeId = storeId ?? this.storeId + ..groupName = groupName ?? this.groupName + ..groupImg = groupImg ?? this.groupImg + ..sort = sort ?? this.sort + ..goodsIndex = goodsIndex ?? this.goodsIndex + ..height = height ?? this.height + ..productList = productList ?? this.productList + ..productPageVO = productPageVO ?? this.productPageVO; + } +} + +ProductListBean $ProductListBeanFromJson(Map json) { + final ProductListBean productListBean = ProductListBean(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productListBean.id = id; + } + final String? supplierName = jsonConvert.convert( + json['supplierName']); + if (supplierName != null) { + productListBean.supplierName = supplierName; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + productListBean.storeId = storeId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + productListBean.categoryId = categoryId; + } + final String? groupId = jsonConvert.convert(json['groupId']); + if (groupId != null) { + productListBean.groupId = groupId; + } + final String? shortName = jsonConvert.convert(json['shortName']); + if (shortName != null) { + productListBean.shortName = shortName; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + productListBean.productName = productName; + } + final String? sellDesc = jsonConvert.convert(json['sellDesc']); + if (sellDesc != null) { + productListBean.sellDesc = sellDesc; + } + final String? productCode = jsonConvert.convert(json['productCode']); + if (productCode != null) { + productListBean.productCode = productCode; + } + final String? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + productListBean.weight = weight; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + productListBean.applyPrice = applyPrice; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + productListBean.price = price; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + productListBean.stock = stock; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + productListBean.sellCount = sellCount; + } + final int? needLogistics = jsonConvert.convert(json['needLogistics']); + if (needLogistics != null) { + productListBean.needLogistics = needLogistics; + } + final int? oversold = jsonConvert.convert(json['oversold']); + if (oversold != null) { + productListBean.oversold = oversold; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + productListBean.status = status; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + productListBean.posShow = posShow; + } + final int? attrStyle = jsonConvert.convert(json['attrStyle']); + if (attrStyle != null) { + productListBean.attrStyle = attrStyle; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productListBean.isDelete = isDelete; + } + final dynamic productAttrValues = json['productAttrValues']; + if (productAttrValues != null) { + productListBean.productAttrValues = productAttrValues; + } + final dynamic skuList = json['skuList']; + if (skuList != null) { + productListBean.skuList = skuList; + } + final dynamic imgPathList = json['imgPathList']; + if (imgPathList != null) { + productListBean.imgPathList = imgPathList; + } + final int? buyNum = jsonConvert.convert(json['buyNum']); + if (buyNum != null) { + productListBean.buyNum = buyNum; + } + final String? imgPath = jsonConvert.convert(json['imgPath']); + if (imgPath != null) { + productListBean.imgPath = imgPath; + } + final int? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + productListBean.setMeal = setMeal; + } + final String? printerFlag = jsonConvert.convert(json['printerFlag']); + if (printerFlag != null) { + productListBean.printerFlag = printerFlag; + } + final dynamic markProductNone = json['markProductNone']; + if (markProductNone != null) { + productListBean.markProductNone = markProductNone; + } + final SubscribeParam? subscribeParam = jsonConvert.convert( + json['subscribeParam']); + if (subscribeParam != null) { + productListBean.subscribeParam = subscribeParam; + } + final bool? isSetMeal = jsonConvert.convert(json['isSetMeal']); + if (isSetMeal != null) { + productListBean.isSetMeal = isSetMeal; + } + return productListBean; +} + +Map $ProductListBeanToJson(ProductListBean entity) { + final Map data = {}; + data['id'] = entity.id; + data['supplierName'] = entity.supplierName; + data['storeId'] = entity.storeId; + data['categoryId'] = entity.categoryId; + data['groupId'] = entity.groupId; + data['shortName'] = entity.shortName; + data['productName'] = entity.productName; + data['sellDesc'] = entity.sellDesc; + data['productCode'] = entity.productCode; + data['weight'] = entity.weight; + data['applyPrice'] = entity.applyPrice; + data['price'] = entity.price; + data['stock'] = entity.stock; + data['sellCount'] = entity.sellCount; + data['needLogistics'] = entity.needLogistics; + data['oversold'] = entity.oversold; + data['status'] = entity.status; + data['posShow'] = entity.posShow; + data['attrStyle'] = entity.attrStyle; + data['isDelete'] = entity.isDelete; + data['productAttrValues'] = entity.productAttrValues; + data['skuList'] = entity.skuList; + data['imgPathList'] = entity.imgPathList; + data['buyNum'] = entity.buyNum; + data['imgPath'] = entity.imgPath; + data['setMeal'] = entity.setMeal; + data['printerFlag'] = entity.printerFlag; + data['markProductNone'] = entity.markProductNone; + data['subscribeParam'] = entity.subscribeParam?.toJson(); + data['isSetMeal'] = entity.isSetMeal; + return data; +} + +extension ProductListBeanExtension on ProductListBean { + ProductListBean copyWith({ + String? id, + String? supplierName, + String? storeId, + String? categoryId, + String? groupId, + String? shortName, + String? productName, + String? sellDesc, + String? productCode, + String? weight, + String? applyPrice, + String? price, + int? stock, + int? sellCount, + int? needLogistics, + int? oversold, + int? status, + bool? posShow, + int? attrStyle, + int? isDelete, + dynamic productAttrValues, + dynamic skuList, + dynamic imgPathList, + int? buyNum, + String? imgPath, + int? setMeal, + String? printerFlag, + dynamic markProductNone, + SubscribeParam? subscribeParam, + bool? isSetMeal, + }) { + return ProductListBean() + ..id = id ?? this.id + ..supplierName = supplierName ?? this.supplierName + ..storeId = storeId ?? this.storeId + ..categoryId = categoryId ?? this.categoryId + ..groupId = groupId ?? this.groupId + ..shortName = shortName ?? this.shortName + ..productName = productName ?? this.productName + ..sellDesc = sellDesc ?? this.sellDesc + ..productCode = productCode ?? this.productCode + ..weight = weight ?? this.weight + ..applyPrice = applyPrice ?? this.applyPrice + ..price = price ?? this.price + ..stock = stock ?? this.stock + ..sellCount = sellCount ?? this.sellCount + ..needLogistics = needLogistics ?? this.needLogistics + ..oversold = oversold ?? this.oversold + ..status = status ?? this.status + ..posShow = posShow ?? this.posShow + ..attrStyle = attrStyle ?? this.attrStyle + ..isDelete = isDelete ?? this.isDelete + ..productAttrValues = productAttrValues ?? this.productAttrValues + ..skuList = skuList ?? this.skuList + ..imgPathList = imgPathList ?? this.imgPathList + ..buyNum = buyNum ?? this.buyNum + ..imgPath = imgPath ?? this.imgPath + ..setMeal = setMeal ?? this.setMeal + ..printerFlag = printerFlag ?? this.printerFlag + ..markProductNone = markProductNone ?? this.markProductNone + ..subscribeParam = subscribeParam ?? this.subscribeParam + ..isSetMeal = isSetMeal ?? this.isSetMeal; + } +} \ No newline at end of file diff --git a/lib/generated/json/follow.g.dart b/lib/generated/json/follow.g.dart new file mode 100644 index 00000000..b07d4025 --- /dev/null +++ b/lib/generated/json/follow.g.dart @@ -0,0 +1,47 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/follow.dart'; + +Follow $FollowFromJson(Map json) { + final Follow follow = Follow(); + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + follow.mid = mid; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + follow.nickname = nickname; + } + final String? avatar = jsonConvert.convert(json['avatar']); + if (avatar != null) { + follow.avatar = avatar; + } + final bool? isFollow = jsonConvert.convert(json['isFollow']); + if (isFollow != null) { + follow.isFollow = isFollow; + } + return follow; +} + +Map $FollowToJson(Follow entity) { + final Map data = {}; + data['mid'] = entity.mid; + data['nickname'] = entity.nickname; + data['avatar'] = entity.avatar; + data['isFollow'] = entity.isFollow; + return data; +} + +extension FollowExtension on Follow { + Follow copyWith({ + String? mid, + String? nickname, + String? avatar, + bool? isFollow, + }) { + return Follow() + ..mid = mid ?? this.mid + ..nickname = nickname ?? this.nickname + ..avatar = avatar ?? this.avatar + ..isFollow = isFollow ?? this.isFollow; + } +} \ No newline at end of file diff --git a/lib/generated/json/founder.g.dart b/lib/generated/json/founder.g.dart new file mode 100644 index 00000000..5e9f8cd1 --- /dev/null +++ b/lib/generated/json/founder.g.dart @@ -0,0 +1,54 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/founder.dart'; + +Founder $FounderFromJson(Map json) { + final Founder founder = Founder(); + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + founder.name = name; + } + final String? position = jsonConvert.convert(json['position']); + if (position != null) { + founder.position = position; + } + final String? description = jsonConvert.convert(json['description']); + if (description != null) { + founder.description = description; + } + final String? imgUrl = jsonConvert.convert(json['imgUrl']); + if (imgUrl != null) { + founder.imgUrl = imgUrl; + } + final String? profile = jsonConvert.convert(json['profile']); + if (profile != null) { + founder.profile = profile; + } + return founder; +} + +Map $FounderToJson(Founder entity) { + final Map data = {}; + data['name'] = entity.name; + data['position'] = entity.position; + data['description'] = entity.description; + data['imgUrl'] = entity.imgUrl; + data['profile'] = entity.profile; + return data; +} + +extension FounderExtension on Founder { + Founder copyWith({ + String? name, + String? position, + String? description, + String? imgUrl, + String? profile, + }) { + return Founder() + ..name = name ?? this.name + ..position = position ?? this.position + ..description = description ?? this.description + ..imgUrl = imgUrl ?? this.imgUrl + ..profile = profile ?? this.profile; + } +} \ No newline at end of file diff --git a/lib/generated/json/good_list.g.dart b/lib/generated/json/good_list.g.dart new file mode 100644 index 00000000..f72377d4 --- /dev/null +++ b/lib/generated/json/good_list.g.dart @@ -0,0 +1,133 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/good_list.dart'; +import 'package:huixiang/data/mini_detail.dart'; + + +GoodList $GoodListFromJson(Map json) { + final GoodList goodList = GoodList(); + final String? productImg = jsonConvert.convert(json['productImg']); + if (productImg != null) { + goodList.productImg = productImg; + } + final List< + ProductSkuVOList>? productSkuVOList = (json['productSkuVOList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductSkuVOList) + .toList(); + if (productSkuVOList != null) { + goodList.productSkuVOList = productSkuVOList; + } + final String? thumbnailImg = jsonConvert.convert( + json['thumbnailImg']); + if (thumbnailImg != null) { + goodList.thumbnailImg = thumbnailImg; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + goodList.tenantCode = tenantCode; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + goodList.storeId = storeId; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + goodList.productName = productName; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + goodList.posShow = posShow; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + goodList.price = price; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + goodList.sellCount = sellCount; + } + final String? details = jsonConvert.convert(json['details']); + if (details != null) { + goodList.details = details; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + goodList.id = id; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + goodList.applyPrice = applyPrice; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + goodList.stock = stock; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + goodList.status = status; + } + final String? info = jsonConvert.convert(json['info']); + if (info != null) { + goodList.info = info; + } + return goodList; +} + +Map $GoodListToJson(GoodList entity) { + final Map data = {}; + data['productImg'] = entity.productImg; + data['productSkuVOList'] = + entity.productSkuVOList?.map((v) => v.toJson()).toList(); + data['thumbnailImg'] = entity.thumbnailImg; + data['tenantCode'] = entity.tenantCode; + data['storeId'] = entity.storeId; + data['productName'] = entity.productName; + data['posShow'] = entity.posShow; + data['price'] = entity.price; + data['sellCount'] = entity.sellCount; + data['details'] = entity.details; + data['id'] = entity.id; + data['applyPrice'] = entity.applyPrice; + data['stock'] = entity.stock; + data['status'] = entity.status; + data['info'] = entity.info; + return data; +} + +extension GoodListExtension on GoodList { + GoodList copyWith({ + String? productImg, + List? productSkuVOList, + String? thumbnailImg, + String? tenantCode, + String? storeId, + String? productName, + bool? posShow, + String? price, + int? sellCount, + String? details, + String? id, + String? applyPrice, + int? stock, + int? status, + String? info, + }) { + return GoodList() + ..productImg = productImg ?? this.productImg + ..productSkuVOList = productSkuVOList ?? this.productSkuVOList + ..thumbnailImg = thumbnailImg ?? this.thumbnailImg + ..tenantCode = tenantCode ?? this.tenantCode + ..storeId = storeId ?? this.storeId + ..productName = productName ?? this.productName + ..posShow = posShow ?? this.posShow + ..price = price ?? this.price + ..sellCount = sellCount ?? this.sellCount + ..details = details ?? this.details + ..id = id ?? this.id + ..applyPrice = applyPrice ?? this.applyPrice + ..stock = stock ?? this.stock + ..status = status ?? this.status + ..info = info ?? this.info; + } +} \ No newline at end of file diff --git a/lib/generated/json/goods.g.dart b/lib/generated/json/goods.g.dart new file mode 100644 index 00000000..240f9aa8 --- /dev/null +++ b/lib/generated/json/goods.g.dart @@ -0,0 +1,211 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/goods.dart'; + +Goods $GoodsFromJson(Map json) { + final Goods goods = Goods(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + goods.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + goods.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + goods.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + goods.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + goods.updateUser = updateUser; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + goods.categoryId = categoryId; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + goods.storeId = storeId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + goods.name = name; + } + final String? description = jsonConvert.convert(json['description']); + if (description != null) { + goods.description = description; + } + final String? detail = jsonConvert.convert(json['detail']); + if (detail != null) { + goods.detail = detail; + } + final String? worth = jsonConvert.convert(json['worth']); + if (worth != null) { + goods.worth = worth; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + goods.price = price; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + goods.money = money; + } + final String? onePrice = jsonConvert.convert(json['onePrice']); + if (onePrice != null) { + goods.onePrice = onePrice; + } + final String? oneMoney = jsonConvert.convert(json['oneMoney']); + if (oneMoney != null) { + goods.oneMoney = oneMoney; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + goods.stock = stock; + } + final int? sales = jsonConvert.convert(json['sales']); + if (sales != null) { + goods.sales = sales; + } + final bool? isHot = jsonConvert.convert(json['isHot']); + if (isHot != null) { + goods.isHot = isHot; + } + final int? sortOrder = jsonConvert.convert(json['sortOrder']); + if (sortOrder != null) { + goods.sortOrder = sortOrder; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + goods.state = state; + } + final bool? canPick = jsonConvert.convert(json['canPick']); + if (canPick != null) { + goods.canPick = canPick; + } + final bool? canDelivery = jsonConvert.convert(json['canDelivery']); + if (canDelivery != null) { + goods.canDelivery = canDelivery; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + goods.isDelete = isDelete; + } + final dynamic categoryName = json['categoryName']; + if (categoryName != null) { + goods.categoryName = categoryName; + } + final String? mainImgPath = jsonConvert.convert(json['mainImgPath']); + if (mainImgPath != null) { + goods.mainImgPath = mainImgPath; + } + final String? oneBean = jsonConvert.convert(json['oneBean']); + if (oneBean != null) { + goods.oneBean = oneBean; + } + final List? viceImgPaths = (json['viceImgPaths'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as String) + .toList(); + if (viceImgPaths != null) { + goods.viceImgPaths = viceImgPaths; + } + return goods; +} + +Map $GoodsToJson(Goods entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['categoryId'] = entity.categoryId; + data['storeId'] = entity.storeId; + data['name'] = entity.name; + data['description'] = entity.description; + data['detail'] = entity.detail; + data['worth'] = entity.worth; + data['price'] = entity.price; + data['money'] = entity.money; + data['onePrice'] = entity.onePrice; + data['oneMoney'] = entity.oneMoney; + data['stock'] = entity.stock; + data['sales'] = entity.sales; + data['isHot'] = entity.isHot; + data['sortOrder'] = entity.sortOrder; + data['state'] = entity.state; + data['canPick'] = entity.canPick; + data['canDelivery'] = entity.canDelivery; + data['isDelete'] = entity.isDelete; + data['categoryName'] = entity.categoryName; + data['mainImgPath'] = entity.mainImgPath; + data['oneBean'] = entity.oneBean; + data['viceImgPaths'] = entity.viceImgPaths; + return data; +} + +extension GoodsExtension on Goods { + Goods copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? categoryId, + String? storeId, + String? name, + String? description, + String? detail, + String? worth, + String? price, + String? money, + String? onePrice, + String? oneMoney, + int? stock, + int? sales, + bool? isHot, + int? sortOrder, + int? state, + bool? canPick, + bool? canDelivery, + int? isDelete, + dynamic categoryName, + String? mainImgPath, + String? oneBean, + List? viceImgPaths, + }) { + return Goods() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..categoryId = categoryId ?? this.categoryId + ..storeId = storeId ?? this.storeId + ..name = name ?? this.name + ..description = description ?? this.description + ..detail = detail ?? this.detail + ..worth = worth ?? this.worth + ..price = price ?? this.price + ..money = money ?? this.money + ..onePrice = onePrice ?? this.onePrice + ..oneMoney = oneMoney ?? this.oneMoney + ..stock = stock ?? this.stock + ..sales = sales ?? this.sales + ..isHot = isHot ?? this.isHot + ..sortOrder = sortOrder ?? this.sortOrder + ..state = state ?? this.state + ..canPick = canPick ?? this.canPick + ..canDelivery = canDelivery ?? this.canDelivery + ..isDelete = isDelete ?? this.isDelete + ..categoryName = categoryName ?? this.categoryName + ..mainImgPath = mainImgPath ?? this.mainImgPath + ..oneBean = oneBean ?? this.oneBean + ..viceImgPaths = viceImgPaths ?? this.viceImgPaths; + } +} \ No newline at end of file diff --git a/lib/generated/json/goods_category.g.dart b/lib/generated/json/goods_category.g.dart new file mode 100644 index 00000000..ce531813 --- /dev/null +++ b/lib/generated/json/goods_category.g.dart @@ -0,0 +1,89 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/goods_category.dart'; + +GoodsCategory $GoodsCategoryFromJson(Map json) { + final GoodsCategory goodsCategory = GoodsCategory(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + goodsCategory.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + goodsCategory.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + goodsCategory.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + goodsCategory.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + goodsCategory.updateUser = updateUser; + } + final String? parentId = jsonConvert.convert(json['parentId']); + if (parentId != null) { + goodsCategory.parentId = parentId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + goodsCategory.name = name; + } + final int? miniShow = jsonConvert.convert(json['miniShow']); + if (miniShow != null) { + goodsCategory.miniShow = miniShow; + } + final int? sortOrder = jsonConvert.convert(json['sortOrder']); + if (sortOrder != null) { + goodsCategory.sortOrder = sortOrder; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + goodsCategory.isDelete = isDelete; + } + return goodsCategory; +} + +Map $GoodsCategoryToJson(GoodsCategory entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['parentId'] = entity.parentId; + data['name'] = entity.name; + data['miniShow'] = entity.miniShow; + data['sortOrder'] = entity.sortOrder; + data['isDelete'] = entity.isDelete; + return data; +} + +extension GoodsCategoryExtension on GoodsCategory { + GoodsCategory copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? parentId, + String? name, + int? miniShow, + int? sortOrder, + int? isDelete, + }) { + return GoodsCategory() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..parentId = parentId ?? this.parentId + ..name = name ?? this.name + ..miniShow = miniShow ?? this.miniShow + ..sortOrder = sortOrder ?? this.sortOrder + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/goods_category_list.g.dart b/lib/generated/json/goods_category_list.g.dart new file mode 100644 index 00000000..c76a2259 --- /dev/null +++ b/lib/generated/json/goods_category_list.g.dart @@ -0,0 +1,105 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/goods_category_list.dart'; + +GoodsCategoryList $GoodsCategoryListFromJson(Map json) { + final GoodsCategoryList goodsCategoryList = GoodsCategoryList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + goodsCategoryList.id = id; + } + final String? categoryName = jsonConvert.convert( + json['categoryName']); + if (categoryName != null) { + goodsCategoryList.categoryName = categoryName; + } + final String? categoryPath = jsonConvert.convert( + json['categoryPath']); + if (categoryPath != null) { + goodsCategoryList.categoryPath = categoryPath; + } + final dynamic categoryImg = json['categoryImg']; + if (categoryImg != null) { + goodsCategoryList.categoryImg = categoryImg; + } + final int? depth = jsonConvert.convert(json['depth']); + if (depth != null) { + goodsCategoryList.depth = depth; + } + final dynamic parentName = json['parentName']; + if (parentName != null) { + goodsCategoryList.parentName = parentName; + } + final dynamic parentId = json['parentId']; + if (parentId != null) { + goodsCategoryList.parentId = parentId; + } + final int? sortOrder = jsonConvert.convert(json['sortOrder']); + if (sortOrder != null) { + goodsCategoryList.sortOrder = sortOrder; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + goodsCategoryList.status = status; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + goodsCategoryList.isDelete = isDelete; + } + final dynamic childs = json['childs']; + if (childs != null) { + goodsCategoryList.childs = childs; + } + final dynamic posType = json['posType']; + if (posType != null) { + goodsCategoryList.posType = posType; + } + return goodsCategoryList; +} + +Map $GoodsCategoryListToJson(GoodsCategoryList entity) { + final Map data = {}; + data['id'] = entity.id; + data['categoryName'] = entity.categoryName; + data['categoryPath'] = entity.categoryPath; + data['categoryImg'] = entity.categoryImg; + data['depth'] = entity.depth; + data['parentName'] = entity.parentName; + data['parentId'] = entity.parentId; + data['sortOrder'] = entity.sortOrder; + data['status'] = entity.status; + data['isDelete'] = entity.isDelete; + data['childs'] = entity.childs; + data['posType'] = entity.posType; + return data; +} + +extension GoodsCategoryListExtension on GoodsCategoryList { + GoodsCategoryList copyWith({ + String? id, + String? categoryName, + String? categoryPath, + dynamic categoryImg, + int? depth, + dynamic parentName, + dynamic parentId, + int? sortOrder, + int? status, + int? isDelete, + dynamic childs, + dynamic posType, + }) { + return GoodsCategoryList() + ..id = id ?? this.id + ..categoryName = categoryName ?? this.categoryName + ..categoryPath = categoryPath ?? this.categoryPath + ..categoryImg = categoryImg ?? this.categoryImg + ..depth = depth ?? this.depth + ..parentName = parentName ?? this.parentName + ..parentId = parentId ?? this.parentId + ..sortOrder = sortOrder ?? this.sortOrder + ..status = status ?? this.status + ..isDelete = isDelete ?? this.isDelete + ..childs = childs ?? this.childs + ..posType = posType ?? this.posType; + } +} \ No newline at end of file diff --git a/lib/generated/json/goods_type_sales.g.dart b/lib/generated/json/goods_type_sales.g.dart new file mode 100644 index 00000000..ef60aa96 --- /dev/null +++ b/lib/generated/json/goods_type_sales.g.dart @@ -0,0 +1,47 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/goods_type_sales.dart'; + +GoodsTypeSales $GoodsTypeSalesFromJson(Map json) { + final GoodsTypeSales goodsTypeSales = GoodsTypeSales(); + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + goodsTypeSales.name = name; + } + final String? value = jsonConvert.convert(json['value']); + if (value != null) { + goodsTypeSales.value = value; + } + final String? sale = jsonConvert.convert(json['sale']); + if (sale != null) { + goodsTypeSales.sale = sale; + } + final String? percentage = jsonConvert.convert(json['percentage']); + if (percentage != null) { + goodsTypeSales.percentage = percentage; + } + return goodsTypeSales; +} + +Map $GoodsTypeSalesToJson(GoodsTypeSales entity) { + final Map data = {}; + data['name'] = entity.name; + data['value'] = entity.value; + data['sale'] = entity.sale; + data['percentage'] = entity.percentage; + return data; +} + +extension GoodsTypeSalesExtension on GoodsTypeSales { + GoodsTypeSales copyWith({ + String? name, + String? value, + String? sale, + String? percentage, + }) { + return GoodsTypeSales() + ..name = name ?? this.name + ..value = value ?? this.value + ..sale = sale ?? this.sale + ..percentage = percentage ?? this.percentage; + } +} \ No newline at end of file diff --git a/lib/generated/json/headlines.g.dart b/lib/generated/json/headlines.g.dart new file mode 100644 index 00000000..f7b9baba --- /dev/null +++ b/lib/generated/json/headlines.g.dart @@ -0,0 +1,103 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/headlines.dart'; + +Headlines $HeadlinesFromJson(Map json) { + final Headlines headlines = Headlines(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + headlines.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + headlines.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + headlines.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + headlines.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + headlines.updateUser = updateUser; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + headlines.name = name; + } + final String? introduce = jsonConvert.convert(json['introduce']); + if (introduce != null) { + headlines.introduce = introduce; + } + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + headlines.coverImg = coverImg; + } + final String? bannerImg = jsonConvert.convert(json['bannerImg']); + if (bannerImg != null) { + headlines.bannerImg = bannerImg; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + headlines.sort = sort; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + headlines.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + headlines.tenantCode = tenantCode; + } + return headlines; +} + +Map $HeadlinesToJson(Headlines entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['name'] = entity.name; + data['introduce'] = entity.introduce; + data['coverImg'] = entity.coverImg; + data['bannerImg'] = entity.bannerImg; + data['sort'] = entity.sort; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + return data; +} + +extension HeadlinesExtension on Headlines { + Headlines copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? name, + String? introduce, + String? coverImg, + String? bannerImg, + int? sort, + int? isDelete, + String? tenantCode, + }) { + return Headlines() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..name = name ?? this.name + ..introduce = introduce ?? this.introduce + ..coverImg = coverImg ?? this.coverImg + ..bannerImg = bannerImg ?? this.bannerImg + ..sort = sort ?? this.sort + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode; + } +} \ No newline at end of file diff --git a/lib/generated/json/headlines_details.g.dart b/lib/generated/json/headlines_details.g.dart new file mode 100644 index 00000000..86acc241 --- /dev/null +++ b/lib/generated/json/headlines_details.g.dart @@ -0,0 +1,103 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/headlines_details.dart'; + +HeadlinesDetails $HeadlinesDetailsFromJson(Map json) { + final HeadlinesDetails headlinesDetails = HeadlinesDetails(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + headlinesDetails.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + headlinesDetails.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + headlinesDetails.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + headlinesDetails.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + headlinesDetails.updateUser = updateUser; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + headlinesDetails.name = name; + } + final String? introduce = jsonConvert.convert(json['introduce']); + if (introduce != null) { + headlinesDetails.introduce = introduce; + } + final String? coverImg = jsonConvert.convert(json['coverImg']); + if (coverImg != null) { + headlinesDetails.coverImg = coverImg; + } + final String? bannerImg = jsonConvert.convert(json['bannerImg']); + if (bannerImg != null) { + headlinesDetails.bannerImg = bannerImg; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + headlinesDetails.sort = sort; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + headlinesDetails.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + headlinesDetails.tenantCode = tenantCode; + } + return headlinesDetails; +} + +Map $HeadlinesDetailsToJson(HeadlinesDetails entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['name'] = entity.name; + data['introduce'] = entity.introduce; + data['coverImg'] = entity.coverImg; + data['bannerImg'] = entity.bannerImg; + data['sort'] = entity.sort; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + return data; +} + +extension HeadlinesDetailsExtension on HeadlinesDetails { + HeadlinesDetails copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? name, + String? introduce, + String? coverImg, + String? bannerImg, + int? sort, + int? isDelete, + String? tenantCode, + }) { + return HeadlinesDetails() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..name = name ?? this.name + ..introduce = introduce ?? this.introduce + ..coverImg = coverImg ?? this.coverImg + ..bannerImg = bannerImg ?? this.bannerImg + ..sort = sort ?? this.sort + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode; + } +} \ No newline at end of file diff --git a/lib/generated/json/home_rank.g.dart b/lib/generated/json/home_rank.g.dart new file mode 100644 index 00000000..e31142a6 --- /dev/null +++ b/lib/generated/json/home_rank.g.dart @@ -0,0 +1,214 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/home_rank.dart'; +import 'package:huixiang/data/good_list.dart'; + +import 'package:huixiang/data/mini_detail.dart'; + + +HomeRank $HomeRankFromJson(Map json) { + final HomeRank homeRank = HomeRank(); + final List? commodityList = (json['CommodityList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as CommodityList) + .toList(); + if (commodityList != null) { + homeRank.commodityList = commodityList; + } + final List? commodityZone = (json['CommodityZone'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as CommodityZone) + .toList(); + if (commodityZone != null) { + homeRank.commodityZone = commodityZone; + } + final String? commodityListImg = jsonConvert.convert( + json['CommodityListImg']); + if (commodityListImg != null) { + homeRank.commodityListImg = commodityListImg; + } + return homeRank; +} + +Map $HomeRankToJson(HomeRank entity) { + final Map data = {}; + data['CommodityList'] = entity.commodityList?.map((v) => v.toJson()).toList(); + data['CommodityZone'] = entity.commodityZone?.map((v) => v.toJson()).toList(); + data['CommodityListImg'] = entity.commodityListImg; + return data; +} + +extension HomeRankExtension on HomeRank { + HomeRank copyWith({ + List? commodityList, + List? commodityZone, + String? commodityListImg, + }) { + return HomeRank() + ..commodityList = commodityList ?? this.commodityList + ..commodityZone = commodityZone ?? this.commodityZone + ..commodityListImg = commodityListImg ?? this.commodityListImg; + } +} + +CommodityList $CommodityListFromJson(Map json) { + final CommodityList commodityList = CommodityList(); + final List? goodList = (json['goodList'] as List?)?.map( + (e) => jsonConvert.convert(e) as GoodList).toList(); + if (goodList != null) { + commodityList.goodList = goodList; + } + final String? typeName = jsonConvert.convert(json['typeName']); + if (typeName != null) { + commodityList.typeName = typeName; + } + return commodityList; +} + +Map $CommodityListToJson(CommodityList entity) { + final Map data = {}; + data['goodList'] = entity.goodList?.map((v) => v.toJson()).toList(); + data['typeName'] = entity.typeName; + return data; +} + +extension CommodityListExtension on CommodityList { + CommodityList copyWith({ + List? goodList, + String? typeName, + }) { + return CommodityList() + ..goodList = goodList ?? this.goodList + ..typeName = typeName ?? this.typeName; + } +} + +CommodityZone $CommodityZoneFromJson(Map json) { + final CommodityZone commodityZone = CommodityZone(); + final String? productImg = jsonConvert.convert(json['productImg']); + if (productImg != null) { + commodityZone.productImg = productImg; + } + final List< + ProductSkuVOList>? productSkuVOList = (json['productSkuVOList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductSkuVOList) + .toList(); + if (productSkuVOList != null) { + commodityZone.productSkuVOList = productSkuVOList; + } + final String? thumbnailImg = jsonConvert.convert( + json['thumbnailImg']); + if (thumbnailImg != null) { + commodityZone.thumbnailImg = thumbnailImg; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + commodityZone.productName = productName; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + commodityZone.posShow = posShow; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + commodityZone.price = price; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + commodityZone.sellCount = sellCount; + } + final String? details = jsonConvert.convert(json['details']); + if (details != null) { + commodityZone.details = details; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + commodityZone.id = id; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + commodityZone.applyPrice = applyPrice; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + commodityZone.stock = stock; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + commodityZone.status = status; + } + final String? info = jsonConvert.convert(json['info']); + if (info != null) { + commodityZone.info = info; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + commodityZone.storeId = storeId; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + commodityZone.tenantCode = tenantCode; + } + return commodityZone; +} + +Map $CommodityZoneToJson(CommodityZone entity) { + final Map data = {}; + data['productImg'] = entity.productImg; + data['productSkuVOList'] = + entity.productSkuVOList?.map((v) => v.toJson()).toList(); + data['thumbnailImg'] = entity.thumbnailImg; + data['productName'] = entity.productName; + data['posShow'] = entity.posShow; + data['price'] = entity.price; + data['sellCount'] = entity.sellCount; + data['details'] = entity.details; + data['id'] = entity.id; + data['applyPrice'] = entity.applyPrice; + data['stock'] = entity.stock; + data['status'] = entity.status; + data['info'] = entity.info; + data['storeId'] = entity.storeId; + data['tenantCode'] = entity.tenantCode; + return data; +} + +extension CommodityZoneExtension on CommodityZone { + CommodityZone copyWith({ + String? productImg, + List? productSkuVOList, + String? thumbnailImg, + String? productName, + bool? posShow, + String? price, + int? sellCount, + String? details, + String? id, + String? applyPrice, + int? stock, + int? status, + String? info, + String? storeId, + String? tenantCode, + }) { + return CommodityZone() + ..productImg = productImg ?? this.productImg + ..productSkuVOList = productSkuVOList ?? this.productSkuVOList + ..thumbnailImg = thumbnailImg ?? this.thumbnailImg + ..productName = productName ?? this.productName + ..posShow = posShow ?? this.posShow + ..price = price ?? this.price + ..sellCount = sellCount ?? this.sellCount + ..details = details ?? this.details + ..id = id ?? this.id + ..applyPrice = applyPrice ?? this.applyPrice + ..stock = stock ?? this.stock + ..status = status ?? this.status + ..info = info ?? this.info + ..storeId = storeId ?? this.storeId + ..tenantCode = tenantCode ?? this.tenantCode; + } +} \ No newline at end of file diff --git a/lib/generated/json/home_recommend_list.g.dart b/lib/generated/json/home_recommend_list.g.dart new file mode 100644 index 00000000..70bede5c --- /dev/null +++ b/lib/generated/json/home_recommend_list.g.dart @@ -0,0 +1,259 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/home_recommend_list.dart'; +import 'package:huixiang/data/product_sku_list.dart'; + + +HomeRecommendList $HomeRecommendListFromJson(Map json) { + final HomeRecommendList homeRecommendList = HomeRecommendList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + homeRecommendList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + homeRecommendList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + homeRecommendList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + homeRecommendList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + homeRecommendList.updateUser = updateUser; + } + final String? supplierName = jsonConvert.convert( + json['supplierName']); + if (supplierName != null) { + homeRecommendList.supplierName = supplierName; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + homeRecommendList.storeId = storeId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + homeRecommendList.categoryId = categoryId; + } + final String? groupId = jsonConvert.convert(json['groupId']); + if (groupId != null) { + homeRecommendList.groupId = groupId; + } + final String? shortName = jsonConvert.convert(json['shortName']); + if (shortName != null) { + homeRecommendList.shortName = shortName; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + homeRecommendList.productName = productName; + } + final String? sellDesc = jsonConvert.convert(json['sellDesc']); + if (sellDesc != null) { + homeRecommendList.sellDesc = sellDesc; + } + final String? productCode = jsonConvert.convert(json['productCode']); + if (productCode != null) { + homeRecommendList.productCode = productCode; + } + final String? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + homeRecommendList.weight = weight; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + homeRecommendList.applyPrice = applyPrice; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + homeRecommendList.price = price; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + homeRecommendList.stock = stock; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + homeRecommendList.sellCount = sellCount; + } + final int? needLogistics = jsonConvert.convert(json['needLogistics']); + if (needLogistics != null) { + homeRecommendList.needLogistics = needLogistics; + } + final int? oversold = jsonConvert.convert(json['oversold']); + if (oversold != null) { + homeRecommendList.oversold = oversold; + } + final int? organic = jsonConvert.convert(json['organic']); + if (organic != null) { + homeRecommendList.organic = organic; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + homeRecommendList.status = status; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + homeRecommendList.posShow = posShow; + } + final int? productType = jsonConvert.convert(json['productType']); + if (productType != null) { + homeRecommendList.productType = productType; + } + final int? productNumber = jsonConvert.convert(json['productNumber']); + if (productNumber != null) { + homeRecommendList.productNumber = productNumber; + } + final int? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + homeRecommendList.setMeal = setMeal; + } + final int? attrStyle = jsonConvert.convert(json['attrStyle']); + if (attrStyle != null) { + homeRecommendList.attrStyle = attrStyle; + } + final String? detail = jsonConvert.convert(json['detail']); + if (detail != null) { + homeRecommendList.detail = detail; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + homeRecommendList.isDelete = isDelete; + } + final String? printerFlag = jsonConvert.convert(json['printerFlag']); + if (printerFlag != null) { + homeRecommendList.printerFlag = printerFlag; + } + final dynamic materialId = json['materialId']; + if (materialId != null) { + homeRecommendList.materialId = materialId; + } + final List? imgs = (json['imgs'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (imgs != null) { + homeRecommendList.imgs = imgs; + } + final List? productSkuList = (json['productSkuList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductSkuList) + .toList(); + if (productSkuList != null) { + homeRecommendList.productSkuList = productSkuList; + } + return homeRecommendList; +} + +Map $HomeRecommendListToJson(HomeRecommendList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['supplierName'] = entity.supplierName; + data['storeId'] = entity.storeId; + data['categoryId'] = entity.categoryId; + data['groupId'] = entity.groupId; + data['shortName'] = entity.shortName; + data['productName'] = entity.productName; + data['sellDesc'] = entity.sellDesc; + data['productCode'] = entity.productCode; + data['weight'] = entity.weight; + data['applyPrice'] = entity.applyPrice; + data['price'] = entity.price; + data['stock'] = entity.stock; + data['sellCount'] = entity.sellCount; + data['needLogistics'] = entity.needLogistics; + data['oversold'] = entity.oversold; + data['organic'] = entity.organic; + data['status'] = entity.status; + data['posShow'] = entity.posShow; + data['productType'] = entity.productType; + data['productNumber'] = entity.productNumber; + data['setMeal'] = entity.setMeal; + data['attrStyle'] = entity.attrStyle; + data['detail'] = entity.detail; + data['isDelete'] = entity.isDelete; + data['printerFlag'] = entity.printerFlag; + data['materialId'] = entity.materialId; + data['imgs'] = entity.imgs; + data['productSkuList'] = + entity.productSkuList?.map((v) => v.toJson()).toList(); + return data; +} + +extension HomeRecommendListExtension on HomeRecommendList { + HomeRecommendList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? supplierName, + String? storeId, + String? categoryId, + String? groupId, + String? shortName, + String? productName, + String? sellDesc, + String? productCode, + String? weight, + String? applyPrice, + String? price, + int? stock, + int? sellCount, + int? needLogistics, + int? oversold, + int? organic, + int? status, + bool? posShow, + int? productType, + int? productNumber, + int? setMeal, + int? attrStyle, + String? detail, + int? isDelete, + String? printerFlag, + dynamic materialId, + List? imgs, + List? productSkuList, + }) { + return HomeRecommendList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..supplierName = supplierName ?? this.supplierName + ..storeId = storeId ?? this.storeId + ..categoryId = categoryId ?? this.categoryId + ..groupId = groupId ?? this.groupId + ..shortName = shortName ?? this.shortName + ..productName = productName ?? this.productName + ..sellDesc = sellDesc ?? this.sellDesc + ..productCode = productCode ?? this.productCode + ..weight = weight ?? this.weight + ..applyPrice = applyPrice ?? this.applyPrice + ..price = price ?? this.price + ..stock = stock ?? this.stock + ..sellCount = sellCount ?? this.sellCount + ..needLogistics = needLogistics ?? this.needLogistics + ..oversold = oversold ?? this.oversold + ..organic = organic ?? this.organic + ..status = status ?? this.status + ..posShow = posShow ?? this.posShow + ..productType = productType ?? this.productType + ..productNumber = productNumber ?? this.productNumber + ..setMeal = setMeal ?? this.setMeal + ..attrStyle = attrStyle ?? this.attrStyle + ..detail = detail ?? this.detail + ..isDelete = isDelete ?? this.isDelete + ..printerFlag = printerFlag ?? this.printerFlag + ..materialId = materialId ?? this.materialId + ..imgs = imgs ?? this.imgs + ..productSkuList = productSkuList ?? this.productSkuList; + } +} \ No newline at end of file diff --git a/lib/generated/json/invitation.g.dart b/lib/generated/json/invitation.g.dart new file mode 100644 index 00000000..665aab1f --- /dev/null +++ b/lib/generated/json/invitation.g.dart @@ -0,0 +1,61 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/invitation.dart'; + +Invitation $InvitationFromJson(Map json) { + final Invitation invitation = Invitation(); + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + invitation.mid = mid; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + invitation.nickname = nickname; + } + final String? avatar = jsonConvert.convert(json['avatar']); + if (avatar != null) { + invitation.avatar = avatar; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + invitation.phone = phone; + } + final dynamic isFollow = json['isFollow']; + if (isFollow != null) { + invitation.isFollow = isFollow; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + invitation.createTime = createTime; + } + return invitation; +} + +Map $InvitationToJson(Invitation entity) { + final Map data = {}; + data['mid'] = entity.mid; + data['nickname'] = entity.nickname; + data['avatar'] = entity.avatar; + data['phone'] = entity.phone; + data['isFollow'] = entity.isFollow; + data['createTime'] = entity.createTime; + return data; +} + +extension InvitationExtension on Invitation { + Invitation copyWith({ + String? mid, + String? nickname, + String? avatar, + String? phone, + dynamic isFollow, + String? createTime, + }) { + return Invitation() + ..mid = mid ?? this.mid + ..nickname = nickname ?? this.nickname + ..avatar = avatar ?? this.avatar + ..phone = phone ?? this.phone + ..isFollow = isFollow ?? this.isFollow + ..createTime = createTime ?? this.createTime; + } +} \ No newline at end of file diff --git a/lib/generated/json/ip_data.g.dart b/lib/generated/json/ip_data.g.dart new file mode 100644 index 00000000..b4d84cfa --- /dev/null +++ b/lib/generated/json/ip_data.g.dart @@ -0,0 +1,89 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/ip_data.dart'; + +IpData $IpDataFromJson(Map json) { + final IpData ipData = IpData(); + final String? ip = jsonConvert.convert(json['ip']); + if (ip != null) { + ipData.ip = ip; + } + final String? pro = jsonConvert.convert(json['pro']); + if (pro != null) { + ipData.pro = pro; + } + final String? proCode = jsonConvert.convert(json['proCode']); + if (proCode != null) { + ipData.proCode = proCode; + } + final String? city = jsonConvert.convert(json['city']); + if (city != null) { + ipData.city = city; + } + final String? cityCode = jsonConvert.convert(json['cityCode']); + if (cityCode != null) { + ipData.cityCode = cityCode; + } + final String? region = jsonConvert.convert(json['region']); + if (region != null) { + ipData.region = region; + } + final String? regionCode = jsonConvert.convert(json['regionCode']); + if (regionCode != null) { + ipData.regionCode = regionCode; + } + final String? addr = jsonConvert.convert(json['addr']); + if (addr != null) { + ipData.addr = addr; + } + final String? regionNames = jsonConvert.convert(json['regionNames']); + if (regionNames != null) { + ipData.regionNames = regionNames; + } + final String? err = jsonConvert.convert(json['err']); + if (err != null) { + ipData.err = err; + } + return ipData; +} + +Map $IpDataToJson(IpData entity) { + final Map data = {}; + data['ip'] = entity.ip; + data['pro'] = entity.pro; + data['proCode'] = entity.proCode; + data['city'] = entity.city; + data['cityCode'] = entity.cityCode; + data['region'] = entity.region; + data['regionCode'] = entity.regionCode; + data['addr'] = entity.addr; + data['regionNames'] = entity.regionNames; + data['err'] = entity.err; + return data; +} + +extension IpDataExtension on IpData { + IpData copyWith({ + String? ip, + String? pro, + String? proCode, + String? city, + String? cityCode, + String? region, + String? regionCode, + String? addr, + String? regionNames, + String? err, + }) { + return IpData() + ..ip = ip ?? this.ip + ..pro = pro ?? this.pro + ..proCode = proCode ?? this.proCode + ..city = city ?? this.city + ..cityCode = cityCode ?? this.cityCode + ..region = region ?? this.region + ..regionCode = regionCode ?? this.regionCode + ..addr = addr ?? this.addr + ..regionNames = regionNames ?? this.regionNames + ..err = err ?? this.err; + } +} \ No newline at end of file diff --git a/lib/generated/json/launch_join_act.g.dart b/lib/generated/json/launch_join_act.g.dart new file mode 100644 index 00000000..ae3225b6 --- /dev/null +++ b/lib/generated/json/launch_join_act.g.dart @@ -0,0 +1,155 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/launch_join_act.dart'; + +LaunchJoinAct $LaunchJoinActFromJson(Map json) { + final LaunchJoinAct launchJoinAct = LaunchJoinAct(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + launchJoinAct.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + launchJoinAct.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + launchJoinAct.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + launchJoinAct.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + launchJoinAct.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + launchJoinAct.storeId = storeId; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + launchJoinAct.type = type; + } + final String? actTemplateId = jsonConvert.convert( + json['actTemplateId']); + if (actTemplateId != null) { + launchJoinAct.actTemplateId = actTemplateId; + } + final String? actTimeId = jsonConvert.convert(json['actTimeId']); + if (actTimeId != null) { + launchJoinAct.actTimeId = actTimeId; + } + final String? actRecordId = jsonConvert.convert(json['actRecordId']); + if (actRecordId != null) { + launchJoinAct.actRecordId = actRecordId; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + launchJoinAct.mid = mid; + } + final String? orderId = jsonConvert.convert(json['orderId']); + if (orderId != null) { + launchJoinAct.orderId = orderId; + } + final bool? isLeader = jsonConvert.convert(json['isLeader']); + if (isLeader != null) { + launchJoinAct.isLeader = isLeader; + } + final String? memberAvatar = jsonConvert.convert( + json['memberAvatar']); + if (memberAvatar != null) { + launchJoinAct.memberAvatar = memberAvatar; + } + final String? memberNickname = jsonConvert.convert( + json['memberNickname']); + if (memberNickname != null) { + launchJoinAct.memberNickname = memberNickname; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + launchJoinAct.productId = productId; + } + final String? actPrice = jsonConvert.convert(json['actPrice']); + if (actPrice != null) { + launchJoinAct.actPrice = actPrice; + } + final bool? state = jsonConvert.convert(json['state']); + if (state != null) { + launchJoinAct.state = state; + } + final dynamic isDelete = json['isDelete']; + if (isDelete != null) { + launchJoinAct.isDelete = isDelete; + } + return launchJoinAct; +} + +Map $LaunchJoinActToJson(LaunchJoinAct entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['type'] = entity.type; + data['actTemplateId'] = entity.actTemplateId; + data['actTimeId'] = entity.actTimeId; + data['actRecordId'] = entity.actRecordId; + data['mid'] = entity.mid; + data['orderId'] = entity.orderId; + data['isLeader'] = entity.isLeader; + data['memberAvatar'] = entity.memberAvatar; + data['memberNickname'] = entity.memberNickname; + data['productId'] = entity.productId; + data['actPrice'] = entity.actPrice; + data['state'] = entity.state; + data['isDelete'] = entity.isDelete; + return data; +} + +extension LaunchJoinActExtension on LaunchJoinAct { + LaunchJoinAct copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + int? type, + String? actTemplateId, + String? actTimeId, + String? actRecordId, + String? mid, + String? orderId, + bool? isLeader, + String? memberAvatar, + String? memberNickname, + String? productId, + String? actPrice, + bool? state, + dynamic isDelete, + }) { + return LaunchJoinAct() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..type = type ?? this.type + ..actTemplateId = actTemplateId ?? this.actTemplateId + ..actTimeId = actTimeId ?? this.actTimeId + ..actRecordId = actRecordId ?? this.actRecordId + ..mid = mid ?? this.mid + ..orderId = orderId ?? this.orderId + ..isLeader = isLeader ?? this.isLeader + ..memberAvatar = memberAvatar ?? this.memberAvatar + ..memberNickname = memberNickname ?? this.memberNickname + ..productId = productId ?? this.productId + ..actPrice = actPrice ?? this.actPrice + ..state = state ?? this.state + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/login_info.g.dart b/lib/generated/json/login_info.g.dart new file mode 100644 index 00000000..489149c3 --- /dev/null +++ b/lib/generated/json/login_info.g.dart @@ -0,0 +1,648 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/login_info.dart'; + +LoginInfo $LoginInfoFromJson(Map json) { + final LoginInfo loginInfo = LoginInfo(); + final AuthInfo? authInfo = jsonConvert.convert(json['authInfo']); + if (authInfo != null) { + loginInfo.authInfo = authInfo; + } + final List< + InterviewCouponList>? interviewCouponList = (json['interviewCouponList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as InterviewCouponList) + .toList(); + if (interviewCouponList != null) { + loginInfo.interviewCouponList = interviewCouponList; + } + final dynamic newUserCouponList = json['newUserCouponList']; + if (newUserCouponList != null) { + loginInfo.newUserCouponList = newUserCouponList; + } + final List< + FirstLoginCouponList>? firstLoginCouponList = (json['firstLoginCouponList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as FirstLoginCouponList) + .toList(); + if (firstLoginCouponList != null) { + loginInfo.firstLoginCouponList = firstLoginCouponList; + } + return loginInfo; +} + +Map $LoginInfoToJson(LoginInfo entity) { + final Map data = {}; + data['authInfo'] = entity.authInfo?.toJson(); + data['interviewCouponList'] = + entity.interviewCouponList?.map((v) => v.toJson()).toList(); + data['newUserCouponList'] = entity.newUserCouponList; + data['firstLoginCouponList'] = + entity.firstLoginCouponList?.map((v) => v.toJson()).toList(); + return data; +} + +extension LoginInfoExtension on LoginInfo { + LoginInfo copyWith({ + AuthInfo? authInfo, + List? interviewCouponList, + dynamic newUserCouponList, + List? firstLoginCouponList, + }) { + return LoginInfo() + ..authInfo = authInfo ?? this.authInfo + ..interviewCouponList = interviewCouponList ?? this.interviewCouponList + ..newUserCouponList = newUserCouponList ?? this.newUserCouponList + ..firstLoginCouponList = firstLoginCouponList ?? + this.firstLoginCouponList; + } +} + +AuthInfo $AuthInfoFromJson(Map json) { + final AuthInfo authInfo = AuthInfo(); + final String? token = jsonConvert.convert(json['token']); + if (token != null) { + authInfo.token = token; + } + final String? tokenType = jsonConvert.convert(json['tokenType']); + if (tokenType != null) { + authInfo.tokenType = tokenType; + } + final String? refreshToken = jsonConvert.convert( + json['refreshToken']); + if (refreshToken != null) { + authInfo.refreshToken = refreshToken; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + authInfo.name = name; + } + final String? account = jsonConvert.convert(json['account']); + if (account != null) { + authInfo.account = account; + } + final dynamic avatar = json['avatar']; + if (avatar != null) { + authInfo.avatar = avatar; + } + final dynamic workDescribe = json['workDescribe']; + if (workDescribe != null) { + authInfo.workDescribe = workDescribe; + } + final String? userId = jsonConvert.convert(json['userId']); + if (userId != null) { + authInfo.userId = userId; + } + final String? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + authInfo.userType = userType; + } + final String? expire = jsonConvert.convert(json['expire']); + if (expire != null) { + authInfo.expire = expire; + } + final String? expiration = jsonConvert.convert(json['expiration']); + if (expiration != null) { + authInfo.expiration = expiration; + } + final String? mobile = jsonConvert.convert(json['mobile']); + if (mobile != null) { + authInfo.mobile = mobile; + } + return authInfo; +} + +Map $AuthInfoToJson(AuthInfo entity) { + final Map data = {}; + data['token'] = entity.token; + data['tokenType'] = entity.tokenType; + data['refreshToken'] = entity.refreshToken; + data['name'] = entity.name; + data['account'] = entity.account; + data['avatar'] = entity.avatar; + data['workDescribe'] = entity.workDescribe; + data['userId'] = entity.userId; + data['userType'] = entity.userType; + data['expire'] = entity.expire; + data['expiration'] = entity.expiration; + data['mobile'] = entity.mobile; + return data; +} + +extension AuthInfoExtension on AuthInfo { + AuthInfo copyWith({ + String? token, + String? tokenType, + String? refreshToken, + String? name, + String? account, + dynamic avatar, + dynamic workDescribe, + String? userId, + String? userType, + String? expire, + String? expiration, + String? mobile, + }) { + return AuthInfo() + ..token = token ?? this.token + ..tokenType = tokenType ?? this.tokenType + ..refreshToken = refreshToken ?? this.refreshToken + ..name = name ?? this.name + ..account = account ?? this.account + ..avatar = avatar ?? this.avatar + ..workDescribe = workDescribe ?? this.workDescribe + ..userId = userId ?? this.userId + ..userType = userType ?? this.userType + ..expire = expire ?? this.expire + ..expiration = expiration ?? this.expiration + ..mobile = mobile ?? this.mobile; + } +} + +InterviewCouponList $InterviewCouponListFromJson(Map json) { + final InterviewCouponList interviewCouponList = InterviewCouponList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + interviewCouponList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + interviewCouponList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + interviewCouponList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + interviewCouponList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + interviewCouponList.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + interviewCouponList.storeId = storeId; + } + final String? couponName = jsonConvert.convert(json['couponName']); + if (couponName != null) { + interviewCouponList.couponName = couponName; + } + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + interviewCouponList.bizType = bizType; + } + final bool? allProduct = jsonConvert.convert(json['allProduct']); + if (allProduct != null) { + interviewCouponList.allProduct = allProduct; + } + final List? productSkuId = (json['productSkuId'] as List?) + ?.map( + (e) => e) + .toList(); + if (productSkuId != null) { + interviewCouponList.productSkuId = productSkuId; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + interviewCouponList.fullAmount = fullAmount; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + interviewCouponList.discountAmount = discountAmount; + } + final int? fullNumber = jsonConvert.convert(json['fullNumber']); + if (fullNumber != null) { + interviewCouponList.fullNumber = fullNumber; + } + final int? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + interviewCouponList.discountPercent = discountPercent; + } + final String? sellPrice = jsonConvert.convert(json['sellPrice']); + if (sellPrice != null) { + interviewCouponList.sellPrice = sellPrice; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + interviewCouponList.sellCount = sellCount; + } + final String? bizId = jsonConvert.convert(json['bizId']); + if (bizId != null) { + interviewCouponList.bizId = bizId; + } + final String? publishStartTime = jsonConvert.convert( + json['publishStartTime']); + if (publishStartTime != null) { + interviewCouponList.publishStartTime = publishStartTime; + } + final String? publishEndTime = jsonConvert.convert( + json['publishEndTime']); + if (publishEndTime != null) { + interviewCouponList.publishEndTime = publishEndTime; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + interviewCouponList.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + interviewCouponList.useEndTime = useEndTime; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + interviewCouponList.promotionId = promotionId; + } + final bool? dateOrDay = jsonConvert.convert(json['dateOrDay']); + if (dateOrDay != null) { + interviewCouponList.dateOrDay = dateOrDay; + } + final int? startAfterDays = jsonConvert.convert(json['startAfterDays']); + if (startAfterDays != null) { + interviewCouponList.startAfterDays = startAfterDays; + } + final int? daysValidate = jsonConvert.convert(json['daysValidate']); + if (daysValidate != null) { + interviewCouponList.daysValidate = daysValidate; + } + final int? businessType = jsonConvert.convert(json['businessType']); + if (businessType != null) { + interviewCouponList.businessType = businessType; + } + final bool? centreDisplay = jsonConvert.convert(json['centreDisplay']); + if (centreDisplay != null) { + interviewCouponList.centreDisplay = centreDisplay; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + interviewCouponList.tenantCode = tenantCode; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + interviewCouponList.isDelete = isDelete; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + interviewCouponList.storeName = storeName; + } + final int? number = jsonConvert.convert(json['number']); + if (number != null) { + interviewCouponList.number = number; + } + return interviewCouponList; +} + +Map $InterviewCouponListToJson(InterviewCouponList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['couponName'] = entity.couponName; + data['bizType'] = entity.bizType; + data['allProduct'] = entity.allProduct; + data['productSkuId'] = entity.productSkuId; + data['fullAmount'] = entity.fullAmount; + data['discountAmount'] = entity.discountAmount; + data['fullNumber'] = entity.fullNumber; + data['discountPercent'] = entity.discountPercent; + data['sellPrice'] = entity.sellPrice; + data['sellCount'] = entity.sellCount; + data['bizId'] = entity.bizId; + data['publishStartTime'] = entity.publishStartTime; + data['publishEndTime'] = entity.publishEndTime; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['promotionId'] = entity.promotionId; + data['dateOrDay'] = entity.dateOrDay; + data['startAfterDays'] = entity.startAfterDays; + data['daysValidate'] = entity.daysValidate; + data['businessType'] = entity.businessType; + data['centreDisplay'] = entity.centreDisplay; + data['tenantCode'] = entity.tenantCode; + data['isDelete'] = entity.isDelete; + data['storeName'] = entity.storeName; + data['number'] = entity.number; + return data; +} + +extension InterviewCouponListExtension on InterviewCouponList { + InterviewCouponList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? couponName, + int? bizType, + bool? allProduct, + List? productSkuId, + String? fullAmount, + String? discountAmount, + int? fullNumber, + int? discountPercent, + String? sellPrice, + int? sellCount, + String? bizId, + String? publishStartTime, + String? publishEndTime, + String? useStartTime, + String? useEndTime, + String? promotionId, + bool? dateOrDay, + int? startAfterDays, + int? daysValidate, + int? businessType, + bool? centreDisplay, + String? tenantCode, + int? isDelete, + String? storeName, + int? number, + }) { + return InterviewCouponList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..couponName = couponName ?? this.couponName + ..bizType = bizType ?? this.bizType + ..allProduct = allProduct ?? this.allProduct + ..productSkuId = productSkuId ?? this.productSkuId + ..fullAmount = fullAmount ?? this.fullAmount + ..discountAmount = discountAmount ?? this.discountAmount + ..fullNumber = fullNumber ?? this.fullNumber + ..discountPercent = discountPercent ?? this.discountPercent + ..sellPrice = sellPrice ?? this.sellPrice + ..sellCount = sellCount ?? this.sellCount + ..bizId = bizId ?? this.bizId + ..publishStartTime = publishStartTime ?? this.publishStartTime + ..publishEndTime = publishEndTime ?? this.publishEndTime + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..promotionId = promotionId ?? this.promotionId + ..dateOrDay = dateOrDay ?? this.dateOrDay + ..startAfterDays = startAfterDays ?? this.startAfterDays + ..daysValidate = daysValidate ?? this.daysValidate + ..businessType = businessType ?? this.businessType + ..centreDisplay = centreDisplay ?? this.centreDisplay + ..tenantCode = tenantCode ?? this.tenantCode + ..isDelete = isDelete ?? this.isDelete + ..storeName = storeName ?? this.storeName + ..number = number ?? this.number; + } +} + +FirstLoginCouponList $FirstLoginCouponListFromJson(Map json) { + final FirstLoginCouponList firstLoginCouponList = FirstLoginCouponList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + firstLoginCouponList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + firstLoginCouponList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + firstLoginCouponList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + firstLoginCouponList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + firstLoginCouponList.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + firstLoginCouponList.storeId = storeId; + } + final String? couponName = jsonConvert.convert(json['couponName']); + if (couponName != null) { + firstLoginCouponList.couponName = couponName; + } + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + firstLoginCouponList.bizType = bizType; + } + final bool? allProduct = jsonConvert.convert(json['allProduct']); + if (allProduct != null) { + firstLoginCouponList.allProduct = allProduct; + } + final List? productSkuId = (json['productSkuId'] as List?) + ?.map( + (e) => e) + .toList(); + if (productSkuId != null) { + firstLoginCouponList.productSkuId = productSkuId; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + firstLoginCouponList.fullAmount = fullAmount; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + firstLoginCouponList.discountAmount = discountAmount; + } + final int? fullNumber = jsonConvert.convert(json['fullNumber']); + if (fullNumber != null) { + firstLoginCouponList.fullNumber = fullNumber; + } + final int? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + firstLoginCouponList.discountPercent = discountPercent; + } + final String? sellPrice = jsonConvert.convert(json['sellPrice']); + if (sellPrice != null) { + firstLoginCouponList.sellPrice = sellPrice; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + firstLoginCouponList.sellCount = sellCount; + } + final String? bizId = jsonConvert.convert(json['bizId']); + if (bizId != null) { + firstLoginCouponList.bizId = bizId; + } + final String? publishStartTime = jsonConvert.convert( + json['publishStartTime']); + if (publishStartTime != null) { + firstLoginCouponList.publishStartTime = publishStartTime; + } + final String? publishEndTime = jsonConvert.convert( + json['publishEndTime']); + if (publishEndTime != null) { + firstLoginCouponList.publishEndTime = publishEndTime; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + firstLoginCouponList.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + firstLoginCouponList.useEndTime = useEndTime; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + firstLoginCouponList.promotionId = promotionId; + } + final bool? dateOrDay = jsonConvert.convert(json['dateOrDay']); + if (dateOrDay != null) { + firstLoginCouponList.dateOrDay = dateOrDay; + } + final int? startAfterDays = jsonConvert.convert(json['startAfterDays']); + if (startAfterDays != null) { + firstLoginCouponList.startAfterDays = startAfterDays; + } + final int? daysValidate = jsonConvert.convert(json['daysValidate']); + if (daysValidate != null) { + firstLoginCouponList.daysValidate = daysValidate; + } + final int? businessType = jsonConvert.convert(json['businessType']); + if (businessType != null) { + firstLoginCouponList.businessType = businessType; + } + final bool? centreDisplay = jsonConvert.convert(json['centreDisplay']); + if (centreDisplay != null) { + firstLoginCouponList.centreDisplay = centreDisplay; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + firstLoginCouponList.tenantCode = tenantCode; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + firstLoginCouponList.isDelete = isDelete; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + firstLoginCouponList.storeName = storeName; + } + final int? number = jsonConvert.convert(json['number']); + if (number != null) { + firstLoginCouponList.number = number; + } + return firstLoginCouponList; +} + +Map $FirstLoginCouponListToJson(FirstLoginCouponList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['couponName'] = entity.couponName; + data['bizType'] = entity.bizType; + data['allProduct'] = entity.allProduct; + data['productSkuId'] = entity.productSkuId; + data['fullAmount'] = entity.fullAmount; + data['discountAmount'] = entity.discountAmount; + data['fullNumber'] = entity.fullNumber; + data['discountPercent'] = entity.discountPercent; + data['sellPrice'] = entity.sellPrice; + data['sellCount'] = entity.sellCount; + data['bizId'] = entity.bizId; + data['publishStartTime'] = entity.publishStartTime; + data['publishEndTime'] = entity.publishEndTime; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['promotionId'] = entity.promotionId; + data['dateOrDay'] = entity.dateOrDay; + data['startAfterDays'] = entity.startAfterDays; + data['daysValidate'] = entity.daysValidate; + data['businessType'] = entity.businessType; + data['centreDisplay'] = entity.centreDisplay; + data['tenantCode'] = entity.tenantCode; + data['isDelete'] = entity.isDelete; + data['storeName'] = entity.storeName; + data['number'] = entity.number; + return data; +} + +extension FirstLoginCouponListExtension on FirstLoginCouponList { + FirstLoginCouponList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? couponName, + int? bizType, + bool? allProduct, + List? productSkuId, + String? fullAmount, + String? discountAmount, + int? fullNumber, + int? discountPercent, + String? sellPrice, + int? sellCount, + String? bizId, + String? publishStartTime, + String? publishEndTime, + String? useStartTime, + String? useEndTime, + String? promotionId, + bool? dateOrDay, + int? startAfterDays, + int? daysValidate, + int? businessType, + bool? centreDisplay, + String? tenantCode, + int? isDelete, + String? storeName, + int? number, + }) { + return FirstLoginCouponList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..couponName = couponName ?? this.couponName + ..bizType = bizType ?? this.bizType + ..allProduct = allProduct ?? this.allProduct + ..productSkuId = productSkuId ?? this.productSkuId + ..fullAmount = fullAmount ?? this.fullAmount + ..discountAmount = discountAmount ?? this.discountAmount + ..fullNumber = fullNumber ?? this.fullNumber + ..discountPercent = discountPercent ?? this.discountPercent + ..sellPrice = sellPrice ?? this.sellPrice + ..sellCount = sellCount ?? this.sellCount + ..bizId = bizId ?? this.bizId + ..publishStartTime = publishStartTime ?? this.publishStartTime + ..publishEndTime = publishEndTime ?? this.publishEndTime + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..promotionId = promotionId ?? this.promotionId + ..dateOrDay = dateOrDay ?? this.dateOrDay + ..startAfterDays = startAfterDays ?? this.startAfterDays + ..daysValidate = daysValidate ?? this.daysValidate + ..businessType = businessType ?? this.businessType + ..centreDisplay = centreDisplay ?? this.centreDisplay + ..tenantCode = tenantCode ?? this.tenantCode + ..isDelete = isDelete ?? this.isDelete + ..storeName = storeName ?? this.storeName + ..number = number ?? this.number; + } +} \ No newline at end of file diff --git a/lib/generated/json/logistics.g.dart b/lib/generated/json/logistics.g.dart new file mode 100644 index 00000000..5378e6eb --- /dev/null +++ b/lib/generated/json/logistics.g.dart @@ -0,0 +1,88 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/logistics.dart'; + +Logistics $LogisticsFromJson(Map json) { + final Logistics logistics = Logistics(); + final String? logisticCode = jsonConvert.convert( + json['logisticCode']); + if (logisticCode != null) { + logistics.logisticCode = logisticCode; + } + final String? shipperCode = jsonConvert.convert(json['shipperCode']); + if (shipperCode != null) { + logistics.shipperCode = shipperCode; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + logistics.state = state; + } + final bool? success = jsonConvert.convert(json['success']); + if (success != null) { + logistics.success = success; + } + final List? traces = (json['traces'] as List?)?.map( + (e) => jsonConvert.convert(e) as Traces).toList(); + if (traces != null) { + logistics.traces = traces; + } + return logistics; +} + +Map $LogisticsToJson(Logistics entity) { + final Map data = {}; + data['logisticCode'] = entity.logisticCode; + data['shipperCode'] = entity.shipperCode; + data['state'] = entity.state; + data['success'] = entity.success; + data['traces'] = entity.traces?.map((v) => v.toJson()).toList(); + return data; +} + +extension LogisticsExtension on Logistics { + Logistics copyWith({ + String? logisticCode, + String? shipperCode, + int? state, + bool? success, + List? traces, + }) { + return Logistics() + ..logisticCode = logisticCode ?? this.logisticCode + ..shipperCode = shipperCode ?? this.shipperCode + ..state = state ?? this.state + ..success = success ?? this.success + ..traces = traces ?? this.traces; + } +} + +Traces $TracesFromJson(Map json) { + final Traces traces = Traces(); + final String? acceptStation = jsonConvert.convert( + json['acceptStation']); + if (acceptStation != null) { + traces.acceptStation = acceptStation; + } + final String? acceptTime = jsonConvert.convert(json['acceptTime']); + if (acceptTime != null) { + traces.acceptTime = acceptTime; + } + return traces; +} + +Map $TracesToJson(Traces entity) { + final Map data = {}; + data['acceptStation'] = entity.acceptStation; + data['acceptTime'] = entity.acceptTime; + return data; +} + +extension TracesExtension on Traces { + Traces copyWith({ + String? acceptStation, + String? acceptTime, + }) { + return Traces() + ..acceptStation = acceptStation ?? this.acceptStation + ..acceptTime = acceptTime ?? this.acceptTime; + } +} \ No newline at end of file diff --git a/lib/generated/json/member_comment.g.dart b/lib/generated/json/member_comment.g.dart new file mode 100644 index 00000000..ab266cd5 --- /dev/null +++ b/lib/generated/json/member_comment.g.dart @@ -0,0 +1,164 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/member_comment.dart'; + +MemberComment $MemberCommentFromJson(Map json) { + final MemberComment memberComment = MemberComment(); + final String? content = jsonConvert.convert(json['content']); + if (content != null) { + memberComment.content = content; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + memberComment.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + memberComment.createUser = createUser; + } + final bool? hidden = jsonConvert.convert(json['hidden']); + if (hidden != null) { + memberComment.hidden = hidden; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + memberComment.id = id; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + memberComment.isDelete = isDelete; + } + final int? likes = jsonConvert.convert(json['likes']); + if (likes != null) { + memberComment.likes = likes; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + memberComment.mid = mid; + } + final String? parentContent = jsonConvert.convert( + json['parentContent']); + if (parentContent != null) { + memberComment.parentContent = parentContent; + } + final String? parentId = jsonConvert.convert(json['parentId']); + if (parentId != null) { + memberComment.parentId = parentId; + } + final String? parentMid = jsonConvert.convert(json['parentMid']); + if (parentMid != null) { + memberComment.parentMid = parentMid; + } + final String? parentUserAvatarUrl = jsonConvert.convert( + json['parentUserAvatarUrl']); + if (parentUserAvatarUrl != null) { + memberComment.parentUserAvatarUrl = parentUserAvatarUrl; + } + final String? parentUserName = jsonConvert.convert( + json['parentUserName']); + if (parentUserName != null) { + memberComment.parentUserName = parentUserName; + } + final String? relationalId = jsonConvert.convert( + json['relationalId']); + if (relationalId != null) { + memberComment.relationalId = relationalId; + } + final int? relationalType = jsonConvert.convert(json['relationalType']); + if (relationalType != null) { + memberComment.relationalType = relationalType; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + memberComment.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + memberComment.updateUser = updateUser; + } + final String? userAvatarUrl = jsonConvert.convert( + json['userAvatarUrl']); + if (userAvatarUrl != null) { + memberComment.userAvatarUrl = userAvatarUrl; + } + final String? username = jsonConvert.convert(json['username']); + if (username != null) { + memberComment.username = username; + } + final bool? liked = jsonConvert.convert(json['liked']); + if (liked != null) { + memberComment.liked = liked; + } + return memberComment; +} + +Map $MemberCommentToJson(MemberComment entity) { + final Map data = {}; + data['content'] = entity.content; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['hidden'] = entity.hidden; + data['id'] = entity.id; + data['isDelete'] = entity.isDelete; + data['likes'] = entity.likes; + data['mid'] = entity.mid; + data['parentContent'] = entity.parentContent; + data['parentId'] = entity.parentId; + data['parentMid'] = entity.parentMid; + data['parentUserAvatarUrl'] = entity.parentUserAvatarUrl; + data['parentUserName'] = entity.parentUserName; + data['relationalId'] = entity.relationalId; + data['relationalType'] = entity.relationalType; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['userAvatarUrl'] = entity.userAvatarUrl; + data['username'] = entity.username; + data['liked'] = entity.liked; + return data; +} + +extension MemberCommentExtension on MemberComment { + MemberComment copyWith({ + String? content, + String? createTime, + String? createUser, + bool? hidden, + String? id, + int? isDelete, + int? likes, + String? mid, + String? parentContent, + String? parentId, + String? parentMid, + String? parentUserAvatarUrl, + String? parentUserName, + String? relationalId, + int? relationalType, + String? updateTime, + String? updateUser, + String? userAvatarUrl, + String? username, + bool? liked, + }) { + return MemberComment() + ..content = content ?? this.content + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..hidden = hidden ?? this.hidden + ..id = id ?? this.id + ..isDelete = isDelete ?? this.isDelete + ..likes = likes ?? this.likes + ..mid = mid ?? this.mid + ..parentContent = parentContent ?? this.parentContent + ..parentId = parentId ?? this.parentId + ..parentMid = parentMid ?? this.parentMid + ..parentUserAvatarUrl = parentUserAvatarUrl ?? this.parentUserAvatarUrl + ..parentUserName = parentUserName ?? this.parentUserName + ..relationalId = relationalId ?? this.relationalId + ..relationalType = relationalType ?? this.relationalType + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..userAvatarUrl = userAvatarUrl ?? this.userAvatarUrl + ..username = username ?? this.username + ..liked = liked ?? this.liked; + } +} \ No newline at end of file diff --git a/lib/generated/json/member_info.g.dart b/lib/generated/json/member_info.g.dart new file mode 100644 index 00000000..5aa1abbd --- /dev/null +++ b/lib/generated/json/member_info.g.dart @@ -0,0 +1,138 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/member_info.dart'; + +MemberInfo $MemberInfoFromJson(Map json) { + final MemberInfo memberInfo = MemberInfo(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + memberInfo.id = id; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + memberInfo.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + memberInfo.headimg = headimg; + } + final bool? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + memberInfo.userType = userType; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + memberInfo.sex = sex; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + memberInfo.level = level; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + memberInfo.remark = remark; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + memberInfo.createTime = createTime; + } + final String? birth = jsonConvert.convert(json['birth']); + if (birth != null) { + memberInfo.birth = birth; + } + final int? organic = jsonConvert.convert(json['organic']); + if (organic != null) { + memberInfo.organic = organic; + } + final int? age = jsonConvert.convert(json['age']); + if (age != null) { + memberInfo.age = age; + } + final String? signature = jsonConvert.convert(json['signature']); + if (signature != null) { + memberInfo.signature = signature; + } + final String? background = jsonConvert.convert(json['background']); + if (background != null) { + memberInfo.background = background; + } + final int? follow = jsonConvert.convert(json['follow']); + if (follow != null) { + memberInfo.follow = follow; + } + final int? fans = jsonConvert.convert(json['fans']); + if (fans != null) { + memberInfo.fans = fans; + } + final int? trendTotal = jsonConvert.convert(json['trendTotal']); + if (trendTotal != null) { + memberInfo.trendTotal = trendTotal; + } + final int? gainLikeTotal = jsonConvert.convert(json['gainLikeTotal']); + if (gainLikeTotal != null) { + memberInfo.gainLikeTotal = gainLikeTotal; + } + return memberInfo; +} + +Map $MemberInfoToJson(MemberInfo entity) { + final Map data = {}; + data['id'] = entity.id; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['userType'] = entity.userType; + data['sex'] = entity.sex; + data['level'] = entity.level; + data['remark'] = entity.remark; + data['createTime'] = entity.createTime; + data['birth'] = entity.birth; + data['organic'] = entity.organic; + data['age'] = entity.age; + data['signature'] = entity.signature; + data['background'] = entity.background; + data['follow'] = entity.follow; + data['fans'] = entity.fans; + data['trendTotal'] = entity.trendTotal; + data['gainLikeTotal'] = entity.gainLikeTotal; + return data; +} + +extension MemberInfoExtension on MemberInfo { + MemberInfo copyWith({ + String? id, + String? nickname, + String? headimg, + bool? userType, + String? sex, + int? level, + String? remark, + String? createTime, + String? birth, + int? organic, + int? age, + String? signature, + String? background, + int? follow, + int? fans, + int? trendTotal, + int? gainLikeTotal, + }) { + return MemberInfo() + ..id = id ?? this.id + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..userType = userType ?? this.userType + ..sex = sex ?? this.sex + ..level = level ?? this.level + ..remark = remark ?? this.remark + ..createTime = createTime ?? this.createTime + ..birth = birth ?? this.birth + ..organic = organic ?? this.organic + ..age = age ?? this.age + ..signature = signature ?? this.signature + ..background = background ?? this.background + ..follow = follow ?? this.follow + ..fans = fans ?? this.fans + ..trendTotal = trendTotal ?? this.trendTotal + ..gainLikeTotal = gainLikeTotal ?? this.gainLikeTotal; + } +} \ No newline at end of file diff --git a/lib/generated/json/member_infor.g.dart b/lib/generated/json/member_infor.g.dart new file mode 100644 index 00000000..7d0ddfa7 --- /dev/null +++ b/lib/generated/json/member_infor.g.dart @@ -0,0 +1,138 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/member_infor.dart'; + +MemberInfor $MemberInforFromJson(Map json) { + final MemberInfor memberInfor = MemberInfor(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + memberInfor.id = id; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + memberInfor.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + memberInfor.headimg = headimg; + } + final bool? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + memberInfor.userType = userType; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + memberInfor.sex = sex; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + memberInfor.level = level; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + memberInfor.remark = remark; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + memberInfor.createTime = createTime; + } + final String? birth = jsonConvert.convert(json['birth']); + if (birth != null) { + memberInfor.birth = birth; + } + final int? organic = jsonConvert.convert(json['organic']); + if (organic != null) { + memberInfor.organic = organic; + } + final int? age = jsonConvert.convert(json['age']); + if (age != null) { + memberInfor.age = age; + } + final String? signature = jsonConvert.convert(json['signature']); + if (signature != null) { + memberInfor.signature = signature; + } + final String? background = jsonConvert.convert(json['background']); + if (background != null) { + memberInfor.background = background; + } + final int? follow = jsonConvert.convert(json['follow']); + if (follow != null) { + memberInfor.follow = follow; + } + final int? fans = jsonConvert.convert(json['fans']); + if (fans != null) { + memberInfor.fans = fans; + } + final int? trendTotal = jsonConvert.convert(json['trendTotal']); + if (trendTotal != null) { + memberInfor.trendTotal = trendTotal; + } + final int? gainLikeTotal = jsonConvert.convert(json['gainLikeTotal']); + if (gainLikeTotal != null) { + memberInfor.gainLikeTotal = gainLikeTotal; + } + return memberInfor; +} + +Map $MemberInforToJson(MemberInfor entity) { + final Map data = {}; + data['id'] = entity.id; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['userType'] = entity.userType; + data['sex'] = entity.sex; + data['level'] = entity.level; + data['remark'] = entity.remark; + data['createTime'] = entity.createTime; + data['birth'] = entity.birth; + data['organic'] = entity.organic; + data['age'] = entity.age; + data['signature'] = entity.signature; + data['background'] = entity.background; + data['follow'] = entity.follow; + data['fans'] = entity.fans; + data['trendTotal'] = entity.trendTotal; + data['gainLikeTotal'] = entity.gainLikeTotal; + return data; +} + +extension MemberInforExtension on MemberInfor { + MemberInfor copyWith({ + String? id, + String? nickname, + String? headimg, + bool? userType, + String? sex, + int? level, + String? remark, + String? createTime, + String? birth, + int? organic, + int? age, + String? signature, + String? background, + int? follow, + int? fans, + int? trendTotal, + int? gainLikeTotal, + }) { + return MemberInfor() + ..id = id ?? this.id + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..userType = userType ?? this.userType + ..sex = sex ?? this.sex + ..level = level ?? this.level + ..remark = remark ?? this.remark + ..createTime = createTime ?? this.createTime + ..birth = birth ?? this.birth + ..organic = organic ?? this.organic + ..age = age ?? this.age + ..signature = signature ?? this.signature + ..background = background ?? this.background + ..follow = follow ?? this.follow + ..fans = fans ?? this.fans + ..trendTotal = trendTotal ?? this.trendTotal + ..gainLikeTotal = gainLikeTotal ?? this.gainLikeTotal; + } +} \ No newline at end of file diff --git a/lib/generated/json/member_rank.g.dart b/lib/generated/json/member_rank.g.dart new file mode 100644 index 00000000..c8ba3500 --- /dev/null +++ b/lib/generated/json/member_rank.g.dart @@ -0,0 +1,82 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/member_rank.dart'; + +MemberRank $MemberRankFromJson(Map json) { + final MemberRank memberRank = MemberRank(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + memberRank.id = id; + } + final String? nextId = jsonConvert.convert(json['nextId']); + if (nextId != null) { + memberRank.nextId = nextId; + } + final String? nextName = jsonConvert.convert(json['nextName']); + if (nextName != null) { + memberRank.nextName = nextName; + } + final int? nextOrigin = jsonConvert.convert(json['nextOrigin']); + if (nextOrigin != null) { + memberRank.nextOrigin = nextOrigin; + } + final String? rankContent = jsonConvert.convert(json['rankContent']); + if (rankContent != null) { + memberRank.rankContent = rankContent; + } + final String? rankImg = jsonConvert.convert(json['rankImg']); + if (rankImg != null) { + memberRank.rankImg = rankImg; + } + final String? rankName = jsonConvert.convert(json['rankName']); + if (rankName != null) { + memberRank.rankName = rankName; + } + final int? rankOrigin = jsonConvert.convert(json['rankOrigin']); + if (rankOrigin != null) { + memberRank.rankOrigin = rankOrigin; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + memberRank.status = status; + } + return memberRank; +} + +Map $MemberRankToJson(MemberRank entity) { + final Map data = {}; + data['id'] = entity.id; + data['nextId'] = entity.nextId; + data['nextName'] = entity.nextName; + data['nextOrigin'] = entity.nextOrigin; + data['rankContent'] = entity.rankContent; + data['rankImg'] = entity.rankImg; + data['rankName'] = entity.rankName; + data['rankOrigin'] = entity.rankOrigin; + data['status'] = entity.status; + return data; +} + +extension MemberRankExtension on MemberRank { + MemberRank copyWith({ + String? id, + String? nextId, + String? nextName, + int? nextOrigin, + String? rankContent, + String? rankImg, + String? rankName, + int? rankOrigin, + bool? status, + }) { + return MemberRank() + ..id = id ?? this.id + ..nextId = nextId ?? this.nextId + ..nextName = nextName ?? this.nextName + ..nextOrigin = nextOrigin ?? this.nextOrigin + ..rankContent = rankContent ?? this.rankContent + ..rankImg = rankImg ?? this.rankImg + ..rankName = rankName ?? this.rankName + ..rankOrigin = rankOrigin ?? this.rankOrigin + ..status = status ?? this.status; + } +} \ No newline at end of file diff --git a/lib/generated/json/member_recharge.g.dart b/lib/generated/json/member_recharge.g.dart new file mode 100644 index 00000000..3a7ed407 --- /dev/null +++ b/lib/generated/json/member_recharge.g.dart @@ -0,0 +1,132 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/member_recharge.dart'; + +MemberRecharge $MemberRechargeFromJson(Map json) { + final MemberRecharge memberRecharge = MemberRecharge(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + memberRecharge.id = id; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + memberRecharge.rechargeMoney = rechargeMoney; + } + final String? giftdMoney = jsonConvert.convert(json['giftdMoney']); + if (giftdMoney != null) { + memberRecharge.giftdMoney = giftdMoney; + } + final int? limitNum = jsonConvert.convert(json['limitNum']); + if (limitNum != null) { + memberRecharge.limitNum = limitNum; + } + final dynamic gitfdCouponId = json['gitfdCouponId']; + if (gitfdCouponId != null) { + memberRecharge.gitfdCouponId = gitfdCouponId; + } + final dynamic startDate = json['startDate']; + if (startDate != null) { + memberRecharge.startDate = startDate; + } + final dynamic endDate = json['endDate']; + if (endDate != null) { + memberRecharge.endDate = endDate; + } + final dynamic startTime = json['startTime']; + if (startTime != null) { + memberRecharge.startTime = startTime; + } + final dynamic endTime = json['endTime']; + if (endTime != null) { + memberRecharge.endTime = endTime; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + memberRecharge.tenantCode = tenantCode; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + memberRecharge.createTime = createTime; + } + final int? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + memberRecharge.isDeleted = isDeleted; + } + final int? rechargeType = jsonConvert.convert(json['rechargeType']); + if (rechargeType != null) { + memberRecharge.rechargeType = rechargeType; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + memberRecharge.remark = remark; + } + final int? sortValue = jsonConvert.convert(json['sortValue']); + if (sortValue != null) { + memberRecharge.sortValue = sortValue; + } + final int? useNum = jsonConvert.convert(json['useNum']); + if (useNum != null) { + memberRecharge.useNum = useNum; + } + return memberRecharge; +} + +Map $MemberRechargeToJson(MemberRecharge entity) { + final Map data = {}; + data['id'] = entity.id; + data['rechargeMoney'] = entity.rechargeMoney; + data['giftdMoney'] = entity.giftdMoney; + data['limitNum'] = entity.limitNum; + data['gitfdCouponId'] = entity.gitfdCouponId; + data['startDate'] = entity.startDate; + data['endDate'] = entity.endDate; + data['startTime'] = entity.startTime; + data['endTime'] = entity.endTime; + data['tenantCode'] = entity.tenantCode; + data['createTime'] = entity.createTime; + data['isDeleted'] = entity.isDeleted; + data['rechargeType'] = entity.rechargeType; + data['remark'] = entity.remark; + data['sortValue'] = entity.sortValue; + data['useNum'] = entity.useNum; + return data; +} + +extension MemberRechargeExtension on MemberRecharge { + MemberRecharge copyWith({ + String? id, + String? rechargeMoney, + String? giftdMoney, + int? limitNum, + dynamic gitfdCouponId, + dynamic startDate, + dynamic endDate, + dynamic startTime, + dynamic endTime, + String? tenantCode, + String? createTime, + int? isDeleted, + int? rechargeType, + String? remark, + int? sortValue, + int? useNum, + }) { + return MemberRecharge() + ..id = id ?? this.id + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..giftdMoney = giftdMoney ?? this.giftdMoney + ..limitNum = limitNum ?? this.limitNum + ..gitfdCouponId = gitfdCouponId ?? this.gitfdCouponId + ..startDate = startDate ?? this.startDate + ..endDate = endDate ?? this.endDate + ..startTime = startTime ?? this.startTime + ..endTime = endTime ?? this.endTime + ..tenantCode = tenantCode ?? this.tenantCode + ..createTime = createTime ?? this.createTime + ..isDeleted = isDeleted ?? this.isDeleted + ..rechargeType = rechargeType ?? this.rechargeType + ..remark = remark ?? this.remark + ..sortValue = sortValue ?? this.sortValue + ..useNum = useNum ?? this.useNum; + } +} \ No newline at end of file diff --git a/lib/generated/json/member_source.g.dart b/lib/generated/json/member_source.g.dart new file mode 100644 index 00000000..6d14ea64 --- /dev/null +++ b/lib/generated/json/member_source.g.dart @@ -0,0 +1,203 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/member_source.dart'; + +MemberSource $MemberSourceFromJson(Map json) { + final MemberSource memberSource = MemberSource(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + memberSource.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + memberSource.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + memberSource.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + memberSource.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + memberSource.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + memberSource.mid = mid; + } + final String? openid = jsonConvert.convert(json['openid']); + if (openid != null) { + memberSource.openid = openid; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + memberSource.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + memberSource.headimg = headimg; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + memberSource.balance = balance; + } + final String? realRecharge = jsonConvert.convert( + json['realRecharge']); + if (realRecharge != null) { + memberSource.realRecharge = realRecharge; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + memberSource.sex = sex; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + memberSource.status = status; + } + final bool? onCredit = jsonConvert.convert(json['onCredit']); + if (onCredit != null) { + memberSource.onCredit = onCredit; + } + final String? loginTime = jsonConvert.convert(json['loginTime']); + if (loginTime != null) { + memberSource.loginTime = loginTime; + } + final int? loginNum = jsonConvert.convert(json['loginNum']); + if (loginNum != null) { + memberSource.loginNum = loginNum; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + memberSource.tenantCode = tenantCode; + } + final int? source = jsonConvert.convert(json['source']); + if (source != null) { + memberSource.source = source; + } + final String? expendAmount = jsonConvert.convert( + json['expendAmount']); + if (expendAmount != null) { + memberSource.expendAmount = expendAmount; + } + final int? buyTimes = jsonConvert.convert(json['buyTimes']); + if (buyTimes != null) { + memberSource.buyTimes = buyTimes; + } + final String? lastBuyTime = jsonConvert.convert(json['lastBuyTime']); + if (lastBuyTime != null) { + memberSource.lastBuyTime = lastBuyTime; + } + final dynamic vipNo = json['vip_no']; + if (vipNo != null) { + memberSource.vipNo = vipNo; + } + final dynamic expireTime = json['expireTime']; + if (expireTime != null) { + memberSource.expireTime = expireTime; + } + final int? integral = jsonConvert.convert(json['integral']); + if (integral != null) { + memberSource.integral = integral; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + memberSource.level = level; + } + final dynamic vipRegStore = json['vipRegStore']; + if (vipRegStore != null) { + memberSource.vipRegStore = vipRegStore; + } + return memberSource; +} + +Map $MemberSourceToJson(MemberSource entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['openid'] = entity.openid; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['balance'] = entity.balance; + data['realRecharge'] = entity.realRecharge; + data['sex'] = entity.sex; + data['status'] = entity.status; + data['onCredit'] = entity.onCredit; + data['loginTime'] = entity.loginTime; + data['loginNum'] = entity.loginNum; + data['tenantCode'] = entity.tenantCode; + data['source'] = entity.source; + data['expendAmount'] = entity.expendAmount; + data['buyTimes'] = entity.buyTimes; + data['lastBuyTime'] = entity.lastBuyTime; + data['vip_no'] = entity.vipNo; + data['expireTime'] = entity.expireTime; + data['integral'] = entity.integral; + data['level'] = entity.level; + data['vipRegStore'] = entity.vipRegStore; + return data; +} + +extension MemberSourceExtension on MemberSource { + MemberSource copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? openid, + String? nickname, + String? headimg, + String? balance, + String? realRecharge, + String? sex, + bool? status, + bool? onCredit, + String? loginTime, + int? loginNum, + String? tenantCode, + int? source, + String? expendAmount, + int? buyTimes, + String? lastBuyTime, + dynamic vipNo, + dynamic expireTime, + int? integral, + int? level, + dynamic vipRegStore, + }) { + return MemberSource() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..openid = openid ?? this.openid + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..balance = balance ?? this.balance + ..realRecharge = realRecharge ?? this.realRecharge + ..sex = sex ?? this.sex + ..status = status ?? this.status + ..onCredit = onCredit ?? this.onCredit + ..loginTime = loginTime ?? this.loginTime + ..loginNum = loginNum ?? this.loginNum + ..tenantCode = tenantCode ?? this.tenantCode + ..source = source ?? this.source + ..expendAmount = expendAmount ?? this.expendAmount + ..buyTimes = buyTimes ?? this.buyTimes + ..lastBuyTime = lastBuyTime ?? this.lastBuyTime + ..vipNo = vipNo ?? this.vipNo + ..expireTime = expireTime ?? this.expireTime + ..integral = integral ?? this.integral + ..level = level ?? this.level + ..vipRegStore = vipRegStore ?? this.vipRegStore; + } +} \ No newline at end of file diff --git a/lib/generated/json/member_vo.g.dart b/lib/generated/json/member_vo.g.dart new file mode 100644 index 00000000..9799b309 --- /dev/null +++ b/lib/generated/json/member_vo.g.dart @@ -0,0 +1,262 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/member_vo.dart'; +import 'package:huixiang/data/member_rank.dart'; + + +MemberVo $MemberVoFromJson(Map json) { + final MemberVo memberVo = MemberVo(); + final dynamic masterId = json['masterId']; + if (masterId != null) { + memberVo.masterId = masterId; + } + final dynamic masterCardRankName = json['masterCardRankName']; + if (masterCardRankName != null) { + memberVo.masterCardRankName = masterCardRankName; + } + final String? vipNo = jsonConvert.convert(json['vipNo']); + if (vipNo != null) { + memberVo.vipNo = vipNo; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + memberVo.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + memberVo.headimg = headimg; + } + final bool? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + memberVo.userType = userType; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + memberVo.sex = sex; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + memberVo.level = level; + } + final dynamic addressId = json['addressId']; + if (addressId != null) { + memberVo.addressId = addressId; + } + final dynamic remark = json['remark']; + if (remark != null) { + memberVo.remark = remark; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + memberVo.phone = phone; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + memberVo.createTime = createTime; + } + final String? birth = jsonConvert.convert(json['birth']); + if (birth != null) { + memberVo.birth = birth; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + memberVo.balance = balance; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + memberVo.money = money; + } + final String? activityMoney = jsonConvert.convert( + json['activityMoney']); + if (activityMoney != null) { + memberVo.activityMoney = activityMoney; + } + final String? greenMoney = jsonConvert.convert(json['greenMoney']); + if (greenMoney != null) { + memberVo.greenMoney = greenMoney; + } + final String? expendAmount = jsonConvert.convert( + json['expendAmount']); + if (expendAmount != null) { + memberVo.expendAmount = expendAmount; + } + final dynamic organic = json['organic']; + if (organic != null) { + memberVo.organic = organic; + } + final String? points = jsonConvert.convert(json['points']); + if (points != null) { + memberVo.points = points; + } + final bool? isBind = jsonConvert.convert(json['isBind']); + if (isBind != null) { + memberVo.isBind = isBind; + } + final MemberRank? memberRankVo = jsonConvert.convert( + json['memberRankVo']); + if (memberRankVo != null) { + memberVo.memberRankVo = memberRankVo; + } + final int? age = jsonConvert.convert(json['age']); + if (age != null) { + memberVo.age = age; + } + final dynamic inviteCode = json['inviteCode']; + if (inviteCode != null) { + memberVo.inviteCode = inviteCode; + } + final dynamic inviteNumber = json['inviteNumber']; + if (inviteNumber != null) { + memberVo.inviteNumber = inviteNumber; + } + final dynamic todayInviteNumber = json['todayInviteNumber']; + if (todayInviteNumber != null) { + memberVo.todayInviteNumber = todayInviteNumber; + } + final dynamic signature = json['signature']; + if (signature != null) { + memberVo.signature = signature; + } + final dynamic background = json['background']; + if (background != null) { + memberVo.background = background; + } + final bool? certification = jsonConvert.convert(json['certification']); + if (certification != null) { + memberVo.certification = certification; + } + final dynamic hasPayPassword = json['hasPayPassword']; + if (hasPayPassword != null) { + memberVo.hasPayPassword = hasPayPassword; + } + final dynamic isVip = json['isVip']; + if (isVip != null) { + memberVo.isVip = isVip; + } + final dynamic vipExpire = json['vipExpire']; + if (vipExpire != null) { + memberVo.vipExpire = vipExpire; + } + final dynamic isVipSubscribe = json['isVipSubscribe']; + if (isVipSubscribe != null) { + memberVo.isVipSubscribe = isVipSubscribe; + } + final dynamic vipDuration = json['vipDuration']; + if (vipDuration != null) { + memberVo.vipDuration = vipDuration; + } + return memberVo; +} + +Map $MemberVoToJson(MemberVo entity) { + final Map data = {}; + data['masterId'] = entity.masterId; + data['masterCardRankName'] = entity.masterCardRankName; + data['vipNo'] = entity.vipNo; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['userType'] = entity.userType; + data['sex'] = entity.sex; + data['level'] = entity.level; + data['addressId'] = entity.addressId; + data['remark'] = entity.remark; + data['phone'] = entity.phone; + data['createTime'] = entity.createTime; + data['birth'] = entity.birth; + data['balance'] = entity.balance; + data['money'] = entity.money; + data['activityMoney'] = entity.activityMoney; + data['greenMoney'] = entity.greenMoney; + data['expendAmount'] = entity.expendAmount; + data['organic'] = entity.organic; + data['points'] = entity.points; + data['isBind'] = entity.isBind; + data['memberRankVo'] = entity.memberRankVo?.toJson(); + data['age'] = entity.age; + data['inviteCode'] = entity.inviteCode; + data['inviteNumber'] = entity.inviteNumber; + data['todayInviteNumber'] = entity.todayInviteNumber; + data['signature'] = entity.signature; + data['background'] = entity.background; + data['certification'] = entity.certification; + data['hasPayPassword'] = entity.hasPayPassword; + data['isVip'] = entity.isVip; + data['vipExpire'] = entity.vipExpire; + data['isVipSubscribe'] = entity.isVipSubscribe; + data['vipDuration'] = entity.vipDuration; + return data; +} + +extension MemberVoExtension on MemberVo { + MemberVo copyWith({ + dynamic masterId, + dynamic masterCardRankName, + String? vipNo, + String? nickname, + String? headimg, + bool? userType, + String? sex, + int? level, + dynamic addressId, + dynamic remark, + String? phone, + String? createTime, + String? birth, + String? balance, + String? money, + String? activityMoney, + String? greenMoney, + String? expendAmount, + dynamic organic, + String? points, + bool? isBind, + MemberRank? memberRankVo, + int? age, + dynamic inviteCode, + dynamic inviteNumber, + dynamic todayInviteNumber, + dynamic signature, + dynamic background, + bool? certification, + dynamic hasPayPassword, + dynamic isVip, + dynamic vipExpire, + dynamic isVipSubscribe, + dynamic vipDuration, + }) { + return MemberVo() + ..masterId = masterId ?? this.masterId + ..masterCardRankName = masterCardRankName ?? this.masterCardRankName + ..vipNo = vipNo ?? this.vipNo + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..userType = userType ?? this.userType + ..sex = sex ?? this.sex + ..level = level ?? this.level + ..addressId = addressId ?? this.addressId + ..remark = remark ?? this.remark + ..phone = phone ?? this.phone + ..createTime = createTime ?? this.createTime + ..birth = birth ?? this.birth + ..balance = balance ?? this.balance + ..money = money ?? this.money + ..activityMoney = activityMoney ?? this.activityMoney + ..greenMoney = greenMoney ?? this.greenMoney + ..expendAmount = expendAmount ?? this.expendAmount + ..organic = organic ?? this.organic + ..points = points ?? this.points + ..isBind = isBind ?? this.isBind + ..memberRankVo = memberRankVo ?? this.memberRankVo + ..age = age ?? this.age + ..inviteCode = inviteCode ?? this.inviteCode + ..inviteNumber = inviteNumber ?? this.inviteNumber + ..todayInviteNumber = todayInviteNumber ?? this.todayInviteNumber + ..signature = signature ?? this.signature + ..background = background ?? this.background + ..certification = certification ?? this.certification + ..hasPayPassword = hasPayPassword ?? this.hasPayPassword + ..isVip = isVip ?? this.isVip + ..vipExpire = vipExpire ?? this.vipExpire + ..isVipSubscribe = isVipSubscribe ?? this.isVipSubscribe + ..vipDuration = vipDuration ?? this.vipDuration; + } +} \ No newline at end of file diff --git a/lib/generated/json/message.g.dart b/lib/generated/json/message.g.dart new file mode 100644 index 00000000..b9cc9811 --- /dev/null +++ b/lib/generated/json/message.g.dart @@ -0,0 +1,110 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/message.dart'; + +Message $MessageFromJson(Map json) { + final Message message = Message(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + message.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + message.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + message.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + message.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + message.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + message.mid = mid; + } + final String? title = jsonConvert.convert(json['title']); + if (title != null) { + message.title = title; + } + final String? content = jsonConvert.convert(json['content']); + if (content != null) { + message.content = content; + } + final int? typed = jsonConvert.convert(json['typed']); + if (typed != null) { + message.typed = typed; + } + final String? relational = jsonConvert.convert(json['relational']); + if (relational != null) { + message.relational = relational; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + message.state = state; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + message.isDelete = isDelete; + } + final bool? followed = jsonConvert.convert(json['followed']); + if (followed != null) { + message.followed = followed; + } + return message; +} + +Map $MessageToJson(Message entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['title'] = entity.title; + data['content'] = entity.content; + data['typed'] = entity.typed; + data['relational'] = entity.relational; + data['state'] = entity.state; + data['isDelete'] = entity.isDelete; + data['followed'] = entity.followed; + return data; +} + +extension MessageExtension on Message { + Message copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? title, + String? content, + int? typed, + String? relational, + int? state, + int? isDelete, + bool? followed, + }) { + return Message() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..title = title ?? this.title + ..content = content ?? this.content + ..typed = typed ?? this.typed + ..relational = relational ?? this.relational + ..state = state ?? this.state + ..isDelete = isDelete ?? this.isDelete + ..followed = followed ?? this.followed; + } +} \ No newline at end of file diff --git a/lib/generated/json/min_order_info.g.dart b/lib/generated/json/min_order_info.g.dart new file mode 100644 index 00000000..ead2c762 --- /dev/null +++ b/lib/generated/json/min_order_info.g.dart @@ -0,0 +1,976 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/data/order_product_vo.dart'; + + +MinOrderInfo $MinOrderInfoFromJson(Map json) { + final MinOrderInfo minOrderInfo = MinOrderInfo(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + minOrderInfo.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + minOrderInfo.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + minOrderInfo.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + minOrderInfo.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + minOrderInfo.updateUser = updateUser; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + minOrderInfo.tenantCode = tenantCode; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + minOrderInfo.storeId = storeId; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + minOrderInfo.storeName = storeName; + } + final String? tableId = jsonConvert.convert(json['tableId']); + if (tableId != null) { + minOrderInfo.tableId = tableId; + } + final int? orderType = jsonConvert.convert(json['orderType']); + if (orderType != null) { + minOrderInfo.orderType = orderType; + } + final bool? clearTable = jsonConvert.convert(json['clearTable']); + if (clearTable != null) { + minOrderInfo.clearTable = clearTable; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + minOrderInfo.mid = mid; + } + final String? parentId = jsonConvert.convert(json['parentId']); + if (parentId != null) { + minOrderInfo.parentId = parentId; + } + final String? parentCode = jsonConvert.convert(json['parentCode']); + if (parentCode != null) { + minOrderInfo.parentCode = parentCode; + } + final String? orderCode = jsonConvert.convert(json['orderCode']); + if (orderCode != null) { + minOrderInfo.orderCode = orderCode; + } + final String? dayFlowCode = jsonConvert.convert(json['dayFlowCode']); + if (dayFlowCode != null) { + minOrderInfo.dayFlowCode = dayFlowCode; + } + final int? orderStatus = jsonConvert.convert(json['orderStatus']); + if (orderStatus != null) { + minOrderInfo.orderStatus = orderStatus; + } + final int? sendStatus = jsonConvert.convert(json['sendStatus']); + if (sendStatus != null) { + minOrderInfo.sendStatus = sendStatus; + } + final int? payStatus = jsonConvert.convert(json['payStatus']); + if (payStatus != null) { + minOrderInfo.payStatus = payStatus; + } + final String? memberAccount = jsonConvert.convert( + json['memberAccount']); + if (memberAccount != null) { + minOrderInfo.memberAccount = memberAccount; + } + final String? logisticsId = jsonConvert.convert(json['logisticsId']); + if (logisticsId != null) { + minOrderInfo.logisticsId = logisticsId; + } + final String? shipperCode = jsonConvert.convert(json['shipperCode']); + if (shipperCode != null) { + minOrderInfo.shipperCode = shipperCode; + } + final String? logisticsName = jsonConvert.convert( + json['logisticsName']); + if (logisticsName != null) { + minOrderInfo.logisticsName = logisticsName; + } + final String? logisticsNum = jsonConvert.convert( + json['logisticsNum']); + if (logisticsNum != null) { + minOrderInfo.logisticsNum = logisticsNum; + } + final dynamic logisticsCase = json['logisticsCase']; + if (logisticsCase != null) { + minOrderInfo.logisticsCase = logisticsCase; + } + final int? refundStatus = jsonConvert.convert(json['refundStatus']); + if (refundStatus != null) { + minOrderInfo.refundStatus = refundStatus; + } + final dynamic addressExt = json['addressExt']; + if (addressExt != null) { + minOrderInfo.addressExt = addressExt; + } + final String? postFee = jsonConvert.convert(json['postFee']); + if (postFee != null) { + minOrderInfo.postFee = postFee; + } + final String? orderSum = jsonConvert.convert(json['orderSum']); + if (orderSum != null) { + minOrderInfo.orderSum = orderSum; + } + final String? paySum = jsonConvert.convert(json['paySum']); + if (paySum != null) { + minOrderInfo.paySum = paySum; + } + final String? paySumSub = jsonConvert.convert(json['paySumSub']); + if (paySumSub != null) { + minOrderInfo.paySumSub = paySumSub; + } + final String? accountPay = jsonConvert.convert(json['accountPay']); + if (accountPay != null) { + minOrderInfo.accountPay = accountPay; + } + final String? couponSubPrice = jsonConvert.convert( + json['couponSubPrice']); + if (couponSubPrice != null) { + minOrderInfo.couponSubPrice = couponSubPrice; + } + final String? customPrice = jsonConvert.convert(json['customPrice']); + if (customPrice != null) { + minOrderInfo.customPrice = customPrice; + } + final String? removeDecimal = jsonConvert.convert( + json['removeDecimal']); + if (removeDecimal != null) { + minOrderInfo.removeDecimal = removeDecimal; + } + final bool? isSubscribe = jsonConvert.convert(json['isSubscribe']); + if (isSubscribe != null) { + minOrderInfo.isSubscribe = isSubscribe; + } + final dynamic subcribeTime = json['subcribeTime']; + if (subcribeTime != null) { + minOrderInfo.subcribeTime = subcribeTime; + } + final dynamic sendTime = json['sendTime']; + if (sendTime != null) { + minOrderInfo.sendTime = sendTime; + } + final dynamic confirmTime = json['confirmTime']; + if (confirmTime != null) { + minOrderInfo.confirmTime = confirmTime; + } + final dynamic returnMoneyTime = json['returnMoneyTime']; + if (returnMoneyTime != null) { + minOrderInfo.returnMoneyTime = returnMoneyTime; + } + final String? notes = jsonConvert.convert(json['notes']); + if (notes != null) { + minOrderInfo.notes = notes; + } + final dynamic prepayId = json['prepayId']; + if (prepayId != null) { + minOrderInfo.prepayId = prepayId; + } + final dynamic payTime = json['payTime']; + if (payTime != null) { + minOrderInfo.payTime = payTime; + } + final int? payChannel = jsonConvert.convert(json['payChannel']); + if (payChannel != null) { + minOrderInfo.payChannel = payChannel; + } + final dynamic payNum = json['payNum']; + if (payNum != null) { + minOrderInfo.payNum = payNum; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + minOrderInfo.promotionId = promotionId; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + minOrderInfo.couponId = couponId; + } + final String? couponName = jsonConvert.convert(json['couponName']); + if (couponName != null) { + minOrderInfo.couponName = couponName; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + minOrderInfo.isDelete = isDelete; + } + final int? isTakeOut = jsonConvert.convert(json['isTakeOut']); + if (isTakeOut != null) { + minOrderInfo.isTakeOut = isTakeOut; + } + final int? batch = jsonConvert.convert(json['batch']); + if (batch != null) { + minOrderInfo.batch = batch; + } + final String? orderDiscountPrice = jsonConvert.convert( + json['orderDiscountPrice']); + if (orderDiscountPrice != null) { + minOrderInfo.orderDiscountPrice = orderDiscountPrice; + } + final String? dishesDiscountPrice = jsonConvert.convert( + json['dishesDiscountPrice']); + if (dishesDiscountPrice != null) { + minOrderInfo.dishesDiscountPrice = dishesDiscountPrice; + } + final String? orderPercentPrice = jsonConvert.convert( + json['orderPercentPrice']); + if (orderPercentPrice != null) { + minOrderInfo.orderPercentPrice = orderPercentPrice; + } + final String? finalPayPrice = jsonConvert.convert( + json['finalPayPrice']); + if (finalPayPrice != null) { + minOrderInfo.finalPayPrice = finalPayPrice; + } + final String? activityNoPrice = jsonConvert.convert( + json['activityNoPrice']); + if (activityNoPrice != null) { + minOrderInfo.activityNoPrice = activityNoPrice; + } + final String? activityDiscountPrice = jsonConvert.convert( + json['activityDiscountPrice']); + if (activityDiscountPrice != null) { + minOrderInfo.activityDiscountPrice = activityDiscountPrice; + } + final String? totalDiscountPrice = jsonConvert.convert( + json['totalDiscountPrice']); + if (totalDiscountPrice != null) { + minOrderInfo.totalDiscountPrice = totalDiscountPrice; + } + final String? totalPackagingFee = jsonConvert.convert( + json['totalPackagingFee']); + if (totalPackagingFee != null) { + minOrderInfo.totalPackagingFee = totalPackagingFee; + } + final String? benefitDiscountAmount = jsonConvert.convert( + json['benefitDiscountAmount']); + if (benefitDiscountAmount != null) { + minOrderInfo.benefitDiscountAmount = benefitDiscountAmount; + } + final int? orderSource = jsonConvert.convert(json['orderSource']); + if (orderSource != null) { + minOrderInfo.orderSource = orderSource; + } + final dynamic address = json['address']; + if (address != null) { + minOrderInfo.address = address; + } + final dynamic discountPercent = json['discountPercent']; + if (discountPercent != null) { + minOrderInfo.discountPercent = discountPercent; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + minOrderInfo.discountAmount = discountAmount; + } + final dynamic discountType = json['discountType']; + if (discountType != null) { + minOrderInfo.discountType = discountType; + } + final dynamic uniqueDiscountType = json['uniqueDiscountType']; + if (uniqueDiscountType != null) { + minOrderInfo.uniqueDiscountType = uniqueDiscountType; + } + final dynamic discountMoney = json['discountMoney']; + if (discountMoney != null) { + minOrderInfo.discountMoney = discountMoney; + } + final dynamic overTime = json['overTime']; + if (overTime != null) { + minOrderInfo.overTime = overTime; + } + final List< + OrderProductVO>? orderProductVOList = (json['orderProductVOList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as OrderProductVO) + .toList(); + if (orderProductVOList != null) { + minOrderInfo.orderProductVOList = orderProductVOList; + } + final dynamic moneyReturnList = json['moneyReturnList']; + if (moneyReturnList != null) { + minOrderInfo.moneyReturnList = moneyReturnList; + } + final dynamic goodsReturnList = json['goodsReturnList']; + if (goodsReturnList != null) { + minOrderInfo.goodsReturnList = goodsReturnList; + } + final dynamic moneyReturnVOList = json['moneyReturnVOList']; + if (moneyReturnVOList != null) { + minOrderInfo.moneyReturnVOList = moneyReturnVOList; + } + final dynamic goodsReturnVOList = json['goodsReturnVOList']; + if (goodsReturnVOList != null) { + minOrderInfo.goodsReturnVOList = goodsReturnVOList; + } + final dynamic moneyReturnActionHistoryList = json['moneyReturnActionHistoryList']; + if (moneyReturnActionHistoryList != null) { + minOrderInfo.moneyReturnActionHistoryList = moneyReturnActionHistoryList; + } + final dynamic goodsReturnActionHistoryList = json['goodsReturnActionHistoryList']; + if (goodsReturnActionHistoryList != null) { + minOrderInfo.goodsReturnActionHistoryList = goodsReturnActionHistoryList; + } + final String? currentTime = jsonConvert.convert(json['currentTime']); + if (currentTime != null) { + minOrderInfo.currentTime = currentTime; + } + final dynamic tablePrice = json['tablePrice']; + if (tablePrice != null) { + minOrderInfo.tablePrice = tablePrice; + } + final String? tableName = jsonConvert.convert(json['tableName']); + if (tableName != null) { + minOrderInfo.tableName = tableName; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + minOrderInfo.balance = balance; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + minOrderInfo.money = money; + } + final dynamic prodNum = json['prodNum']; + if (prodNum != null) { + minOrderInfo.prodNum = prodNum; + } + final bool? onCredit = jsonConvert.convert(json['onCredit']); + if (onCredit != null) { + minOrderInfo.onCredit = onCredit; + } + final OrderInfoVo? orderInfoVo = jsonConvert.convert( + json['orderInfoVo']); + if (orderInfoVo != null) { + minOrderInfo.orderInfoVo = orderInfoVo; + } + final String? endPayTime = jsonConvert.convert(json['endPayTime']); + if (endPayTime != null) { + minOrderInfo.endPayTime = endPayTime; + } + final String? orderSumPrice = jsonConvert.convert( + json['orderSumPrice']); + if (orderSumPrice != null) { + minOrderInfo.orderSumPrice = orderSumPrice; + } + final bool? isRaise = jsonConvert.convert(json['isRaise']); + if (isRaise != null) { + minOrderInfo.isRaise = isRaise; + } + return minOrderInfo; +} + +Map $MinOrderInfoToJson(MinOrderInfo entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['tenantCode'] = entity.tenantCode; + data['storeId'] = entity.storeId; + data['storeName'] = entity.storeName; + data['tableId'] = entity.tableId; + data['orderType'] = entity.orderType; + data['clearTable'] = entity.clearTable; + data['mid'] = entity.mid; + data['parentId'] = entity.parentId; + data['parentCode'] = entity.parentCode; + data['orderCode'] = entity.orderCode; + data['dayFlowCode'] = entity.dayFlowCode; + data['orderStatus'] = entity.orderStatus; + data['sendStatus'] = entity.sendStatus; + data['payStatus'] = entity.payStatus; + data['memberAccount'] = entity.memberAccount; + data['logisticsId'] = entity.logisticsId; + data['shipperCode'] = entity.shipperCode; + data['logisticsName'] = entity.logisticsName; + data['logisticsNum'] = entity.logisticsNum; + data['logisticsCase'] = entity.logisticsCase; + data['refundStatus'] = entity.refundStatus; + data['addressExt'] = entity.addressExt; + data['postFee'] = entity.postFee; + data['orderSum'] = entity.orderSum; + data['paySum'] = entity.paySum; + data['paySumSub'] = entity.paySumSub; + data['accountPay'] = entity.accountPay; + data['couponSubPrice'] = entity.couponSubPrice; + data['customPrice'] = entity.customPrice; + data['removeDecimal'] = entity.removeDecimal; + data['isSubscribe'] = entity.isSubscribe; + data['subcribeTime'] = entity.subcribeTime; + data['sendTime'] = entity.sendTime; + data['confirmTime'] = entity.confirmTime; + data['returnMoneyTime'] = entity.returnMoneyTime; + data['notes'] = entity.notes; + data['prepayId'] = entity.prepayId; + data['payTime'] = entity.payTime; + data['payChannel'] = entity.payChannel; + data['payNum'] = entity.payNum; + data['promotionId'] = entity.promotionId; + data['couponId'] = entity.couponId; + data['couponName'] = entity.couponName; + data['isDelete'] = entity.isDelete; + data['isTakeOut'] = entity.isTakeOut; + data['batch'] = entity.batch; + data['orderDiscountPrice'] = entity.orderDiscountPrice; + data['dishesDiscountPrice'] = entity.dishesDiscountPrice; + data['orderPercentPrice'] = entity.orderPercentPrice; + data['finalPayPrice'] = entity.finalPayPrice; + data['activityNoPrice'] = entity.activityNoPrice; + data['activityDiscountPrice'] = entity.activityDiscountPrice; + data['totalDiscountPrice'] = entity.totalDiscountPrice; + data['totalPackagingFee'] = entity.totalPackagingFee; + data['benefitDiscountAmount'] = entity.benefitDiscountAmount; + data['orderSource'] = entity.orderSource; + data['address'] = entity.address; + data['discountPercent'] = entity.discountPercent; + data['discountAmount'] = entity.discountAmount; + data['discountType'] = entity.discountType; + data['uniqueDiscountType'] = entity.uniqueDiscountType; + data['discountMoney'] = entity.discountMoney; + data['overTime'] = entity.overTime; + data['orderProductVOList'] = + entity.orderProductVOList?.map((v) => v.toJson()).toList(); + data['moneyReturnList'] = entity.moneyReturnList; + data['goodsReturnList'] = entity.goodsReturnList; + data['moneyReturnVOList'] = entity.moneyReturnVOList; + data['goodsReturnVOList'] = entity.goodsReturnVOList; + data['moneyReturnActionHistoryList'] = entity.moneyReturnActionHistoryList; + data['goodsReturnActionHistoryList'] = entity.goodsReturnActionHistoryList; + data['currentTime'] = entity.currentTime; + data['tablePrice'] = entity.tablePrice; + data['tableName'] = entity.tableName; + data['balance'] = entity.balance; + data['money'] = entity.money; + data['prodNum'] = entity.prodNum; + data['onCredit'] = entity.onCredit; + data['orderInfoVo'] = entity.orderInfoVo?.toJson(); + data['endPayTime'] = entity.endPayTime; + data['orderSumPrice'] = entity.orderSumPrice; + data['isRaise'] = entity.isRaise; + return data; +} + +extension MinOrderInfoExtension on MinOrderInfo { + MinOrderInfo copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? tenantCode, + String? storeId, + String? storeName, + String? tableId, + int? orderType, + bool? clearTable, + String? mid, + String? parentId, + String? parentCode, + String? orderCode, + String? dayFlowCode, + int? orderStatus, + int? sendStatus, + int? payStatus, + String? memberAccount, + String? logisticsId, + String? shipperCode, + String? logisticsName, + String? logisticsNum, + dynamic logisticsCase, + int? refundStatus, + dynamic addressExt, + String? postFee, + String? orderSum, + String? paySum, + String? paySumSub, + String? accountPay, + String? couponSubPrice, + String? customPrice, + String? removeDecimal, + bool? isSubscribe, + dynamic subcribeTime, + dynamic sendTime, + dynamic confirmTime, + dynamic returnMoneyTime, + String? notes, + dynamic prepayId, + dynamic payTime, + int? payChannel, + dynamic payNum, + String? promotionId, + String? couponId, + String? couponName, + int? isDelete, + int? isTakeOut, + int? batch, + String? orderDiscountPrice, + String? dishesDiscountPrice, + String? orderPercentPrice, + String? finalPayPrice, + String? activityNoPrice, + String? activityDiscountPrice, + String? totalDiscountPrice, + String? totalPackagingFee, + String? benefitDiscountAmount, + int? orderSource, + dynamic address, + dynamic discountPercent, + String? discountAmount, + dynamic discountType, + dynamic uniqueDiscountType, + dynamic discountMoney, + dynamic overTime, + List? orderProductVOList, + dynamic moneyReturnList, + dynamic goodsReturnList, + dynamic moneyReturnVOList, + dynamic goodsReturnVOList, + dynamic moneyReturnActionHistoryList, + dynamic goodsReturnActionHistoryList, + String? currentTime, + dynamic tablePrice, + String? tableName, + String? balance, + String? money, + dynamic prodNum, + bool? onCredit, + OrderInfoVo? orderInfoVo, + String? endPayTime, + String? orderSumPrice, + bool? isRaise, + }) { + return MinOrderInfo() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..tenantCode = tenantCode ?? this.tenantCode + ..storeId = storeId ?? this.storeId + ..storeName = storeName ?? this.storeName + ..tableId = tableId ?? this.tableId + ..orderType = orderType ?? this.orderType + ..clearTable = clearTable ?? this.clearTable + ..mid = mid ?? this.mid + ..parentId = parentId ?? this.parentId + ..parentCode = parentCode ?? this.parentCode + ..orderCode = orderCode ?? this.orderCode + ..dayFlowCode = dayFlowCode ?? this.dayFlowCode + ..orderStatus = orderStatus ?? this.orderStatus + ..sendStatus = sendStatus ?? this.sendStatus + ..payStatus = payStatus ?? this.payStatus + ..memberAccount = memberAccount ?? this.memberAccount + ..logisticsId = logisticsId ?? this.logisticsId + ..shipperCode = shipperCode ?? this.shipperCode + ..logisticsName = logisticsName ?? this.logisticsName + ..logisticsNum = logisticsNum ?? this.logisticsNum + ..logisticsCase = logisticsCase ?? this.logisticsCase + ..refundStatus = refundStatus ?? this.refundStatus + ..addressExt = addressExt ?? this.addressExt + ..postFee = postFee ?? this.postFee + ..orderSum = orderSum ?? this.orderSum + ..paySum = paySum ?? this.paySum + ..paySumSub = paySumSub ?? this.paySumSub + ..accountPay = accountPay ?? this.accountPay + ..couponSubPrice = couponSubPrice ?? this.couponSubPrice + ..customPrice = customPrice ?? this.customPrice + ..removeDecimal = removeDecimal ?? this.removeDecimal + ..isSubscribe = isSubscribe ?? this.isSubscribe + ..subcribeTime = subcribeTime ?? this.subcribeTime + ..sendTime = sendTime ?? this.sendTime + ..confirmTime = confirmTime ?? this.confirmTime + ..returnMoneyTime = returnMoneyTime ?? this.returnMoneyTime + ..notes = notes ?? this.notes + ..prepayId = prepayId ?? this.prepayId + ..payTime = payTime ?? this.payTime + ..payChannel = payChannel ?? this.payChannel + ..payNum = payNum ?? this.payNum + ..promotionId = promotionId ?? this.promotionId + ..couponId = couponId ?? this.couponId + ..couponName = couponName ?? this.couponName + ..isDelete = isDelete ?? this.isDelete + ..isTakeOut = isTakeOut ?? this.isTakeOut + ..batch = batch ?? this.batch + ..orderDiscountPrice = orderDiscountPrice ?? this.orderDiscountPrice + ..dishesDiscountPrice = dishesDiscountPrice ?? this.dishesDiscountPrice + ..orderPercentPrice = orderPercentPrice ?? this.orderPercentPrice + ..finalPayPrice = finalPayPrice ?? this.finalPayPrice + ..activityNoPrice = activityNoPrice ?? this.activityNoPrice + ..activityDiscountPrice = activityDiscountPrice ?? + this.activityDiscountPrice + ..totalDiscountPrice = totalDiscountPrice ?? this.totalDiscountPrice + ..totalPackagingFee = totalPackagingFee ?? this.totalPackagingFee + ..benefitDiscountAmount = benefitDiscountAmount ?? + this.benefitDiscountAmount + ..orderSource = orderSource ?? this.orderSource + ..address = address ?? this.address + ..discountPercent = discountPercent ?? this.discountPercent + ..discountAmount = discountAmount ?? this.discountAmount + ..discountType = discountType ?? this.discountType + ..uniqueDiscountType = uniqueDiscountType ?? this.uniqueDiscountType + ..discountMoney = discountMoney ?? this.discountMoney + ..overTime = overTime ?? this.overTime + ..orderProductVOList = orderProductVOList ?? this.orderProductVOList + ..moneyReturnList = moneyReturnList ?? this.moneyReturnList + ..goodsReturnList = goodsReturnList ?? this.goodsReturnList + ..moneyReturnVOList = moneyReturnVOList ?? this.moneyReturnVOList + ..goodsReturnVOList = goodsReturnVOList ?? this.goodsReturnVOList + ..moneyReturnActionHistoryList = moneyReturnActionHistoryList ?? + this.moneyReturnActionHistoryList + ..goodsReturnActionHistoryList = goodsReturnActionHistoryList ?? + this.goodsReturnActionHistoryList + ..currentTime = currentTime ?? this.currentTime + ..tablePrice = tablePrice ?? this.tablePrice + ..tableName = tableName ?? this.tableName + ..balance = balance ?? this.balance + ..money = money ?? this.money + ..prodNum = prodNum ?? this.prodNum + ..onCredit = onCredit ?? this.onCredit + ..orderInfoVo = orderInfoVo ?? this.orderInfoVo + ..endPayTime = endPayTime ?? this.endPayTime + ..orderSumPrice = orderSumPrice ?? this.orderSumPrice + ..isRaise = isRaise ?? this.isRaise; + } +} + +OrderInfoVo $OrderInfoVoFromJson(Map json) { + final OrderInfoVo orderInfoVo = OrderInfoVo(); + final int? orderNum = jsonConvert.convert(json['orderNum']); + if (orderNum != null) { + orderInfoVo.orderNum = orderNum; + } + final int? productNum = jsonConvert.convert(json['productNum']); + if (productNum != null) { + orderInfoVo.productNum = productNum; + } + final int? mins = jsonConvert.convert(json['mins']); + if (mins != null) { + orderInfoVo.mins = mins; + } + final MemberVO? memberVO = jsonConvert.convert(json['memberVO']); + if (memberVO != null) { + orderInfoVo.memberVO = memberVO; + } + final String? postAge = jsonConvert.convert(json['postAge']); + if (postAge != null) { + orderInfoVo.postAge = postAge; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + orderInfoVo.price = price; + } + final String? orderSum = jsonConvert.convert(json['orderSum']); + if (orderSum != null) { + orderInfoVo.orderSum = orderSum; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + orderInfoVo.discountAmount = discountAmount; + } + final dynamic promotionInfoList = json['promotionInfoList']; + if (promotionInfoList != null) { + orderInfoVo.promotionInfoList = promotionInfoList; + } + final dynamic couponList = json['couponList']; + if (couponList != null) { + orderInfoVo.couponList = couponList; + } + final String? threshold = jsonConvert.convert(json['threshold']); + if (threshold != null) { + orderInfoVo.threshold = threshold; + } + final String? freePostAge = jsonConvert.convert(json['freePostAge']); + if (freePostAge != null) { + orderInfoVo.freePostAge = freePostAge; + } + final dynamic orderProductList = json['orderProductList']; + if (orderProductList != null) { + orderInfoVo.orderProductList = orderProductList; + } + return orderInfoVo; +} + +Map $OrderInfoVoToJson(OrderInfoVo entity) { + final Map data = {}; + data['orderNum'] = entity.orderNum; + data['productNum'] = entity.productNum; + data['mins'] = entity.mins; + data['memberVO'] = entity.memberVO?.toJson(); + data['postAge'] = entity.postAge; + data['price'] = entity.price; + data['orderSum'] = entity.orderSum; + data['discountAmount'] = entity.discountAmount; + data['promotionInfoList'] = entity.promotionInfoList; + data['couponList'] = entity.couponList; + data['threshold'] = entity.threshold; + data['freePostAge'] = entity.freePostAge; + data['orderProductList'] = entity.orderProductList; + return data; +} + +extension OrderInfoVoExtension on OrderInfoVo { + OrderInfoVo copyWith({ + int? orderNum, + int? productNum, + int? mins, + MemberVO? memberVO, + String? postAge, + String? price, + String? orderSum, + String? discountAmount, + dynamic promotionInfoList, + dynamic couponList, + String? threshold, + String? freePostAge, + dynamic orderProductList, + }) { + return OrderInfoVo() + ..orderNum = orderNum ?? this.orderNum + ..productNum = productNum ?? this.productNum + ..mins = mins ?? this.mins + ..memberVO = memberVO ?? this.memberVO + ..postAge = postAge ?? this.postAge + ..price = price ?? this.price + ..orderSum = orderSum ?? this.orderSum + ..discountAmount = discountAmount ?? this.discountAmount + ..promotionInfoList = promotionInfoList ?? this.promotionInfoList + ..couponList = couponList ?? this.couponList + ..threshold = threshold ?? this.threshold + ..freePostAge = freePostAge ?? this.freePostAge + ..orderProductList = orderProductList ?? this.orderProductList; + } +} + +MemberVO $MemberVOFromJson(Map json) { + final MemberVO memberVO = MemberVO(); + final String? vipNo = jsonConvert.convert(json['vipNo']); + if (vipNo != null) { + memberVO.vipNo = vipNo; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + memberVO.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + memberVO.headimg = headimg; + } + final bool? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + memberVO.userType = userType; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + memberVO.sex = sex; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + memberVO.level = level; + } + final dynamic addressId = json['addressId']; + if (addressId != null) { + memberVO.addressId = addressId; + } + final dynamic remark = json['remark']; + if (remark != null) { + memberVO.remark = remark; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + memberVO.phone = phone; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + memberVO.createTime = createTime; + } + final String? birth = jsonConvert.convert(json['birth']); + if (birth != null) { + memberVO.birth = birth; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + memberVO.balance = balance; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + memberVO.money = money; + } + final String? points = jsonConvert.convert(json['points']); + if (points != null) { + memberVO.points = points; + } + final bool? isBind = jsonConvert.convert(json['isBind']); + if (isBind != null) { + memberVO.isBind = isBind; + } + final MemberRankVo? memberRankVo = jsonConvert.convert( + json['memberRankVo']); + if (memberRankVo != null) { + memberVO.memberRankVo = memberRankVo; + } + final int? age = jsonConvert.convert(json['age']); + if (age != null) { + memberVO.age = age; + } + return memberVO; +} + +Map $MemberVOToJson(MemberVO entity) { + final Map data = {}; + data['vipNo'] = entity.vipNo; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['userType'] = entity.userType; + data['sex'] = entity.sex; + data['level'] = entity.level; + data['addressId'] = entity.addressId; + data['remark'] = entity.remark; + data['phone'] = entity.phone; + data['createTime'] = entity.createTime; + data['birth'] = entity.birth; + data['balance'] = entity.balance; + data['money'] = entity.money; + data['points'] = entity.points; + data['isBind'] = entity.isBind; + data['memberRankVo'] = entity.memberRankVo?.toJson(); + data['age'] = entity.age; + return data; +} + +extension MemberVOExtension on MemberVO { + MemberVO copyWith({ + String? vipNo, + String? nickname, + String? headimg, + bool? userType, + String? sex, + int? level, + dynamic addressId, + dynamic remark, + String? phone, + String? createTime, + String? birth, + String? balance, + String? money, + String? points, + bool? isBind, + MemberRankVo? memberRankVo, + int? age, + }) { + return MemberVO() + ..vipNo = vipNo ?? this.vipNo + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..userType = userType ?? this.userType + ..sex = sex ?? this.sex + ..level = level ?? this.level + ..addressId = addressId ?? this.addressId + ..remark = remark ?? this.remark + ..phone = phone ?? this.phone + ..createTime = createTime ?? this.createTime + ..birth = birth ?? this.birth + ..balance = balance ?? this.balance + ..money = money ?? this.money + ..points = points ?? this.points + ..isBind = isBind ?? this.isBind + ..memberRankVo = memberRankVo ?? this.memberRankVo + ..age = age ?? this.age; + } +} + +MemberRankVo $MemberRankVoFromJson(Map json) { + final MemberRankVo memberRankVo = MemberRankVo(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + memberRankVo.id = id; + } + final String? rankName = jsonConvert.convert(json['rankName']); + if (rankName != null) { + memberRankVo.rankName = rankName; + } + final int? rankOrigin = jsonConvert.convert(json['rankOrigin']); + if (rankOrigin != null) { + memberRankVo.rankOrigin = rankOrigin; + } + final String? rankContent = jsonConvert.convert(json['rankContent']); + if (rankContent != null) { + memberRankVo.rankContent = rankContent; + } + final String? rankImg = jsonConvert.convert(json['rankImg']); + if (rankImg != null) { + memberRankVo.rankImg = rankImg; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + memberRankVo.status = status; + } + final String? nextId = jsonConvert.convert(json['nextId']); + if (nextId != null) { + memberRankVo.nextId = nextId; + } + final String? nextName = jsonConvert.convert(json['nextName']); + if (nextName != null) { + memberRankVo.nextName = nextName; + } + final dynamic nextOrigin = json['nextOrigin']; + if (nextOrigin != null) { + memberRankVo.nextOrigin = nextOrigin; + } + return memberRankVo; +} + +Map $MemberRankVoToJson(MemberRankVo entity) { + final Map data = {}; + data['id'] = entity.id; + data['rankName'] = entity.rankName; + data['rankOrigin'] = entity.rankOrigin; + data['rankContent'] = entity.rankContent; + data['rankImg'] = entity.rankImg; + data['status'] = entity.status; + data['nextId'] = entity.nextId; + data['nextName'] = entity.nextName; + data['nextOrigin'] = entity.nextOrigin; + return data; +} + +extension MemberRankVoExtension on MemberRankVo { + MemberRankVo copyWith({ + String? id, + String? rankName, + int? rankOrigin, + String? rankContent, + String? rankImg, + bool? status, + String? nextId, + String? nextName, + dynamic nextOrigin, + }) { + return MemberRankVo() + ..id = id ?? this.id + ..rankName = rankName ?? this.rankName + ..rankOrigin = rankOrigin ?? this.rankOrigin + ..rankContent = rankContent ?? this.rankContent + ..rankImg = rankImg ?? this.rankImg + ..status = status ?? this.status + ..nextId = nextId ?? this.nextId + ..nextName = nextName ?? this.nextName + ..nextOrigin = nextOrigin ?? this.nextOrigin; + } +} \ No newline at end of file diff --git a/lib/generated/json/mini.g.dart b/lib/generated/json/mini.g.dart new file mode 100644 index 00000000..c4330c04 --- /dev/null +++ b/lib/generated/json/mini.g.dart @@ -0,0 +1,41 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/mini.dart'; + +Mini $MiniFromJson(Map json) { + final Mini mini = Mini(); + final String? miniDownloadUrl = jsonConvert.convert( + json['miniDownloadUrl']); + if (miniDownloadUrl != null) { + mini.miniDownloadUrl = miniDownloadUrl; + } + final String? miniVersion = jsonConvert.convert(json['miniVersion']); + if (miniVersion != null) { + mini.miniVersion = miniVersion; + } + final String? miniAppId = jsonConvert.convert(json['miniAppId']); + if (miniAppId != null) { + mini.miniAppId = miniAppId; + } + return mini; +} + +Map $MiniToJson(Mini entity) { + final Map data = {}; + data['miniDownloadUrl'] = entity.miniDownloadUrl; + data['miniVersion'] = entity.miniVersion; + data['miniAppId'] = entity.miniAppId; + return data; +} + +extension MiniExtension on Mini { + Mini copyWith({ + String? miniDownloadUrl, + String? miniVersion, + String? miniAppId, + }) { + return Mini() + ..miniDownloadUrl = miniDownloadUrl ?? this.miniDownloadUrl + ..miniVersion = miniVersion ?? this.miniVersion + ..miniAppId = miniAppId ?? this.miniAppId; + } +} \ No newline at end of file diff --git a/lib/generated/json/mini_detail.g.dart b/lib/generated/json/mini_detail.g.dart new file mode 100644 index 00000000..686f6889 --- /dev/null +++ b/lib/generated/json/mini_detail.g.dart @@ -0,0 +1,772 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/product_set_meals.dart'; + +import 'package:huixiang/data/sku_attr_list.dart'; + +import 'package:huixiang/data/subscribe_param.dart'; + + +MiniDetail $MiniDetailFromJson(Map json) { + final MiniDetail miniDetail = MiniDetail(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + miniDetail.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + miniDetail.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + miniDetail.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + miniDetail.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + miniDetail.updateUser = updateUser; + } + final String? supplierName = jsonConvert.convert( + json['supplierName']); + if (supplierName != null) { + miniDetail.supplierName = supplierName; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + miniDetail.storeId = storeId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + miniDetail.categoryId = categoryId; + } + final String? groupId = jsonConvert.convert(json['groupId']); + if (groupId != null) { + miniDetail.groupId = groupId; + } + final String? shortName = jsonConvert.convert(json['shortName']); + if (shortName != null) { + miniDetail.shortName = shortName; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + miniDetail.productName = productName; + } + final String? sellDesc = jsonConvert.convert(json['sellDesc']); + if (sellDesc != null) { + miniDetail.sellDesc = sellDesc; + } + final String? productCode = jsonConvert.convert(json['productCode']); + if (productCode != null) { + miniDetail.productCode = productCode; + } + final String? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + miniDetail.weight = weight; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + miniDetail.applyPrice = applyPrice; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + miniDetail.price = price; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + miniDetail.stock = stock; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + miniDetail.sellCount = sellCount; + } + final int? needLogistics = jsonConvert.convert(json['needLogistics']); + if (needLogistics != null) { + miniDetail.needLogistics = needLogistics; + } + final int? oversold = jsonConvert.convert(json['oversold']); + if (oversold != null) { + miniDetail.oversold = oversold; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + miniDetail.status = status; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + miniDetail.posShow = posShow; + } + final int? productType = jsonConvert.convert(json['productType']); + if (productType != null) { + miniDetail.productType = productType; + } + final int? productNumber = jsonConvert.convert(json['productNumber']); + if (productNumber != null) { + miniDetail.productNumber = productNumber; + } + final int? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + miniDetail.setMeal = setMeal; + } + final int? attrStyle = jsonConvert.convert(json['attrStyle']); + if (attrStyle != null) { + miniDetail.attrStyle = attrStyle; + } + final String? detail = jsonConvert.convert(json['detail']); + if (detail != null) { + miniDetail.detail = detail; + } + final String? details = jsonConvert.convert(json['details']); + if (details != null) { + miniDetail.details = details; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + miniDetail.isDelete = isDelete; + } + final String? printerFlag = jsonConvert.convert(json['printerFlag']); + if (printerFlag != null) { + miniDetail.printerFlag = printerFlag; + } + final String? thumbnailImg = jsonConvert.convert( + json['thumbnailImg']); + if (thumbnailImg != null) { + miniDetail.thumbnailImg = thumbnailImg; + } + final dynamic materialId = json['materialId']; + if (materialId != null) { + miniDetail.materialId = materialId; + } + final List? imgs = (json['imgs'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (imgs != null) { + miniDetail.imgs = imgs; + } + final StoreDTO? storeDTO = jsonConvert.convert(json['storeDTO']); + if (storeDTO != null) { + miniDetail.storeDTO = storeDTO; + } + final List? attrList = (json['attrList'] as List?)?.map( + (e) => jsonConvert.convert(e) as AttrList).toList(); + if (attrList != null) { + miniDetail.attrList = attrList; + } + final List< + ProductSkuVOList>? productSkuVOList = (json['productSkuVOList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductSkuVOList) + .toList(); + if (productSkuVOList != null) { + miniDetail.productSkuVOList = productSkuVOList; + } + final String? shipAddress = jsonConvert.convert(json['shipAddress']); + if (shipAddress != null) { + miniDetail.shipAddress = shipAddress; + } + final int? buyCount = jsonConvert.convert(json['buyCount']); + if (buyCount != null) { + miniDetail.buyCount = buyCount; + } + final List< + dynamic>? promotionShowVOList = (json['promotionShowVOList'] as List< + dynamic>?)?.map( + (e) => e).toList(); + if (promotionShowVOList != null) { + miniDetail.promotionShowVOList = promotionShowVOList; + } + final int? buyNum = jsonConvert.convert(json['buyNum']); + if (buyNum != null) { + miniDetail.buyNum = buyNum; + } + final dynamic productPlatterInfos = json['productPlatterInfos']; + if (productPlatterInfos != null) { + miniDetail.productPlatterInfos = productPlatterInfos; + } + final dynamic markProductNone = json['markProductNone']; + if (markProductNone != null) { + miniDetail.markProductNone = markProductNone; + } + final dynamic namePinyin = json['namePinyin']; + if (namePinyin != null) { + miniDetail.namePinyin = namePinyin; + } + final dynamic nameInitials = json['nameInitials']; + if (nameInitials != null) { + miniDetail.nameInitials = nameInitials; + } + final SubscribeParam? subscribeParam = jsonConvert.convert( + json['subscribeParam']); + if (subscribeParam != null) { + miniDetail.subscribeParam = subscribeParam; + } + return miniDetail; +} + +Map $MiniDetailToJson(MiniDetail entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['supplierName'] = entity.supplierName; + data['storeId'] = entity.storeId; + data['categoryId'] = entity.categoryId; + data['groupId'] = entity.groupId; + data['shortName'] = entity.shortName; + data['productName'] = entity.productName; + data['sellDesc'] = entity.sellDesc; + data['productCode'] = entity.productCode; + data['weight'] = entity.weight; + data['applyPrice'] = entity.applyPrice; + data['price'] = entity.price; + data['stock'] = entity.stock; + data['sellCount'] = entity.sellCount; + data['needLogistics'] = entity.needLogistics; + data['oversold'] = entity.oversold; + data['status'] = entity.status; + data['posShow'] = entity.posShow; + data['productType'] = entity.productType; + data['productNumber'] = entity.productNumber; + data['setMeal'] = entity.setMeal; + data['attrStyle'] = entity.attrStyle; + data['detail'] = entity.detail; + data['details'] = entity.details; + data['isDelete'] = entity.isDelete; + data['printerFlag'] = entity.printerFlag; + data['thumbnailImg'] = entity.thumbnailImg; + data['materialId'] = entity.materialId; + data['imgs'] = entity.imgs; + data['storeDTO'] = entity.storeDTO?.toJson(); + data['attrList'] = entity.attrList?.map((v) => v.toJson()).toList(); + data['productSkuVOList'] = + entity.productSkuVOList?.map((v) => v.toJson()).toList(); + data['shipAddress'] = entity.shipAddress; + data['buyCount'] = entity.buyCount; + data['promotionShowVOList'] = entity.promotionShowVOList; + data['buyNum'] = entity.buyNum; + data['productPlatterInfos'] = entity.productPlatterInfos; + data['markProductNone'] = entity.markProductNone; + data['namePinyin'] = entity.namePinyin; + data['nameInitials'] = entity.nameInitials; + data['subscribeParam'] = entity.subscribeParam?.toJson(); + return data; +} + +extension MiniDetailExtension on MiniDetail { + MiniDetail copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? supplierName, + String? storeId, + String? categoryId, + String? groupId, + String? shortName, + String? productName, + String? sellDesc, + String? productCode, + String? weight, + String? applyPrice, + String? price, + int? stock, + int? sellCount, + int? needLogistics, + int? oversold, + int? status, + bool? posShow, + int? productType, + int? productNumber, + int? setMeal, + int? attrStyle, + String? detail, + String? details, + int? isDelete, + String? printerFlag, + String? thumbnailImg, + dynamic materialId, + List? imgs, + StoreDTO? storeDTO, + List? attrList, + List? productSkuVOList, + String? shipAddress, + int? buyCount, + List? promotionShowVOList, + int? buyNum, + dynamic productPlatterInfos, + dynamic markProductNone, + dynamic namePinyin, + dynamic nameInitials, + SubscribeParam? subscribeParam, + }) { + return MiniDetail() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..supplierName = supplierName ?? this.supplierName + ..storeId = storeId ?? this.storeId + ..categoryId = categoryId ?? this.categoryId + ..groupId = groupId ?? this.groupId + ..shortName = shortName ?? this.shortName + ..productName = productName ?? this.productName + ..sellDesc = sellDesc ?? this.sellDesc + ..productCode = productCode ?? this.productCode + ..weight = weight ?? this.weight + ..applyPrice = applyPrice ?? this.applyPrice + ..price = price ?? this.price + ..stock = stock ?? this.stock + ..sellCount = sellCount ?? this.sellCount + ..needLogistics = needLogistics ?? this.needLogistics + ..oversold = oversold ?? this.oversold + ..status = status ?? this.status + ..posShow = posShow ?? this.posShow + ..productType = productType ?? this.productType + ..productNumber = productNumber ?? this.productNumber + ..setMeal = setMeal ?? this.setMeal + ..attrStyle = attrStyle ?? this.attrStyle + ..detail = detail ?? this.detail + ..details = details ?? this.details + ..isDelete = isDelete ?? this.isDelete + ..printerFlag = printerFlag ?? this.printerFlag + ..thumbnailImg = thumbnailImg ?? this.thumbnailImg + ..materialId = materialId ?? this.materialId + ..imgs = imgs ?? this.imgs + ..storeDTO = storeDTO ?? this.storeDTO + ..attrList = attrList ?? this.attrList + ..productSkuVOList = productSkuVOList ?? this.productSkuVOList + ..shipAddress = shipAddress ?? this.shipAddress + ..buyCount = buyCount ?? this.buyCount + ..promotionShowVOList = promotionShowVOList ?? this.promotionShowVOList + ..buyNum = buyNum ?? this.buyNum + ..productPlatterInfos = productPlatterInfos ?? this.productPlatterInfos + ..markProductNone = markProductNone ?? this.markProductNone + ..namePinyin = namePinyin ?? this.namePinyin + ..nameInitials = nameInitials ?? this.nameInitials + ..subscribeParam = subscribeParam ?? this.subscribeParam; + } +} + +StoreDTO $StoreDTOFromJson(Map json) { + final StoreDTO storeDTO = StoreDTO(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + storeDTO.id = id; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + storeDTO.storeName = storeName; + } + final String? nickName = jsonConvert.convert(json['nickName']); + if (nickName != null) { + storeDTO.nickName = nickName; + } + final String? logo = jsonConvert.convert(json['logo']); + if (logo != null) { + storeDTO.logo = logo; + } + final int? productCount = jsonConvert.convert(json['productCount']); + if (productCount != null) { + storeDTO.productCount = productCount; + } + final int? soldNum = jsonConvert.convert(json['soldNum']); + if (soldNum != null) { + storeDTO.soldNum = soldNum; + } + return storeDTO; +} + +Map $StoreDTOToJson(StoreDTO entity) { + final Map data = {}; + data['id'] = entity.id; + data['storeName'] = entity.storeName; + data['nickName'] = entity.nickName; + data['logo'] = entity.logo; + data['productCount'] = entity.productCount; + data['soldNum'] = entity.soldNum; + return data; +} + +extension StoreDTOExtension on StoreDTO { + StoreDTO copyWith({ + String? id, + String? storeName, + String? nickName, + String? logo, + int? productCount, + int? soldNum, + }) { + return StoreDTO() + ..id = id ?? this.id + ..storeName = storeName ?? this.storeName + ..nickName = nickName ?? this.nickName + ..logo = logo ?? this.logo + ..productCount = productCount ?? this.productCount + ..soldNum = soldNum ?? this.soldNum; + } +} + +AttrList $AttrListFromJson(Map json) { + final AttrList attrList = AttrList(); + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + attrList.productId = productId; + } + final String? attrName = jsonConvert.convert(json['attrName']); + if (attrName != null) { + attrList.attrName = attrName; + } + final int? sortOrder = jsonConvert.convert(json['sortOrder']); + if (sortOrder != null) { + attrList.sortOrder = sortOrder; + } + final bool? needImg = jsonConvert.convert(json['needImg']); + if (needImg != null) { + attrList.needImg = needImg; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + attrList.isDelete = isDelete; + } + final dynamic attrCode = json['attrCode']; + if (attrCode != null) { + attrList.attrCode = attrCode; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + attrList.id = id; + } + final List? attrValueList = (json['attrValueList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as AttrValueList) + .toList(); + if (attrValueList != null) { + attrList.attrValueList = attrValueList; + } + return attrList; +} + +Map $AttrListToJson(AttrList entity) { + final Map data = {}; + data['productId'] = entity.productId; + data['attrName'] = entity.attrName; + data['sortOrder'] = entity.sortOrder; + data['needImg'] = entity.needImg; + data['isDelete'] = entity.isDelete; + data['attrCode'] = entity.attrCode; + data['id'] = entity.id; + data['attrValueList'] = entity.attrValueList?.map((v) => v.toJson()).toList(); + return data; +} + +extension AttrListExtension on AttrList { + AttrList copyWith({ + String? productId, + String? attrName, + int? sortOrder, + bool? needImg, + int? isDelete, + dynamic attrCode, + String? id, + List? attrValueList, + }) { + return AttrList() + ..productId = productId ?? this.productId + ..attrName = attrName ?? this.attrName + ..sortOrder = sortOrder ?? this.sortOrder + ..needImg = needImg ?? this.needImg + ..isDelete = isDelete ?? this.isDelete + ..attrCode = attrCode ?? this.attrCode + ..id = id ?? this.id + ..attrValueList = attrValueList ?? this.attrValueList; + } +} + +AttrValueList $AttrValueListFromJson(Map json) { + final AttrValueList attrValueList = AttrValueList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + attrValueList.id = id; + } + final String? attrId = jsonConvert.convert(json['attrId']); + if (attrId != null) { + attrValueList.attrId = attrId; + } + final String? attrValue = jsonConvert.convert(json['attrValue']); + if (attrValue != null) { + attrValueList.attrValue = attrValue; + } + final String? attrName = jsonConvert.convert(json['attrName']); + if (attrName != null) { + attrValueList.attrName = attrName; + } + final String? attrValueImg = jsonConvert.convert( + json['attrValueImg']); + if (attrValueImg != null) { + attrValueList.attrValueImg = attrValueImg; + } + final dynamic sortOrder = json['sortOrder']; + if (sortOrder != null) { + attrValueList.sortOrder = sortOrder; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + attrValueList.isDelete = isDelete; + } + final dynamic attrValues = json['attr_value_list']; + if (attrValues != null) { + attrValueList.attrValues = attrValues; + } + final dynamic attrValueCode = json['attrValueCode']; + if (attrValueCode != null) { + attrValueList.attrValueCode = attrValueCode; + } + return attrValueList; +} + +Map $AttrValueListToJson(AttrValueList entity) { + final Map data = {}; + data['id'] = entity.id; + data['attrId'] = entity.attrId; + data['attrValue'] = entity.attrValue; + data['attrName'] = entity.attrName; + data['attrValueImg'] = entity.attrValueImg; + data['sortOrder'] = entity.sortOrder; + data['isDelete'] = entity.isDelete; + data['attr_value_list'] = entity.attrValues; + data['attrValueCode'] = entity.attrValueCode; + return data; +} + +extension AttrValueListExtension on AttrValueList { + AttrValueList copyWith({ + String? id, + String? attrId, + String? attrValue, + String? attrName, + String? attrValueImg, + dynamic sortOrder, + int? isDelete, + dynamic attrValues, + dynamic attrValueCode, + }) { + return AttrValueList() + ..id = id ?? this.id + ..attrId = attrId ?? this.attrId + ..attrValue = attrValue ?? this.attrValue + ..attrName = attrName ?? this.attrName + ..attrValueImg = attrValueImg ?? this.attrValueImg + ..sortOrder = sortOrder ?? this.sortOrder + ..isDelete = isDelete ?? this.isDelete + ..attrValues = attrValues ?? this.attrValues + ..attrValueCode = attrValueCode ?? this.attrValueCode; + } +} + +ProductSkuVOList $ProductSkuVOListFromJson(Map json) { + final ProductSkuVOList productSkuVOList = ProductSkuVOList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productSkuVOList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + productSkuVOList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + productSkuVOList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + productSkuVOList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + productSkuVOList.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + productSkuVOList.storeId = storeId; + } + final String? skuCode = jsonConvert.convert(json['skuCode']); + if (skuCode != null) { + productSkuVOList.skuCode = skuCode; + } + final String? skuNameStr = jsonConvert.convert(json['skuNameStr']); + if (skuNameStr != null) { + productSkuVOList.skuNameStr = skuNameStr; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + productSkuVOList.productId = productId; + } + final String? skuPrice = jsonConvert.convert(json['skuPrice']); + if (skuPrice != null) { + productSkuVOList.skuPrice = skuPrice; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + productSkuVOList.applyPrice = applyPrice; + } + final dynamic vipPrice = json['vipPrice']; + if (vipPrice != null) { + productSkuVOList.vipPrice = vipPrice; + } + final dynamic skuImg = json['skuImg']; + if (skuImg != null) { + productSkuVOList.skuImg = skuImg; + } + final int? skuStock = jsonConvert.convert(json['skuStock']); + if (skuStock != null) { + productSkuVOList.skuStock = skuStock; + } + final dynamic sort = json['sort']; + if (sort != null) { + productSkuVOList.sort = sort; + } + final String? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + productSkuVOList.setMeal = setMeal; + } + final double? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + productSkuVOList.weight = weight; + } + final double? volume = jsonConvert.convert(json['volume']); + if (volume != null) { + productSkuVOList.volume = volume; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productSkuVOList.isDelete = isDelete; + } + final dynamic material = json['material']; + if (material != null) { + productSkuVOList.material = material; + } + final dynamic version = json['version']; + if (version != null) { + productSkuVOList.version = version; + } + final dynamic skuAttrCodeDTOList = json['skuAttrCodeDTOList']; + if (skuAttrCodeDTOList != null) { + productSkuVOList.skuAttrCodeDTOList = skuAttrCodeDTOList; + } + final List? skuAttrList = (json['skuAttrList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as SkuAttrList) + .toList(); + if (skuAttrList != null) { + productSkuVOList.skuAttrList = skuAttrList; + } + final List< + ProductSetMeals>? productSetMeals = (json['productSetMeals'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductSetMeals) + .toList(); + if (productSetMeals != null) { + productSkuVOList.productSetMeals = productSetMeals; + } + final dynamic setMealDTOList = json['setMealDTOList']; + if (setMealDTOList != null) { + productSkuVOList.setMealDTOList = setMealDTOList; + } + return productSkuVOList; +} + +Map $ProductSkuVOListToJson(ProductSkuVOList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['skuCode'] = entity.skuCode; + data['skuNameStr'] = entity.skuNameStr; + data['productId'] = entity.productId; + data['skuPrice'] = entity.skuPrice; + data['applyPrice'] = entity.applyPrice; + data['vipPrice'] = entity.vipPrice; + data['skuImg'] = entity.skuImg; + data['skuStock'] = entity.skuStock; + data['sort'] = entity.sort; + data['setMeal'] = entity.setMeal; + data['weight'] = entity.weight; + data['volume'] = entity.volume; + data['isDelete'] = entity.isDelete; + data['material'] = entity.material; + data['version'] = entity.version; + data['skuAttrCodeDTOList'] = entity.skuAttrCodeDTOList; + data['skuAttrList'] = entity.skuAttrList?.map((v) => v.toJson()).toList(); + data['productSetMeals'] = + entity.productSetMeals?.map((v) => v.toJson()).toList(); + data['setMealDTOList'] = entity.setMealDTOList; + return data; +} + +extension ProductSkuVOListExtension on ProductSkuVOList { + ProductSkuVOList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? skuCode, + String? skuNameStr, + String? productId, + String? skuPrice, + String? applyPrice, + dynamic vipPrice, + dynamic skuImg, + int? skuStock, + dynamic sort, + String? setMeal, + double? weight, + double? volume, + int? isDelete, + dynamic material, + dynamic version, + dynamic skuAttrCodeDTOList, + List? skuAttrList, + List? productSetMeals, + dynamic setMealDTOList, + }) { + return ProductSkuVOList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..skuCode = skuCode ?? this.skuCode + ..skuNameStr = skuNameStr ?? this.skuNameStr + ..productId = productId ?? this.productId + ..skuPrice = skuPrice ?? this.skuPrice + ..applyPrice = applyPrice ?? this.applyPrice + ..vipPrice = vipPrice ?? this.vipPrice + ..skuImg = skuImg ?? this.skuImg + ..skuStock = skuStock ?? this.skuStock + ..sort = sort ?? this.sort + ..setMeal = setMeal ?? this.setMeal + ..weight = weight ?? this.weight + ..volume = volume ?? this.volume + ..isDelete = isDelete ?? this.isDelete + ..material = material ?? this.material + ..version = version ?? this.version + ..skuAttrCodeDTOList = skuAttrCodeDTOList ?? this.skuAttrCodeDTOList + ..skuAttrList = skuAttrList ?? this.skuAttrList + ..productSetMeals = productSetMeals ?? this.productSetMeals + ..setMealDTOList = setMealDTOList ?? this.setMealDTOList; + } +} \ No newline at end of file diff --git a/lib/generated/json/msg_stats.g.dart b/lib/generated/json/msg_stats.g.dart new file mode 100644 index 00000000..956bb199 --- /dev/null +++ b/lib/generated/json/msg_stats.g.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/msg_stats.dart'; + +MsgStats $MsgStatsFromJson(Map json) { + final MsgStats msgStats = MsgStats(); + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + msgStats.name = name; + } + final int? number = jsonConvert.convert(json['number']); + if (number != null) { + msgStats.number = number; + } + return msgStats; +} + +Map $MsgStatsToJson(MsgStats entity) { + final Map data = {}; + data['name'] = entity.name; + data['number'] = entity.number; + return data; +} + +extension MsgStatsExtension on MsgStats { + MsgStats copyWith({ + String? name, + int? number, + }) { + return MsgStats() + ..name = name ?? this.name + ..number = number ?? this.number; + } +} \ No newline at end of file diff --git a/lib/generated/json/order_info.g.dart b/lib/generated/json/order_info.g.dart new file mode 100644 index 00000000..d027ce18 --- /dev/null +++ b/lib/generated/json/order_info.g.dart @@ -0,0 +1,1084 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/order_info.dart'; +import 'package:huixiang/data/order_product_vo.dart'; + + +OrderInfo $OrderInfoFromJson(Map json) { + final OrderInfo orderInfo = OrderInfo(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + orderInfo.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + orderInfo.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + orderInfo.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + orderInfo.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + orderInfo.updateUser = updateUser; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + orderInfo.tenantCode = tenantCode; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + orderInfo.storeId = storeId; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + orderInfo.storeName = storeName; + } + final String? tableId = jsonConvert.convert(json['tableId']); + if (tableId != null) { + orderInfo.tableId = tableId; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + orderInfo.mid = mid; + } + final String? parentId = jsonConvert.convert(json['parentId']); + if (parentId != null) { + orderInfo.parentId = parentId; + } + final String? parentCode = jsonConvert.convert(json['parentCode']); + if (parentCode != null) { + orderInfo.parentCode = parentCode; + } + final String? orderCode = jsonConvert.convert(json['orderCode']); + if (orderCode != null) { + orderInfo.orderCode = orderCode; + } + final String? dayFlowCode = jsonConvert.convert(json['dayFlowCode']); + if (dayFlowCode != null) { + orderInfo.dayFlowCode = dayFlowCode; + } + final int? orderStatus = jsonConvert.convert(json['orderStatus']); + if (orderStatus != null) { + orderInfo.orderStatus = orderStatus; + } + final int? sendStatus = jsonConvert.convert(json['sendStatus']); + if (sendStatus != null) { + orderInfo.sendStatus = sendStatus; + } + final int? payStatus = jsonConvert.convert(json['payStatus']); + if (payStatus != null) { + orderInfo.payStatus = payStatus; + } + final String? memberAccount = jsonConvert.convert( + json['memberAccount']); + if (memberAccount != null) { + orderInfo.memberAccount = memberAccount; + } + final String? logisticsId = jsonConvert.convert(json['logisticsId']); + if (logisticsId != null) { + orderInfo.logisticsId = logisticsId; + } + final String? shipperCode = jsonConvert.convert(json['shipperCode']); + if (shipperCode != null) { + orderInfo.shipperCode = shipperCode; + } + final String? logisticsName = jsonConvert.convert( + json['logisticsName']); + if (logisticsName != null) { + orderInfo.logisticsName = logisticsName; + } + final String? logisticsNum = jsonConvert.convert( + json['logisticsNum']); + if (logisticsNum != null) { + orderInfo.logisticsNum = logisticsNum; + } + final dynamic logisticsCase = json['logisticsCase']; + if (logisticsCase != null) { + orderInfo.logisticsCase = logisticsCase; + } + final int? refundStatus = jsonConvert.convert(json['refundStatus']); + if (refundStatus != null) { + orderInfo.refundStatus = refundStatus; + } + final AddressExt? addressExt = jsonConvert.convert( + json['addressExt']); + if (addressExt != null) { + orderInfo.addressExt = addressExt; + } + final String? postFee = jsonConvert.convert(json['postFee']); + if (postFee != null) { + orderInfo.postFee = postFee; + } + final String? orderSum = jsonConvert.convert(json['orderSum']); + if (orderSum != null) { + orderInfo.orderSum = orderSum; + } + final String? paySum = jsonConvert.convert(json['paySum']); + if (paySum != null) { + orderInfo.paySum = paySum; + } + final String? paySumSub = jsonConvert.convert(json['paySumSub']); + if (paySumSub != null) { + orderInfo.paySumSub = paySumSub; + } + final String? accountPay = jsonConvert.convert(json['accountPay']); + if (accountPay != null) { + orderInfo.accountPay = accountPay; + } + final String? couponSubPrice = jsonConvert.convert( + json['couponSubPrice']); + if (couponSubPrice != null) { + orderInfo.couponSubPrice = couponSubPrice; + } + final String? customPrice = jsonConvert.convert(json['customPrice']); + if (customPrice != null) { + orderInfo.customPrice = customPrice; + } + final String? removeDecimal = jsonConvert.convert( + json['removeDecimal']); + if (removeDecimal != null) { + orderInfo.removeDecimal = removeDecimal; + } + final bool? isSubscribe = jsonConvert.convert(json['isSubscribe']); + if (isSubscribe != null) { + orderInfo.isSubscribe = isSubscribe; + } + final String? subcribeTime = jsonConvert.convert( + json['subcribeTime']); + if (subcribeTime != null) { + orderInfo.subcribeTime = subcribeTime; + } + final dynamic sendTime = json['sendTime']; + if (sendTime != null) { + orderInfo.sendTime = sendTime; + } + final dynamic confirmTime = json['confirmTime']; + if (confirmTime != null) { + orderInfo.confirmTime = confirmTime; + } + final dynamic returnMoneyTime = json['returnMoneyTime']; + if (returnMoneyTime != null) { + orderInfo.returnMoneyTime = returnMoneyTime; + } + final String? notes = jsonConvert.convert(json['notes']); + if (notes != null) { + orderInfo.notes = notes; + } + final dynamic prepayId = json['prepayId']; + if (prepayId != null) { + orderInfo.prepayId = prepayId; + } + final String? payTime = jsonConvert.convert(json['payTime']); + if (payTime != null) { + orderInfo.payTime = payTime; + } + final int? payChannel = jsonConvert.convert(json['payChannel']); + if (payChannel != null) { + orderInfo.payChannel = payChannel; + } + final String? payNum = jsonConvert.convert(json['payNum']); + if (payNum != null) { + orderInfo.payNum = payNum; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + orderInfo.promotionId = promotionId; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + orderInfo.couponId = couponId; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + orderInfo.isDelete = isDelete; + } + final int? isTakeOut = jsonConvert.convert(json['isTakeOut']); + if (isTakeOut != null) { + orderInfo.isTakeOut = isTakeOut; + } + final int? batch = jsonConvert.convert(json['batch']); + if (batch != null) { + orderInfo.batch = batch; + } + final String? orderDiscountPrice = jsonConvert.convert( + json['orderDiscountPrice']); + if (orderDiscountPrice != null) { + orderInfo.orderDiscountPrice = orderDiscountPrice; + } + final String? dishesDiscountPrice = jsonConvert.convert( + json['dishesDiscountPrice']); + if (dishesDiscountPrice != null) { + orderInfo.dishesDiscountPrice = dishesDiscountPrice; + } + final String? orderPercentPrice = jsonConvert.convert( + json['orderPercentPrice']); + if (orderPercentPrice != null) { + orderInfo.orderPercentPrice = orderPercentPrice; + } + final String? finalPayPrice = jsonConvert.convert( + json['finalPayPrice']); + if (finalPayPrice != null) { + orderInfo.finalPayPrice = finalPayPrice; + } + final String? activityNoPrice = jsonConvert.convert( + json['activityNoPrice']); + if (activityNoPrice != null) { + orderInfo.activityNoPrice = activityNoPrice; + } + final String? activityDiscountPrice = jsonConvert.convert( + json['activityDiscountPrice']); + if (activityDiscountPrice != null) { + orderInfo.activityDiscountPrice = activityDiscountPrice; + } + final String? benefitDiscountAmount = jsonConvert.convert( + json['benefitDiscountAmount']); + if (benefitDiscountAmount != null) { + orderInfo.benefitDiscountAmount = benefitDiscountAmount; + } + final String? totalDiscountPrice = jsonConvert.convert( + json['totalDiscountPrice']); + if (totalDiscountPrice != null) { + orderInfo.totalDiscountPrice = totalDiscountPrice; + } + final String? totalPackagingFee = jsonConvert.convert( + json['totalPackagingFee']); + if (totalPackagingFee != null) { + orderInfo.totalPackagingFee = totalPackagingFee; + } + final String? vipDiscountPrice = jsonConvert.convert( + json['vipDiscountPrice']); + if (vipDiscountPrice != null) { + orderInfo.vipDiscountPrice = vipDiscountPrice; + } + final int? orderSource = jsonConvert.convert(json['orderSource']); + if (orderSource != null) { + orderInfo.orderSource = orderSource; + } + final int? orderType = jsonConvert.convert(json['orderType']); + if (orderType != null) { + orderInfo.orderType = orderType; + } + final StoreVO? storeVO = jsonConvert.convert(json['storeVO']); + if (storeVO != null) { + orderInfo.storeVO = storeVO; + } + final OrderDetail? orderDetail = jsonConvert.convert( + json['orderDetail']); + if (orderDetail != null) { + orderInfo.orderDetail = orderDetail; + } + final List? productList = (json['productList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as OrderProductVO) + .toList(); + if (productList != null) { + orderInfo.productList = productList; + } + return orderInfo; +} + +Map $OrderInfoToJson(OrderInfo entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['tenantCode'] = entity.tenantCode; + data['storeId'] = entity.storeId; + data['storeName'] = entity.storeName; + data['tableId'] = entity.tableId; + data['mid'] = entity.mid; + data['parentId'] = entity.parentId; + data['parentCode'] = entity.parentCode; + data['orderCode'] = entity.orderCode; + data['dayFlowCode'] = entity.dayFlowCode; + data['orderStatus'] = entity.orderStatus; + data['sendStatus'] = entity.sendStatus; + data['payStatus'] = entity.payStatus; + data['memberAccount'] = entity.memberAccount; + data['logisticsId'] = entity.logisticsId; + data['shipperCode'] = entity.shipperCode; + data['logisticsName'] = entity.logisticsName; + data['logisticsNum'] = entity.logisticsNum; + data['logisticsCase'] = entity.logisticsCase; + data['refundStatus'] = entity.refundStatus; + data['addressExt'] = entity.addressExt?.toJson(); + data['postFee'] = entity.postFee; + data['orderSum'] = entity.orderSum; + data['paySum'] = entity.paySum; + data['paySumSub'] = entity.paySumSub; + data['accountPay'] = entity.accountPay; + data['couponSubPrice'] = entity.couponSubPrice; + data['customPrice'] = entity.customPrice; + data['removeDecimal'] = entity.removeDecimal; + data['isSubscribe'] = entity.isSubscribe; + data['subcribeTime'] = entity.subcribeTime; + data['sendTime'] = entity.sendTime; + data['confirmTime'] = entity.confirmTime; + data['returnMoneyTime'] = entity.returnMoneyTime; + data['notes'] = entity.notes; + data['prepayId'] = entity.prepayId; + data['payTime'] = entity.payTime; + data['payChannel'] = entity.payChannel; + data['payNum'] = entity.payNum; + data['promotionId'] = entity.promotionId; + data['couponId'] = entity.couponId; + data['isDelete'] = entity.isDelete; + data['isTakeOut'] = entity.isTakeOut; + data['batch'] = entity.batch; + data['orderDiscountPrice'] = entity.orderDiscountPrice; + data['dishesDiscountPrice'] = entity.dishesDiscountPrice; + data['orderPercentPrice'] = entity.orderPercentPrice; + data['finalPayPrice'] = entity.finalPayPrice; + data['activityNoPrice'] = entity.activityNoPrice; + data['activityDiscountPrice'] = entity.activityDiscountPrice; + data['benefitDiscountAmount'] = entity.benefitDiscountAmount; + data['totalDiscountPrice'] = entity.totalDiscountPrice; + data['totalPackagingFee'] = entity.totalPackagingFee; + data['vipDiscountPrice'] = entity.vipDiscountPrice; + data['orderSource'] = entity.orderSource; + data['orderType'] = entity.orderType; + data['storeVO'] = entity.storeVO?.toJson(); + data['orderDetail'] = entity.orderDetail?.toJson(); + data['productList'] = entity.productList?.map((v) => v.toJson()).toList(); + return data; +} + +extension OrderInfoExtension on OrderInfo { + OrderInfo copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? tenantCode, + String? storeId, + String? storeName, + String? tableId, + String? mid, + String? parentId, + String? parentCode, + String? orderCode, + String? dayFlowCode, + int? orderStatus, + int? sendStatus, + int? payStatus, + String? memberAccount, + String? logisticsId, + String? shipperCode, + String? logisticsName, + String? logisticsNum, + dynamic logisticsCase, + int? refundStatus, + AddressExt? addressExt, + String? postFee, + String? orderSum, + String? paySum, + String? paySumSub, + String? accountPay, + String? couponSubPrice, + String? customPrice, + String? removeDecimal, + bool? isSubscribe, + String? subcribeTime, + dynamic sendTime, + dynamic confirmTime, + dynamic returnMoneyTime, + String? notes, + dynamic prepayId, + String? payTime, + int? payChannel, + String? payNum, + String? promotionId, + String? couponId, + int? isDelete, + int? isTakeOut, + int? batch, + String? orderDiscountPrice, + String? dishesDiscountPrice, + String? orderPercentPrice, + String? finalPayPrice, + String? activityNoPrice, + String? activityDiscountPrice, + String? benefitDiscountAmount, + String? totalDiscountPrice, + String? totalPackagingFee, + String? vipDiscountPrice, + int? orderSource, + int? orderType, + StoreVO? storeVO, + OrderDetail? orderDetail, + List? productList, + }) { + return OrderInfo() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..tenantCode = tenantCode ?? this.tenantCode + ..storeId = storeId ?? this.storeId + ..storeName = storeName ?? this.storeName + ..tableId = tableId ?? this.tableId + ..mid = mid ?? this.mid + ..parentId = parentId ?? this.parentId + ..parentCode = parentCode ?? this.parentCode + ..orderCode = orderCode ?? this.orderCode + ..dayFlowCode = dayFlowCode ?? this.dayFlowCode + ..orderStatus = orderStatus ?? this.orderStatus + ..sendStatus = sendStatus ?? this.sendStatus + ..payStatus = payStatus ?? this.payStatus + ..memberAccount = memberAccount ?? this.memberAccount + ..logisticsId = logisticsId ?? this.logisticsId + ..shipperCode = shipperCode ?? this.shipperCode + ..logisticsName = logisticsName ?? this.logisticsName + ..logisticsNum = logisticsNum ?? this.logisticsNum + ..logisticsCase = logisticsCase ?? this.logisticsCase + ..refundStatus = refundStatus ?? this.refundStatus + ..addressExt = addressExt ?? this.addressExt + ..postFee = postFee ?? this.postFee + ..orderSum = orderSum ?? this.orderSum + ..paySum = paySum ?? this.paySum + ..paySumSub = paySumSub ?? this.paySumSub + ..accountPay = accountPay ?? this.accountPay + ..couponSubPrice = couponSubPrice ?? this.couponSubPrice + ..customPrice = customPrice ?? this.customPrice + ..removeDecimal = removeDecimal ?? this.removeDecimal + ..isSubscribe = isSubscribe ?? this.isSubscribe + ..subcribeTime = subcribeTime ?? this.subcribeTime + ..sendTime = sendTime ?? this.sendTime + ..confirmTime = confirmTime ?? this.confirmTime + ..returnMoneyTime = returnMoneyTime ?? this.returnMoneyTime + ..notes = notes ?? this.notes + ..prepayId = prepayId ?? this.prepayId + ..payTime = payTime ?? this.payTime + ..payChannel = payChannel ?? this.payChannel + ..payNum = payNum ?? this.payNum + ..promotionId = promotionId ?? this.promotionId + ..couponId = couponId ?? this.couponId + ..isDelete = isDelete ?? this.isDelete + ..isTakeOut = isTakeOut ?? this.isTakeOut + ..batch = batch ?? this.batch + ..orderDiscountPrice = orderDiscountPrice ?? this.orderDiscountPrice + ..dishesDiscountPrice = dishesDiscountPrice ?? this.dishesDiscountPrice + ..orderPercentPrice = orderPercentPrice ?? this.orderPercentPrice + ..finalPayPrice = finalPayPrice ?? this.finalPayPrice + ..activityNoPrice = activityNoPrice ?? this.activityNoPrice + ..activityDiscountPrice = activityDiscountPrice ?? + this.activityDiscountPrice + ..benefitDiscountAmount = benefitDiscountAmount ?? + this.benefitDiscountAmount + ..totalDiscountPrice = totalDiscountPrice ?? this.totalDiscountPrice + ..totalPackagingFee = totalPackagingFee ?? this.totalPackagingFee + ..vipDiscountPrice = vipDiscountPrice ?? this.vipDiscountPrice + ..orderSource = orderSource ?? this.orderSource + ..orderType = orderType ?? this.orderType + ..storeVO = storeVO ?? this.storeVO + ..orderDetail = orderDetail ?? this.orderDetail + ..productList = productList ?? this.productList; + } +} + +AddressExt $AddressExtFromJson(Map json) { + final AddressExt addressExt = AddressExt(); + final dynamic addressId = json['addressId']; + if (addressId != null) { + addressExt.addressId = addressId; + } + final dynamic country = json['country']; + if (country != null) { + addressExt.country = country; + } + final dynamic countryId = json['countryId']; + if (countryId != null) { + addressExt.countryId = countryId; + } + final String? province = jsonConvert.convert(json['province']); + if (province != null) { + addressExt.province = province; + } + final dynamic provinceId = json['provinceId']; + if (provinceId != null) { + addressExt.provinceId = provinceId; + } + final String? city = jsonConvert.convert(json['city']); + if (city != null) { + addressExt.city = city; + } + final dynamic cityId = json['cityId']; + if (cityId != null) { + addressExt.cityId = cityId; + } + final String? district = jsonConvert.convert(json['district']); + if (district != null) { + addressExt.district = district; + } + final dynamic districtId = json['districtId']; + if (districtId != null) { + addressExt.districtId = districtId; + } + final String? address = jsonConvert.convert(json['address']); + if (address != null) { + addressExt.address = address; + } + final dynamic recName = json['recName']; + if (recName != null) { + addressExt.recName = recName; + } + final dynamic recMobile = json['recMobile']; + if (recMobile != null) { + addressExt.recMobile = recMobile; + } + final String? longitude = jsonConvert.convert(json['longitude']); + if (longitude != null) { + addressExt.longitude = longitude; + } + final String? latitude = jsonConvert.convert(json['latitude']); + if (latitude != null) { + addressExt.latitude = latitude; + } + return addressExt; +} + +Map $AddressExtToJson(AddressExt entity) { + final Map data = {}; + data['addressId'] = entity.addressId; + data['country'] = entity.country; + data['countryId'] = entity.countryId; + data['province'] = entity.province; + data['provinceId'] = entity.provinceId; + data['city'] = entity.city; + data['cityId'] = entity.cityId; + data['district'] = entity.district; + data['districtId'] = entity.districtId; + data['address'] = entity.address; + data['recName'] = entity.recName; + data['recMobile'] = entity.recMobile; + data['longitude'] = entity.longitude; + data['latitude'] = entity.latitude; + return data; +} + +extension AddressExtExtension on AddressExt { + AddressExt copyWith({ + dynamic addressId, + dynamic country, + dynamic countryId, + String? province, + dynamic provinceId, + String? city, + dynamic cityId, + String? district, + dynamic districtId, + String? address, + dynamic recName, + dynamic recMobile, + String? longitude, + String? latitude, + }) { + return AddressExt() + ..addressId = addressId ?? this.addressId + ..country = country ?? this.country + ..countryId = countryId ?? this.countryId + ..province = province ?? this.province + ..provinceId = provinceId ?? this.provinceId + ..city = city ?? this.city + ..cityId = cityId ?? this.cityId + ..district = district ?? this.district + ..districtId = districtId ?? this.districtId + ..address = address ?? this.address + ..recName = recName ?? this.recName + ..recMobile = recMobile ?? this.recMobile + ..longitude = longitude ?? this.longitude + ..latitude = latitude ?? this.latitude; + } +} + +StoreVO $StoreVOFromJson(Map json) { + final StoreVO storeVO = StoreVO(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + storeVO.id = id; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + storeVO.storeName = storeName; + } + final String? nickName = jsonConvert.convert(json['nickName']); + if (nickName != null) { + storeVO.nickName = nickName; + } + final String? businessService = jsonConvert.convert( + json['businessService']); + if (businessService != null) { + storeVO.businessService = businessService; + } + final String? businessType = jsonConvert.convert( + json['businessType']); + if (businessType != null) { + storeVO.businessType = businessType; + } + final String? logo = jsonConvert.convert(json['logo']); + if (logo != null) { + storeVO.logo = logo; + } + final String? openStartTime = jsonConvert.convert( + json['openStartTime']); + if (openStartTime != null) { + storeVO.openStartTime = openStartTime; + } + final String? openEndTime = jsonConvert.convert(json['openEndTime']); + if (openEndTime != null) { + storeVO.openEndTime = openEndTime; + } + final String? shipAddress = jsonConvert.convert(json['shipAddress']); + if (shipAddress != null) { + storeVO.shipAddress = shipAddress; + } + final dynamic remark = json['remark']; + if (remark != null) { + storeVO.remark = remark; + } + final String? mobile = jsonConvert.convert(json['mobile']); + if (mobile != null) { + storeVO.mobile = mobile; + } + final dynamic refundAddress = json['refundAddress']; + if (refundAddress != null) { + storeVO.refundAddress = refundAddress; + } + final dynamic refundTel = json['refundTel']; + if (refundTel != null) { + storeVO.refundTel = refundTel; + } + final dynamic refundContact = json['refundContact']; + if (refundContact != null) { + storeVO.refundContact = refundContact; + } + final int? isAutoSendRefundAddress = jsonConvert.convert( + json['isAutoSendRefundAddress']); + if (isAutoSendRefundAddress != null) { + storeVO.isAutoSendRefundAddress = isAutoSendRefundAddress; + } + final dynamic soldNum = json['soldNum']; + if (soldNum != null) { + storeVO.soldNum = soldNum; + } + final dynamic storeTemplateConfig = json['storeTemplateConfig']; + if (storeTemplateConfig != null) { + storeVO.storeTemplateConfig = storeTemplateConfig; + } + final dynamic storeTable = json['storeTable']; + if (storeTable != null) { + storeVO.storeTable = storeTable; + } + final dynamic threshold = json['threshold']; + if (threshold != null) { + storeVO.threshold = threshold; + } + final dynamic freePostAge = json['freePostAge']; + if (freePostAge != null) { + storeVO.freePostAge = freePostAge; + } + final dynamic logisticsThreshold = json['logisticsThreshold']; + if (logisticsThreshold != null) { + storeVO.logisticsThreshold = logisticsThreshold; + } + final dynamic logisticsFreePostAge = json['logisticsFreePostAge']; + if (logisticsFreePostAge != null) { + storeVO.logisticsFreePostAge = logisticsFreePostAge; + } + final String? longitude = jsonConvert.convert(json['longitude']); + if (longitude != null) { + storeVO.longitude = longitude; + } + final String? latitude = jsonConvert.convert(json['latitude']); + if (latitude != null) { + storeVO.latitude = latitude; + } + final dynamic deliveryDistance = json['deliveryDistance']; + if (deliveryDistance != null) { + storeVO.deliveryDistance = deliveryDistance; + } + final dynamic couponVO = json['couponVO']; + if (couponVO != null) { + storeVO.couponVO = couponVO; + } + final StoreVOPosType? posType = jsonConvert.convert( + json['posType']); + if (posType != null) { + storeVO.posType = posType; + } + final dynamic banners = json['banners']; + if (banners != null) { + storeVO.banners = banners; + } + final dynamic tips = json['tips']; + if (tips != null) { + storeVO.tips = tips; + } + final dynamic storeBrandImg = json['storeBrandImg']; + if (storeBrandImg != null) { + storeVO.storeBrandImg = storeBrandImg; + } + final dynamic defaultPostAge = json['defaultPostAge']; + if (defaultPostAge != null) { + storeVO.defaultPostAge = defaultPostAge; + } + return storeVO; +} + +Map $StoreVOToJson(StoreVO entity) { + final Map data = {}; + data['id'] = entity.id; + data['storeName'] = entity.storeName; + data['nickName'] = entity.nickName; + data['businessService'] = entity.businessService; + data['businessType'] = entity.businessType; + data['logo'] = entity.logo; + data['openStartTime'] = entity.openStartTime; + data['openEndTime'] = entity.openEndTime; + data['shipAddress'] = entity.shipAddress; + data['remark'] = entity.remark; + data['mobile'] = entity.mobile; + data['refundAddress'] = entity.refundAddress; + data['refundTel'] = entity.refundTel; + data['refundContact'] = entity.refundContact; + data['isAutoSendRefundAddress'] = entity.isAutoSendRefundAddress; + data['soldNum'] = entity.soldNum; + data['storeTemplateConfig'] = entity.storeTemplateConfig; + data['storeTable'] = entity.storeTable; + data['threshold'] = entity.threshold; + data['freePostAge'] = entity.freePostAge; + data['logisticsThreshold'] = entity.logisticsThreshold; + data['logisticsFreePostAge'] = entity.logisticsFreePostAge; + data['longitude'] = entity.longitude; + data['latitude'] = entity.latitude; + data['deliveryDistance'] = entity.deliveryDistance; + data['couponVO'] = entity.couponVO; + data['posType'] = entity.posType?.toJson(); + data['banners'] = entity.banners; + data['tips'] = entity.tips; + data['storeBrandImg'] = entity.storeBrandImg; + data['defaultPostAge'] = entity.defaultPostAge; + return data; +} + +extension StoreVOExtension on StoreVO { + StoreVO copyWith({ + String? id, + String? storeName, + String? nickName, + String? businessService, + String? businessType, + String? logo, + String? openStartTime, + String? openEndTime, + String? shipAddress, + dynamic remark, + String? mobile, + dynamic refundAddress, + dynamic refundTel, + dynamic refundContact, + int? isAutoSendRefundAddress, + dynamic soldNum, + dynamic storeTemplateConfig, + dynamic storeTable, + dynamic threshold, + dynamic freePostAge, + dynamic logisticsThreshold, + dynamic logisticsFreePostAge, + String? longitude, + String? latitude, + dynamic deliveryDistance, + dynamic couponVO, + StoreVOPosType? posType, + dynamic banners, + dynamic tips, + dynamic storeBrandImg, + dynamic defaultPostAge, + }) { + return StoreVO() + ..id = id ?? this.id + ..storeName = storeName ?? this.storeName + ..nickName = nickName ?? this.nickName + ..businessService = businessService ?? this.businessService + ..businessType = businessType ?? this.businessType + ..logo = logo ?? this.logo + ..openStartTime = openStartTime ?? this.openStartTime + ..openEndTime = openEndTime ?? this.openEndTime + ..shipAddress = shipAddress ?? this.shipAddress + ..remark = remark ?? this.remark + ..mobile = mobile ?? this.mobile + ..refundAddress = refundAddress ?? this.refundAddress + ..refundTel = refundTel ?? this.refundTel + ..refundContact = refundContact ?? this.refundContact + ..isAutoSendRefundAddress = isAutoSendRefundAddress ?? + this.isAutoSendRefundAddress + ..soldNum = soldNum ?? this.soldNum + ..storeTemplateConfig = storeTemplateConfig ?? this.storeTemplateConfig + ..storeTable = storeTable ?? this.storeTable + ..threshold = threshold ?? this.threshold + ..freePostAge = freePostAge ?? this.freePostAge + ..logisticsThreshold = logisticsThreshold ?? this.logisticsThreshold + ..logisticsFreePostAge = logisticsFreePostAge ?? this.logisticsFreePostAge + ..longitude = longitude ?? this.longitude + ..latitude = latitude ?? this.latitude + ..deliveryDistance = deliveryDistance ?? this.deliveryDistance + ..couponVO = couponVO ?? this.couponVO + ..posType = posType ?? this.posType + ..banners = banners ?? this.banners + ..tips = tips ?? this.tips + ..storeBrandImg = storeBrandImg ?? this.storeBrandImg + ..defaultPostAge = defaultPostAge ?? this.defaultPostAge; + } +} + +StoreVOPosType $StoreVOPosTypeFromJson(Map json) { + final StoreVOPosType storeVOPosType = StoreVOPosType(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + storeVOPosType.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + storeVOPosType.code = code; + } + return storeVOPosType; +} + +Map $StoreVOPosTypeToJson(StoreVOPosType entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension StoreVOPosTypeExtension on StoreVOPosType { + StoreVOPosType copyWith({ + String? desc, + String? code, + }) { + return StoreVOPosType() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} + +OrderDetail $OrderDetailFromJson(Map json) { + final OrderDetail orderDetail = OrderDetail(); + final List< + OrderProductVO>? orderProductList = (json['orderProductList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as OrderProductVO) + .toList(); + if (orderProductList != null) { + orderDetail.orderProductList = orderProductList; + } + final dynamic discountName = json['discountName']; + if (discountName != null) { + orderDetail.discountName = discountName; + } + final dynamic discountMoney = json['discountMoney']; + if (discountMoney != null) { + orderDetail.discountMoney = discountMoney; + } + final dynamic discountNumber = json['discountNumber']; + if (discountNumber != null) { + orderDetail.discountNumber = discountNumber; + } + final dynamic activityName = json['activityName']; + if (activityName != null) { + orderDetail.activityName = activityName; + } + final dynamic couponDTO = json['couponDTO']; + if (couponDTO != null) { + orderDetail.couponDTO = couponDTO; + } + final String? orderSumPrice = jsonConvert.convert( + json['orderSumPrice']); + if (orderSumPrice != null) { + orderDetail.orderSumPrice = orderSumPrice; + } + final String? paySumPrice = jsonConvert.convert(json['paySumPrice']); + if (paySumPrice != null) { + orderDetail.paySumPrice = paySumPrice; + } + final String? activityNoPrice = jsonConvert.convert( + json['activityNoPrice']); + if (activityNoPrice != null) { + orderDetail.activityNoPrice = activityNoPrice; + } + final String? activityPrice = jsonConvert.convert( + json['activityPrice']); + if (activityPrice != null) { + orderDetail.activityPrice = activityPrice; + } + final List? dishesList = (json['dishesList'] as List?)?.map( + (e) => e).toList(); + if (dishesList != null) { + orderDetail.dishesList = dishesList; + } + final String? customPrice = jsonConvert.convert(json['customPrice']); + if (customPrice != null) { + orderDetail.customPrice = customPrice; + } + final String? nextPerson = jsonConvert.convert(json['nextPerson']); + if (nextPerson != null) { + orderDetail.nextPerson = nextPerson; + } + final int? isTakeOut = jsonConvert.convert(json['isTakeOut']); + if (isTakeOut != null) { + orderDetail.isTakeOut = isTakeOut; + } + final dynamic memberRec = json['memberRec']; + if (memberRec != null) { + orderDetail.memberRec = memberRec; + } + final dynamic isSubscribe = json['isSubscribe']; + if (isSubscribe != null) { + orderDetail.isSubscribe = isSubscribe; + } + final dynamic subcribeTime = json['subcribeTime']; + if (subcribeTime != null) { + orderDetail.subcribeTime = subcribeTime; + } + final String? postFee = jsonConvert.convert(json['postFee']); + if (postFee != null) { + orderDetail.postFee = postFee; + } + final String? shipperCode = jsonConvert.convert(json['shipperCode']); + if (shipperCode != null) { + orderDetail.shipperCode = shipperCode; + } + final String? logisticsName = jsonConvert.convert( + json['logisticsName']); + if (logisticsName != null) { + orderDetail.logisticsName = logisticsName; + } + final String? logisticsNum = jsonConvert.convert( + json['logisticsNum']); + if (logisticsNum != null) { + orderDetail.logisticsNum = logisticsNum; + } + final String? promotionName = jsonConvert.convert( + json['promotionName']); + if (promotionName != null) { + orderDetail.promotionName = promotionName; + } + final int? orderNum = jsonConvert.convert(json['orderNum']); + if (orderNum != null) { + orderDetail.orderNum = orderNum; + } + final int? productNum = jsonConvert.convert(json['productNum']); + if (productNum != null) { + orderDetail.productNum = productNum; + } + final int? mins = jsonConvert.convert(json['mins']); + if (mins != null) { + orderDetail.mins = mins; + } + final dynamic predictTime = json['predictTime']; + if (predictTime != null) { + orderDetail.predictTime = predictTime; + } + return orderDetail; +} + +Map $OrderDetailToJson(OrderDetail entity) { + final Map data = {}; + data['orderProductList'] = + entity.orderProductList?.map((v) => v.toJson()).toList(); + data['discountName'] = entity.discountName; + data['discountMoney'] = entity.discountMoney; + data['discountNumber'] = entity.discountNumber; + data['activityName'] = entity.activityName; + data['couponDTO'] = entity.couponDTO; + data['orderSumPrice'] = entity.orderSumPrice; + data['paySumPrice'] = entity.paySumPrice; + data['activityNoPrice'] = entity.activityNoPrice; + data['activityPrice'] = entity.activityPrice; + data['dishesList'] = entity.dishesList; + data['customPrice'] = entity.customPrice; + data['nextPerson'] = entity.nextPerson; + data['isTakeOut'] = entity.isTakeOut; + data['memberRec'] = entity.memberRec; + data['isSubscribe'] = entity.isSubscribe; + data['subcribeTime'] = entity.subcribeTime; + data['postFee'] = entity.postFee; + data['shipperCode'] = entity.shipperCode; + data['logisticsName'] = entity.logisticsName; + data['logisticsNum'] = entity.logisticsNum; + data['promotionName'] = entity.promotionName; + data['orderNum'] = entity.orderNum; + data['productNum'] = entity.productNum; + data['mins'] = entity.mins; + data['predictTime'] = entity.predictTime; + return data; +} + +extension OrderDetailExtension on OrderDetail { + OrderDetail copyWith({ + List? orderProductList, + dynamic discountName, + dynamic discountMoney, + dynamic discountNumber, + dynamic activityName, + dynamic couponDTO, + String? orderSumPrice, + String? paySumPrice, + String? activityNoPrice, + String? activityPrice, + List? dishesList, + String? customPrice, + String? nextPerson, + int? isTakeOut, + dynamic memberRec, + dynamic isSubscribe, + dynamic subcribeTime, + String? postFee, + String? shipperCode, + String? logisticsName, + String? logisticsNum, + String? promotionName, + int? orderNum, + int? productNum, + int? mins, + dynamic predictTime, + }) { + return OrderDetail() + ..orderProductList = orderProductList ?? this.orderProductList + ..discountName = discountName ?? this.discountName + ..discountMoney = discountMoney ?? this.discountMoney + ..discountNumber = discountNumber ?? this.discountNumber + ..activityName = activityName ?? this.activityName + ..couponDTO = couponDTO ?? this.couponDTO + ..orderSumPrice = orderSumPrice ?? this.orderSumPrice + ..paySumPrice = paySumPrice ?? this.paySumPrice + ..activityNoPrice = activityNoPrice ?? this.activityNoPrice + ..activityPrice = activityPrice ?? this.activityPrice + ..dishesList = dishesList ?? this.dishesList + ..customPrice = customPrice ?? this.customPrice + ..nextPerson = nextPerson ?? this.nextPerson + ..isTakeOut = isTakeOut ?? this.isTakeOut + ..memberRec = memberRec ?? this.memberRec + ..isSubscribe = isSubscribe ?? this.isSubscribe + ..subcribeTime = subcribeTime ?? this.subcribeTime + ..postFee = postFee ?? this.postFee + ..shipperCode = shipperCode ?? this.shipperCode + ..logisticsName = logisticsName ?? this.logisticsName + ..logisticsNum = logisticsNum ?? this.logisticsNum + ..promotionName = promotionName ?? this.promotionName + ..orderNum = orderNum ?? this.orderNum + ..productNum = productNum ?? this.productNum + ..mins = mins ?? this.mins + ..predictTime = predictTime ?? this.predictTime; + } +} \ No newline at end of file diff --git a/lib/generated/json/order_product_vo.g.dart b/lib/generated/json/order_product_vo.g.dart new file mode 100644 index 00000000..73b8fc90 --- /dev/null +++ b/lib/generated/json/order_product_vo.g.dart @@ -0,0 +1,169 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/data/act_info.dart'; + +import 'package:huixiang/data/additional_comment.dart'; + +import 'package:huixiang/data/comment.dart'; + +import 'package:huixiang/data/set_meal_data.dart'; + + +OrderProductVO $OrderProductVOFromJson(Map json) { + final OrderProductVO orderProductVO = OrderProductVO(); + final ActInfo? actInfo = jsonConvert.convert(json['actInfo']); + if (actInfo != null) { + orderProductVO.actInfo = actInfo; + } + final AdditionalComment? additionalComment = jsonConvert.convert< + AdditionalComment>(json['additionalComment']); + if (additionalComment != null) { + orderProductVO.additionalComment = additionalComment; + } + final int? buyNum = jsonConvert.convert(json['buyNum']); + if (buyNum != null) { + orderProductVO.buyNum = buyNum; + } + final String? canApplyIntervention = jsonConvert.convert( + json['canApplyIntervention']); + if (canApplyIntervention != null) { + orderProductVO.canApplyIntervention = canApplyIntervention; + } + final Comment? comment = jsonConvert.convert(json['comment']); + if (comment != null) { + orderProductVO.comment = comment; + } + final String? commentStatus = jsonConvert.convert( + json['commentStatus']); + if (commentStatus != null) { + orderProductVO.commentStatus = commentStatus; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + orderProductVO.discountAmount = discountAmount; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + orderProductVO.id = id; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + orderProductVO.productId = productId; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + orderProductVO.productName = productName; + } + final String? returnCode = jsonConvert.convert(json['returnCode']); + if (returnCode != null) { + orderProductVO.returnCode = returnCode; + } + final String? returnStatus = jsonConvert.convert( + json['returnStatus']); + if (returnStatus != null) { + orderProductVO.returnStatus = returnStatus; + } + final String? returnType = jsonConvert.convert(json['returnType']); + if (returnType != null) { + orderProductVO.returnType = returnType; + } + final String? sellPrice = jsonConvert.convert(json['sellPrice']); + if (sellPrice != null) { + orderProductVO.sellPrice = sellPrice; + } + final String? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + orderProductVO.skuId = skuId; + } + final String? skuImg = jsonConvert.convert(json['skuImg']); + if (skuImg != null) { + orderProductVO.skuImg = skuImg; + } + final String? skuNameStr = jsonConvert.convert(json['skuNameStr']); + if (skuNameStr != null) { + orderProductVO.skuNameStr = skuNameStr; + } + final List? setMealDataList = (json['setMealDataList'] as List< + dynamic>?)?.map( + (e) => jsonConvert.convert(e) as SetMealData).toList(); + if (setMealDataList != null) { + orderProductVO.setMealDataList = setMealDataList; + } + final String? packagingFee = jsonConvert.convert( + json['packagingFee']); + if (packagingFee != null) { + orderProductVO.packagingFee = packagingFee; + } + return orderProductVO; +} + +Map $OrderProductVOToJson(OrderProductVO entity) { + final Map data = {}; + data['actInfo'] = entity.actInfo?.toJson(); + data['additionalComment'] = entity.additionalComment?.toJson(); + data['buyNum'] = entity.buyNum; + data['canApplyIntervention'] = entity.canApplyIntervention; + data['comment'] = entity.comment?.toJson(); + data['commentStatus'] = entity.commentStatus; + data['discountAmount'] = entity.discountAmount; + data['id'] = entity.id; + data['productId'] = entity.productId; + data['productName'] = entity.productName; + data['returnCode'] = entity.returnCode; + data['returnStatus'] = entity.returnStatus; + data['returnType'] = entity.returnType; + data['sellPrice'] = entity.sellPrice; + data['skuId'] = entity.skuId; + data['skuImg'] = entity.skuImg; + data['skuNameStr'] = entity.skuNameStr; + data['setMealDataList'] = + entity.setMealDataList?.map((v) => v.toJson()).toList(); + data['packagingFee'] = entity.packagingFee; + return data; +} + +extension OrderProductVOExtension on OrderProductVO { + OrderProductVO copyWith({ + ActInfo? actInfo, + AdditionalComment? additionalComment, + int? buyNum, + String? canApplyIntervention, + Comment? comment, + String? commentStatus, + String? discountAmount, + String? id, + String? productId, + String? productName, + String? returnCode, + String? returnStatus, + String? returnType, + String? sellPrice, + String? skuId, + String? skuImg, + String? skuNameStr, + List? setMealDataList, + String? packagingFee, + }) { + return OrderProductVO() + ..actInfo = actInfo ?? this.actInfo + ..additionalComment = additionalComment ?? this.additionalComment + ..buyNum = buyNum ?? this.buyNum + ..canApplyIntervention = canApplyIntervention ?? this.canApplyIntervention + ..comment = comment ?? this.comment + ..commentStatus = commentStatus ?? this.commentStatus + ..discountAmount = discountAmount ?? this.discountAmount + ..id = id ?? this.id + ..productId = productId ?? this.productId + ..productName = productName ?? this.productName + ..returnCode = returnCode ?? this.returnCode + ..returnStatus = returnStatus ?? this.returnStatus + ..returnType = returnType ?? this.returnType + ..sellPrice = sellPrice ?? this.sellPrice + ..skuId = skuId ?? this.skuId + ..skuImg = skuImg ?? this.skuImg + ..skuNameStr = skuNameStr ?? this.skuNameStr + ..setMealDataList = setMealDataList ?? this.setMealDataList + ..packagingFee = packagingFee ?? this.packagingFee; + } +} \ No newline at end of file diff --git a/lib/generated/json/order_trend.g.dart b/lib/generated/json/order_trend.g.dart new file mode 100644 index 00000000..ddc5925b --- /dev/null +++ b/lib/generated/json/order_trend.g.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/order_trend.dart'; + +OrderTrend $OrderTrendFromJson(Map json) { + final OrderTrend orderTrend = OrderTrend(); + final String? date = jsonConvert.convert(json['date']); + if (date != null) { + orderTrend.date = date; + } + final int? number = jsonConvert.convert(json['number']); + if (number != null) { + orderTrend.number = number; + } + return orderTrend; +} + +Map $OrderTrendToJson(OrderTrend entity) { + final Map data = {}; + data['date'] = entity.date; + data['number'] = entity.number; + return data; +} + +extension OrderTrendExtension on OrderTrend { + OrderTrend copyWith({ + String? date, + int? number, + }) { + return OrderTrend() + ..date = date ?? this.date + ..number = number ?? this.number; + } +} \ No newline at end of file diff --git a/lib/generated/json/order_user_detail.g.dart b/lib/generated/json/order_user_detail.g.dart new file mode 100644 index 00000000..ef034bad --- /dev/null +++ b/lib/generated/json/order_user_detail.g.dart @@ -0,0 +1,245 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/order_user_detail.dart'; + +OrderUserDetail $OrderUserDetailFromJson(Map json) { + final OrderUserDetail orderUserDetail = OrderUserDetail(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + orderUserDetail.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + orderUserDetail.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + orderUserDetail.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + orderUserDetail.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + orderUserDetail.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + orderUserDetail.mid = mid; + } + final String? masterId = jsonConvert.convert(json['masterId']); + if (masterId != null) { + orderUserDetail.masterId = masterId; + } + final String? openid = jsonConvert.convert(json['openid']); + if (openid != null) { + orderUserDetail.openid = openid; + } + final dynamic aliOpenid = json['aliOpenid']; + if (aliOpenid != null) { + orderUserDetail.aliOpenid = aliOpenid; + } + final dynamic douyinOpenid = json['douyinOpenid']; + if (douyinOpenid != null) { + orderUserDetail.douyinOpenid = douyinOpenid; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + orderUserDetail.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + orderUserDetail.headimg = headimg; + } + final String? rankId = jsonConvert.convert(json['rankId']); + if (rankId != null) { + orderUserDetail.rankId = rankId; + } + final dynamic rankExpireTime = json['rankExpireTime']; + if (rankExpireTime != null) { + orderUserDetail.rankExpireTime = rankExpireTime; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + orderUserDetail.balance = balance; + } + final String? realRecharge = jsonConvert.convert( + json['realRecharge']); + if (realRecharge != null) { + orderUserDetail.realRecharge = realRecharge; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + orderUserDetail.sex = sex; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + orderUserDetail.status = status; + } + final bool? onCredit = jsonConvert.convert(json['onCredit']); + if (onCredit != null) { + orderUserDetail.onCredit = onCredit; + } + final String? loginTime = jsonConvert.convert(json['loginTime']); + if (loginTime != null) { + orderUserDetail.loginTime = loginTime; + } + final int? loginNum = jsonConvert.convert(json['loginNum']); + if (loginNum != null) { + orderUserDetail.loginNum = loginNum; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + orderUserDetail.tenantCode = tenantCode; + } + final int? source = jsonConvert.convert(json['source']); + if (source != null) { + orderUserDetail.source = source; + } + final String? expendAmount = jsonConvert.convert( + json['expendAmount']); + if (expendAmount != null) { + orderUserDetail.expendAmount = expendAmount; + } + final int? buyTimes = jsonConvert.convert(json['buyTimes']); + if (buyTimes != null) { + orderUserDetail.buyTimes = buyTimes; + } + final String? lastBuyTime = jsonConvert.convert(json['lastBuyTime']); + if (lastBuyTime != null) { + orderUserDetail.lastBuyTime = lastBuyTime; + } + final dynamic vipNo = json['vip_no']; + if (vipNo != null) { + orderUserDetail.vipNo = vipNo; + } + final String? expireTime = jsonConvert.convert(json['expireTime']); + if (expireTime != null) { + orderUserDetail.expireTime = expireTime; + } + final int? integral = jsonConvert.convert(json['integral']); + if (integral != null) { + orderUserDetail.integral = integral; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + orderUserDetail.level = level; + } + final dynamic vipRegStore = json['vipRegStore']; + if (vipRegStore != null) { + orderUserDetail.vipRegStore = vipRegStore; + } + final bool? certification = jsonConvert.convert(json['certification']); + if (certification != null) { + orderUserDetail.certification = certification; + } + return orderUserDetail; +} + +Map $OrderUserDetailToJson(OrderUserDetail entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['masterId'] = entity.masterId; + data['openid'] = entity.openid; + data['aliOpenid'] = entity.aliOpenid; + data['douyinOpenid'] = entity.douyinOpenid; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['rankId'] = entity.rankId; + data['rankExpireTime'] = entity.rankExpireTime; + data['balance'] = entity.balance; + data['realRecharge'] = entity.realRecharge; + data['sex'] = entity.sex; + data['status'] = entity.status; + data['onCredit'] = entity.onCredit; + data['loginTime'] = entity.loginTime; + data['loginNum'] = entity.loginNum; + data['tenantCode'] = entity.tenantCode; + data['source'] = entity.source; + data['expendAmount'] = entity.expendAmount; + data['buyTimes'] = entity.buyTimes; + data['lastBuyTime'] = entity.lastBuyTime; + data['vip_no'] = entity.vipNo; + data['expireTime'] = entity.expireTime; + data['integral'] = entity.integral; + data['level'] = entity.level; + data['vipRegStore'] = entity.vipRegStore; + data['certification'] = entity.certification; + return data; +} + +extension OrderUserDetailExtension on OrderUserDetail { + OrderUserDetail copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? masterId, + String? openid, + dynamic aliOpenid, + dynamic douyinOpenid, + String? nickname, + String? headimg, + String? rankId, + dynamic rankExpireTime, + String? balance, + String? realRecharge, + String? sex, + bool? status, + bool? onCredit, + String? loginTime, + int? loginNum, + String? tenantCode, + int? source, + String? expendAmount, + int? buyTimes, + String? lastBuyTime, + dynamic vipNo, + String? expireTime, + int? integral, + int? level, + dynamic vipRegStore, + bool? certification, + }) { + return OrderUserDetail() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..masterId = masterId ?? this.masterId + ..openid = openid ?? this.openid + ..aliOpenid = aliOpenid ?? this.aliOpenid + ..douyinOpenid = douyinOpenid ?? this.douyinOpenid + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..rankId = rankId ?? this.rankId + ..rankExpireTime = rankExpireTime ?? this.rankExpireTime + ..balance = balance ?? this.balance + ..realRecharge = realRecharge ?? this.realRecharge + ..sex = sex ?? this.sex + ..status = status ?? this.status + ..onCredit = onCredit ?? this.onCredit + ..loginTime = loginTime ?? this.loginTime + ..loginNum = loginNum ?? this.loginNum + ..tenantCode = tenantCode ?? this.tenantCode + ..source = source ?? this.source + ..expendAmount = expendAmount ?? this.expendAmount + ..buyTimes = buyTimes ?? this.buyTimes + ..lastBuyTime = lastBuyTime ?? this.lastBuyTime + ..vipNo = vipNo ?? this.vipNo + ..expireTime = expireTime ?? this.expireTime + ..integral = integral ?? this.integral + ..level = level ?? this.level + ..vipRegStore = vipRegStore ?? this.vipRegStore + ..certification = certification ?? this.certification; + } +} \ No newline at end of file diff --git a/lib/generated/json/page.g.dart b/lib/generated/json/page.g.dart new file mode 100644 index 00000000..df7a8e6b --- /dev/null +++ b/lib/generated/json/page.g.dart @@ -0,0 +1,94 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:json_annotation/json_annotation.dart'; + + +PageInfo $PageInfoFromJson(Map json) { + final PageInfo pageInfo = PageInfo(); + final int? pageNum = jsonConvert.convert(json['pageNum']); + if (pageNum != null) { + pageInfo.pageNum = pageNum; + } + final dynamic current = json['current']; + if (current != null) { + pageInfo.current = current; + } + final int? pageSize = jsonConvert.convert(json['pageSize']); + if (pageSize != null) { + pageInfo.pageSize = pageSize; + } + final dynamic size = json['size']; + if (size != null) { + pageInfo.size = size; + } + final dynamic pages = json['pages']; + if (pages != null) { + pageInfo.pages = pages; + } + final bool? hasPreviousPage = jsonConvert.convert( + json['hasPreviousPage']); + if (hasPreviousPage != null) { + pageInfo.hasPreviousPage = hasPreviousPage; + } + final bool? hasNextPage = jsonConvert.convert(json['hasNextPage']); + if (hasNextPage != null) { + pageInfo.hasNextPage = hasNextPage; + } + final String? total = jsonConvert.convert(json['total']); + if (total != null) { + pageInfo.total = total; + } + final List? list = (json['list'] as List?)?.map( + (e) => jsonConvert.convert(e) as D).toList(); + if (list != null) { + pageInfo.list = list; + } + final List? records = (json['records'] as List?)?.map( + (e) => jsonConvert.convert(e) as D).toList(); + if (records != null) { + pageInfo.records = records; + } + return pageInfo; +} + +Map $PageInfoToJson(PageInfo entity) { + final Map data = {}; + data['pageNum'] = entity.pageNum; + data['current'] = entity.current; + data['pageSize'] = entity.pageSize; + data['size'] = entity.size; + data['pages'] = entity.pages; + data['hasPreviousPage'] = entity.hasPreviousPage; + data['hasNextPage'] = entity.hasNextPage; + data['total'] = entity.total; + data['list'] = entity.list?.map((v) => v.toJson()).toList(); + data['records'] = entity.records?.map((v) => v.toJson()).toList(); + return data; +} + +extension PageInfoExtension on PageInfo { + PageInfo copyWith({ + int? pageNum, + dynamic current, + int? pageSize, + dynamic size, + dynamic pages, + bool? hasPreviousPage, + bool? hasNextPage, + String? total, + List? list, + List? records, + }) { + return PageInfo() + ..pageNum = pageNum ?? this.pageNum + ..current = current ?? this.current + ..pageSize = pageSize ?? this.pageSize + ..size = size ?? this.size + ..pages = pages ?? this.pages + ..hasPreviousPage = hasPreviousPage ?? this.hasPreviousPage + ..hasNextPage = hasNextPage ?? this.hasNextPage + ..total = total ?? this.total + ..list = list ?? this.list + ..records = records ?? this.records; + } +} \ No newline at end of file diff --git a/lib/generated/json/page_list.g.dart b/lib/generated/json/page_list.g.dart new file mode 100644 index 00000000..91fd1228 --- /dev/null +++ b/lib/generated/json/page_list.g.dart @@ -0,0 +1,108 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/page_list.dart'; + +PageList $PageListFromJson(Map json) { + final PageList pageList = PageList(); + final List? records = (json['records'] as List?)?.map( + (e) => jsonConvert.convert(e) as T).toList(); + if (records != null) { + pageList.records = records; + } + final String? total = jsonConvert.convert(json['total']); + if (total != null) { + pageList.total = total; + } + final String? size = jsonConvert.convert(json['size']); + if (size != null) { + pageList.size = size; + } + final String? current = jsonConvert.convert(json['current']); + if (current != null) { + pageList.current = current; + } + final List? orders = (json['orders'] as List?)?.map( + (e) => jsonConvert.convert(e) as Orders).toList(); + if (orders != null) { + pageList.orders = orders; + } + final bool? hitCount = jsonConvert.convert(json['hitCount']); + if (hitCount != null) { + pageList.hitCount = hitCount; + } + final bool? searchCount = jsonConvert.convert(json['searchCount']); + if (searchCount != null) { + pageList.searchCount = searchCount; + } + final String? pages = jsonConvert.convert(json['pages']); + if (pages != null) { + pageList.pages = pages; + } + return pageList; +} + +Map $PageListToJson(PageList entity) { + final Map data = {}; + data['records'] = entity.records?.map((v) => v.toJson()).toList(); + data['total'] = entity.total; + data['size'] = entity.size; + data['current'] = entity.current; + data['orders'] = entity.orders?.map((v) => v.toJson()).toList(); + data['hitCount'] = entity.hitCount; + data['searchCount'] = entity.searchCount; + data['pages'] = entity.pages; + return data; +} + +extension PageListExtension on PageList { + PageList copyWith({ + List? records, + String? total, + String? size, + String? current, + List? orders, + bool? hitCount, + bool? searchCount, + String? pages, + }) { + return PageList() + ..records = records ?? this.records + ..total = total ?? this.total + ..size = size ?? this.size + ..current = current ?? this.current + ..orders = orders ?? this.orders + ..hitCount = hitCount ?? this.hitCount + ..searchCount = searchCount ?? this.searchCount + ..pages = pages ?? this.pages; + } +} + +Orders $OrdersFromJson(Map json) { + final Orders orders = Orders(); + final String? column = jsonConvert.convert(json['column']); + if (column != null) { + orders.column = column; + } + final bool? asc = jsonConvert.convert(json['asc']); + if (asc != null) { + orders.asc = asc; + } + return orders; +} + +Map $OrdersToJson(Orders entity) { + final Map data = {}; + data['column'] = entity.column; + data['asc'] = entity.asc; + return data; +} + +extension OrdersExtension on Orders { + Orders copyWith({ + String? column, + bool? asc, + }) { + return Orders() + ..column = column ?? this.column + ..asc = asc ?? this.asc; + } +} \ No newline at end of file diff --git a/lib/generated/json/phone_query_member_info.g.dart b/lib/generated/json/phone_query_member_info.g.dart new file mode 100644 index 00000000..6135bf9f --- /dev/null +++ b/lib/generated/json/phone_query_member_info.g.dart @@ -0,0 +1,796 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/phone_query_member_info.dart'; + +PhoneQueryMemberInfo $PhoneQueryMemberInfoFromJson(Map json) { + final PhoneQueryMemberInfo phoneQueryMemberInfo = PhoneQueryMemberInfo(); + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + phoneQueryMemberInfo.mid = mid; + } + final String? sid = jsonConvert.convert(json['sid']); + if (sid != null) { + phoneQueryMemberInfo.sid = sid; + } + final String? phoneNum = jsonConvert.convert(json['phoneNum']); + if (phoneNum != null) { + phoneQueryMemberInfo.phoneNum = phoneNum; + } + final String? nickName = jsonConvert.convert(json['nickName']); + if (nickName != null) { + phoneQueryMemberInfo.nickName = nickName; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + phoneQueryMemberInfo.headimg = headimg; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + phoneQueryMemberInfo.sex = sex; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + phoneQueryMemberInfo.balance = balance; + } + final String? realBalance = jsonConvert.convert(json['realBalance']); + if (realBalance != null) { + phoneQueryMemberInfo.realBalance = realBalance; + } + final String? giftBalance = jsonConvert.convert(json['giftBalance']); + if (giftBalance != null) { + phoneQueryMemberInfo.giftBalance = giftBalance; + } + final bool? memberSourceCredit = jsonConvert.convert( + json['memberSourceCredit']); + if (memberSourceCredit != null) { + phoneQueryMemberInfo.memberSourceCredit = memberSourceCredit; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + phoneQueryMemberInfo.money = money; + } + final bool? memberCredit = jsonConvert.convert(json['memberCredit']); + if (memberCredit != null) { + phoneQueryMemberInfo.memberCredit = memberCredit; + } + final String? greenMoney = jsonConvert.convert(json['greenMoney']); + if (greenMoney != null) { + phoneQueryMemberInfo.greenMoney = greenMoney; + } + final String? raiseMoney = jsonConvert.convert(json['raiseMoney']); + if (raiseMoney != null) { + phoneQueryMemberInfo.raiseMoney = raiseMoney; + } + final String? payPassword = jsonConvert.convert(json['payPassword']); + if (payPassword != null) { + phoneQueryMemberInfo.payPassword = payPassword; + } + final List< + UseableConponList>? useableConponList = (json['useableConponList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as UseableConponList) + .toList(); + if (useableConponList != null) { + phoneQueryMemberInfo.useableConponList = useableConponList; + } + return phoneQueryMemberInfo; +} + +Map $PhoneQueryMemberInfoToJson(PhoneQueryMemberInfo entity) { + final Map data = {}; + data['mid'] = entity.mid; + data['sid'] = entity.sid; + data['phoneNum'] = entity.phoneNum; + data['nickName'] = entity.nickName; + data['headimg'] = entity.headimg; + data['sex'] = entity.sex; + data['balance'] = entity.balance; + data['realBalance'] = entity.realBalance; + data['giftBalance'] = entity.giftBalance; + data['memberSourceCredit'] = entity.memberSourceCredit; + data['money'] = entity.money; + data['memberCredit'] = entity.memberCredit; + data['greenMoney'] = entity.greenMoney; + data['raiseMoney'] = entity.raiseMoney; + data['payPassword'] = entity.payPassword; + data['useableConponList'] = + entity.useableConponList?.map((v) => v.toJson()).toList(); + return data; +} + +extension PhoneQueryMemberInfoExtension on PhoneQueryMemberInfo { + PhoneQueryMemberInfo copyWith({ + String? mid, + String? sid, + String? phoneNum, + String? nickName, + String? headimg, + String? sex, + String? balance, + String? realBalance, + String? giftBalance, + bool? memberSourceCredit, + String? money, + bool? memberCredit, + String? greenMoney, + String? raiseMoney, + String? payPassword, + List? useableConponList, + }) { + return PhoneQueryMemberInfo() + ..mid = mid ?? this.mid + ..sid = sid ?? this.sid + ..phoneNum = phoneNum ?? this.phoneNum + ..nickName = nickName ?? this.nickName + ..headimg = headimg ?? this.headimg + ..sex = sex ?? this.sex + ..balance = balance ?? this.balance + ..realBalance = realBalance ?? this.realBalance + ..giftBalance = giftBalance ?? this.giftBalance + ..memberSourceCredit = memberSourceCredit ?? this.memberSourceCredit + ..money = money ?? this.money + ..memberCredit = memberCredit ?? this.memberCredit + ..greenMoney = greenMoney ?? this.greenMoney + ..raiseMoney = raiseMoney ?? this.raiseMoney + ..payPassword = payPassword ?? this.payPassword + ..useableConponList = useableConponList ?? this.useableConponList; + } +} + +UseableConponList $UseableConponListFromJson(Map json) { + final UseableConponList useableConponList = UseableConponList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + useableConponList.id = id; + } + final List? storeIds = (json['storeIds'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (storeIds != null) { + useableConponList.storeIds = storeIds; + } + final List? stores = (json['stores'] as List?)?.map( + (e) => e).toList(); + if (stores != null) { + useableConponList.stores = stores; + } + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + useableConponList.bizType = bizType; + } + final String? fullType = jsonConvert.convert(json['fullType']); + if (fullType != null) { + useableConponList.fullType = fullType; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + useableConponList.fullAmount = fullAmount; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + useableConponList.discountAmount = discountAmount; + } + final int? fullNumber = jsonConvert.convert(json['fullNumber']); + if (fullNumber != null) { + useableConponList.fullNumber = fullNumber; + } + final bool? dateOrDay = jsonConvert.convert(json['dateOrDay']); + if (dateOrDay != null) { + useableConponList.dateOrDay = dateOrDay; + } + final int? startAfterDays = jsonConvert.convert(json['startAfterDays']); + if (startAfterDays != null) { + useableConponList.startAfterDays = startAfterDays; + } + final int? daysValidate = jsonConvert.convert(json['daysValidate']); + if (daysValidate != null) { + useableConponList.daysValidate = daysValidate; + } + final int? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + useableConponList.discountPercent = discountPercent; + } + final String? limitAmount = jsonConvert.convert(json['limitAmount']); + if (limitAmount != null) { + useableConponList.limitAmount = limitAmount; + } + final String? bizId = jsonConvert.convert(json['bizId']); + if (bizId != null) { + useableConponList.bizId = bizId; + } + final String? publishStartTime = jsonConvert.convert( + json['publishStartTime']); + if (publishStartTime != null) { + useableConponList.publishStartTime = publishStartTime; + } + final String? publishEndTime = jsonConvert.convert( + json['publishEndTime']); + if (publishEndTime != null) { + useableConponList.publishEndTime = publishEndTime; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + useableConponList.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + useableConponList.useEndTime = useEndTime; + } + final String? doStartTime = jsonConvert.convert(json['doStartTime']); + if (doStartTime != null) { + useableConponList.doStartTime = doStartTime; + } + final String? doEndTime = jsonConvert.convert(json['doEndTime']); + if (doEndTime != null) { + useableConponList.doEndTime = doEndTime; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + useableConponList.promotionId = promotionId; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + useableConponList.couponId = couponId; + } + final String? receiveTime = jsonConvert.convert(json['receiveTime']); + if (receiveTime != null) { + useableConponList.receiveTime = receiveTime; + } + final dynamic useTime = json['useTime']; + if (useTime != null) { + useableConponList.useTime = useTime; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + useableConponList.status = status; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + useableConponList.tenantCode = tenantCode; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + useableConponList.type = type; + } + final String? promotionName = jsonConvert.convert( + json['promotionName']); + if (promotionName != null) { + useableConponList.promotionName = promotionName; + } + final bool? usable = jsonConvert.convert(json['usable']); + if (usable != null) { + useableConponList.usable = usable; + } + final String? usableReason = jsonConvert.convert( + json['usableReason']); + if (usableReason != null) { + useableConponList.usableReason = usableReason; + } + final bool? allProduct = jsonConvert.convert(json['allProduct']); + if (allProduct != null) { + useableConponList.allProduct = allProduct; + } + final List? productSkuId = (json['productSkuId'] as List?) + ?.map( + (e) => e) + .toList(); + if (productSkuId != null) { + useableConponList.productSkuId = productSkuId; + } + final List? productGroupIds = (json['productGroupIds'] as List< + dynamic>?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (productGroupIds != null) { + useableConponList.productGroupIds = productGroupIds; + } + final List? productList = (json['productList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as ProductList) + .toList(); + if (productList != null) { + useableConponList.productList = productList; + } + final bool? isMaxCoupon = jsonConvert.convert(json['isMaxCoupon']); + if (isMaxCoupon != null) { + useableConponList.isMaxCoupon = isMaxCoupon; + } + final List? productGroupList = (json['productGroupList'] as List< + dynamic>?)?.map( + (e) => e).toList(); + if (productGroupList != null) { + useableConponList.productGroupList = productGroupList; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + useableConponList.remark = remark; + } + final bool? canUseBalance = jsonConvert.convert(json['canUseBalance']); + if (canUseBalance != null) { + useableConponList.canUseBalance = canUseBalance; + } + return useableConponList; +} + +Map $UseableConponListToJson(UseableConponList entity) { + final Map data = {}; + data['id'] = entity.id; + data['storeIds'] = entity.storeIds; + data['stores'] = entity.stores; + data['bizType'] = entity.bizType; + data['fullType'] = entity.fullType; + data['fullAmount'] = entity.fullAmount; + data['discountAmount'] = entity.discountAmount; + data['fullNumber'] = entity.fullNumber; + data['dateOrDay'] = entity.dateOrDay; + data['startAfterDays'] = entity.startAfterDays; + data['daysValidate'] = entity.daysValidate; + data['discountPercent'] = entity.discountPercent; + data['limitAmount'] = entity.limitAmount; + data['bizId'] = entity.bizId; + data['publishStartTime'] = entity.publishStartTime; + data['publishEndTime'] = entity.publishEndTime; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['doStartTime'] = entity.doStartTime; + data['doEndTime'] = entity.doEndTime; + data['promotionId'] = entity.promotionId; + data['couponId'] = entity.couponId; + data['receiveTime'] = entity.receiveTime; + data['useTime'] = entity.useTime; + data['status'] = entity.status; + data['tenantCode'] = entity.tenantCode; + data['type'] = entity.type; + data['promotionName'] = entity.promotionName; + data['usable'] = entity.usable; + data['usableReason'] = entity.usableReason; + data['allProduct'] = entity.allProduct; + data['productSkuId'] = entity.productSkuId; + data['productGroupIds'] = entity.productGroupIds; + data['productList'] = entity.productList?.map((v) => v.toJson()).toList(); + data['isMaxCoupon'] = entity.isMaxCoupon; + data['productGroupList'] = entity.productGroupList; + data['remark'] = entity.remark; + data['canUseBalance'] = entity.canUseBalance; + return data; +} + +extension UseableConponListExtension on UseableConponList { + UseableConponList copyWith({ + String? id, + List? storeIds, + List? stores, + int? bizType, + String? fullType, + String? fullAmount, + String? discountAmount, + int? fullNumber, + bool? dateOrDay, + int? startAfterDays, + int? daysValidate, + int? discountPercent, + String? limitAmount, + String? bizId, + String? publishStartTime, + String? publishEndTime, + String? useStartTime, + String? useEndTime, + String? doStartTime, + String? doEndTime, + String? promotionId, + String? couponId, + String? receiveTime, + dynamic useTime, + int? status, + String? tenantCode, + int? type, + String? promotionName, + bool? usable, + String? usableReason, + bool? allProduct, + List? productSkuId, + List? productGroupIds, + List? productList, + bool? isMaxCoupon, + List? productGroupList, + String? remark, + bool? canUseBalance, + }) { + return UseableConponList() + ..id = id ?? this.id + ..storeIds = storeIds ?? this.storeIds + ..stores = stores ?? this.stores + ..bizType = bizType ?? this.bizType + ..fullType = fullType ?? this.fullType + ..fullAmount = fullAmount ?? this.fullAmount + ..discountAmount = discountAmount ?? this.discountAmount + ..fullNumber = fullNumber ?? this.fullNumber + ..dateOrDay = dateOrDay ?? this.dateOrDay + ..startAfterDays = startAfterDays ?? this.startAfterDays + ..daysValidate = daysValidate ?? this.daysValidate + ..discountPercent = discountPercent ?? this.discountPercent + ..limitAmount = limitAmount ?? this.limitAmount + ..bizId = bizId ?? this.bizId + ..publishStartTime = publishStartTime ?? this.publishStartTime + ..publishEndTime = publishEndTime ?? this.publishEndTime + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..doStartTime = doStartTime ?? this.doStartTime + ..doEndTime = doEndTime ?? this.doEndTime + ..promotionId = promotionId ?? this.promotionId + ..couponId = couponId ?? this.couponId + ..receiveTime = receiveTime ?? this.receiveTime + ..useTime = useTime ?? this.useTime + ..status = status ?? this.status + ..tenantCode = tenantCode ?? this.tenantCode + ..type = type ?? this.type + ..promotionName = promotionName ?? this.promotionName + ..usable = usable ?? this.usable + ..usableReason = usableReason ?? this.usableReason + ..allProduct = allProduct ?? this.allProduct + ..productSkuId = productSkuId ?? this.productSkuId + ..productGroupIds = productGroupIds ?? this.productGroupIds + ..productList = productList ?? this.productList + ..isMaxCoupon = isMaxCoupon ?? this.isMaxCoupon + ..productGroupList = productGroupList ?? this.productGroupList + ..remark = remark ?? this.remark + ..canUseBalance = canUseBalance ?? this.canUseBalance; + } +} + +ProductList $ProductListFromJson(Map json) { + final ProductList productList = ProductList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + productList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + productList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + productList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + productList.updateUser = updateUser; + } + final String? supplierName = jsonConvert.convert( + json['supplierName']); + if (supplierName != null) { + productList.supplierName = supplierName; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + productList.storeId = storeId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + productList.categoryId = categoryId; + } + final String? groupId = jsonConvert.convert(json['groupId']); + if (groupId != null) { + productList.groupId = groupId; + } + final String? shortName = jsonConvert.convert(json['shortName']); + if (shortName != null) { + productList.shortName = shortName; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + productList.productName = productName; + } + final String? sellDesc = jsonConvert.convert(json['sellDesc']); + if (sellDesc != null) { + productList.sellDesc = sellDesc; + } + final dynamic attribute = json['attribute']; + if (attribute != null) { + productList.attribute = attribute; + } + final String? productCode = jsonConvert.convert(json['productCode']); + if (productCode != null) { + productList.productCode = productCode; + } + final String? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + productList.weight = weight; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + productList.applyPrice = applyPrice; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + productList.price = price; + } + final String? vipPrice = jsonConvert.convert(json['vipPrice']); + if (vipPrice != null) { + productList.vipPrice = vipPrice; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + productList.stock = stock; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + productList.sellCount = sellCount; + } + final int? needLogistics = jsonConvert.convert(json['needLogistics']); + if (needLogistics != null) { + productList.needLogistics = needLogistics; + } + final int? oversold = jsonConvert.convert(json['oversold']); + if (oversold != null) { + productList.oversold = oversold; + } + final int? organic = jsonConvert.convert(json['organic']); + if (organic != null) { + productList.organic = organic; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + productList.status = status; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + productList.posShow = posShow; + } + final dynamic subscribeParam = json['subscribeParam']; + if (subscribeParam != null) { + productList.subscribeParam = subscribeParam; + } + final bool? isRaise = jsonConvert.convert(json['isRaise']); + if (isRaise != null) { + productList.isRaise = isRaise; + } + final int? productType = jsonConvert.convert(json['productType']); + if (productType != null) { + productList.productType = productType; + } + final int? productNumber = jsonConvert.convert(json['productNumber']); + if (productNumber != null) { + productList.productNumber = productNumber; + } + final int? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + productList.setMeal = setMeal; + } + final int? attrStyle = jsonConvert.convert(json['attrStyle']); + if (attrStyle != null) { + productList.attrStyle = attrStyle; + } + final String? detail = jsonConvert.convert(json['detail']); + if (detail != null) { + productList.detail = detail; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productList.isDelete = isDelete; + } + final String? printerFlag = jsonConvert.convert(json['printerFlag']); + if (printerFlag != null) { + productList.printerFlag = printerFlag; + } + final dynamic materials = json['materials']; + if (materials != null) { + productList.materials = materials; + } + final dynamic materialId = json['materialId']; + if (materialId != null) { + productList.materialId = materialId; + } + final String? details = jsonConvert.convert(json['details']); + if (details != null) { + productList.details = details; + } + final String? thumbnailImg = jsonConvert.convert( + json['thumbnailImg']); + if (thumbnailImg != null) { + productList.thumbnailImg = thumbnailImg; + } + final String? info = jsonConvert.convert(json['info']); + if (info != null) { + productList.info = info; + } + final int? buyCount = jsonConvert.convert(json['buyCount']); + if (buyCount != null) { + productList.buyCount = buyCount; + } + final int? sellCountLimit = jsonConvert.convert(json['sellCountLimit']); + if (sellCountLimit != null) { + productList.sellCountLimit = sellCountLimit; + } + final String? stockRecoveryTime = jsonConvert.convert( + json['stockRecoveryTime']); + if (stockRecoveryTime != null) { + productList.stockRecoveryTime = stockRecoveryTime; + } + final dynamic isAddPurchase = json['isAddPurchase']; + if (isAddPurchase != null) { + productList.isAddPurchase = isAddPurchase; + } + final int? limitNum = jsonConvert.convert(json['limitNum']); + if (limitNum != null) { + productList.limitNum = limitNum; + } + final String? rankId = jsonConvert.convert(json['rankId']); + if (rankId != null) { + productList.rankId = rankId; + } + final int? happyBean = jsonConvert.convert(json['happyBean']); + if (happyBean != null) { + productList.happyBean = happyBean; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + productList.sort = sort; + } + final dynamic salesRules = json['salesRules']; + if (salesRules != null) { + productList.salesRules = salesRules; + } + return productList; +} + +Map $ProductListToJson(ProductList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['supplierName'] = entity.supplierName; + data['storeId'] = entity.storeId; + data['categoryId'] = entity.categoryId; + data['groupId'] = entity.groupId; + data['shortName'] = entity.shortName; + data['productName'] = entity.productName; + data['sellDesc'] = entity.sellDesc; + data['attribute'] = entity.attribute; + data['productCode'] = entity.productCode; + data['weight'] = entity.weight; + data['applyPrice'] = entity.applyPrice; + data['price'] = entity.price; + data['vipPrice'] = entity.vipPrice; + data['stock'] = entity.stock; + data['sellCount'] = entity.sellCount; + data['needLogistics'] = entity.needLogistics; + data['oversold'] = entity.oversold; + data['organic'] = entity.organic; + data['status'] = entity.status; + data['posShow'] = entity.posShow; + data['subscribeParam'] = entity.subscribeParam; + data['isRaise'] = entity.isRaise; + data['productType'] = entity.productType; + data['productNumber'] = entity.productNumber; + data['setMeal'] = entity.setMeal; + data['attrStyle'] = entity.attrStyle; + data['detail'] = entity.detail; + data['isDelete'] = entity.isDelete; + data['printerFlag'] = entity.printerFlag; + data['materials'] = entity.materials; + data['materialId'] = entity.materialId; + data['details'] = entity.details; + data['thumbnailImg'] = entity.thumbnailImg; + data['info'] = entity.info; + data['buyCount'] = entity.buyCount; + data['sellCountLimit'] = entity.sellCountLimit; + data['stockRecoveryTime'] = entity.stockRecoveryTime; + data['isAddPurchase'] = entity.isAddPurchase; + data['limitNum'] = entity.limitNum; + data['rankId'] = entity.rankId; + data['happyBean'] = entity.happyBean; + data['sort'] = entity.sort; + data['salesRules'] = entity.salesRules; + return data; +} + +extension ProductListExtension on ProductList { + ProductList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? supplierName, + String? storeId, + String? categoryId, + String? groupId, + String? shortName, + String? productName, + String? sellDesc, + dynamic attribute, + String? productCode, + String? weight, + String? applyPrice, + String? price, + String? vipPrice, + int? stock, + int? sellCount, + int? needLogistics, + int? oversold, + int? organic, + int? status, + bool? posShow, + dynamic subscribeParam, + bool? isRaise, + int? productType, + int? productNumber, + int? setMeal, + int? attrStyle, + String? detail, + int? isDelete, + String? printerFlag, + dynamic materials, + dynamic materialId, + String? details, + String? thumbnailImg, + String? info, + int? buyCount, + int? sellCountLimit, + String? stockRecoveryTime, + dynamic isAddPurchase, + int? limitNum, + String? rankId, + int? happyBean, + int? sort, + dynamic salesRules, + }) { + return ProductList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..supplierName = supplierName ?? this.supplierName + ..storeId = storeId ?? this.storeId + ..categoryId = categoryId ?? this.categoryId + ..groupId = groupId ?? this.groupId + ..shortName = shortName ?? this.shortName + ..productName = productName ?? this.productName + ..sellDesc = sellDesc ?? this.sellDesc + ..attribute = attribute ?? this.attribute + ..productCode = productCode ?? this.productCode + ..weight = weight ?? this.weight + ..applyPrice = applyPrice ?? this.applyPrice + ..price = price ?? this.price + ..vipPrice = vipPrice ?? this.vipPrice + ..stock = stock ?? this.stock + ..sellCount = sellCount ?? this.sellCount + ..needLogistics = needLogistics ?? this.needLogistics + ..oversold = oversold ?? this.oversold + ..organic = organic ?? this.organic + ..status = status ?? this.status + ..posShow = posShow ?? this.posShow + ..subscribeParam = subscribeParam ?? this.subscribeParam + ..isRaise = isRaise ?? this.isRaise + ..productType = productType ?? this.productType + ..productNumber = productNumber ?? this.productNumber + ..setMeal = setMeal ?? this.setMeal + ..attrStyle = attrStyle ?? this.attrStyle + ..detail = detail ?? this.detail + ..isDelete = isDelete ?? this.isDelete + ..printerFlag = printerFlag ?? this.printerFlag + ..materials = materials ?? this.materials + ..materialId = materialId ?? this.materialId + ..details = details ?? this.details + ..thumbnailImg = thumbnailImg ?? this.thumbnailImg + ..info = info ?? this.info + ..buyCount = buyCount ?? this.buyCount + ..sellCountLimit = sellCountLimit ?? this.sellCountLimit + ..stockRecoveryTime = stockRecoveryTime ?? this.stockRecoveryTime + ..isAddPurchase = isAddPurchase ?? this.isAddPurchase + ..limitNum = limitNum ?? this.limitNum + ..rankId = rankId ?? this.rankId + ..happyBean = happyBean ?? this.happyBean + ..sort = sort ?? this.sort + ..salesRules = salesRules ?? this.salesRules; + } +} \ No newline at end of file diff --git a/lib/generated/json/pickup_type.g.dart b/lib/generated/json/pickup_type.g.dart new file mode 100644 index 00000000..0452771a --- /dev/null +++ b/lib/generated/json/pickup_type.g.dart @@ -0,0 +1,42 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/pickup_type.dart'; + +PickupType $PickupTypeFromJson(Map json) { + final PickupType pickupType = PickupType(); + final bool? dineInTakeStatus = jsonConvert.convert( + json['dineInTakeStatus']); + if (dineInTakeStatus != null) { + pickupType.dineInTakeStatus = dineInTakeStatus; + } + final dynamic takeawayStatus = json['takeawayStatus']; + if (takeawayStatus != null) { + pickupType.takeawayStatus = takeawayStatus; + } + final dynamic expressDeliveryStatus = json['expressDeliveryStatus']; + if (expressDeliveryStatus != null) { + pickupType.expressDeliveryStatus = expressDeliveryStatus; + } + return pickupType; +} + +Map $PickupTypeToJson(PickupType entity) { + final Map data = {}; + data['dineInTakeStatus'] = entity.dineInTakeStatus; + data['takeawayStatus'] = entity.takeawayStatus; + data['expressDeliveryStatus'] = entity.expressDeliveryStatus; + return data; +} + +extension PickupTypeExtension on PickupType { + PickupType copyWith({ + bool? dineInTakeStatus, + dynamic takeawayStatus, + dynamic expressDeliveryStatus, + }) { + return PickupType() + ..dineInTakeStatus = dineInTakeStatus ?? this.dineInTakeStatus + ..takeawayStatus = takeawayStatus ?? this.takeawayStatus + ..expressDeliveryStatus = expressDeliveryStatus ?? + this.expressDeliveryStatus; + } +} \ No newline at end of file diff --git a/lib/generated/json/place_order_first.g.dart b/lib/generated/json/place_order_first.g.dart new file mode 100644 index 00000000..040b6c18 --- /dev/null +++ b/lib/generated/json/place_order_first.g.dart @@ -0,0 +1,252 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/place_order_first.dart'; +import 'package:huixiang/data/order_product_vo.dart'; + + +PlaceOrderFirst $PlaceOrderFirstFromJson(Map json) { + final PlaceOrderFirst placeOrderFirst = PlaceOrderFirst(); + final int? cartNum = jsonConvert.convert(json['cartNum']); + if (cartNum != null) { + placeOrderFirst.cartNum = cartNum; + } + final dynamic cartSum = json['cartSum']; + if (cartSum != null) { + placeOrderFirst.cartSum = cartSum; + } + final dynamic addressId = json['addressId']; + if (addressId != null) { + placeOrderFirst.addressId = addressId; + } + final bool? isSubscribe = jsonConvert.convert(json['isSubscribe']); + if (isSubscribe != null) { + placeOrderFirst.isSubscribe = isSubscribe; + } + final int? isTakeOut = jsonConvert.convert(json['isTakeOut']); + if (isTakeOut != null) { + placeOrderFirst.isTakeOut = isTakeOut; + } + final dynamic notes = json['notes']; + if (notes != null) { + placeOrderFirst.notes = notes; + } + final dynamic id = json['id']; + if (id != null) { + placeOrderFirst.id = id; + } + final dynamic numberOfPeople = json['numberOfPeople']; + if (numberOfPeople != null) { + placeOrderFirst.numberOfPeople = numberOfPeople; + } + final int? orderSource = jsonConvert.convert(json['orderSource']); + if (orderSource != null) { + placeOrderFirst.orderSource = orderSource; + } + final dynamic orderType = json['orderType']; + if (orderType != null) { + placeOrderFirst.orderType = orderType; + } + final int? orderTypeId = jsonConvert.convert(json['orderTypeId']); + if (orderTypeId != null) { + placeOrderFirst.orderTypeId = orderTypeId; + } + final dynamic parentCode = json['parentCode']; + if (parentCode != null) { + placeOrderFirst.parentCode = parentCode; + } + final dynamic parentId = json['parentId']; + if (parentId != null) { + placeOrderFirst.parentId = parentId; + } + final int? payChannel = jsonConvert.convert(json['payChannel']); + if (payChannel != null) { + placeOrderFirst.payChannel = payChannel; + } + final PromotionInfoDTOBean? promotionInfoDTO = jsonConvert.convert< + PromotionInfoDTOBean>(json['promotionInfoDTO']); + if (promotionInfoDTO != null) { + placeOrderFirst.promotionInfoDTO = promotionInfoDTO; + } + final String? recMobile = jsonConvert.convert(json['recMobile']); + if (recMobile != null) { + placeOrderFirst.recMobile = recMobile; + } + final List< + OrderProductVO>? orderProductVOList = (json['orderProductVOList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as OrderProductVO) + .toList(); + if (orderProductVOList != null) { + placeOrderFirst.orderProductVOList = orderProductVOList; + } + final List< + OrderProductVO>? shoppingCartSkuItemList = (json['shoppingCartSkuItemList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as OrderProductVO) + .toList(); + if (shoppingCartSkuItemList != null) { + placeOrderFirst.shoppingCartSkuItemList = shoppingCartSkuItemList; + } + final List? skuItemDTOList = (json['skuItemDTOList'] as List< + dynamic>?)?.map( + (e) => e).toList(); + if (skuItemDTOList != null) { + placeOrderFirst.skuItemDTOList = skuItemDTOList; + } + final int? source = jsonConvert.convert(json['source']); + if (source != null) { + placeOrderFirst.source = source; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + placeOrderFirst.storeId = storeId; + } + final String? subcribeTime = jsonConvert.convert( + json['subcribeTime']); + if (subcribeTime != null) { + placeOrderFirst.subcribeTime = subcribeTime; + } + final String? tableId = jsonConvert.convert(json['tableId']); + if (tableId != null) { + placeOrderFirst.tableId = tableId; + } + return placeOrderFirst; +} + +Map $PlaceOrderFirstToJson(PlaceOrderFirst entity) { + final Map data = {}; + data['cartNum'] = entity.cartNum; + data['cartSum'] = entity.cartSum; + data['addressId'] = entity.addressId; + data['isSubscribe'] = entity.isSubscribe; + data['isTakeOut'] = entity.isTakeOut; + data['notes'] = entity.notes; + data['id'] = entity.id; + data['numberOfPeople'] = entity.numberOfPeople; + data['orderSource'] = entity.orderSource; + data['orderType'] = entity.orderType; + data['orderTypeId'] = entity.orderTypeId; + data['parentCode'] = entity.parentCode; + data['parentId'] = entity.parentId; + data['payChannel'] = entity.payChannel; + data['promotionInfoDTO'] = entity.promotionInfoDTO?.toJson(); + data['recMobile'] = entity.recMobile; + data['orderProductVOList'] = + entity.orderProductVOList?.map((v) => v.toJson()).toList(); + data['shoppingCartSkuItemList'] = + entity.shoppingCartSkuItemList?.map((v) => v.toJson()).toList(); + data['skuItemDTOList'] = entity.skuItemDTOList; + data['source'] = entity.source; + data['storeId'] = entity.storeId; + data['subcribeTime'] = entity.subcribeTime; + data['tableId'] = entity.tableId; + return data; +} + +extension PlaceOrderFirstExtension on PlaceOrderFirst { + PlaceOrderFirst copyWith({ + int? cartNum, + dynamic cartSum, + dynamic addressId, + bool? isSubscribe, + int? isTakeOut, + dynamic notes, + dynamic id, + dynamic numberOfPeople, + int? orderSource, + dynamic orderType, + int? orderTypeId, + dynamic parentCode, + dynamic parentId, + int? payChannel, + PromotionInfoDTOBean? promotionInfoDTO, + String? recMobile, + List? orderProductVOList, + List? shoppingCartSkuItemList, + List? skuItemDTOList, + int? source, + String? storeId, + String? subcribeTime, + String? tableId, + }) { + return PlaceOrderFirst() + ..cartNum = cartNum ?? this.cartNum + ..cartSum = cartSum ?? this.cartSum + ..addressId = addressId ?? this.addressId + ..isSubscribe = isSubscribe ?? this.isSubscribe + ..isTakeOut = isTakeOut ?? this.isTakeOut + ..notes = notes ?? this.notes + ..id = id ?? this.id + ..numberOfPeople = numberOfPeople ?? this.numberOfPeople + ..orderSource = orderSource ?? this.orderSource + ..orderType = orderType ?? this.orderType + ..orderTypeId = orderTypeId ?? this.orderTypeId + ..parentCode = parentCode ?? this.parentCode + ..parentId = parentId ?? this.parentId + ..payChannel = payChannel ?? this.payChannel + ..promotionInfoDTO = promotionInfoDTO ?? this.promotionInfoDTO + ..recMobile = recMobile ?? this.recMobile + ..orderProductVOList = orderProductVOList ?? this.orderProductVOList + ..shoppingCartSkuItemList = shoppingCartSkuItemList ?? + this.shoppingCartSkuItemList + ..skuItemDTOList = skuItemDTOList ?? this.skuItemDTOList + ..source = source ?? this.source + ..storeId = storeId ?? this.storeId + ..subcribeTime = subcribeTime ?? this.subcribeTime + ..tableId = tableId ?? this.tableId; + } +} + +PromotionInfoDTOBean $PromotionInfoDTOBeanFromJson(Map json) { + final PromotionInfoDTOBean promotionInfoDTOBean = PromotionInfoDTOBean(); + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + promotionInfoDTOBean.couponId = couponId; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + promotionInfoDTOBean.promotionId = promotionId; + } + final bool? useVipPrice = jsonConvert.convert(json['useVipPrice']); + if (useVipPrice != null) { + promotionInfoDTOBean.useVipPrice = useVipPrice; + } + final bool? useBenefit = jsonConvert.convert(json['useBenefit']); + if (useBenefit != null) { + promotionInfoDTOBean.useBenefit = useBenefit; + } + final String? discountType = jsonConvert.convert( + json['discountType']); + if (discountType != null) { + promotionInfoDTOBean.discountType = discountType; + } + return promotionInfoDTOBean; +} + +Map $PromotionInfoDTOBeanToJson(PromotionInfoDTOBean entity) { + final Map data = {}; + data['couponId'] = entity.couponId; + data['promotionId'] = entity.promotionId; + data['useVipPrice'] = entity.useVipPrice; + data['useBenefit'] = entity.useBenefit; + data['discountType'] = entity.discountType; + return data; +} + +extension PromotionInfoDTOBeanExtension on PromotionInfoDTOBean { + PromotionInfoDTOBean copyWith({ + String? couponId, + String? promotionId, + bool? useVipPrice, + bool? useBenefit, + String? discountType, + }) { + return PromotionInfoDTOBean() + ..couponId = couponId ?? this.couponId + ..promotionId = promotionId ?? this.promotionId + ..useVipPrice = useVipPrice ?? this.useVipPrice + ..useBenefit = useBenefit ?? this.useBenefit + ..discountType = discountType ?? this.discountType; + } +} \ No newline at end of file diff --git a/lib/generated/json/platter.g.dart b/lib/generated/json/platter.g.dart new file mode 100644 index 00000000..d581a1d1 --- /dev/null +++ b/lib/generated/json/platter.g.dart @@ -0,0 +1,54 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/platter.dart'; + +Platter $PlatterFromJson(Map json) { + final Platter platter = Platter(); + final bool? deleted = jsonConvert.convert(json['deleted']); + if (deleted != null) { + platter.deleted = deleted; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + platter.id = id; + } + final int? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + platter.productId = productId; + } + final bool? required = jsonConvert.convert(json['required']); + if (required != null) { + platter.required = required; + } + final int? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + platter.skuId = skuId; + } + return platter; +} + +Map $PlatterToJson(Platter entity) { + final Map data = {}; + data['deleted'] = entity.deleted; + data['id'] = entity.id; + data['productId'] = entity.productId; + data['required'] = entity.required; + data['skuId'] = entity.skuId; + return data; +} + +extension PlatterExtension on Platter { + Platter copyWith({ + bool? deleted, + int? id, + int? productId, + bool? required, + int? skuId, + }) { + return Platter() + ..deleted = deleted ?? this.deleted + ..id = id ?? this.id + ..productId = productId ?? this.productId + ..required = required ?? this.required + ..skuId = skuId ?? this.skuId; + } +} \ No newline at end of file diff --git a/lib/generated/json/popular_sales.g.dart b/lib/generated/json/popular_sales.g.dart new file mode 100644 index 00000000..2b52781c --- /dev/null +++ b/lib/generated/json/popular_sales.g.dart @@ -0,0 +1,269 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/popular_sales.dart'; + +PopularSales $PopularSalesFromJson(Map json) { + final PopularSales popularSales = PopularSales(); + final List? dashMemberList = (json['dashMemberList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as DashMemberList) + .toList(); + if (dashMemberList != null) { + popularSales.dashMemberList = dashMemberList; + } + final List< + SaleProductList>? saleProductList = (json['saleProductList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as SaleProductList) + .toList(); + if (saleProductList != null) { + popularSales.saleProductList = saleProductList; + } + final String? avgPrice = jsonConvert.convert(json['avgPrice']); + if (avgPrice != null) { + popularSales.avgPrice = avgPrice; + } + final int? orderNum = jsonConvert.convert(json['orderNum']); + if (orderNum != null) { + popularSales.orderNum = orderNum; + } + final List< + dynamic>? storeDailyStatistics = (json['storeDailyStatistics'] as List< + dynamic>?)?.map( + (e) => e).toList(); + if (storeDailyStatistics != null) { + popularSales.storeDailyStatistics = storeDailyStatistics; + } + final String? orderSum = jsonConvert.convert(json['orderSum']); + if (orderSum != null) { + popularSales.orderSum = orderSum; + } + final ChangeData? changeData = jsonConvert.convert( + json['changeData']); + if (changeData != null) { + popularSales.changeData = changeData; + } + final String? paySum = jsonConvert.convert(json['paySum']); + if (paySum != null) { + popularSales.paySum = paySum; + } + return popularSales; +} + +Map $PopularSalesToJson(PopularSales entity) { + final Map data = {}; + data['dashMemberList'] = + entity.dashMemberList?.map((v) => v.toJson()).toList(); + data['saleProductList'] = + entity.saleProductList?.map((v) => v.toJson()).toList(); + data['avgPrice'] = entity.avgPrice; + data['orderNum'] = entity.orderNum; + data['storeDailyStatistics'] = entity.storeDailyStatistics; + data['orderSum'] = entity.orderSum; + data['changeData'] = entity.changeData?.toJson(); + data['paySum'] = entity.paySum; + return data; +} + +extension PopularSalesExtension on PopularSales { + PopularSales copyWith({ + List? dashMemberList, + List? saleProductList, + String? avgPrice, + int? orderNum, + List? storeDailyStatistics, + String? orderSum, + ChangeData? changeData, + String? paySum, + }) { + return PopularSales() + ..dashMemberList = dashMemberList ?? this.dashMemberList + ..saleProductList = saleProductList ?? this.saleProductList + ..avgPrice = avgPrice ?? this.avgPrice + ..orderNum = orderNum ?? this.orderNum + ..storeDailyStatistics = storeDailyStatistics ?? this.storeDailyStatistics + ..orderSum = orderSum ?? this.orderSum + ..changeData = changeData ?? this.changeData + ..paySum = paySum ?? this.paySum; + } +} + +DashMemberList $DashMemberListFromJson(Map json) { + final DashMemberList dashMemberList = DashMemberList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + dashMemberList.id = id; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + dashMemberList.name = name; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + dashMemberList.phone = phone; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + dashMemberList.balance = balance; + } + return dashMemberList; +} + +Map $DashMemberListToJson(DashMemberList entity) { + final Map data = {}; + data['id'] = entity.id; + data['name'] = entity.name; + data['phone'] = entity.phone; + data['balance'] = entity.balance; + return data; +} + +extension DashMemberListExtension on DashMemberList { + DashMemberList copyWith({ + String? id, + String? name, + String? phone, + String? balance, + }) { + return DashMemberList() + ..id = id ?? this.id + ..name = name ?? this.name + ..phone = phone ?? this.phone + ..balance = balance ?? this.balance; + } +} + +SaleProductList $SaleProductListFromJson(Map json) { + final SaleProductList saleProductList = SaleProductList(); + final String? productId = jsonConvert.convert(json['product_id']); + if (productId != null) { + saleProductList.productId = productId; + } + final int? saleNum = jsonConvert.convert(json['saleNum']); + if (saleNum != null) { + saleProductList.saleNum = saleNum; + } + final String? productName = jsonConvert.convert(json['product_name']); + if (productName != null) { + saleProductList.productName = productName; + } + return saleProductList; +} + +Map $SaleProductListToJson(SaleProductList entity) { + final Map data = {}; + data['product_id'] = entity.productId; + data['saleNum'] = entity.saleNum; + data['product_name'] = entity.productName; + return data; +} + +extension SaleProductListExtension on SaleProductList { + SaleProductList copyWith({ + String? productId, + int? saleNum, + String? productName, + }) { + return SaleProductList() + ..productId = productId ?? this.productId + ..saleNum = saleNum ?? this.saleNum + ..productName = productName ?? this.productName; + } +} + +ChangeData $ChangeDataFromJson(Map json) { + final ChangeData changeData = ChangeData(); + final double? addCartChangeRate = jsonConvert.convert( + json['addCartChangeRate']); + if (addCartChangeRate != null) { + changeData.addCartChangeRate = addCartChangeRate; + } + final double? payCountChangeRate = jsonConvert.convert( + json['payCountChangeRate']); + if (payCountChangeRate != null) { + changeData.payCountChangeRate = payCountChangeRate; + } + final String? sumAddCartCount = jsonConvert.convert( + json['sumAddCartCount']); + if (sumAddCartCount != null) { + changeData.sumAddCartCount = sumAddCartCount; + } + final String? sumSettleCount = jsonConvert.convert( + json['sumSettleCount']); + if (sumSettleCount != null) { + changeData.sumSettleCount = sumSettleCount; + } + final String? sumPaySuccessCount = jsonConvert.convert( + json['sumPaySuccessCount']); + if (sumPaySuccessCount != null) { + changeData.sumPaySuccessCount = sumPaySuccessCount; + } + final String? sumPV = jsonConvert.convert(json['sumPV']); + if (sumPV != null) { + changeData.sumPV = sumPV; + } + final double? totalChangeRate = jsonConvert.convert( + json['totalChangeRate']); + if (totalChangeRate != null) { + changeData.totalChangeRate = totalChangeRate; + } + final String? sumPayCount = jsonConvert.convert(json['sumPayCount']); + if (sumPayCount != null) { + changeData.sumPayCount = sumPayCount; + } + final double? settleChangeRate = jsonConvert.convert( + json['settleChangeRate']); + if (settleChangeRate != null) { + changeData.settleChangeRate = settleChangeRate; + } + final double? paySuccessChangeRate = jsonConvert.convert( + json['paySuccessChangeRate']); + if (paySuccessChangeRate != null) { + changeData.paySuccessChangeRate = paySuccessChangeRate; + } + return changeData; +} + +Map $ChangeDataToJson(ChangeData entity) { + final Map data = {}; + data['addCartChangeRate'] = entity.addCartChangeRate; + data['payCountChangeRate'] = entity.payCountChangeRate; + data['sumAddCartCount'] = entity.sumAddCartCount; + data['sumSettleCount'] = entity.sumSettleCount; + data['sumPaySuccessCount'] = entity.sumPaySuccessCount; + data['sumPV'] = entity.sumPV; + data['totalChangeRate'] = entity.totalChangeRate; + data['sumPayCount'] = entity.sumPayCount; + data['settleChangeRate'] = entity.settleChangeRate; + data['paySuccessChangeRate'] = entity.paySuccessChangeRate; + return data; +} + +extension ChangeDataExtension on ChangeData { + ChangeData copyWith({ + double? addCartChangeRate, + double? payCountChangeRate, + String? sumAddCartCount, + String? sumSettleCount, + String? sumPaySuccessCount, + String? sumPV, + double? totalChangeRate, + String? sumPayCount, + double? settleChangeRate, + double? paySuccessChangeRate, + }) { + return ChangeData() + ..addCartChangeRate = addCartChangeRate ?? this.addCartChangeRate + ..payCountChangeRate = payCountChangeRate ?? this.payCountChangeRate + ..sumAddCartCount = sumAddCartCount ?? this.sumAddCartCount + ..sumSettleCount = sumSettleCount ?? this.sumSettleCount + ..sumPaySuccessCount = sumPaySuccessCount ?? this.sumPaySuccessCount + ..sumPV = sumPV ?? this.sumPV + ..totalChangeRate = totalChangeRate ?? this.totalChangeRate + ..sumPayCount = sumPayCount ?? this.sumPayCount + ..settleChangeRate = settleChangeRate ?? this.settleChangeRate + ..paySuccessChangeRate = paySuccessChangeRate ?? + this.paySuccessChangeRate; + } +} \ No newline at end of file diff --git a/lib/generated/json/preferential.g.dart b/lib/generated/json/preferential.g.dart new file mode 100644 index 00000000..750951fd --- /dev/null +++ b/lib/generated/json/preferential.g.dart @@ -0,0 +1,90 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/preferential.dart'; + +PreferentialList $PreferentialListFromJson(Map json) { + final PreferentialList preferentialList = PreferentialList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + preferentialList.id = id; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + preferentialList.rechargeMoney = rechargeMoney; + } + final String? giftdMoney = jsonConvert.convert(json['giftdMoney']); + if (giftdMoney != null) { + preferentialList.giftdMoney = giftdMoney; + } + final dynamic gitfdCouponId = json['gitfdCouponId']; + if (gitfdCouponId != null) { + preferentialList.gitfdCouponId = gitfdCouponId; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + preferentialList.tenantCode = tenantCode; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + preferentialList.createTime = createTime; + } + final int? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + preferentialList.isDeleted = isDeleted; + } + final int? rechargeType = jsonConvert.convert(json['rechargeType']); + if (rechargeType != null) { + preferentialList.rechargeType = rechargeType; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + preferentialList.remark = remark; + } + final int? sortValue = jsonConvert.convert(json['sortValue']); + if (sortValue != null) { + preferentialList.sortValue = sortValue; + } + return preferentialList; +} + +Map $PreferentialListToJson(PreferentialList entity) { + final Map data = {}; + data['id'] = entity.id; + data['rechargeMoney'] = entity.rechargeMoney; + data['giftdMoney'] = entity.giftdMoney; + data['gitfdCouponId'] = entity.gitfdCouponId; + data['tenantCode'] = entity.tenantCode; + data['createTime'] = entity.createTime; + data['isDeleted'] = entity.isDeleted; + data['rechargeType'] = entity.rechargeType; + data['remark'] = entity.remark; + data['sortValue'] = entity.sortValue; + return data; +} + +extension PreferentialListExtension on PreferentialList { + PreferentialList copyWith({ + String? id, + String? rechargeMoney, + String? giftdMoney, + dynamic gitfdCouponId, + String? tenantCode, + String? createTime, + int? isDeleted, + int? rechargeType, + String? remark, + int? sortValue, + }) { + return PreferentialList() + ..id = id ?? this.id + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..giftdMoney = giftdMoney ?? this.giftdMoney + ..gitfdCouponId = gitfdCouponId ?? this.gitfdCouponId + ..tenantCode = tenantCode ?? this.tenantCode + ..createTime = createTime ?? this.createTime + ..isDeleted = isDeleted ?? this.isDeleted + ..rechargeType = rechargeType ?? this.rechargeType + ..remark = remark ?? this.remark + ..sortValue = sortValue ?? this.sortValue; + } +} \ No newline at end of file diff --git a/lib/generated/json/product.g.dart b/lib/generated/json/product.g.dart new file mode 100644 index 00000000..d304a04d --- /dev/null +++ b/lib/generated/json/product.g.dart @@ -0,0 +1,189 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/product.dart'; + +Product $ProductFromJson(Map json) { + final Product product = Product(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + product.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + product.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + product.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + product.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + product.updateUser = updateUser; + } + final dynamic tenantCode = json['tenantCode']; + if (tenantCode != null) { + product.tenantCode = tenantCode; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + product.storeId = storeId; + } + final String? orderId = jsonConvert.convert(json['orderId']); + if (orderId != null) { + product.orderId = orderId; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + product.productId = productId; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + product.productName = productName; + } + final String? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + product.skuId = skuId; + } + final String? skuNameStr = jsonConvert.convert(json['skuNameStr']); + if (skuNameStr != null) { + product.skuNameStr = skuNameStr; + } + final String? skuImg = jsonConvert.convert(json['skuImg']); + if (skuImg != null) { + product.skuImg = skuImg; + } + final int? buyNum = jsonConvert.convert(json['buyNum']); + if (buyNum != null) { + product.buyNum = buyNum; + } + final int? refundNum = jsonConvert.convert(json['refundNum']); + if (refundNum != null) { + product.refundNum = refundNum; + } + final double? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + product.weight = weight; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + product.applyPrice = applyPrice; + } + final String? sellPrice = jsonConvert.convert(json['sellPrice']); + if (sellPrice != null) { + product.sellPrice = sellPrice; + } + final String? postPay = jsonConvert.convert(json['postPay']); + if (postPay != null) { + product.postPay = postPay; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + product.isDelete = isDelete; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + product.discountAmount = discountAmount; + } + final int? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + product.discountPercent = discountPercent; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + product.status = status; + } + final int? batch = jsonConvert.convert(json['batch']); + if (batch != null) { + product.batch = batch; + } + return product; +} + +Map $ProductToJson(Product entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['tenantCode'] = entity.tenantCode; + data['storeId'] = entity.storeId; + data['orderId'] = entity.orderId; + data['productId'] = entity.productId; + data['productName'] = entity.productName; + data['skuId'] = entity.skuId; + data['skuNameStr'] = entity.skuNameStr; + data['skuImg'] = entity.skuImg; + data['buyNum'] = entity.buyNum; + data['refundNum'] = entity.refundNum; + data['weight'] = entity.weight; + data['applyPrice'] = entity.applyPrice; + data['sellPrice'] = entity.sellPrice; + data['postPay'] = entity.postPay; + data['isDelete'] = entity.isDelete; + data['discountAmount'] = entity.discountAmount; + data['discountPercent'] = entity.discountPercent; + data['status'] = entity.status; + data['batch'] = entity.batch; + return data; +} + +extension ProductExtension on Product { + Product copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + dynamic tenantCode, + String? storeId, + String? orderId, + String? productId, + String? productName, + String? skuId, + String? skuNameStr, + String? skuImg, + int? buyNum, + int? refundNum, + double? weight, + String? applyPrice, + String? sellPrice, + String? postPay, + int? isDelete, + String? discountAmount, + int? discountPercent, + bool? status, + int? batch, + }) { + return Product() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..tenantCode = tenantCode ?? this.tenantCode + ..storeId = storeId ?? this.storeId + ..orderId = orderId ?? this.orderId + ..productId = productId ?? this.productId + ..productName = productName ?? this.productName + ..skuId = skuId ?? this.skuId + ..skuNameStr = skuNameStr ?? this.skuNameStr + ..skuImg = skuImg ?? this.skuImg + ..buyNum = buyNum ?? this.buyNum + ..refundNum = refundNum ?? this.refundNum + ..weight = weight ?? this.weight + ..applyPrice = applyPrice ?? this.applyPrice + ..sellPrice = sellPrice ?? this.sellPrice + ..postPay = postPay ?? this.postPay + ..isDelete = isDelete ?? this.isDelete + ..discountAmount = discountAmount ?? this.discountAmount + ..discountPercent = discountPercent ?? this.discountPercent + ..status = status ?? this.status + ..batch = batch ?? this.batch; + } +} \ No newline at end of file diff --git a/lib/generated/json/product_group.g.dart b/lib/generated/json/product_group.g.dart new file mode 100644 index 00000000..541d28b5 --- /dev/null +++ b/lib/generated/json/product_group.g.dart @@ -0,0 +1,180 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/product_group.dart'; + +ProductGroup $ProductGroupFromJson(Map json) { + final ProductGroup productGroup = ProductGroup(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productGroup.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + productGroup.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + productGroup.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + productGroup.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + productGroup.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + productGroup.storeId = storeId; + } + final String? groupName = jsonConvert.convert(json['groupName']); + if (groupName != null) { + productGroup.groupName = groupName; + } + final String? groupImg = jsonConvert.convert(json['groupImg']); + if (groupImg != null) { + productGroup.groupImg = groupImg; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + productGroup.sort = sort; + } + final int? kitchenGroup = jsonConvert.convert(json['kitchenGroup']); + if (kitchenGroup != null) { + productGroup.kitchenGroup = kitchenGroup; + } + final List? printerId = (json['printerId'] as List?)?.map( + (e) => e).toList(); + if (printerId != null) { + productGroup.printerId = printerId; + } + final dynamic attachPrinterIds = json['attachPrinterIds']; + if (attachPrinterIds != null) { + productGroup.attachPrinterIds = attachPrinterIds; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productGroup.isDelete = isDelete; + } + final int? isCharge = jsonConvert.convert(json['isCharge']); + if (isCharge != null) { + productGroup.isCharge = isCharge; + } + final dynamic useVipDiscount = json['useVipDiscount']; + if (useVipDiscount != null) { + productGroup.useVipDiscount = useVipDiscount; + } + final ProductGroupProfitSharing? profitSharing = jsonConvert.convert< + ProductGroupProfitSharing>(json['profitSharing']); + if (profitSharing != null) { + productGroup.profitSharing = profitSharing; + } + return productGroup; +} + +Map $ProductGroupToJson(ProductGroup entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['groupName'] = entity.groupName; + data['groupImg'] = entity.groupImg; + data['sort'] = entity.sort; + data['kitchenGroup'] = entity.kitchenGroup; + data['printerId'] = entity.printerId; + data['attachPrinterIds'] = entity.attachPrinterIds; + data['isDelete'] = entity.isDelete; + data['isCharge'] = entity.isCharge; + data['useVipDiscount'] = entity.useVipDiscount; + data['profitSharing'] = entity.profitSharing?.toJson(); + return data; +} + +extension ProductGroupExtension on ProductGroup { + ProductGroup copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? groupName, + String? groupImg, + int? sort, + int? kitchenGroup, + List? printerId, + dynamic attachPrinterIds, + int? isDelete, + int? isCharge, + dynamic useVipDiscount, + ProductGroupProfitSharing? profitSharing, + }) { + return ProductGroup() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..groupName = groupName ?? this.groupName + ..groupImg = groupImg ?? this.groupImg + ..sort = sort ?? this.sort + ..kitchenGroup = kitchenGroup ?? this.kitchenGroup + ..printerId = printerId ?? this.printerId + ..attachPrinterIds = attachPrinterIds ?? this.attachPrinterIds + ..isDelete = isDelete ?? this.isDelete + ..isCharge = isCharge ?? this.isCharge + ..useVipDiscount = useVipDiscount ?? this.useVipDiscount + ..profitSharing = profitSharing ?? this.profitSharing; + } +} + +ProductGroupProfitSharing $ProductGroupProfitSharingFromJson( + Map json) { + final ProductGroupProfitSharing productGroupProfitSharing = ProductGroupProfitSharing(); + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + productGroupProfitSharing.type = type; + } + final String? mchName = jsonConvert.convert(json['mchName']); + if (mchName != null) { + productGroupProfitSharing.mchName = mchName; + } + final String? mchCode = jsonConvert.convert(json['mchCode']); + if (mchCode != null) { + productGroupProfitSharing.mchCode = mchCode; + } + final int? ratio = jsonConvert.convert(json['ratio']); + if (ratio != null) { + productGroupProfitSharing.ratio = ratio; + } + return productGroupProfitSharing; +} + +Map $ProductGroupProfitSharingToJson( + ProductGroupProfitSharing entity) { + final Map data = {}; + data['type'] = entity.type; + data['mchName'] = entity.mchName; + data['mchCode'] = entity.mchCode; + data['ratio'] = entity.ratio; + return data; +} + +extension ProductGroupProfitSharingExtension on ProductGroupProfitSharing { + ProductGroupProfitSharing copyWith({ + String? type, + String? mchName, + String? mchCode, + int? ratio, + }) { + return ProductGroupProfitSharing() + ..type = type ?? this.type + ..mchName = mchName ?? this.mchName + ..mchCode = mchCode ?? this.mchCode + ..ratio = ratio ?? this.ratio; + } +} \ No newline at end of file diff --git a/lib/generated/json/product_set_meals.g.dart b/lib/generated/json/product_set_meals.g.dart new file mode 100644 index 00000000..c5b23d5b --- /dev/null +++ b/lib/generated/json/product_set_meals.g.dart @@ -0,0 +1,328 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/product_set_meals.dart'; +import 'package:huixiang/data/mini_detail.dart'; + + +ProductSetMeals $ProductSetMealsFromJson(Map json) { + final ProductSetMeals productSetMeals = ProductSetMeals(); + final String? groupName = jsonConvert.convert(json['groupName']); + if (groupName != null) { + productSetMeals.groupName = groupName; + } + final int? totalNumber = jsonConvert.convert(json['totalNumber']); + if (totalNumber != null) { + productSetMeals.totalNumber = totalNumber; + } + final int? optionalNumber = jsonConvert.convert(json['optionalNumber']); + if (optionalNumber != null) { + productSetMeals.optionalNumber = optionalNumber; + } + final List< + SetMealsProductInfoList>? productInfoList = (json['productInfoList'] as List< + dynamic>?)?.map( + (e) => + jsonConvert.convert( + e) as SetMealsProductInfoList).toList(); + if (productInfoList != null) { + productSetMeals.productInfoList = productInfoList; + } + return productSetMeals; +} + +Map $ProductSetMealsToJson(ProductSetMeals entity) { + final Map data = {}; + data['groupName'] = entity.groupName; + data['totalNumber'] = entity.totalNumber; + data['optionalNumber'] = entity.optionalNumber; + data['productInfoList'] = + entity.productInfoList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ProductSetMealsExtension on ProductSetMeals { + ProductSetMeals copyWith({ + String? groupName, + int? totalNumber, + int? optionalNumber, + List? productInfoList, + }) { + return ProductSetMeals() + ..groupName = groupName ?? this.groupName + ..totalNumber = totalNumber ?? this.totalNumber + ..optionalNumber = optionalNumber ?? this.optionalNumber + ..productInfoList = productInfoList ?? this.productInfoList; + } +} + +SetMealsProductInfoList $SetMealsProductInfoListFromJson( + Map json) { + final SetMealsProductInfoList setMealsProductInfoList = SetMealsProductInfoList(); + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + setMealsProductInfoList.productId = productId; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + setMealsProductInfoList.productName = productName; + } + final String? productImg = jsonConvert.convert(json['productImg']); + if (productImg != null) { + setMealsProductInfoList.productImg = productImg; + } + final bool? allSku = jsonConvert.convert(json['allSku']); + if (allSku != null) { + setMealsProductInfoList.allSku = allSku; + } + final List? skuInfoList = (json['skuInfoList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as SkuInfoList) + .toList(); + if (skuInfoList != null) { + setMealsProductInfoList.skuInfoList = skuInfoList; + } + final List< + ProductAttrInfoList>? productAttrInfoList = (json['productAttrInfoList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as ProductAttrInfoList) + .toList(); + if (productAttrInfoList != null) { + setMealsProductInfoList.productAttrInfoList = productAttrInfoList; + } + final int? number = jsonConvert.convert(json['number']); + if (number != null) { + setMealsProductInfoList.number = number; + } + final int? count = jsonConvert.convert(json['count']); + if (count != null) { + setMealsProductInfoList.count = count; + } + return setMealsProductInfoList; +} + +Map $SetMealsProductInfoListToJson( + SetMealsProductInfoList entity) { + final Map data = {}; + data['productId'] = entity.productId; + data['productName'] = entity.productName; + data['productImg'] = entity.productImg; + data['allSku'] = entity.allSku; + data['skuInfoList'] = entity.skuInfoList?.map((v) => v.toJson()).toList(); + data['productAttrInfoList'] = + entity.productAttrInfoList?.map((v) => v.toJson()).toList(); + data['number'] = entity.number; + data['count'] = entity.count; + return data; +} + +extension SetMealsProductInfoListExtension on SetMealsProductInfoList { + SetMealsProductInfoList copyWith({ + String? productId, + String? productName, + String? productImg, + bool? allSku, + List? skuInfoList, + List? productAttrInfoList, + int? number, + int? count, + }) { + return SetMealsProductInfoList() + ..productId = productId ?? this.productId + ..productName = productName ?? this.productName + ..productImg = productImg ?? this.productImg + ..allSku = allSku ?? this.allSku + ..skuInfoList = skuInfoList ?? this.skuInfoList + ..productAttrInfoList = productAttrInfoList ?? this.productAttrInfoList + ..number = number ?? this.number + ..count = count ?? this.count; + } +} + +SkuInfoList $SkuInfoListFromJson(Map json) { + final SkuInfoList skuInfoList = SkuInfoList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + skuInfoList.id = id; + } + final String? skuName = jsonConvert.convert(json['skuName']); + if (skuName != null) { + skuInfoList.skuName = skuName; + } + final List< + ProductSkuAttrList>? productSkuAttrList = (json['productSkuAttrList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as ProductSkuAttrList) + .toList(); + if (productSkuAttrList != null) { + skuInfoList.productSkuAttrList = productSkuAttrList; + } + final bool? isSelected = jsonConvert.convert(json['isSelected']); + if (isSelected != null) { + skuInfoList.isSelected = isSelected; + } + return skuInfoList; +} + +Map $SkuInfoListToJson(SkuInfoList entity) { + final Map data = {}; + data['id'] = entity.id; + data['skuName'] = entity.skuName; + data['productSkuAttrList'] = + entity.productSkuAttrList?.map((v) => v.toJson()).toList(); + data['isSelected'] = entity.isSelected; + return data; +} + +extension SkuInfoListExtension on SkuInfoList { + SkuInfoList copyWith({ + String? id, + String? skuName, + List? productSkuAttrList, + bool? isSelected, + }) { + return SkuInfoList() + ..id = id ?? this.id + ..skuName = skuName ?? this.skuName + ..productSkuAttrList = productSkuAttrList ?? this.productSkuAttrList + ..isSelected = isSelected ?? this.isSelected; + } +} + +ProductSkuAttrList $ProductSkuAttrListFromJson(Map json) { + final ProductSkuAttrList productSkuAttrList = ProductSkuAttrList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productSkuAttrList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + productSkuAttrList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + productSkuAttrList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + productSkuAttrList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + productSkuAttrList.updateUser = updateUser; + } + final String? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + productSkuAttrList.skuId = skuId; + } + final String? attrId = jsonConvert.convert(json['attrId']); + if (attrId != null) { + productSkuAttrList.attrId = attrId; + } + final String? attrValueId = jsonConvert.convert(json['attrValueId']); + if (attrValueId != null) { + productSkuAttrList.attrValueId = attrValueId; + } + final dynamic sortOrder = json['sortOrder']; + if (sortOrder != null) { + productSkuAttrList.sortOrder = sortOrder; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productSkuAttrList.isDelete = isDelete; + } + return productSkuAttrList; +} + +Map $ProductSkuAttrListToJson(ProductSkuAttrList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['skuId'] = entity.skuId; + data['attrId'] = entity.attrId; + data['attrValueId'] = entity.attrValueId; + data['sortOrder'] = entity.sortOrder; + data['isDelete'] = entity.isDelete; + return data; +} + +extension ProductSkuAttrListExtension on ProductSkuAttrList { + ProductSkuAttrList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? skuId, + String? attrId, + String? attrValueId, + dynamic sortOrder, + int? isDelete, + }) { + return ProductSkuAttrList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..skuId = skuId ?? this.skuId + ..attrId = attrId ?? this.attrId + ..attrValueId = attrValueId ?? this.attrValueId + ..sortOrder = sortOrder ?? this.sortOrder + ..isDelete = isDelete ?? this.isDelete; + } +} + +ProductAttrInfoList $ProductAttrInfoListFromJson(Map json) { + final ProductAttrInfoList productAttrInfoList = ProductAttrInfoList(); + final String? attrId = jsonConvert.convert(json['attrId']); + if (attrId != null) { + productAttrInfoList.attrId = attrId; + } + final String? attrName = jsonConvert.convert(json['attrName']); + if (attrName != null) { + productAttrInfoList.attrName = attrName; + } + final List? attrValueList = (json['attrValueList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as AttrValueList) + .toList(); + if (attrValueList != null) { + productAttrInfoList.attrValueList = attrValueList; + } + final String? selectSku = jsonConvert.convert(json['selectSku']); + if (selectSku != null) { + productAttrInfoList.selectSku = selectSku; + } + return productAttrInfoList; +} + +Map $ProductAttrInfoListToJson(ProductAttrInfoList entity) { + final Map data = {}; + data['attrId'] = entity.attrId; + data['attrName'] = entity.attrName; + data['attrValueList'] = entity.attrValueList?.map((v) => v.toJson()).toList(); + data['selectSku'] = entity.selectSku; + return data; +} + +extension ProductAttrInfoListExtension on ProductAttrInfoList { + ProductAttrInfoList copyWith({ + String? attrId, + String? attrName, + List? attrValueList, + String? selectSku, + }) { + return ProductAttrInfoList() + ..attrId = attrId ?? this.attrId + ..attrName = attrName ?? this.attrName + ..attrValueList = attrValueList ?? this.attrValueList + ..selectSku = selectSku ?? this.selectSku; + } +} \ No newline at end of file diff --git a/lib/generated/json/product_show.g.dart b/lib/generated/json/product_show.g.dart new file mode 100644 index 00000000..3a60e9a9 --- /dev/null +++ b/lib/generated/json/product_show.g.dart @@ -0,0 +1,358 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/product_show.dart'; +import 'package:huixiang/data/product_sku_list.dart'; + + +ProductShow $ProductShowFromJson(Map json) { + final ProductShow productShow = ProductShow(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productShow.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + productShow.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + productShow.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + productShow.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + productShow.updateUser = updateUser; + } + final String? supplierName = jsonConvert.convert( + json['supplierName']); + if (supplierName != null) { + productShow.supplierName = supplierName; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + productShow.storeId = storeId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + productShow.categoryId = categoryId; + } + final String? groupId = jsonConvert.convert(json['groupId']); + if (groupId != null) { + productShow.groupId = groupId; + } + final String? shortName = jsonConvert.convert(json['shortName']); + if (shortName != null) { + productShow.shortName = shortName; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + productShow.productName = productName; + } + final String? sellDesc = jsonConvert.convert(json['sellDesc']); + if (sellDesc != null) { + productShow.sellDesc = sellDesc; + } + final String? productCode = jsonConvert.convert(json['productCode']); + if (productCode != null) { + productShow.productCode = productCode; + } + final String? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + productShow.weight = weight; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + productShow.applyPrice = applyPrice; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + productShow.price = price; + } + final dynamic vipPrice = json['vipPrice']; + if (vipPrice != null) { + productShow.vipPrice = vipPrice; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + productShow.stock = stock; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + productShow.sellCount = sellCount; + } + final int? needLogistics = jsonConvert.convert(json['needLogistics']); + if (needLogistics != null) { + productShow.needLogistics = needLogistics; + } + final int? oversold = jsonConvert.convert(json['oversold']); + if (oversold != null) { + productShow.oversold = oversold; + } + final int? organic = jsonConvert.convert(json['organic']); + if (organic != null) { + productShow.organic = organic; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + productShow.status = status; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + productShow.posShow = posShow; + } + final dynamic subscribeParam = json['subscribeParam']; + if (subscribeParam != null) { + productShow.subscribeParam = subscribeParam; + } + final bool? isRaise = jsonConvert.convert(json['isRaise']); + if (isRaise != null) { + productShow.isRaise = isRaise; + } + final int? productType = jsonConvert.convert(json['productType']); + if (productType != null) { + productShow.productType = productType; + } + final int? productNumber = jsonConvert.convert(json['productNumber']); + if (productNumber != null) { + productShow.productNumber = productNumber; + } + final int? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + productShow.setMeal = setMeal; + } + final int? attrStyle = jsonConvert.convert(json['attrStyle']); + if (attrStyle != null) { + productShow.attrStyle = attrStyle; + } + final String? detail = jsonConvert.convert(json['detail']); + if (detail != null) { + productShow.detail = detail; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productShow.isDelete = isDelete; + } + final String? printerFlag = jsonConvert.convert(json['printerFlag']); + if (printerFlag != null) { + productShow.printerFlag = printerFlag; + } + final dynamic materials = json['materials']; + if (materials != null) { + productShow.materials = materials; + } + final dynamic materialId = json['materialId']; + if (materialId != null) { + productShow.materialId = materialId; + } + final String? details = jsonConvert.convert(json['details']); + if (details != null) { + productShow.details = details; + } + final String? thumbnailImg = jsonConvert.convert( + json['thumbnailImg']); + if (thumbnailImg != null) { + productShow.thumbnailImg = thumbnailImg; + } + final String? info = jsonConvert.convert(json['info']); + if (info != null) { + productShow.info = info; + } + final int? buyCount = jsonConvert.convert(json['buyCount']); + if (buyCount != null) { + productShow.buyCount = buyCount; + } + final int? sellCountLimit = jsonConvert.convert(json['sellCountLimit']); + if (sellCountLimit != null) { + productShow.sellCountLimit = sellCountLimit; + } + final dynamic stockRecoveryTime = json['stockRecoveryTime']; + if (stockRecoveryTime != null) { + productShow.stockRecoveryTime = stockRecoveryTime; + } + final dynamic isAddPurchase = json['isAddPurchase']; + if (isAddPurchase != null) { + productShow.isAddPurchase = isAddPurchase; + } + final int? limitNum = jsonConvert.convert(json['limitNum']); + if (limitNum != null) { + productShow.limitNum = limitNum; + } + final String? rankId = jsonConvert.convert(json['rankId']); + if (rankId != null) { + productShow.rankId = rankId; + } + final int? happyBean = jsonConvert.convert(json['happyBean']); + if (happyBean != null) { + productShow.happyBean = happyBean; + } + final List? imgs = (json['imgs'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (imgs != null) { + productShow.imgs = imgs; + } + final List? productSkuList = (json['productSkuList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductSkuList) + .toList(); + if (productSkuList != null) { + productShow.productSkuList = productSkuList; + } + return productShow; +} + +Map $ProductShowToJson(ProductShow entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['supplierName'] = entity.supplierName; + data['storeId'] = entity.storeId; + data['categoryId'] = entity.categoryId; + data['groupId'] = entity.groupId; + data['shortName'] = entity.shortName; + data['productName'] = entity.productName; + data['sellDesc'] = entity.sellDesc; + data['productCode'] = entity.productCode; + data['weight'] = entity.weight; + data['applyPrice'] = entity.applyPrice; + data['price'] = entity.price; + data['vipPrice'] = entity.vipPrice; + data['stock'] = entity.stock; + data['sellCount'] = entity.sellCount; + data['needLogistics'] = entity.needLogistics; + data['oversold'] = entity.oversold; + data['organic'] = entity.organic; + data['status'] = entity.status; + data['posShow'] = entity.posShow; + data['subscribeParam'] = entity.subscribeParam; + data['isRaise'] = entity.isRaise; + data['productType'] = entity.productType; + data['productNumber'] = entity.productNumber; + data['setMeal'] = entity.setMeal; + data['attrStyle'] = entity.attrStyle; + data['detail'] = entity.detail; + data['isDelete'] = entity.isDelete; + data['printerFlag'] = entity.printerFlag; + data['materials'] = entity.materials; + data['materialId'] = entity.materialId; + data['details'] = entity.details; + data['thumbnailImg'] = entity.thumbnailImg; + data['info'] = entity.info; + data['buyCount'] = entity.buyCount; + data['sellCountLimit'] = entity.sellCountLimit; + data['stockRecoveryTime'] = entity.stockRecoveryTime; + data['isAddPurchase'] = entity.isAddPurchase; + data['limitNum'] = entity.limitNum; + data['rankId'] = entity.rankId; + data['happyBean'] = entity.happyBean; + data['imgs'] = entity.imgs; + data['productSkuList'] = + entity.productSkuList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ProductShowExtension on ProductShow { + ProductShow copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? supplierName, + String? storeId, + String? categoryId, + String? groupId, + String? shortName, + String? productName, + String? sellDesc, + String? productCode, + String? weight, + String? applyPrice, + String? price, + dynamic vipPrice, + int? stock, + int? sellCount, + int? needLogistics, + int? oversold, + int? organic, + int? status, + bool? posShow, + dynamic subscribeParam, + bool? isRaise, + int? productType, + int? productNumber, + int? setMeal, + int? attrStyle, + String? detail, + int? isDelete, + String? printerFlag, + dynamic materials, + dynamic materialId, + String? details, + String? thumbnailImg, + String? info, + int? buyCount, + int? sellCountLimit, + dynamic stockRecoveryTime, + dynamic isAddPurchase, + int? limitNum, + String? rankId, + int? happyBean, + List? imgs, + List? productSkuList, + }) { + return ProductShow() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..supplierName = supplierName ?? this.supplierName + ..storeId = storeId ?? this.storeId + ..categoryId = categoryId ?? this.categoryId + ..groupId = groupId ?? this.groupId + ..shortName = shortName ?? this.shortName + ..productName = productName ?? this.productName + ..sellDesc = sellDesc ?? this.sellDesc + ..productCode = productCode ?? this.productCode + ..weight = weight ?? this.weight + ..applyPrice = applyPrice ?? this.applyPrice + ..price = price ?? this.price + ..vipPrice = vipPrice ?? this.vipPrice + ..stock = stock ?? this.stock + ..sellCount = sellCount ?? this.sellCount + ..needLogistics = needLogistics ?? this.needLogistics + ..oversold = oversold ?? this.oversold + ..organic = organic ?? this.organic + ..status = status ?? this.status + ..posShow = posShow ?? this.posShow + ..subscribeParam = subscribeParam ?? this.subscribeParam + ..isRaise = isRaise ?? this.isRaise + ..productType = productType ?? this.productType + ..productNumber = productNumber ?? this.productNumber + ..setMeal = setMeal ?? this.setMeal + ..attrStyle = attrStyle ?? this.attrStyle + ..detail = detail ?? this.detail + ..isDelete = isDelete ?? this.isDelete + ..printerFlag = printerFlag ?? this.printerFlag + ..materials = materials ?? this.materials + ..materialId = materialId ?? this.materialId + ..details = details ?? this.details + ..thumbnailImg = thumbnailImg ?? this.thumbnailImg + ..info = info ?? this.info + ..buyCount = buyCount ?? this.buyCount + ..sellCountLimit = sellCountLimit ?? this.sellCountLimit + ..stockRecoveryTime = stockRecoveryTime ?? this.stockRecoveryTime + ..isAddPurchase = isAddPurchase ?? this.isAddPurchase + ..limitNum = limitNum ?? this.limitNum + ..rankId = rankId ?? this.rankId + ..happyBean = happyBean ?? this.happyBean + ..imgs = imgs ?? this.imgs + ..productSkuList = productSkuList ?? this.productSkuList; + } +} \ No newline at end of file diff --git a/lib/generated/json/product_sku_list.g.dart b/lib/generated/json/product_sku_list.g.dart new file mode 100644 index 00000000..da130920 --- /dev/null +++ b/lib/generated/json/product_sku_list.g.dart @@ -0,0 +1,247 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/product_sku_list.dart'; + +ProductSkuList $ProductSkuListFromJson(Map json) { + final ProductSkuList productSkuList = ProductSkuList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productSkuList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + productSkuList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + productSkuList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + productSkuList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + productSkuList.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + productSkuList.storeId = storeId; + } + final String? skuCode = jsonConvert.convert(json['skuCode']); + if (skuCode != null) { + productSkuList.skuCode = skuCode; + } + final String? skuNameStr = jsonConvert.convert(json['skuNameStr']); + if (skuNameStr != null) { + productSkuList.skuNameStr = skuNameStr; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + productSkuList.productId = productId; + } + final String? skuPrice = jsonConvert.convert(json['skuPrice']); + if (skuPrice != null) { + productSkuList.skuPrice = skuPrice; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + productSkuList.applyPrice = applyPrice; + } + final String? vipPrice = jsonConvert.convert(json['vipPrice']); + if (vipPrice != null) { + productSkuList.vipPrice = vipPrice; + } + final String? packagingFee = jsonConvert.convert( + json['packagingFee']); + if (packagingFee != null) { + productSkuList.packagingFee = packagingFee; + } + final dynamic skuImg = json['skuImg']; + if (skuImg != null) { + productSkuList.skuImg = skuImg; + } + final int? skuStock = jsonConvert.convert(json['skuStock']); + if (skuStock != null) { + productSkuList.skuStock = skuStock; + } + final int? autoRenewSkuStock = jsonConvert.convert( + json['autoRenewSkuStock']); + if (autoRenewSkuStock != null) { + productSkuList.autoRenewSkuStock = autoRenewSkuStock; + } + final int? deliveries = jsonConvert.convert(json['deliveries']); + if (deliveries != null) { + productSkuList.deliveries = deliveries; + } + final String? ticketType = jsonConvert.convert(json['ticketType']); + if (ticketType != null) { + productSkuList.ticketType = ticketType; + } + final dynamic ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; + if (ticketWipedTimeTemplateId != null) { + productSkuList.ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; + } + final dynamic takeType = json['takeType']; + if (takeType != null) { + productSkuList.takeType = takeType; + } + final String? ticketDays = jsonConvert.convert(json['ticketDays']); + if (ticketDays != null) { + productSkuList.ticketDays = ticketDays; + } + final String? ticketExpireTime = jsonConvert.convert( + json['ticketExpireTime']); + if (ticketExpireTime != null) { + productSkuList.ticketExpireTime = ticketExpireTime; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + productSkuList.sort = sort; + } + final String? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + productSkuList.setMeal = setMeal; + } + final dynamic productSetMeals = json['productSetMeals']; + if (productSetMeals != null) { + productSkuList.productSetMeals = productSetMeals; + } + final double? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + productSkuList.weight = weight; + } + final double? volume = jsonConvert.convert(json['volume']); + if (volume != null) { + productSkuList.volume = volume; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productSkuList.isDelete = isDelete; + } + final dynamic material = json['material']; + if (material != null) { + productSkuList.material = material; + } + final int? version = jsonConvert.convert(json['version']); + if (version != null) { + productSkuList.version = version; + } + final dynamic skuTickets = json['skuTickets']; + if (skuTickets != null) { + productSkuList.skuTickets = skuTickets; + } + final String? ticketStyle = jsonConvert.convert(json['ticketStyle']); + if (ticketStyle != null) { + productSkuList.ticketStyle = ticketStyle; + } + return productSkuList; +} + +Map $ProductSkuListToJson(ProductSkuList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['skuCode'] = entity.skuCode; + data['skuNameStr'] = entity.skuNameStr; + data['productId'] = entity.productId; + data['skuPrice'] = entity.skuPrice; + data['applyPrice'] = entity.applyPrice; + data['vipPrice'] = entity.vipPrice; + data['packagingFee'] = entity.packagingFee; + data['skuImg'] = entity.skuImg; + data['skuStock'] = entity.skuStock; + data['autoRenewSkuStock'] = entity.autoRenewSkuStock; + data['deliveries'] = entity.deliveries; + data['ticketType'] = entity.ticketType; + data['ticketWipedTimeTemplateId'] = entity.ticketWipedTimeTemplateId; + data['takeType'] = entity.takeType; + data['ticketDays'] = entity.ticketDays; + data['ticketExpireTime'] = entity.ticketExpireTime; + data['sort'] = entity.sort; + data['setMeal'] = entity.setMeal; + data['productSetMeals'] = entity.productSetMeals; + data['weight'] = entity.weight; + data['volume'] = entity.volume; + data['isDelete'] = entity.isDelete; + data['material'] = entity.material; + data['version'] = entity.version; + data['skuTickets'] = entity.skuTickets; + data['ticketStyle'] = entity.ticketStyle; + return data; +} + +extension ProductSkuListExtension on ProductSkuList { + ProductSkuList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? skuCode, + String? skuNameStr, + String? productId, + String? skuPrice, + String? applyPrice, + String? vipPrice, + String? packagingFee, + dynamic skuImg, + int? skuStock, + int? autoRenewSkuStock, + int? deliveries, + String? ticketType, + dynamic ticketWipedTimeTemplateId, + dynamic takeType, + String? ticketDays, + String? ticketExpireTime, + int? sort, + String? setMeal, + dynamic productSetMeals, + double? weight, + double? volume, + int? isDelete, + dynamic material, + int? version, + dynamic skuTickets, + String? ticketStyle, + }) { + return ProductSkuList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..skuCode = skuCode ?? this.skuCode + ..skuNameStr = skuNameStr ?? this.skuNameStr + ..productId = productId ?? this.productId + ..skuPrice = skuPrice ?? this.skuPrice + ..applyPrice = applyPrice ?? this.applyPrice + ..vipPrice = vipPrice ?? this.vipPrice + ..packagingFee = packagingFee ?? this.packagingFee + ..skuImg = skuImg ?? this.skuImg + ..skuStock = skuStock ?? this.skuStock + ..autoRenewSkuStock = autoRenewSkuStock ?? this.autoRenewSkuStock + ..deliveries = deliveries ?? this.deliveries + ..ticketType = ticketType ?? this.ticketType + ..ticketWipedTimeTemplateId = ticketWipedTimeTemplateId ?? + this.ticketWipedTimeTemplateId + ..takeType = takeType ?? this.takeType + ..ticketDays = ticketDays ?? this.ticketDays + ..ticketExpireTime = ticketExpireTime ?? this.ticketExpireTime + ..sort = sort ?? this.sort + ..setMeal = setMeal ?? this.setMeal + ..productSetMeals = productSetMeals ?? this.productSetMeals + ..weight = weight ?? this.weight + ..volume = volume ?? this.volume + ..isDelete = isDelete ?? this.isDelete + ..material = material ?? this.material + ..version = version ?? this.version + ..skuTickets = skuTickets ?? this.skuTickets + ..ticketStyle = ticketStyle ?? this.ticketStyle; + } +} \ No newline at end of file diff --git a/lib/generated/json/promotion.g.dart b/lib/generated/json/promotion.g.dart new file mode 100644 index 00000000..b619e741 --- /dev/null +++ b/lib/generated/json/promotion.g.dart @@ -0,0 +1,182 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/promotion.dart'; + +Promotion $PromotionFromJson(Map json) { + final Promotion promotion = Promotion(); + final String? activityEndTime = jsonConvert.convert( + json['activityEndTime']); + if (activityEndTime != null) { + promotion.activityEndTime = activityEndTime; + } + final String? activityStartTime = jsonConvert.convert( + json['activityStartTime']); + if (activityStartTime != null) { + promotion.activityStartTime = activityStartTime; + } + final String? applyEndTime = jsonConvert.convert( + json['applyEndTime']); + if (applyEndTime != null) { + promotion.applyEndTime = applyEndTime; + } + final String? applyStartTime = jsonConvert.convert( + json['applyStartTime']); + if (applyStartTime != null) { + promotion.applyStartTime = applyStartTime; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + promotion.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + promotion.createUser = createUser; + } + final String? description = jsonConvert.convert(json['description']); + if (description != null) { + promotion.description = description; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + promotion.id = id; + } + final String? image = jsonConvert.convert(json['image']); + if (image != null) { + promotion.image = image; + } + final num? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + promotion.isDelete = isDelete; + } + final num? isNeedSecurityDeposit = jsonConvert.convert( + json['isNeedSecurityDeposit']); + if (isNeedSecurityDeposit != null) { + promotion.isNeedSecurityDeposit = isNeedSecurityDeposit; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + promotion.name = name; + } + final List? promotionDetail = (json['promotionDetail'] as List< + dynamic>?)?.map( + (e) => jsonConvert.convert(e) as DetailBean).toList(); + if (promotionDetail != null) { + promotion.promotionDetail = promotionDetail; + } + final num? promotionPlan = jsonConvert.convert(json['promotionPlan']); + if (promotionPlan != null) { + promotion.promotionPlan = promotionPlan; + } + final num? promotionType = jsonConvert.convert(json['promotionType']); + if (promotionType != null) { + promotion.promotionType = promotionType; + } + final String? securityDeposit = jsonConvert.convert( + json['securityDeposit']); + if (securityDeposit != null) { + promotion.securityDeposit = securityDeposit; + } + final num? status = jsonConvert.convert(json['status']); + if (status != null) { + promotion.status = status; + } + final String? tag = jsonConvert.convert(json['tag']); + if (tag != null) { + promotion.tag = tag; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + promotion.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + promotion.updateUser = updateUser; + } + return promotion; +} + +Map $PromotionToJson(Promotion entity) { + final Map data = {}; + data['activityEndTime'] = entity.activityEndTime; + data['activityStartTime'] = entity.activityStartTime; + data['applyEndTime'] = entity.applyEndTime; + data['applyStartTime'] = entity.applyStartTime; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['description'] = entity.description; + data['id'] = entity.id; + data['image'] = entity.image; + data['isDelete'] = entity.isDelete; + data['isNeedSecurityDeposit'] = entity.isNeedSecurityDeposit; + data['name'] = entity.name; + data['promotionDetail'] = + entity.promotionDetail?.map((v) => v.toJson()).toList(); + data['promotionPlan'] = entity.promotionPlan; + data['promotionType'] = entity.promotionType; + data['securityDeposit'] = entity.securityDeposit; + data['status'] = entity.status; + data['tag'] = entity.tag; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + return data; +} + +extension PromotionExtension on Promotion { + Promotion copyWith({ + String? activityEndTime, + String? activityStartTime, + String? applyEndTime, + String? applyStartTime, + String? createTime, + String? createUser, + String? description, + String? id, + String? image, + num? isDelete, + num? isNeedSecurityDeposit, + String? name, + List? promotionDetail, + num? promotionPlan, + num? promotionType, + String? securityDeposit, + num? status, + String? tag, + String? updateTime, + String? updateUser, + }) { + return Promotion() + ..activityEndTime = activityEndTime ?? this.activityEndTime + ..activityStartTime = activityStartTime ?? this.activityStartTime + ..applyEndTime = applyEndTime ?? this.applyEndTime + ..applyStartTime = applyStartTime ?? this.applyStartTime + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..description = description ?? this.description + ..id = id ?? this.id + ..image = image ?? this.image + ..isDelete = isDelete ?? this.isDelete + ..isNeedSecurityDeposit = isNeedSecurityDeposit ?? + this.isNeedSecurityDeposit + ..name = name ?? this.name + ..promotionDetail = promotionDetail ?? this.promotionDetail + ..promotionPlan = promotionPlan ?? this.promotionPlan + ..promotionType = promotionType ?? this.promotionType + ..securityDeposit = securityDeposit ?? this.securityDeposit + ..status = status ?? this.status + ..tag = tag ?? this.tag + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser; + } +} + +DetailBean $DetailBeanFromJson(Map json) { + final DetailBean detailBean = DetailBean(); + return detailBean; +} + +Map $DetailBeanToJson(DetailBean entity) { + final Map data = {}; + return data; +} + +extension DetailBeanExtension on DetailBean { +} \ No newline at end of file diff --git a/lib/generated/json/promotion_info.g.dart b/lib/generated/json/promotion_info.g.dart new file mode 100644 index 00000000..a31d5030 --- /dev/null +++ b/lib/generated/json/promotion_info.g.dart @@ -0,0 +1,301 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/promotion_info.dart'; + +PromotionInfo $PromotionInfoFromJson(Map json) { + final PromotionInfo promotionInfo = PromotionInfo(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + promotionInfo.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + promotionInfo.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + promotionInfo.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + promotionInfo.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + promotionInfo.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + promotionInfo.storeId = storeId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + promotionInfo.name = name; + } + final String? image = jsonConvert.convert(json['image']); + if (image != null) { + promotionInfo.image = image; + } + final String? description = jsonConvert.convert(json['description']); + if (description != null) { + promotionInfo.description = description; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + promotionInfo.status = status; + } + final String? applyStartTime = jsonConvert.convert( + json['applyStartTime']); + if (applyStartTime != null) { + promotionInfo.applyStartTime = applyStartTime; + } + final String? applyEndTime = jsonConvert.convert( + json['applyEndTime']); + if (applyEndTime != null) { + promotionInfo.applyEndTime = applyEndTime; + } + final String? activityStartTime = jsonConvert.convert( + json['activityStartTime']); + if (activityStartTime != null) { + promotionInfo.activityStartTime = activityStartTime; + } + final String? activityEndTime = jsonConvert.convert( + json['activityEndTime']); + if (activityEndTime != null) { + promotionInfo.activityEndTime = activityEndTime; + } + final dynamic doStartTime = json['doStartTime']; + if (doStartTime != null) { + promotionInfo.doStartTime = doStartTime; + } + final dynamic doEndTime = json['doEndTime']; + if (doEndTime != null) { + promotionInfo.doEndTime = doEndTime; + } + final int? isNeedSecurityDeposit = jsonConvert.convert( + json['isNeedSecurityDeposit']); + if (isNeedSecurityDeposit != null) { + promotionInfo.isNeedSecurityDeposit = isNeedSecurityDeposit; + } + final String? securityDeposit = jsonConvert.convert( + json['securityDeposit']); + if (securityDeposit != null) { + promotionInfo.securityDeposit = securityDeposit; + } + final String? tag = jsonConvert.convert(json['tag']); + if (tag != null) { + promotionInfo.tag = tag; + } + final int? promotionType = jsonConvert.convert(json['promotionType']); + if (promotionType != null) { + promotionInfo.promotionType = promotionType; + } + final int? promotionPlan = jsonConvert.convert(json['promotionPlan']); + if (promotionPlan != null) { + promotionInfo.promotionPlan = promotionPlan; + } + final List< + PromotionInfoPromotionDetail>? promotionDetail = (json['promotionDetail'] as List< + dynamic>?)?.map( + (e) => + jsonConvert.convert( + e) as PromotionInfoPromotionDetail).toList(); + if (promotionDetail != null) { + promotionInfo.promotionDetail = promotionDetail; + } + final List? channels = (json['channels'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (channels != null) { + promotionInfo.channels = channels; + } + final bool? isVip = jsonConvert.convert(json['isVip']); + if (isVip != null) { + promotionInfo.isVip = isVip; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + promotionInfo.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + promotionInfo.tenantCode = tenantCode; + } + final bool? canPartake = jsonConvert.convert(json['canPartake']); + if (canPartake != null) { + promotionInfo.canPartake = canPartake; + } + final bool? isMaxPromotion = jsonConvert.convert( + json['isMaxPromotion']); + if (isMaxPromotion != null) { + promotionInfo.isMaxPromotion = isMaxPromotion; + } + final dynamic promotionProuctList = json['promotionProuctList']; + if (promotionProuctList != null) { + promotionInfo.promotionProuctList = promotionProuctList; + } + return promotionInfo; +} + +Map $PromotionInfoToJson(PromotionInfo entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['name'] = entity.name; + data['image'] = entity.image; + data['description'] = entity.description; + data['status'] = entity.status; + data['applyStartTime'] = entity.applyStartTime; + data['applyEndTime'] = entity.applyEndTime; + data['activityStartTime'] = entity.activityStartTime; + data['activityEndTime'] = entity.activityEndTime; + data['doStartTime'] = entity.doStartTime; + data['doEndTime'] = entity.doEndTime; + data['isNeedSecurityDeposit'] = entity.isNeedSecurityDeposit; + data['securityDeposit'] = entity.securityDeposit; + data['tag'] = entity.tag; + data['promotionType'] = entity.promotionType; + data['promotionPlan'] = entity.promotionPlan; + data['promotionDetail'] = + entity.promotionDetail?.map((v) => v.toJson()).toList(); + data['channels'] = entity.channels; + data['isVip'] = entity.isVip; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['canPartake'] = entity.canPartake; + data['isMaxPromotion'] = entity.isMaxPromotion; + data['promotionProuctList'] = entity.promotionProuctList; + return data; +} + +extension PromotionInfoExtension on PromotionInfo { + PromotionInfo copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? name, + String? image, + String? description, + int? status, + String? applyStartTime, + String? applyEndTime, + String? activityStartTime, + String? activityEndTime, + dynamic doStartTime, + dynamic doEndTime, + int? isNeedSecurityDeposit, + String? securityDeposit, + String? tag, + int? promotionType, + int? promotionPlan, + List? promotionDetail, + List? channels, + bool? isVip, + int? isDelete, + String? tenantCode, + bool? canPartake, + bool? isMaxPromotion, + dynamic promotionProuctList, + }) { + return PromotionInfo() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..name = name ?? this.name + ..image = image ?? this.image + ..description = description ?? this.description + ..status = status ?? this.status + ..applyStartTime = applyStartTime ?? this.applyStartTime + ..applyEndTime = applyEndTime ?? this.applyEndTime + ..activityStartTime = activityStartTime ?? this.activityStartTime + ..activityEndTime = activityEndTime ?? this.activityEndTime + ..doStartTime = doStartTime ?? this.doStartTime + ..doEndTime = doEndTime ?? this.doEndTime + ..isNeedSecurityDeposit = isNeedSecurityDeposit ?? + this.isNeedSecurityDeposit + ..securityDeposit = securityDeposit ?? this.securityDeposit + ..tag = tag ?? this.tag + ..promotionType = promotionType ?? this.promotionType + ..promotionPlan = promotionPlan ?? this.promotionPlan + ..promotionDetail = promotionDetail ?? this.promotionDetail + ..channels = channels ?? this.channels + ..isVip = isVip ?? this.isVip + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..canPartake = canPartake ?? this.canPartake + ..isMaxPromotion = isMaxPromotion ?? this.isMaxPromotion + ..promotionProuctList = promotionProuctList ?? this.promotionProuctList; + } +} + +PromotionInfoPromotionDetail $PromotionInfoPromotionDetailFromJson( + Map json) { + final PromotionInfoPromotionDetail promotionInfoPromotionDetail = PromotionInfoPromotionDetail(); + final String? limitTime = jsonConvert.convert(json['limitTime']); + if (limitTime != null) { + promotionInfoPromotionDetail.limitTime = limitTime; + } + final String? discountRate = jsonConvert.convert( + json['discountRate']); + if (discountRate != null) { + promotionInfoPromotionDetail.discountRate = discountRate; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + promotionInfoPromotionDetail.discountAmount = discountAmount; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + promotionInfoPromotionDetail.fullAmount = fullAmount; + } + final String? collageNumber = jsonConvert.convert( + json['collageNumber']); + if (collageNumber != null) { + promotionInfoPromotionDetail.collageNumber = collageNumber; + } + final String? fullNumber = jsonConvert.convert(json['fullNumber']); + if (fullNumber != null) { + promotionInfoPromotionDetail.fullNumber = fullNumber; + } + return promotionInfoPromotionDetail; +} + +Map $PromotionInfoPromotionDetailToJson( + PromotionInfoPromotionDetail entity) { + final Map data = {}; + data['limitTime'] = entity.limitTime; + data['discountRate'] = entity.discountRate; + data['discountAmount'] = entity.discountAmount; + data['fullAmount'] = entity.fullAmount; + data['collageNumber'] = entity.collageNumber; + data['fullNumber'] = entity.fullNumber; + return data; +} + +extension PromotionInfoPromotionDetailExtension on PromotionInfoPromotionDetail { + PromotionInfoPromotionDetail copyWith({ + String? limitTime, + String? discountRate, + String? discountAmount, + String? fullAmount, + String? collageNumber, + String? fullNumber, + }) { + return PromotionInfoPromotionDetail() + ..limitTime = limitTime ?? this.limitTime + ..discountRate = discountRate ?? this.discountRate + ..discountAmount = discountAmount ?? this.discountAmount + ..fullAmount = fullAmount ?? this.fullAmount + ..collageNumber = collageNumber ?? this.collageNumber + ..fullNumber = fullNumber ?? this.fullNumber; + } +} \ No newline at end of file diff --git a/lib/generated/json/rank.g.dart b/lib/generated/json/rank.g.dart new file mode 100644 index 00000000..4e626633 --- /dev/null +++ b/lib/generated/json/rank.g.dart @@ -0,0 +1,131 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/rank.dart'; + +Rank $RankFromJson(Map json) { + final Rank rank = Rank(); + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + rank.createTime = createTime; + } + final int? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + rank.createUser = createUser; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + rank.id = id; + } + final int? price = jsonConvert.convert(json['price']); + if (price != null) { + rank.price = price; + } + final String? rankContent = jsonConvert.convert(json['rankContent']); + if (rankContent != null) { + rank.rankContent = rankContent; + } + final String? rankImg = jsonConvert.convert(json['rankImg']); + if (rankImg != null) { + rank.rankImg = rankImg; + } + final String? rankName = jsonConvert.convert(json['rankName']); + if (rankName != null) { + rank.rankName = rankName; + } + final int? rankOrigin = jsonConvert.convert(json['rankOrigin']); + if (rankOrigin != null) { + rank.rankOrigin = rankOrigin; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + rank.status = status; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + rank.updateTime = updateTime; + } + final int? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + rank.updateUser = updateUser; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + rank.level = level; + } + final String? color = jsonConvert.convert(json['color']); + if (color != null) { + rank.color = color; + } + final String? textColor = jsonConvert.convert(json['textColor']); + if (textColor != null) { + rank.textColor = textColor; + } + final int? originScore = jsonConvert.convert(json['originScore']); + if (originScore != null) { + rank.originScore = originScore; + } + final int? demotionScore = jsonConvert.convert(json['demotionScore']); + if (demotionScore != null) { + rank.demotionScore = demotionScore; + } + return rank; +} + +Map $RankToJson(Rank entity) { + final Map data = {}; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['id'] = entity.id; + data['price'] = entity.price; + data['rankContent'] = entity.rankContent; + data['rankImg'] = entity.rankImg; + data['rankName'] = entity.rankName; + data['rankOrigin'] = entity.rankOrigin; + data['status'] = entity.status; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['level'] = entity.level; + data['color'] = entity.color; + data['textColor'] = entity.textColor; + data['originScore'] = entity.originScore; + data['demotionScore'] = entity.demotionScore; + return data; +} + +extension RankExtension on Rank { + Rank copyWith({ + String? createTime, + int? createUser, + int? id, + int? price, + String? rankContent, + String? rankImg, + String? rankName, + int? rankOrigin, + bool? status, + String? updateTime, + int? updateUser, + int? level, + String? color, + String? textColor, + int? originScore, + int? demotionScore, + }) { + return Rank() + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..id = id ?? this.id + ..price = price ?? this.price + ..rankContent = rankContent ?? this.rankContent + ..rankImg = rankImg ?? this.rankImg + ..rankName = rankName ?? this.rankName + ..rankOrigin = rankOrigin ?? this.rankOrigin + ..status = status ?? this.status + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..level = level ?? this.level + ..color = color ?? this.color + ..textColor = textColor ?? this.textColor + ..originScore = originScore ?? this.originScore + ..demotionScore = demotionScore ?? this.demotionScore; + } +} \ No newline at end of file diff --git a/lib/generated/json/recharge.g.dart b/lib/generated/json/recharge.g.dart new file mode 100644 index 00000000..aae89d57 --- /dev/null +++ b/lib/generated/json/recharge.g.dart @@ -0,0 +1,83 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/recharge.dart'; + +Recharge $RechargeFromJson(Map json) { + final Recharge recharge = Recharge(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + recharge.id = id; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + recharge.rechargeMoney = rechargeMoney; + } + final String? giftdMoney = jsonConvert.convert(json['giftdMoney']); + if (giftdMoney != null) { + recharge.giftdMoney = giftdMoney; + } + final dynamic gitfdCouponId = json['gitfdCouponId']; + if (gitfdCouponId != null) { + recharge.gitfdCouponId = gitfdCouponId; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + recharge.tenantCode = tenantCode; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + recharge.createTime = createTime; + } + final int? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + recharge.isDeleted = isDeleted; + } + final int? rechargeType = jsonConvert.convert(json['rechargeType']); + if (rechargeType != null) { + recharge.rechargeType = rechargeType; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + recharge.remark = remark; + } + return recharge; +} + +Map $RechargeToJson(Recharge entity) { + final Map data = {}; + data['id'] = entity.id; + data['rechargeMoney'] = entity.rechargeMoney; + data['giftdMoney'] = entity.giftdMoney; + data['gitfdCouponId'] = entity.gitfdCouponId; + data['tenantCode'] = entity.tenantCode; + data['createTime'] = entity.createTime; + data['isDeleted'] = entity.isDeleted; + data['rechargeType'] = entity.rechargeType; + data['remark'] = entity.remark; + return data; +} + +extension RechargeExtension on Recharge { + Recharge copyWith({ + String? id, + String? rechargeMoney, + String? giftdMoney, + dynamic gitfdCouponId, + String? tenantCode, + String? createTime, + int? isDeleted, + int? rechargeType, + String? remark, + }) { + return Recharge() + ..id = id ?? this.id + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..giftdMoney = giftdMoney ?? this.giftdMoney + ..gitfdCouponId = gitfdCouponId ?? this.gitfdCouponId + ..tenantCode = tenantCode ?? this.tenantCode + ..createTime = createTime ?? this.createTime + ..isDeleted = isDeleted ?? this.isDeleted + ..rechargeType = rechargeType ?? this.rechargeType + ..remark = remark ?? this.remark; + } +} \ No newline at end of file diff --git a/lib/generated/json/recharge_act.g.dart b/lib/generated/json/recharge_act.g.dart new file mode 100644 index 00000000..5ab72da3 --- /dev/null +++ b/lib/generated/json/recharge_act.g.dart @@ -0,0 +1,49 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/recharge_act.dart'; +import 'package:huixiang/data/preferential.dart'; + + +RechargeAct $RechargeActFromJson(Map json) { + final RechargeAct rechargeAct = RechargeAct(); + final List< + PreferentialList>? preferentialList = (json['preferentialList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as PreferentialList) + .toList(); + if (preferentialList != null) { + rechargeAct.preferentialList = preferentialList; + } + final List? channels = (json['channels'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (channels != null) { + rechargeAct.channels = channels; + } + final bool? isOpen = jsonConvert.convert(json['isOpen']); + if (isOpen != null) { + rechargeAct.isOpen = isOpen; + } + return rechargeAct; +} + +Map $RechargeActToJson(RechargeAct entity) { + final Map data = {}; + data['preferentialList'] = + entity.preferentialList?.map((v) => v.toJson()).toList(); + data['channels'] = entity.channels; + data['isOpen'] = entity.isOpen; + return data; +} + +extension RechargeActExtension on RechargeAct { + RechargeAct copyWith({ + List? preferentialList, + List? channels, + bool? isOpen, + }) { + return RechargeAct() + ..preferentialList = preferentialList ?? this.preferentialList + ..channels = channels ?? this.channels + ..isOpen = isOpen ?? this.isOpen; + } +} \ No newline at end of file diff --git a/lib/generated/json/recharge_flow.g.dart b/lib/generated/json/recharge_flow.g.dart new file mode 100644 index 00000000..415a6de9 --- /dev/null +++ b/lib/generated/json/recharge_flow.g.dart @@ -0,0 +1,157 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/recharge_flow.dart'; + +RechargeFlow $RechargeFlowFromJson(Map json) { + final RechargeFlow rechargeFlow = RechargeFlow(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + rechargeFlow.id = id; + } + final int? rechargeType = jsonConvert.convert(json['rechargeType']); + if (rechargeType != null) { + rechargeFlow.rechargeType = rechargeType; + } + final String? rechargeName = jsonConvert.convert( + json['rechargeName']); + if (rechargeName != null) { + rechargeFlow.rechargeName = rechargeName; + } + final int? source = jsonConvert.convert(json['source']); + if (source != null) { + rechargeFlow.source = source; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + rechargeFlow.createTime = createTime; + } + final dynamic createTimeFormat = json['createTimeFormat']; + if (createTimeFormat != null) { + rechargeFlow.createTimeFormat = createTimeFormat; + } + final String? createPerson = jsonConvert.convert( + json['createPerson']); + if (createPerson != null) { + rechargeFlow.createPerson = createPerson; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + rechargeFlow.phone = phone; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + rechargeFlow.tenantCode = tenantCode; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + rechargeFlow.storeName = storeName; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + rechargeFlow.rechargeMoney = rechargeMoney; + } + final String? giftdMoney = jsonConvert.convert(json['giftdMoney']); + if (giftdMoney != null) { + rechargeFlow.giftdMoney = giftdMoney; + } + final String? sumMoney = jsonConvert.convert(json['sumMoney']); + if (sumMoney != null) { + rechargeFlow.sumMoney = sumMoney; + } + final dynamic createMemberId = json['createMemberId']; + if (createMemberId != null) { + rechargeFlow.createMemberId = createMemberId; + } + final dynamic rechargePreferentialId = json['rechargePreferentialId']; + if (rechargePreferentialId != null) { + rechargeFlow.rechargePreferentialId = rechargePreferentialId; + } + final int? rechargeStatus = jsonConvert.convert(json['rechargeStatus']); + if (rechargeStatus != null) { + rechargeFlow.rechargeStatus = rechargeStatus; + } + final dynamic refuseReason = json['refuseReason']; + if (refuseReason != null) { + rechargeFlow.refuseReason = refuseReason; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + rechargeFlow.balance = balance; + } + final String? realRecharge = jsonConvert.convert( + json['realRecharge']); + if (realRecharge != null) { + rechargeFlow.realRecharge = realRecharge; + } + return rechargeFlow; +} + +Map $RechargeFlowToJson(RechargeFlow entity) { + final Map data = {}; + data['id'] = entity.id; + data['rechargeType'] = entity.rechargeType; + data['rechargeName'] = entity.rechargeName; + data['source'] = entity.source; + data['createTime'] = entity.createTime; + data['createTimeFormat'] = entity.createTimeFormat; + data['createPerson'] = entity.createPerson; + data['phone'] = entity.phone; + data['tenantCode'] = entity.tenantCode; + data['storeName'] = entity.storeName; + data['rechargeMoney'] = entity.rechargeMoney; + data['giftdMoney'] = entity.giftdMoney; + data['sumMoney'] = entity.sumMoney; + data['createMemberId'] = entity.createMemberId; + data['rechargePreferentialId'] = entity.rechargePreferentialId; + data['rechargeStatus'] = entity.rechargeStatus; + data['refuseReason'] = entity.refuseReason; + data['balance'] = entity.balance; + data['realRecharge'] = entity.realRecharge; + return data; +} + +extension RechargeFlowExtension on RechargeFlow { + RechargeFlow copyWith({ + String? id, + int? rechargeType, + String? rechargeName, + int? source, + String? createTime, + dynamic createTimeFormat, + String? createPerson, + String? phone, + String? tenantCode, + String? storeName, + String? rechargeMoney, + String? giftdMoney, + String? sumMoney, + dynamic createMemberId, + dynamic rechargePreferentialId, + int? rechargeStatus, + dynamic refuseReason, + String? balance, + String? realRecharge, + }) { + return RechargeFlow() + ..id = id ?? this.id + ..rechargeType = rechargeType ?? this.rechargeType + ..rechargeName = rechargeName ?? this.rechargeName + ..source = source ?? this.source + ..createTime = createTime ?? this.createTime + ..createTimeFormat = createTimeFormat ?? this.createTimeFormat + ..createPerson = createPerson ?? this.createPerson + ..phone = phone ?? this.phone + ..tenantCode = tenantCode ?? this.tenantCode + ..storeName = storeName ?? this.storeName + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..giftdMoney = giftdMoney ?? this.giftdMoney + ..sumMoney = sumMoney ?? this.sumMoney + ..createMemberId = createMemberId ?? this.createMemberId + ..rechargePreferentialId = rechargePreferentialId ?? + this.rechargePreferentialId + ..rechargeStatus = rechargeStatus ?? this.rechargeStatus + ..refuseReason = refuseReason ?? this.refuseReason + ..balance = balance ?? this.balance + ..realRecharge = realRecharge ?? this.realRecharge; + } +} \ No newline at end of file diff --git a/lib/generated/json/refund_reason.g.dart b/lib/generated/json/refund_reason.g.dart new file mode 100644 index 00000000..15693807 --- /dev/null +++ b/lib/generated/json/refund_reason.g.dart @@ -0,0 +1,82 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/refund_reason.dart'; + +RefundReason $RefundReasonFromJson(Map json) { + final RefundReason refundReason = RefundReason(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + refundReason.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + refundReason.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + refundReason.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + refundReason.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + refundReason.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + refundReason.storeId = storeId; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + refundReason.type = type; + } + final String? reason = jsonConvert.convert(json['reason']); + if (reason != null) { + refundReason.reason = reason; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + refundReason.isDelete = isDelete; + } + return refundReason; +} + +Map $RefundReasonToJson(RefundReason entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['type'] = entity.type; + data['reason'] = entity.reason; + data['isDelete'] = entity.isDelete; + return data; +} + +extension RefundReasonExtension on RefundReason { + RefundReason copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + int? type, + String? reason, + int? isDelete, + }) { + return RefundReason() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..type = type ?? this.type + ..reason = reason ?? this.reason + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/second_card.g.dart b/lib/generated/json/second_card.g.dart new file mode 100644 index 00000000..6c882964 --- /dev/null +++ b/lib/generated/json/second_card.g.dart @@ -0,0 +1,54 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/second_card.dart'; + +SecondCard $SecondCardFromJson(Map json) { + final SecondCard secondCard = SecondCard(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + secondCard.id = id; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + secondCard.phone = phone; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + secondCard.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + secondCard.headimg = headimg; + } + final bool? isAdd = jsonConvert.convert(json['isAdd']); + if (isAdd != null) { + secondCard.isAdd = isAdd; + } + return secondCard; +} + +Map $SecondCardToJson(SecondCard entity) { + final Map data = {}; + data['id'] = entity.id; + data['phone'] = entity.phone; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['isAdd'] = entity.isAdd; + return data; +} + +extension SecondCardExtension on SecondCard { + SecondCard copyWith({ + String? id, + String? phone, + String? nickname, + String? headimg, + bool? isAdd, + }) { + return SecondCard() + ..id = id ?? this.id + ..phone = phone ?? this.phone + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..isAdd = isAdd ?? this.isAdd; + } +} \ No newline at end of file diff --git a/lib/generated/json/service_bug.g.dart b/lib/generated/json/service_bug.g.dart new file mode 100644 index 00000000..3c6400e3 --- /dev/null +++ b/lib/generated/json/service_bug.g.dart @@ -0,0 +1,149 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/service_bug.dart'; + +ServiceBug $ServiceBugFromJson(Map json) { + final ServiceBug serviceBug = ServiceBug(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + serviceBug.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + serviceBug.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + serviceBug.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + serviceBug.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + serviceBug.updateUser = updateUser; + } + final String? tenantId = jsonConvert.convert(json['tenantId']); + if (tenantId != null) { + serviceBug.tenantId = tenantId; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + serviceBug.tenantCode = tenantCode; + } + final String? packageId = jsonConvert.convert(json['packageId']); + if (packageId != null) { + serviceBug.packageId = packageId; + } + final String? oldPackageId = jsonConvert.convert( + json['oldPackageId']); + if (oldPackageId != null) { + serviceBug.oldPackageId = oldPackageId; + } + final String? packagePrice = jsonConvert.convert( + json['packagePrice']); + if (packagePrice != null) { + serviceBug.packagePrice = packagePrice; + } + final int? packageNum = jsonConvert.convert(json['packageNum']); + if (packageNum != null) { + serviceBug.packageNum = packageNum; + } + final int? packageDiscount = jsonConvert.convert( + json['packageDiscount']); + if (packageDiscount != null) { + serviceBug.packageDiscount = packageDiscount; + } + final String? expirationTime = jsonConvert.convert( + json['expirationTime']); + if (expirationTime != null) { + serviceBug.expirationTime = expirationTime; + } + final dynamic upgradeTime = json['upgradeTime']; + if (upgradeTime != null) { + serviceBug.upgradeTime = upgradeTime; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + serviceBug.status = status; + } + final int? payChannel = jsonConvert.convert(json['payChannel']); + if (payChannel != null) { + serviceBug.payChannel = payChannel; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + serviceBug.isDelete = isDelete; + } + final String? packageName = jsonConvert.convert(json['packageName']); + if (packageName != null) { + serviceBug.packageName = packageName; + } + return serviceBug; +} + +Map $ServiceBugToJson(ServiceBug entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['tenantId'] = entity.tenantId; + data['tenantCode'] = entity.tenantCode; + data['packageId'] = entity.packageId; + data['oldPackageId'] = entity.oldPackageId; + data['packagePrice'] = entity.packagePrice; + data['packageNum'] = entity.packageNum; + data['packageDiscount'] = entity.packageDiscount; + data['expirationTime'] = entity.expirationTime; + data['upgradeTime'] = entity.upgradeTime; + data['status'] = entity.status; + data['payChannel'] = entity.payChannel; + data['isDelete'] = entity.isDelete; + data['packageName'] = entity.packageName; + return data; +} + +extension ServiceBugExtension on ServiceBug { + ServiceBug copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? tenantId, + String? tenantCode, + String? packageId, + String? oldPackageId, + String? packagePrice, + int? packageNum, + int? packageDiscount, + String? expirationTime, + dynamic upgradeTime, + int? status, + int? payChannel, + int? isDelete, + String? packageName, + }) { + return ServiceBug() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..tenantId = tenantId ?? this.tenantId + ..tenantCode = tenantCode ?? this.tenantCode + ..packageId = packageId ?? this.packageId + ..oldPackageId = oldPackageId ?? this.oldPackageId + ..packagePrice = packagePrice ?? this.packagePrice + ..packageNum = packageNum ?? this.packageNum + ..packageDiscount = packageDiscount ?? this.packageDiscount + ..expirationTime = expirationTime ?? this.expirationTime + ..upgradeTime = upgradeTime ?? this.upgradeTime + ..status = status ?? this.status + ..payChannel = payChannel ?? this.payChannel + ..isDelete = isDelete ?? this.isDelete + ..packageName = packageName ?? this.packageName; + } +} \ No newline at end of file diff --git a/lib/generated/json/set_meal_data.g.dart b/lib/generated/json/set_meal_data.g.dart new file mode 100644 index 00000000..e774836c --- /dev/null +++ b/lib/generated/json/set_meal_data.g.dart @@ -0,0 +1,98 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/set_meal_data.dart'; + +SetMealData $SetMealDataFromJson(Map json) { + final SetMealData setMealData = SetMealData(); + final String? groupName = jsonConvert.convert(json['groupName']); + if (groupName != null) { + setMealData.groupName = groupName; + } + final List< + ProductInfoList>? productInfoList = (json['productInfoList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as ProductInfoList) + .toList(); + if (productInfoList != null) { + setMealData.productInfoList = productInfoList; + } + return setMealData; +} + +Map $SetMealDataToJson(SetMealData entity) { + final Map data = {}; + data['groupName'] = entity.groupName; + data['productInfoList'] = + entity.productInfoList?.map((v) => v.toJson()).toList(); + return data; +} + +extension SetMealDataExtension on SetMealData { + SetMealData copyWith({ + String? groupName, + List? productInfoList, + }) { + return SetMealData() + ..groupName = groupName ?? this.groupName + ..productInfoList = productInfoList ?? this.productInfoList; + } +} + +ProductInfoList $ProductInfoListFromJson(Map json) { + final ProductInfoList productInfoList = ProductInfoList(); + final String? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + productInfoList.skuId = skuId; + } + final String? skuName = jsonConvert.convert(json['skuName']); + if (skuName != null) { + productInfoList.skuName = skuName; + } + final int? buyNumber = jsonConvert.convert(json['buyNumber']); + if (buyNumber != null) { + productInfoList.buyNumber = buyNumber; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + productInfoList.productId = productId; + } + final double? sellPrice = jsonConvert.convert(json['sellPrice']); + if (sellPrice != null) { + productInfoList.sellPrice = sellPrice; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + productInfoList.productName = productName; + } + return productInfoList; +} + +Map $ProductInfoListToJson(ProductInfoList entity) { + final Map data = {}; + data['skuId'] = entity.skuId; + data['skuName'] = entity.skuName; + data['buyNumber'] = entity.buyNumber; + data['productId'] = entity.productId; + data['sellPrice'] = entity.sellPrice; + data['productName'] = entity.productName; + return data; +} + +extension ProductInfoListExtension on ProductInfoList { + ProductInfoList copyWith({ + String? skuId, + String? skuName, + int? buyNumber, + String? productId, + double? sellPrice, + String? productName, + }) { + return ProductInfoList() + ..skuId = skuId ?? this.skuId + ..skuName = skuName ?? this.skuName + ..buyNumber = buyNumber ?? this.buyNumber + ..productId = productId ?? this.productId + ..sellPrice = sellPrice ?? this.sellPrice + ..productName = productName ?? this.productName; + } +} \ No newline at end of file diff --git a/lib/generated/json/settle_order_info.g.dart b/lib/generated/json/settle_order_info.g.dart new file mode 100644 index 00000000..c324753f --- /dev/null +++ b/lib/generated/json/settle_order_info.g.dart @@ -0,0 +1,754 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/member_vo.dart'; + +import 'package:huixiang/data/order_product_vo.dart'; + +import 'package:huixiang/data/settlement.dart'; + + +SettleOrderInfo $SettleOrderInfoFromJson(Map json) { + final SettleOrderInfo settleOrderInfo = SettleOrderInfo(); + final int? orderNum = jsonConvert.convert(json['orderNum']); + if (orderNum != null) { + settleOrderInfo.orderNum = orderNum; + } + final int? productNum = jsonConvert.convert(json['productNum']); + if (productNum != null) { + settleOrderInfo.productNum = productNum; + } + final int? mins = jsonConvert.convert(json['mins']); + if (mins != null) { + settleOrderInfo.mins = mins; + } + final MemberVo? memberVO = jsonConvert.convert(json['memberVO']); + if (memberVO != null) { + settleOrderInfo.memberVO = memberVO; + } + final String? postAge = jsonConvert.convert(json['postAge']); + if (postAge != null) { + settleOrderInfo.postAge = postAge; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + settleOrderInfo.price = price; + } + final String? benefitDiscountAmount = jsonConvert.convert( + json['benefitDiscountAmount']); + if (benefitDiscountAmount != null) { + settleOrderInfo.benefitDiscountAmount = benefitDiscountAmount; + } + final String? orderSum = jsonConvert.convert(json['orderSum']); + if (orderSum != null) { + settleOrderInfo.orderSum = orderSum; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + settleOrderInfo.discountAmount = discountAmount; + } + final List< + PromotionInfoListBean>? promotionInfoList = (json['promotionInfoList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as PromotionInfoListBean) + .toList(); + if (promotionInfoList != null) { + settleOrderInfo.promotionInfoList = promotionInfoList; + } + final List? couponList = (json['couponList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as CouponListBean) + .toList(); + if (couponList != null) { + settleOrderInfo.couponList = couponList; + } + final String? threshold = jsonConvert.convert(json['threshold']); + if (threshold != null) { + settleOrderInfo.threshold = threshold; + } + final String? freePostAge = jsonConvert.convert(json['freePostAge']); + if (freePostAge != null) { + settleOrderInfo.freePostAge = freePostAge; + } + final List< + OrderProductVO>? orderProductList = (json['orderProductList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as OrderProductVO) + .toList(); + if (orderProductList != null) { + settleOrderInfo.orderProductList = orderProductList; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + settleOrderInfo.promotionId = promotionId; + } + final String? memberCouponId = jsonConvert.convert( + json['memberCouponId']); + if (memberCouponId != null) { + settleOrderInfo.memberCouponId = memberCouponId; + } + final bool? usePlateMoney = jsonConvert.convert(json['usePlateMoney']); + if (usePlateMoney != null) { + settleOrderInfo.usePlateMoney = usePlateMoney; + } + final bool? isRaise = jsonConvert.convert(json['isRaise']); + if (isRaise != null) { + settleOrderInfo.isRaise = isRaise; + } + final bool? isVipDay = jsonConvert.convert(json['isVipDay']); + if (isVipDay != null) { + settleOrderInfo.isVipDay = isVipDay; + } + final int? selectDiscount = jsonConvert.convert(json['selectDiscount']); + if (selectDiscount != null) { + settleOrderInfo.selectDiscount = selectDiscount; + } + final bool? useVipPriceSelect = jsonConvert.convert( + json['useVipPriceSelect']); + if (useVipPriceSelect != null) { + settleOrderInfo.useVipPriceSelect = useVipPriceSelect; + } + final String? vipDiscountAmount = jsonConvert.convert( + json['vipDiscountAmount']); + if (vipDiscountAmount != null) { + settleOrderInfo.vipDiscountAmount = vipDiscountAmount; + } + final String? totalDiscountAmount = jsonConvert.convert( + json['totalDiscountAmount']); + if (totalDiscountAmount != null) { + settleOrderInfo.totalDiscountAmount = totalDiscountAmount; + } + final String? vipDayDiscountAmount = jsonConvert.convert( + json['vipDayDiscountAmount']); + if (vipDayDiscountAmount != null) { + settleOrderInfo.vipDayDiscountAmount = vipDayDiscountAmount; + } + final String? discountType = jsonConvert.convert( + json['discountType']); + if (discountType != null) { + settleOrderInfo.discountType = discountType; + } + final String? totalPackagingFee = jsonConvert.convert( + json['totalPackagingFee']); + if (totalPackagingFee != null) { + settleOrderInfo.totalPackagingFee = totalPackagingFee; + } + return settleOrderInfo; +} + +Map $SettleOrderInfoToJson(SettleOrderInfo entity) { + final Map data = {}; + data['orderNum'] = entity.orderNum; + data['productNum'] = entity.productNum; + data['mins'] = entity.mins; + data['memberVO'] = entity.memberVO?.toJson(); + data['postAge'] = entity.postAge; + data['price'] = entity.price; + data['benefitDiscountAmount'] = entity.benefitDiscountAmount; + data['orderSum'] = entity.orderSum; + data['discountAmount'] = entity.discountAmount; + data['promotionInfoList'] = + entity.promotionInfoList?.map((v) => v.toJson()).toList(); + data['couponList'] = entity.couponList?.map((v) => v.toJson()).toList(); + data['threshold'] = entity.threshold; + data['freePostAge'] = entity.freePostAge; + data['orderProductList'] = + entity.orderProductList?.map((v) => v.toJson()).toList(); + data['promotionId'] = entity.promotionId; + data['memberCouponId'] = entity.memberCouponId; + data['usePlateMoney'] = entity.usePlateMoney; + data['isRaise'] = entity.isRaise; + data['isVipDay'] = entity.isVipDay; + data['selectDiscount'] = entity.selectDiscount; + data['useVipPriceSelect'] = entity.useVipPriceSelect; + data['vipDiscountAmount'] = entity.vipDiscountAmount; + data['totalDiscountAmount'] = entity.totalDiscountAmount; + data['vipDayDiscountAmount'] = entity.vipDayDiscountAmount; + data['discountType'] = entity.discountType; + data['totalPackagingFee'] = entity.totalPackagingFee; + return data; +} + +extension SettleOrderInfoExtension on SettleOrderInfo { + SettleOrderInfo copyWith({ + int? orderNum, + int? productNum, + int? mins, + MemberVo? memberVO, + String? postAge, + String? price, + String? benefitDiscountAmount, + String? orderSum, + String? discountAmount, + List? promotionInfoList, + List? couponList, + String? threshold, + String? freePostAge, + List? orderProductList, + String? promotionId, + String? memberCouponId, + bool? usePlateMoney, + bool? isRaise, + bool? isVipDay, + int? selectDiscount, + bool? useVipPriceSelect, + String? vipDiscountAmount, + String? totalDiscountAmount, + String? vipDayDiscountAmount, + String? discountType, + String? totalPackagingFee, + }) { + return SettleOrderInfo() + ..orderNum = orderNum ?? this.orderNum + ..productNum = productNum ?? this.productNum + ..mins = mins ?? this.mins + ..memberVO = memberVO ?? this.memberVO + ..postAge = postAge ?? this.postAge + ..price = price ?? this.price + ..benefitDiscountAmount = benefitDiscountAmount ?? + this.benefitDiscountAmount + ..orderSum = orderSum ?? this.orderSum + ..discountAmount = discountAmount ?? this.discountAmount + ..promotionInfoList = promotionInfoList ?? this.promotionInfoList + ..couponList = couponList ?? this.couponList + ..threshold = threshold ?? this.threshold + ..freePostAge = freePostAge ?? this.freePostAge + ..orderProductList = orderProductList ?? this.orderProductList + ..promotionId = promotionId ?? this.promotionId + ..memberCouponId = memberCouponId ?? this.memberCouponId + ..usePlateMoney = usePlateMoney ?? this.usePlateMoney + ..isRaise = isRaise ?? this.isRaise + ..isVipDay = isVipDay ?? this.isVipDay + ..selectDiscount = selectDiscount ?? this.selectDiscount + ..useVipPriceSelect = useVipPriceSelect ?? this.useVipPriceSelect + ..vipDiscountAmount = vipDiscountAmount ?? this.vipDiscountAmount + ..totalDiscountAmount = totalDiscountAmount ?? this.totalDiscountAmount + ..vipDayDiscountAmount = vipDayDiscountAmount ?? this.vipDayDiscountAmount + ..discountType = discountType ?? this.discountType + ..totalPackagingFee = totalPackagingFee ?? this.totalPackagingFee; + } +} + +CouponListBean $CouponListBeanFromJson(Map json) { + final CouponListBean couponListBean = CouponListBean(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + couponListBean.id = id; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + couponListBean.storeId = storeId; + } + final int? bizType = jsonConvert.convert(json['bizType']); + if (bizType != null) { + couponListBean.bizType = bizType; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + couponListBean.fullAmount = fullAmount; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + couponListBean.discountAmount = discountAmount; + } + final int? fullNumber = jsonConvert.convert(json['fullNumber']); + if (fullNumber != null) { + couponListBean.fullNumber = fullNumber; + } + final int? discountPercent = jsonConvert.convert( + json['discountPercent']); + if (discountPercent != null) { + couponListBean.discountPercent = discountPercent; + } + final String? bizId = jsonConvert.convert(json['bizId']); + if (bizId != null) { + couponListBean.bizId = bizId; + } + final String? limitAmount = jsonConvert.convert(json['limitAmount']); + if (limitAmount != null) { + couponListBean.limitAmount = limitAmount; + } + final String? publishStartTime = jsonConvert.convert( + json['publishStartTime']); + if (publishStartTime != null) { + couponListBean.publishStartTime = publishStartTime; + } + final String? publishEndTime = jsonConvert.convert( + json['publishEndTime']); + if (publishEndTime != null) { + couponListBean.publishEndTime = publishEndTime; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + couponListBean.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + couponListBean.useEndTime = useEndTime; + } + final String? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + couponListBean.promotionId = promotionId; + } + final dynamic mid = json['mid']; + if (mid != null) { + couponListBean.mid = mid; + } + final String? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + couponListBean.couponId = couponId; + } + final String? receiveTime = jsonConvert.convert(json['receiveTime']); + if (receiveTime != null) { + couponListBean.receiveTime = receiveTime; + } + final dynamic useTime = json['useTime']; + if (useTime != null) { + couponListBean.useTime = useTime; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + couponListBean.status = status; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + couponListBean.tenantCode = tenantCode; + } + final int? type = jsonConvert.convert(json['type']); + if (type != null) { + couponListBean.type = type; + } + final String? promotionName = jsonConvert.convert( + json['promotionName']); + if (promotionName != null) { + couponListBean.promotionName = promotionName; + } + final bool? usable = jsonConvert.convert(json['usable']); + if (usable != null) { + couponListBean.usable = usable; + } + final bool? allProduct = jsonConvert.convert(json['allProduct']); + if (allProduct != null) { + couponListBean.allProduct = allProduct; + } + final bool? isMaxCoupon = jsonConvert.convert(json['isMaxCoupon']); + if (isMaxCoupon != null) { + couponListBean.isMaxCoupon = isMaxCoupon; + } + final dynamic productList = json['productList']; + if (productList != null) { + couponListBean.productList = productList; + } + final bool? isEx = jsonConvert.convert(json['isEx']); + if (isEx != null) { + couponListBean.isEx = isEx; + } + final String? usableReason = jsonConvert.convert( + json['usableReason']); + if (usableReason != null) { + couponListBean.usableReason = usableReason; + } + return couponListBean; +} + +Map $CouponListBeanToJson(CouponListBean entity) { + final Map data = {}; + data['id'] = entity.id; + data['storeId'] = entity.storeId; + data['bizType'] = entity.bizType; + data['fullAmount'] = entity.fullAmount; + data['discountAmount'] = entity.discountAmount; + data['fullNumber'] = entity.fullNumber; + data['discountPercent'] = entity.discountPercent; + data['bizId'] = entity.bizId; + data['limitAmount'] = entity.limitAmount; + data['publishStartTime'] = entity.publishStartTime; + data['publishEndTime'] = entity.publishEndTime; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['promotionId'] = entity.promotionId; + data['mid'] = entity.mid; + data['couponId'] = entity.couponId; + data['receiveTime'] = entity.receiveTime; + data['useTime'] = entity.useTime; + data['status'] = entity.status; + data['tenantCode'] = entity.tenantCode; + data['type'] = entity.type; + data['promotionName'] = entity.promotionName; + data['usable'] = entity.usable; + data['allProduct'] = entity.allProduct; + data['isMaxCoupon'] = entity.isMaxCoupon; + data['productList'] = entity.productList; + data['isEx'] = entity.isEx; + data['usableReason'] = entity.usableReason; + return data; +} + +extension CouponListBeanExtension on CouponListBean { + CouponListBean copyWith({ + String? id, + String? storeId, + int? bizType, + String? fullAmount, + String? discountAmount, + int? fullNumber, + int? discountPercent, + String? bizId, + String? limitAmount, + String? publishStartTime, + String? publishEndTime, + String? useStartTime, + String? useEndTime, + String? promotionId, + dynamic mid, + String? couponId, + String? receiveTime, + dynamic useTime, + int? status, + String? tenantCode, + int? type, + String? promotionName, + bool? usable, + bool? allProduct, + bool? isMaxCoupon, + dynamic productList, + bool? isEx, + String? usableReason, + }) { + return CouponListBean() + ..id = id ?? this.id + ..storeId = storeId ?? this.storeId + ..bizType = bizType ?? this.bizType + ..fullAmount = fullAmount ?? this.fullAmount + ..discountAmount = discountAmount ?? this.discountAmount + ..fullNumber = fullNumber ?? this.fullNumber + ..discountPercent = discountPercent ?? this.discountPercent + ..bizId = bizId ?? this.bizId + ..limitAmount = limitAmount ?? this.limitAmount + ..publishStartTime = publishStartTime ?? this.publishStartTime + ..publishEndTime = publishEndTime ?? this.publishEndTime + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..promotionId = promotionId ?? this.promotionId + ..mid = mid ?? this.mid + ..couponId = couponId ?? this.couponId + ..receiveTime = receiveTime ?? this.receiveTime + ..useTime = useTime ?? this.useTime + ..status = status ?? this.status + ..tenantCode = tenantCode ?? this.tenantCode + ..type = type ?? this.type + ..promotionName = promotionName ?? this.promotionName + ..usable = usable ?? this.usable + ..allProduct = allProduct ?? this.allProduct + ..isMaxCoupon = isMaxCoupon ?? this.isMaxCoupon + ..productList = productList ?? this.productList + ..isEx = isEx ?? this.isEx + ..usableReason = usableReason ?? this.usableReason; + } +} + +PromotionInfoListBean $PromotionInfoListBeanFromJson( + Map json) { + final PromotionInfoListBean promotionInfoListBean = PromotionInfoListBean(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + promotionInfoListBean.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + promotionInfoListBean.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + promotionInfoListBean.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + promotionInfoListBean.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + promotionInfoListBean.updateUser = updateUser; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + promotionInfoListBean.storeId = storeId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + promotionInfoListBean.name = name; + } + final String? image = jsonConvert.convert(json['image']); + if (image != null) { + promotionInfoListBean.image = image; + } + final String? description = jsonConvert.convert(json['description']); + if (description != null) { + promotionInfoListBean.description = description; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + promotionInfoListBean.status = status; + } + final String? applyStartTime = jsonConvert.convert( + json['applyStartTime']); + if (applyStartTime != null) { + promotionInfoListBean.applyStartTime = applyStartTime; + } + final String? applyEndTime = jsonConvert.convert( + json['applyEndTime']); + if (applyEndTime != null) { + promotionInfoListBean.applyEndTime = applyEndTime; + } + final String? activityStartTime = jsonConvert.convert( + json['activityStartTime']); + if (activityStartTime != null) { + promotionInfoListBean.activityStartTime = activityStartTime; + } + final String? activityEndTime = jsonConvert.convert( + json['activityEndTime']); + if (activityEndTime != null) { + promotionInfoListBean.activityEndTime = activityEndTime; + } + final dynamic doStartTime = json['doStartTime']; + if (doStartTime != null) { + promotionInfoListBean.doStartTime = doStartTime; + } + final dynamic doEndTime = json['doEndTime']; + if (doEndTime != null) { + promotionInfoListBean.doEndTime = doEndTime; + } + final int? isNeedSecurityDeposit = jsonConvert.convert( + json['isNeedSecurityDeposit']); + if (isNeedSecurityDeposit != null) { + promotionInfoListBean.isNeedSecurityDeposit = isNeedSecurityDeposit; + } + final String? securityDeposit = jsonConvert.convert( + json['securityDeposit']); + if (securityDeposit != null) { + promotionInfoListBean.securityDeposit = securityDeposit; + } + final String? tag = jsonConvert.convert(json['tag']); + if (tag != null) { + promotionInfoListBean.tag = tag; + } + final int? promotionType = jsonConvert.convert(json['promotionType']); + if (promotionType != null) { + promotionInfoListBean.promotionType = promotionType; + } + final int? promotionPlan = jsonConvert.convert(json['promotionPlan']); + if (promotionPlan != null) { + promotionInfoListBean.promotionPlan = promotionPlan; + } + final List< + PromotionDetailBean>? promotionDetail = (json['promotionDetail'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as PromotionDetailBean) + .toList(); + if (promotionDetail != null) { + promotionInfoListBean.promotionDetail = promotionDetail; + } + final List? channels = (json['channels'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (channels != null) { + promotionInfoListBean.channels = channels; + } + final bool? isVip = jsonConvert.convert(json['isVip']); + if (isVip != null) { + promotionInfoListBean.isVip = isVip; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + promotionInfoListBean.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + promotionInfoListBean.tenantCode = tenantCode; + } + final bool? canPartake = jsonConvert.convert(json['canPartake']); + if (canPartake != null) { + promotionInfoListBean.canPartake = canPartake; + } + final bool? isMaxPromotion = jsonConvert.convert( + json['isMaxPromotion']); + if (isMaxPromotion != null) { + promotionInfoListBean.isMaxPromotion = isMaxPromotion; + } + final dynamic promotionProuctList = json['promotionProuctList']; + if (promotionProuctList != null) { + promotionInfoListBean.promotionProuctList = promotionProuctList; + } + return promotionInfoListBean; +} + +Map $PromotionInfoListBeanToJson( + PromotionInfoListBean entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['storeId'] = entity.storeId; + data['name'] = entity.name; + data['image'] = entity.image; + data['description'] = entity.description; + data['status'] = entity.status; + data['applyStartTime'] = entity.applyStartTime; + data['applyEndTime'] = entity.applyEndTime; + data['activityStartTime'] = entity.activityStartTime; + data['activityEndTime'] = entity.activityEndTime; + data['doStartTime'] = entity.doStartTime; + data['doEndTime'] = entity.doEndTime; + data['isNeedSecurityDeposit'] = entity.isNeedSecurityDeposit; + data['securityDeposit'] = entity.securityDeposit; + data['tag'] = entity.tag; + data['promotionType'] = entity.promotionType; + data['promotionPlan'] = entity.promotionPlan; + data['promotionDetail'] = + entity.promotionDetail?.map((v) => v.toJson()).toList(); + data['channels'] = entity.channels; + data['isVip'] = entity.isVip; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['canPartake'] = entity.canPartake; + data['isMaxPromotion'] = entity.isMaxPromotion; + data['promotionProuctList'] = entity.promotionProuctList; + return data; +} + +extension PromotionInfoListBeanExtension on PromotionInfoListBean { + PromotionInfoListBean copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? storeId, + String? name, + String? image, + String? description, + int? status, + String? applyStartTime, + String? applyEndTime, + String? activityStartTime, + String? activityEndTime, + dynamic doStartTime, + dynamic doEndTime, + int? isNeedSecurityDeposit, + String? securityDeposit, + String? tag, + int? promotionType, + int? promotionPlan, + List? promotionDetail, + List? channels, + bool? isVip, + int? isDelete, + String? tenantCode, + bool? canPartake, + bool? isMaxPromotion, + dynamic promotionProuctList, + }) { + return PromotionInfoListBean() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..storeId = storeId ?? this.storeId + ..name = name ?? this.name + ..image = image ?? this.image + ..description = description ?? this.description + ..status = status ?? this.status + ..applyStartTime = applyStartTime ?? this.applyStartTime + ..applyEndTime = applyEndTime ?? this.applyEndTime + ..activityStartTime = activityStartTime ?? this.activityStartTime + ..activityEndTime = activityEndTime ?? this.activityEndTime + ..doStartTime = doStartTime ?? this.doStartTime + ..doEndTime = doEndTime ?? this.doEndTime + ..isNeedSecurityDeposit = isNeedSecurityDeposit ?? + this.isNeedSecurityDeposit + ..securityDeposit = securityDeposit ?? this.securityDeposit + ..tag = tag ?? this.tag + ..promotionType = promotionType ?? this.promotionType + ..promotionPlan = promotionPlan ?? this.promotionPlan + ..promotionDetail = promotionDetail ?? this.promotionDetail + ..channels = channels ?? this.channels + ..isVip = isVip ?? this.isVip + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..canPartake = canPartake ?? this.canPartake + ..isMaxPromotion = isMaxPromotion ?? this.isMaxPromotion + ..promotionProuctList = promotionProuctList ?? this.promotionProuctList; + } +} + +PromotionDetailBean $PromotionDetailBeanFromJson(Map json) { + final PromotionDetailBean promotionDetailBean = PromotionDetailBean(); + final String? limitTime = jsonConvert.convert(json['limitTime']); + if (limitTime != null) { + promotionDetailBean.limitTime = limitTime; + } + final String? discountRate = jsonConvert.convert( + json['discountRate']); + if (discountRate != null) { + promotionDetailBean.discountRate = discountRate; + } + final String? discountAmount = jsonConvert.convert( + json['discountAmount']); + if (discountAmount != null) { + promotionDetailBean.discountAmount = discountAmount; + } + final String? fullAmount = jsonConvert.convert(json['fullAmount']); + if (fullAmount != null) { + promotionDetailBean.fullAmount = fullAmount; + } + final String? collageNumber = jsonConvert.convert( + json['collageNumber']); + if (collageNumber != null) { + promotionDetailBean.collageNumber = collageNumber; + } + final String? fullNumber = jsonConvert.convert(json['fullNumber']); + if (fullNumber != null) { + promotionDetailBean.fullNumber = fullNumber; + } + return promotionDetailBean; +} + +Map $PromotionDetailBeanToJson(PromotionDetailBean entity) { + final Map data = {}; + data['limitTime'] = entity.limitTime; + data['discountRate'] = entity.discountRate; + data['discountAmount'] = entity.discountAmount; + data['fullAmount'] = entity.fullAmount; + data['collageNumber'] = entity.collageNumber; + data['fullNumber'] = entity.fullNumber; + return data; +} + +extension PromotionDetailBeanExtension on PromotionDetailBean { + PromotionDetailBean copyWith({ + String? limitTime, + String? discountRate, + String? discountAmount, + String? fullAmount, + String? collageNumber, + String? fullNumber, + }) { + return PromotionDetailBean() + ..limitTime = limitTime ?? this.limitTime + ..discountRate = discountRate ?? this.discountRate + ..discountAmount = discountAmount ?? this.discountAmount + ..fullAmount = fullAmount ?? this.fullAmount + ..collageNumber = collageNumber ?? this.collageNumber + ..fullNumber = fullNumber ?? this.fullNumber; + } +} \ No newline at end of file diff --git a/lib/generated/json/settlement.g.dart b/lib/generated/json/settlement.g.dart new file mode 100644 index 00000000..a6364fe2 --- /dev/null +++ b/lib/generated/json/settlement.g.dart @@ -0,0 +1,251 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/settlement.dart'; +import 'package:huixiang/data/act_info.dart'; + +import 'package:huixiang/data/additional_comment.dart'; + +import 'package:huixiang/data/comment.dart'; + + +Settlement $SettlementFromJson(Map json) { + final Settlement settlement = Settlement(); + final int? addressId = jsonConvert.convert(json['addressId']); + if (addressId != null) { + settlement.addressId = addressId; + } + final int? buyNum = jsonConvert.convert(json['buyNum']); + if (buyNum != null) { + settlement.buyNum = buyNum; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + settlement.id = id; + } + final bool? isLogistics = jsonConvert.convert(json['is_logistics']); + if (isLogistics != null) { + settlement.isLogistics = isLogistics; + } + final List< + OrderProductVOList>? orderProductVOList = (json['orderProductVOList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as OrderProductVOList) + .toList(); + if (orderProductVOList != null) { + settlement.orderProductVOList = orderProductVOList; + } + final int? payChannel = jsonConvert.convert(json['payChannel']); + if (payChannel != null) { + settlement.payChannel = payChannel; + } + final PromotionInfoDTO? promotionInfoDTO = jsonConvert.convert< + PromotionInfoDTO>(json['promotionInfoDTO']); + if (promotionInfoDTO != null) { + settlement.promotionInfoDTO = promotionInfoDTO; + } + return settlement; +} + +Map $SettlementToJson(Settlement entity) { + final Map data = {}; + data['addressId'] = entity.addressId; + data['buyNum'] = entity.buyNum; + data['id'] = entity.id; + data['is_logistics'] = entity.isLogistics; + data['orderProductVOList'] = + entity.orderProductVOList?.map((v) => v.toJson()).toList(); + data['payChannel'] = entity.payChannel; + data['promotionInfoDTO'] = entity.promotionInfoDTO?.toJson(); + return data; +} + +extension SettlementExtension on Settlement { + Settlement copyWith({ + int? addressId, + int? buyNum, + int? id, + bool? isLogistics, + List? orderProductVOList, + int? payChannel, + PromotionInfoDTO? promotionInfoDTO, + }) { + return Settlement() + ..addressId = addressId ?? this.addressId + ..buyNum = buyNum ?? this.buyNum + ..id = id ?? this.id + ..isLogistics = isLogistics ?? this.isLogistics + ..orderProductVOList = orderProductVOList ?? this.orderProductVOList + ..payChannel = payChannel ?? this.payChannel + ..promotionInfoDTO = promotionInfoDTO ?? this.promotionInfoDTO; + } +} + +OrderProductVOList $OrderProductVOListFromJson(Map json) { + final OrderProductVOList orderProductVOList = OrderProductVOList(); + final ActInfo? actInfo = jsonConvert.convert(json['actInfo']); + if (actInfo != null) { + orderProductVOList.actInfo = actInfo; + } + final AdditionalComment? additionalComment = jsonConvert.convert< + AdditionalComment>(json['additionalComment']); + if (additionalComment != null) { + orderProductVOList.additionalComment = additionalComment; + } + final int? buyNum = jsonConvert.convert(json['buyNum']); + if (buyNum != null) { + orderProductVOList.buyNum = buyNum; + } + final int? canApplyIntervention = jsonConvert.convert( + json['canApplyIntervention']); + if (canApplyIntervention != null) { + orderProductVOList.canApplyIntervention = canApplyIntervention; + } + final Comment? comment = jsonConvert.convert(json['comment']); + if (comment != null) { + orderProductVOList.comment = comment; + } + final int? commentStatus = jsonConvert.convert(json['commentStatus']); + if (commentStatus != null) { + orderProductVOList.commentStatus = commentStatus; + } + final int? discountAmount = jsonConvert.convert(json['discountAmount']); + if (discountAmount != null) { + orderProductVOList.discountAmount = discountAmount; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + orderProductVOList.id = id; + } + final int? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + orderProductVOList.productId = productId; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + orderProductVOList.productName = productName; + } + final String? returnCode = jsonConvert.convert(json['returnCode']); + if (returnCode != null) { + orderProductVOList.returnCode = returnCode; + } + final int? returnStatus = jsonConvert.convert(json['returnStatus']); + if (returnStatus != null) { + orderProductVOList.returnStatus = returnStatus; + } + final int? returnType = jsonConvert.convert(json['returnType']); + if (returnType != null) { + orderProductVOList.returnType = returnType; + } + final int? sellPrice = jsonConvert.convert(json['sellPrice']); + if (sellPrice != null) { + orderProductVOList.sellPrice = sellPrice; + } + final int? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + orderProductVOList.skuId = skuId; + } + final String? skuImg = jsonConvert.convert(json['skuImg']); + if (skuImg != null) { + orderProductVOList.skuImg = skuImg; + } + final String? skuNameStr = jsonConvert.convert(json['skuNameStr']); + if (skuNameStr != null) { + orderProductVOList.skuNameStr = skuNameStr; + } + return orderProductVOList; +} + +Map $OrderProductVOListToJson(OrderProductVOList entity) { + final Map data = {}; + data['actInfo'] = entity.actInfo?.toJson(); + data['additionalComment'] = entity.additionalComment?.toJson(); + data['buyNum'] = entity.buyNum; + data['canApplyIntervention'] = entity.canApplyIntervention; + data['comment'] = entity.comment?.toJson(); + data['commentStatus'] = entity.commentStatus; + data['discountAmount'] = entity.discountAmount; + data['id'] = entity.id; + data['productId'] = entity.productId; + data['productName'] = entity.productName; + data['returnCode'] = entity.returnCode; + data['returnStatus'] = entity.returnStatus; + data['returnType'] = entity.returnType; + data['sellPrice'] = entity.sellPrice; + data['skuId'] = entity.skuId; + data['skuImg'] = entity.skuImg; + data['skuNameStr'] = entity.skuNameStr; + return data; +} + +extension OrderProductVOListExtension on OrderProductVOList { + OrderProductVOList copyWith({ + ActInfo? actInfo, + AdditionalComment? additionalComment, + int? buyNum, + int? canApplyIntervention, + Comment? comment, + int? commentStatus, + int? discountAmount, + int? id, + int? productId, + String? productName, + String? returnCode, + int? returnStatus, + int? returnType, + int? sellPrice, + int? skuId, + String? skuImg, + String? skuNameStr, + }) { + return OrderProductVOList() + ..actInfo = actInfo ?? this.actInfo + ..additionalComment = additionalComment ?? this.additionalComment + ..buyNum = buyNum ?? this.buyNum + ..canApplyIntervention = canApplyIntervention ?? this.canApplyIntervention + ..comment = comment ?? this.comment + ..commentStatus = commentStatus ?? this.commentStatus + ..discountAmount = discountAmount ?? this.discountAmount + ..id = id ?? this.id + ..productId = productId ?? this.productId + ..productName = productName ?? this.productName + ..returnCode = returnCode ?? this.returnCode + ..returnStatus = returnStatus ?? this.returnStatus + ..returnType = returnType ?? this.returnType + ..sellPrice = sellPrice ?? this.sellPrice + ..skuId = skuId ?? this.skuId + ..skuImg = skuImg ?? this.skuImg + ..skuNameStr = skuNameStr ?? this.skuNameStr; + } +} + +PromotionInfoDTO $PromotionInfoDTOFromJson(Map json) { + final PromotionInfoDTO promotionInfoDTO = PromotionInfoDTO(); + final int? couponId = jsonConvert.convert(json['couponId']); + if (couponId != null) { + promotionInfoDTO.couponId = couponId; + } + final int? promotionId = jsonConvert.convert(json['promotionId']); + if (promotionId != null) { + promotionInfoDTO.promotionId = promotionId; + } + return promotionInfoDTO; +} + +Map $PromotionInfoDTOToJson(PromotionInfoDTO entity) { + final Map data = {}; + data['couponId'] = entity.couponId; + data['promotionId'] = entity.promotionId; + return data; +} + +extension PromotionInfoDTOExtension on PromotionInfoDTO { + PromotionInfoDTO copyWith({ + int? couponId, + int? promotionId, + }) { + return PromotionInfoDTO() + ..couponId = couponId ?? this.couponId + ..promotionId = promotionId ?? this.promotionId; + } +} \ No newline at end of file diff --git a/lib/generated/json/shoping_home_config.g.dart b/lib/generated/json/shoping_home_config.g.dart new file mode 100644 index 00000000..559fbe4a --- /dev/null +++ b/lib/generated/json/shoping_home_config.g.dart @@ -0,0 +1,683 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; +import 'package:huixiang/data/mini_detail.dart'; + +import 'package:huixiang/data/sku_attr_list.dart'; + + +ShopingHomeConfig $ShopingHomeConfigFromJson(Map json) { + final ShopingHomeConfig shopingHomeConfig = ShopingHomeConfig(); + final List? specialArea = (json['specialArea'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as SpecialArea) + .toList(); + if (specialArea != null) { + shopingHomeConfig.specialArea = specialArea; + } + final List? quickEntry = (json['quickEntry'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as QuickEntry) + .toList(); + if (quickEntry != null) { + shopingHomeConfig.quickEntry = quickEntry; + } + final List? hotSearch = (json['hotSearch'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (hotSearch != null) { + shopingHomeConfig.hotSearch = hotSearch; + } + final List? categoryGroup = (json['categoryGroup'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as CategoryGroup) + .toList(); + if (categoryGroup != null) { + shopingHomeConfig.categoryGroup = categoryGroup; + } + return shopingHomeConfig; +} + +Map $ShopingHomeConfigToJson(ShopingHomeConfig entity) { + final Map data = {}; + data['specialArea'] = entity.specialArea?.map((v) => v.toJson()).toList(); + data['quickEntry'] = entity.quickEntry?.map((v) => v.toJson()).toList(); + data['hotSearch'] = entity.hotSearch; + data['categoryGroup'] = entity.categoryGroup?.map((v) => v.toJson()).toList(); + return data; +} + +extension ShopingHomeConfigExtension on ShopingHomeConfig { + ShopingHomeConfig copyWith({ + List? specialArea, + List? quickEntry, + List? hotSearch, + List? categoryGroup, + }) { + return ShopingHomeConfig() + ..specialArea = specialArea ?? this.specialArea + ..quickEntry = quickEntry ?? this.quickEntry + ..hotSearch = hotSearch ?? this.hotSearch + ..categoryGroup = categoryGroup ?? this.categoryGroup; + } +} + +SpecialArea $SpecialAreaFromJson(Map json) { + final SpecialArea specialArea = SpecialArea(); + final String? img = jsonConvert.convert(json['img']); + if (img != null) { + specialArea.img = img; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + specialArea.id = id; + } + final List? productList = (json['productList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as ShopHomeProductList) + .toList(); + if (productList != null) { + specialArea.productList = productList; + } + return specialArea; +} + +Map $SpecialAreaToJson(SpecialArea entity) { + final Map data = {}; + data['img'] = entity.img; + data['id'] = entity.id; + data['productList'] = entity.productList?.map((v) => v.toJson()).toList(); + return data; +} + +extension SpecialAreaExtension on SpecialArea { + SpecialArea copyWith({ + String? img, + String? id, + List? productList, + }) { + return SpecialArea() + ..img = img ?? this.img + ..id = id ?? this.id + ..productList = productList ?? this.productList; + } +} + +ShopHomeProductList $ShopHomeProductListFromJson(Map json) { + final ShopHomeProductList shopHomeProductList = ShopHomeProductList(); + final String? productImg = jsonConvert.convert(json['productImg']); + if (productImg != null) { + shopHomeProductList.productImg = productImg; + } + final List< + ShopHomeProductSkuVOList>? productSkuVOList = (json['productSkuVOList'] as List< + dynamic>?)?.map( + (e) => + jsonConvert.convert( + e) as ShopHomeProductSkuVOList).toList(); + if (productSkuVOList != null) { + shopHomeProductList.productSkuVOList = productSkuVOList; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + shopHomeProductList.productName = productName; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + shopHomeProductList.posShow = posShow; + } + final List? attrList = (json['attrList'] as List?)?.map( + (e) => jsonConvert.convert(e) as AttrList).toList(); + if (attrList != null) { + shopHomeProductList.attrList = attrList; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + shopHomeProductList.price = price; + } + final String? productPrice = jsonConvert.convert( + json['productPrice']); + if (productPrice != null) { + shopHomeProductList.productPrice = productPrice; + } + final String? promotionPrice = jsonConvert.convert( + json['promotionPrice']); + if (promotionPrice != null) { + shopHomeProductList.promotionPrice = promotionPrice; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + shopHomeProductList.sellCount = sellCount; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + shopHomeProductList.id = id; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + shopHomeProductList.applyPrice = applyPrice; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + shopHomeProductList.productId = productId; + } + final int? productStock = jsonConvert.convert(json['productStock']); + if (productStock != null) { + shopHomeProductList.productStock = productStock; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + shopHomeProductList.stock = stock; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + shopHomeProductList.status = status; + } + return shopHomeProductList; +} + +Map $ShopHomeProductListToJson(ShopHomeProductList entity) { + final Map data = {}; + data['productImg'] = entity.productImg; + data['productSkuVOList'] = + entity.productSkuVOList?.map((v) => v.toJson()).toList(); + data['productName'] = entity.productName; + data['posShow'] = entity.posShow; + data['attrList'] = entity.attrList?.map((v) => v.toJson()).toList(); + data['price'] = entity.price; + data['productPrice'] = entity.productPrice; + data['promotionPrice'] = entity.promotionPrice; + data['sellCount'] = entity.sellCount; + data['id'] = entity.id; + data['applyPrice'] = entity.applyPrice; + data['productId'] = entity.productId; + data['productStock'] = entity.productStock; + data['stock'] = entity.stock; + data['status'] = entity.status; + return data; +} + +extension ShopHomeProductListExtension on ShopHomeProductList { + ShopHomeProductList copyWith({ + String? productImg, + List? productSkuVOList, + String? productName, + bool? posShow, + List? attrList, + String? price, + String? productPrice, + String? promotionPrice, + int? sellCount, + String? id, + String? applyPrice, + String? productId, + int? productStock, + int? stock, + int? status, + }) { + return ShopHomeProductList() + ..productImg = productImg ?? this.productImg + ..productSkuVOList = productSkuVOList ?? this.productSkuVOList + ..productName = productName ?? this.productName + ..posShow = posShow ?? this.posShow + ..attrList = attrList ?? this.attrList + ..price = price ?? this.price + ..productPrice = productPrice ?? this.productPrice + ..promotionPrice = promotionPrice ?? this.promotionPrice + ..sellCount = sellCount ?? this.sellCount + ..id = id ?? this.id + ..applyPrice = applyPrice ?? this.applyPrice + ..productId = productId ?? this.productId + ..productStock = productStock ?? this.productStock + ..stock = stock ?? this.stock + ..status = status ?? this.status; + } +} + +ShopHomeProductSkuVOList $ShopHomeProductSkuVOListFromJson( + Map json) { + final ShopHomeProductSkuVOList shopHomeProductSkuVOList = ShopHomeProductSkuVOList(); + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + shopHomeProductSkuVOList.productId = productId; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + shopHomeProductSkuVOList.isDelete = isDelete; + } + final String? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + shopHomeProductSkuVOList.setMeal = setMeal; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + shopHomeProductSkuVOList.updateUser = updateUser; + } + final String? skuPrice = jsonConvert.convert(json['skuPrice']); + if (skuPrice != null) { + shopHomeProductSkuVOList.skuPrice = skuPrice; + } + final int? skuStock = jsonConvert.convert(json['skuStock']); + if (skuStock != null) { + shopHomeProductSkuVOList.skuStock = skuStock; + } + final int? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + shopHomeProductSkuVOList.weight = weight; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + shopHomeProductSkuVOList.updateTime = updateTime; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + shopHomeProductSkuVOList.storeId = storeId; + } + final int? volume = jsonConvert.convert(json['volume']); + if (volume != null) { + shopHomeProductSkuVOList.volume = volume; + } + final String? skuNameStr = jsonConvert.convert(json['skuNameStr']); + if (skuNameStr != null) { + shopHomeProductSkuVOList.skuNameStr = skuNameStr; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + shopHomeProductSkuVOList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + shopHomeProductSkuVOList.createUser = createUser; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + shopHomeProductSkuVOList.id = id; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + shopHomeProductSkuVOList.applyPrice = applyPrice; + } + final List? skuAttrList = (json['skuAttrList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as SkuAttrList) + .toList(); + if (skuAttrList != null) { + shopHomeProductSkuVOList.skuAttrList = skuAttrList; + } + final String? skuCode = jsonConvert.convert(json['skuCode']); + if (skuCode != null) { + shopHomeProductSkuVOList.skuCode = skuCode; + } + return shopHomeProductSkuVOList; +} + +Map $ShopHomeProductSkuVOListToJson( + ShopHomeProductSkuVOList entity) { + final Map data = {}; + data['productId'] = entity.productId; + data['isDelete'] = entity.isDelete; + data['setMeal'] = entity.setMeal; + data['updateUser'] = entity.updateUser; + data['skuPrice'] = entity.skuPrice; + data['skuStock'] = entity.skuStock; + data['weight'] = entity.weight; + data['updateTime'] = entity.updateTime; + data['storeId'] = entity.storeId; + data['volume'] = entity.volume; + data['skuNameStr'] = entity.skuNameStr; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['id'] = entity.id; + data['applyPrice'] = entity.applyPrice; + data['skuAttrList'] = entity.skuAttrList?.map((v) => v.toJson()).toList(); + data['skuCode'] = entity.skuCode; + return data; +} + +extension ShopHomeProductSkuVOListExtension on ShopHomeProductSkuVOList { + ShopHomeProductSkuVOList copyWith({ + String? productId, + int? isDelete, + String? setMeal, + String? updateUser, + String? skuPrice, + int? skuStock, + int? weight, + String? updateTime, + String? storeId, + int? volume, + String? skuNameStr, + String? createTime, + String? createUser, + String? id, + String? applyPrice, + List? skuAttrList, + String? skuCode, + }) { + return ShopHomeProductSkuVOList() + ..productId = productId ?? this.productId + ..isDelete = isDelete ?? this.isDelete + ..setMeal = setMeal ?? this.setMeal + ..updateUser = updateUser ?? this.updateUser + ..skuPrice = skuPrice ?? this.skuPrice + ..skuStock = skuStock ?? this.skuStock + ..weight = weight ?? this.weight + ..updateTime = updateTime ?? this.updateTime + ..storeId = storeId ?? this.storeId + ..volume = volume ?? this.volume + ..skuNameStr = skuNameStr ?? this.skuNameStr + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..id = id ?? this.id + ..applyPrice = applyPrice ?? this.applyPrice + ..skuAttrList = skuAttrList ?? this.skuAttrList + ..skuCode = skuCode ?? this.skuCode; + } +} + +ShopHomeAttrList $ShopHomeAttrListFromJson(Map json) { + final ShopHomeAttrList shopHomeAttrList = ShopHomeAttrList(); + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + shopHomeAttrList.productId = productId; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + shopHomeAttrList.isDelete = isDelete; + } + final bool? needImg = jsonConvert.convert(json['needImg']); + if (needImg != null) { + shopHomeAttrList.needImg = needImg; + } + final List< + ShopHomeAttrValueList>? attrValueList = (json['attrValueList'] as List< + dynamic>?) + ?.map( + (e) => + jsonConvert.convert(e) as ShopHomeAttrValueList) + .toList(); + if (attrValueList != null) { + shopHomeAttrList.attrValueList = attrValueList; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + shopHomeAttrList.id = id; + } + final String? attrName = jsonConvert.convert(json['attrName']); + if (attrName != null) { + shopHomeAttrList.attrName = attrName; + } + return shopHomeAttrList; +} + +Map $ShopHomeAttrListToJson(ShopHomeAttrList entity) { + final Map data = {}; + data['productId'] = entity.productId; + data['isDelete'] = entity.isDelete; + data['needImg'] = entity.needImg; + data['attrValueList'] = entity.attrValueList?.map((v) => v.toJson()).toList(); + data['id'] = entity.id; + data['attrName'] = entity.attrName; + return data; +} + +extension ShopHomeAttrListExtension on ShopHomeAttrList { + ShopHomeAttrList copyWith({ + String? productId, + int? isDelete, + bool? needImg, + List? attrValueList, + String? id, + String? attrName, + }) { + return ShopHomeAttrList() + ..productId = productId ?? this.productId + ..isDelete = isDelete ?? this.isDelete + ..needImg = needImg ?? this.needImg + ..attrValueList = attrValueList ?? this.attrValueList + ..id = id ?? this.id + ..attrName = attrName ?? this.attrName; + } +} + +ShopHomeAttrValueList $ShopHomeAttrValueListFromJson( + Map json) { + final ShopHomeAttrValueList shopHomeAttrValueList = ShopHomeAttrValueList(); + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + shopHomeAttrValueList.isDelete = isDelete; + } + final String? attrId = jsonConvert.convert(json['attrId']); + if (attrId != null) { + shopHomeAttrValueList.attrId = attrId; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + shopHomeAttrValueList.id = id; + } + final String? attrValue = jsonConvert.convert(json['attrValue']); + if (attrValue != null) { + shopHomeAttrValueList.attrValue = attrValue; + } + final String? attrValueImg = jsonConvert.convert( + json['attrValueImg']); + if (attrValueImg != null) { + shopHomeAttrValueList.attrValueImg = attrValueImg; + } + return shopHomeAttrValueList; +} + +Map $ShopHomeAttrValueListToJson( + ShopHomeAttrValueList entity) { + final Map data = {}; + data['isDelete'] = entity.isDelete; + data['attrId'] = entity.attrId; + data['id'] = entity.id; + data['attrValue'] = entity.attrValue; + data['attrValueImg'] = entity.attrValueImg; + return data; +} + +extension ShopHomeAttrValueListExtension on ShopHomeAttrValueList { + ShopHomeAttrValueList copyWith({ + int? isDelete, + String? attrId, + String? id, + String? attrValue, + String? attrValueImg, + }) { + return ShopHomeAttrValueList() + ..isDelete = isDelete ?? this.isDelete + ..attrId = attrId ?? this.attrId + ..id = id ?? this.id + ..attrValue = attrValue ?? this.attrValue + ..attrValueImg = attrValueImg ?? this.attrValueImg; + } +} + +QuickEntry $QuickEntryFromJson(Map json) { + final QuickEntry quickEntry = QuickEntry(); + final String? img = jsonConvert.convert(json['img']); + if (img != null) { + quickEntry.img = img; + } + final String? url = jsonConvert.convert(json['url']); + if (url != null) { + quickEntry.url = url; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + quickEntry.id = id; + } + return quickEntry; +} + +Map $QuickEntryToJson(QuickEntry entity) { + final Map data = {}; + data['img'] = entity.img; + data['url'] = entity.url; + data['id'] = entity.id; + return data; +} + +extension QuickEntryExtension on QuickEntry { + QuickEntry copyWith({ + String? img, + String? url, + String? id, + }) { + return QuickEntry() + ..img = img ?? this.img + ..url = url ?? this.url + ..id = id ?? this.id; + } +} + +CategoryGroup $CategoryGroupFromJson(Map json) { + final CategoryGroup categoryGroup = CategoryGroup(); + final List? groupList = (json['groupList'] as List?)?.map( + (e) => jsonConvert.convert(e) as GroupList).toList(); + if (groupList != null) { + categoryGroup.groupList = groupList; + } + final String? groupCommodityName = jsonConvert.convert( + json['groupCommodityName']); + if (groupCommodityName != null) { + categoryGroup.groupCommodityName = groupCommodityName; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + categoryGroup.name = name; + } + return categoryGroup; +} + +Map $CategoryGroupToJson(CategoryGroup entity) { + final Map data = {}; + data['groupList'] = entity.groupList?.map((v) => v.toJson()).toList(); + data['groupCommodityName'] = entity.groupCommodityName; + data['name'] = entity.name; + return data; +} + +extension CategoryGroupExtension on CategoryGroup { + CategoryGroup copyWith({ + List? groupList, + String? groupCommodityName, + String? name, + }) { + return CategoryGroup() + ..groupList = groupList ?? this.groupList + ..groupCommodityName = groupCommodityName ?? this.groupCommodityName + ..name = name ?? this.name; + } +} + +GroupList $GroupListFromJson(Map json) { + final GroupList groupList = GroupList(); + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + groupList.isDelete = isDelete; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + groupList.updateUser = updateUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + groupList.updateTime = updateTime; + } + final String? groupImg = jsonConvert.convert(json['groupImg']); + if (groupImg != null) { + groupList.groupImg = groupImg; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + groupList.sort = sort; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + groupList.storeId = storeId; + } + final String? groupName = jsonConvert.convert(json['groupName']); + if (groupName != null) { + groupList.groupName = groupName; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + groupList.createTime = createTime; + } + final int? kitchenGroup = jsonConvert.convert(json['kitchenGroup']); + if (kitchenGroup != null) { + groupList.kitchenGroup = kitchenGroup; + } + final String? printerId = jsonConvert.convert(json['printerId']); + if (printerId != null) { + groupList.printerId = printerId; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + groupList.createUser = createUser; + } + final int? isCharge = jsonConvert.convert(json['isCharge']); + if (isCharge != null) { + groupList.isCharge = isCharge; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + groupList.id = id; + } + return groupList; +} + +Map $GroupListToJson(GroupList entity) { + final Map data = {}; + data['isDelete'] = entity.isDelete; + data['updateUser'] = entity.updateUser; + data['updateTime'] = entity.updateTime; + data['groupImg'] = entity.groupImg; + data['sort'] = entity.sort; + data['storeId'] = entity.storeId; + data['groupName'] = entity.groupName; + data['createTime'] = entity.createTime; + data['kitchenGroup'] = entity.kitchenGroup; + data['printerId'] = entity.printerId; + data['createUser'] = entity.createUser; + data['isCharge'] = entity.isCharge; + data['id'] = entity.id; + return data; +} + +extension GroupListExtension on GroupList { + GroupList copyWith({ + int? isDelete, + String? updateUser, + String? updateTime, + String? groupImg, + int? sort, + String? storeId, + String? groupName, + String? createTime, + int? kitchenGroup, + String? printerId, + String? createUser, + int? isCharge, + String? id, + }) { + return GroupList() + ..isDelete = isDelete ?? this.isDelete + ..updateUser = updateUser ?? this.updateUser + ..updateTime = updateTime ?? this.updateTime + ..groupImg = groupImg ?? this.groupImg + ..sort = sort ?? this.sort + ..storeId = storeId ?? this.storeId + ..groupName = groupName ?? this.groupName + ..createTime = createTime ?? this.createTime + ..kitchenGroup = kitchenGroup ?? this.kitchenGroup + ..printerId = printerId ?? this.printerId + ..createUser = createUser ?? this.createUser + ..isCharge = isCharge ?? this.isCharge + ..id = id ?? this.id; + } +} \ No newline at end of file diff --git a/lib/generated/json/shopping_cart.g.dart b/lib/generated/json/shopping_cart.g.dart new file mode 100644 index 00000000..64c67473 --- /dev/null +++ b/lib/generated/json/shopping_cart.g.dart @@ -0,0 +1,289 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/shopping_cart.dart'; +import 'package:huixiang/data/coupon_list.dart'; + +import 'package:huixiang/data/promotion_info.dart'; + +import 'package:huixiang/data/set_meal_data.dart'; + + +ShoppingCart $ShoppingCartFromJson(Map json) { + final ShoppingCart shoppingCart = ShoppingCart(); + final int? cartSum = jsonConvert.convert(json['cartSum']); + if (cartSum != null) { + shoppingCart.cartSum = cartSum; + } + final int? selectDiscount = jsonConvert.convert(json['selectDiscount']); + if (selectDiscount != null) { + shoppingCart.selectDiscount = selectDiscount; + } + final int? numberOfPeople = jsonConvert.convert(json['numberOfPeople']); + if (numberOfPeople != null) { + shoppingCart.numberOfPeople = numberOfPeople; + } + final int? selected = jsonConvert.convert(json['selected']); + if (selected != null) { + shoppingCart.selected = selected; + } + final List< + SkuItemList>? shoppingCartSkuItemList = (json['shoppingCartSkuItemList'] as List< + dynamic>?)?.map( + (e) => jsonConvert.convert(e) as SkuItemList).toList(); + if (shoppingCartSkuItemList != null) { + shoppingCart.shoppingCartSkuItemList = shoppingCartSkuItemList; + } + final int? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + shoppingCart.storeId = storeId; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + shoppingCart.storeName = storeName; + } + final String? tableId = jsonConvert.convert(json['tableId']); + if (tableId != null) { + shoppingCart.tableId = tableId; + } + final List< + PromotionInfo>? promotionInfoList = (json['promotionInfoList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as PromotionInfo) + .toList(); + if (promotionInfoList != null) { + shoppingCart.promotionInfoList = promotionInfoList; + } + final List? couponList = (json['couponList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as CouponList) + .toList(); + if (couponList != null) { + shoppingCart.couponList = couponList; + } + return shoppingCart; +} + +Map $ShoppingCartToJson(ShoppingCart entity) { + final Map data = {}; + data['cartSum'] = entity.cartSum; + data['selectDiscount'] = entity.selectDiscount; + data['numberOfPeople'] = entity.numberOfPeople; + data['selected'] = entity.selected; + data['shoppingCartSkuItemList'] = + entity.shoppingCartSkuItemList?.map((v) => v.toJson()).toList(); + data['storeId'] = entity.storeId; + data['storeName'] = entity.storeName; + data['tableId'] = entity.tableId; + data['promotionInfoList'] = + entity.promotionInfoList?.map((v) => v.toJson()).toList(); + data['couponList'] = entity.couponList?.map((v) => v.toJson()).toList(); + return data; +} + +extension ShoppingCartExtension on ShoppingCart { + ShoppingCart copyWith({ + int? cartSum, + int? selectDiscount, + int? numberOfPeople, + int? selected, + List? shoppingCartSkuItemList, + int? storeId, + String? storeName, + String? tableId, + List? promotionInfoList, + List? couponList, + }) { + return ShoppingCart() + ..cartSum = cartSum ?? this.cartSum + ..selectDiscount = selectDiscount ?? this.selectDiscount + ..numberOfPeople = numberOfPeople ?? this.numberOfPeople + ..selected = selected ?? this.selected + ..shoppingCartSkuItemList = shoppingCartSkuItemList ?? + this.shoppingCartSkuItemList + ..storeId = storeId ?? this.storeId + ..storeName = storeName ?? this.storeName + ..tableId = tableId ?? this.tableId + ..promotionInfoList = promotionInfoList ?? this.promotionInfoList + ..couponList = couponList ?? this.couponList; + } +} + +SkuItemList $SkuItemListFromJson(Map json) { + final SkuItemList skuItemList = SkuItemList(); + final int? buyNum = jsonConvert.convert(json['buyNum']); + if (buyNum != null) { + skuItemList.buyNum = buyNum; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + skuItemList.createTime = createTime; + } + final int? groupId = jsonConvert.convert(json['groupId']); + if (groupId != null) { + skuItemList.groupId = groupId; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + skuItemList.id = id; + } + final List? platterList = (json['platterList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as PlatterList) + .toList(); + if (platterList != null) { + skuItemList.platterList = platterList; + } + final List? setMealDataList = (json['setMealDataList'] as List< + dynamic>?)?.map( + (e) => jsonConvert.convert(e) as SetMealData).toList(); + if (setMealDataList != null) { + skuItemList.setMealDataList = setMealDataList; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + skuItemList.productId = productId; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + skuItemList.productName = productName; + } + final int? selected = jsonConvert.convert(json['selected']); + if (selected != null) { + skuItemList.selected = selected; + } + final String? skuImg = jsonConvert.convert(json['skuImg']); + if (skuImg != null) { + skuItemList.skuImg = skuImg; + } + final String? skuName = jsonConvert.convert(json['skuName']); + if (skuName != null) { + skuItemList.skuName = skuName; + } + final String? skuPrice = jsonConvert.convert(json['skuPrice']); + if (skuPrice != null) { + skuItemList.skuPrice = skuPrice; + } + final int? skuStock = jsonConvert.convert(json['skuStock']); + if (skuStock != null) { + skuItemList.skuStock = skuStock; + } + final int? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + skuItemList.storeId = storeId; + } + final int? tableId = jsonConvert.convert(json['tableId']); + if (tableId != null) { + skuItemList.tableId = tableId; + } + return skuItemList; +} + +Map $SkuItemListToJson(SkuItemList entity) { + final Map data = {}; + data['buyNum'] = entity.buyNum; + data['createTime'] = entity.createTime; + data['groupId'] = entity.groupId; + data['id'] = entity.id; + data['platterList'] = entity.platterList?.map((v) => v.toJson()).toList(); + data['setMealDataList'] = + entity.setMealDataList?.map((v) => v.toJson()).toList(); + data['productId'] = entity.productId; + data['productName'] = entity.productName; + data['selected'] = entity.selected; + data['skuImg'] = entity.skuImg; + data['skuName'] = entity.skuName; + data['skuPrice'] = entity.skuPrice; + data['skuStock'] = entity.skuStock; + data['storeId'] = entity.storeId; + data['tableId'] = entity.tableId; + return data; +} + +extension SkuItemListExtension on SkuItemList { + SkuItemList copyWith({ + int? buyNum, + String? createTime, + int? groupId, + int? id, + List? platterList, + List? setMealDataList, + String? productId, + String? productName, + int? selected, + String? skuImg, + String? skuName, + String? skuPrice, + int? skuStock, + int? storeId, + int? tableId, + }) { + return SkuItemList() + ..buyNum = buyNum ?? this.buyNum + ..createTime = createTime ?? this.createTime + ..groupId = groupId ?? this.groupId + ..id = id ?? this.id + ..platterList = platterList ?? this.platterList + ..setMealDataList = setMealDataList ?? this.setMealDataList + ..productId = productId ?? this.productId + ..productName = productName ?? this.productName + ..selected = selected ?? this.selected + ..skuImg = skuImg ?? this.skuImg + ..skuName = skuName ?? this.skuName + ..skuPrice = skuPrice ?? this.skuPrice + ..skuStock = skuStock ?? this.skuStock + ..storeId = storeId ?? this.storeId + ..tableId = tableId ?? this.tableId; + } +} + +PlatterList $PlatterListFromJson(Map json) { + final PlatterList platterList = PlatterList(); + final bool? deleted = jsonConvert.convert(json['deleted']); + if (deleted != null) { + platterList.deleted = deleted; + } + final int? id = jsonConvert.convert(json['id']); + if (id != null) { + platterList.id = id; + } + final int? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + platterList.productId = productId; + } + final bool? required = jsonConvert.convert(json['required']); + if (required != null) { + platterList.required = required; + } + final int? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + platterList.skuId = skuId; + } + return platterList; +} + +Map $PlatterListToJson(PlatterList entity) { + final Map data = {}; + data['deleted'] = entity.deleted; + data['id'] = entity.id; + data['productId'] = entity.productId; + data['required'] = entity.required; + data['skuId'] = entity.skuId; + return data; +} + +extension PlatterListExtension on PlatterList { + PlatterList copyWith({ + bool? deleted, + int? id, + int? productId, + bool? required, + int? skuId, + }) { + return PlatterList() + ..deleted = deleted ?? this.deleted + ..id = id ?? this.id + ..productId = productId ?? this.productId + ..required = required ?? this.required + ..skuId = skuId ?? this.skuId; + } +} \ No newline at end of file diff --git a/lib/generated/json/sign_in.g.dart b/lib/generated/json/sign_in.g.dart new file mode 100644 index 00000000..cfcb2d65 --- /dev/null +++ b/lib/generated/json/sign_in.g.dart @@ -0,0 +1,131 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/sign_in.dart'; + +SignIn $SignInFromJson(Map json) { + final SignIn signIn = SignIn(); + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + signIn.balance = balance; + } + final String? category = jsonConvert.convert(json['category']); + if (category != null) { + signIn.category = category; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + signIn.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + signIn.createUser = createUser; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + signIn.id = id; + } + final bool? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + signIn.isDeleted = isDeleted; + } + final String? linkId = jsonConvert.convert(json['linkId']); + if (linkId != null) { + signIn.linkId = linkId; + } + final String? mark = jsonConvert.convert(json['mark']); + if (mark != null) { + signIn.mark = mark; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + signIn.mid = mid; + } + final String? number = jsonConvert.convert(json['number']); + if (number != null) { + signIn.number = number; + } + final int? pm = jsonConvert.convert(json['pm']); + if (pm != null) { + signIn.pm = pm; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + signIn.status = status; + } + final String? title = jsonConvert.convert(json['title']); + if (title != null) { + signIn.title = title; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + signIn.type = type; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + signIn.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + signIn.updateUser = updateUser; + } + return signIn; +} + +Map $SignInToJson(SignIn entity) { + final Map data = {}; + data['balance'] = entity.balance; + data['category'] = entity.category; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['id'] = entity.id; + data['isDeleted'] = entity.isDeleted; + data['linkId'] = entity.linkId; + data['mark'] = entity.mark; + data['mid'] = entity.mid; + data['number'] = entity.number; + data['pm'] = entity.pm; + data['status'] = entity.status; + data['title'] = entity.title; + data['type'] = entity.type; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + return data; +} + +extension SignInExtension on SignIn { + SignIn copyWith({ + String? balance, + String? category, + String? createTime, + String? createUser, + String? id, + bool? isDeleted, + String? linkId, + String? mark, + String? mid, + String? number, + int? pm, + bool? status, + String? title, + String? type, + String? updateTime, + String? updateUser, + }) { + return SignIn() + ..balance = balance ?? this.balance + ..category = category ?? this.category + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..id = id ?? this.id + ..isDeleted = isDeleted ?? this.isDeleted + ..linkId = linkId ?? this.linkId + ..mark = mark ?? this.mark + ..mid = mid ?? this.mid + ..number = number ?? this.number + ..pm = pm ?? this.pm + ..status = status ?? this.status + ..title = title ?? this.title + ..type = type ?? this.type + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser; + } +} \ No newline at end of file diff --git a/lib/generated/json/sign_info.g.dart b/lib/generated/json/sign_info.g.dart new file mode 100644 index 00000000..263245fb --- /dev/null +++ b/lib/generated/json/sign_info.g.dart @@ -0,0 +1,71 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/sign_info.dart'; +import 'package:huixiang/data/member_rank.dart'; + +import 'package:huixiang/data/sign_in.dart'; + +import 'package:huixiang/data/task.dart'; + + +SignInfo $SignInfoFromJson(Map json) { + final SignInfo signInfo = SignInfo(); + final String? point = jsonConvert.convert(json['point']); + if (point != null) { + signInfo.point = point; + } + final bool? todayHasSignin = jsonConvert.convert( + json['todayHasSignin']); + if (todayHasSignin != null) { + signInfo.todayHasSignin = todayHasSignin; + } + final MemberRank? rank = jsonConvert.convert(json['rank']); + if (rank != null) { + signInfo.rank = rank; + } + final List? signInList = (json['signInList'] as List?)?.map( + (e) => jsonConvert.convert(e) as SignIn).toList(); + if (signInList != null) { + signInfo.signInList = signInList; + } + final List? taskList = (json['taskList'] as List?)?.map( + (e) => jsonConvert.convert(e) as Task).toList(); + if (taskList != null) { + signInfo.taskList = taskList; + } + final List? rewardList = (json['rewardList'] as List?)?.map( + (e) => jsonConvert.convert(e) as int).toList(); + if (rewardList != null) { + signInfo.rewardList = rewardList; + } + return signInfo; +} + +Map $SignInfoToJson(SignInfo entity) { + final Map data = {}; + data['point'] = entity.point; + data['todayHasSignin'] = entity.todayHasSignin; + data['rank'] = entity.rank?.toJson(); + data['signInList'] = entity.signInList?.map((v) => v.toJson()).toList(); + data['taskList'] = entity.taskList?.map((v) => v.toJson()).toList(); + data['rewardList'] = entity.rewardList; + return data; +} + +extension SignInfoExtension on SignInfo { + SignInfo copyWith({ + String? point, + bool? todayHasSignin, + MemberRank? rank, + List? signInList, + List? taskList, + List? rewardList, + }) { + return SignInfo() + ..point = point ?? this.point + ..todayHasSignin = todayHasSignin ?? this.todayHasSignin + ..rank = rank ?? this.rank + ..signInList = signInList ?? this.signInList + ..taskList = taskList ?? this.taskList + ..rewardList = rewardList ?? this.rewardList; + } +} \ No newline at end of file diff --git a/lib/generated/json/single_sales.g.dart b/lib/generated/json/single_sales.g.dart new file mode 100644 index 00000000..198116c4 --- /dev/null +++ b/lib/generated/json/single_sales.g.dart @@ -0,0 +1,122 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/single_sales.dart'; + +SingleSales $SingleSalesFromJson(Map json) { + final SingleSales singleSales = SingleSales(); + final dynamic productId = json['productId']; + if (productId != null) { + singleSales.productId = productId; + } + final int? saleNum = jsonConvert.convert(json['saleNum']); + if (saleNum != null) { + singleSales.saleNum = saleNum; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + singleSales.productName = productName; + } + final dynamic productType = json['productType']; + if (productType != null) { + singleSales.productType = productType; + } + final String? productGroupName = jsonConvert.convert( + json['productGroupName']); + if (productGroupName != null) { + singleSales.productGroupName = productGroupName; + } + final String? sumPrice = jsonConvert.convert(json['sumPrice']); + if (sumPrice != null) { + singleSales.sumPrice = sumPrice; + } + final String? sellPrict = jsonConvert.convert(json['sellPrict']); + if (sellPrict != null) { + singleSales.sellPrict = sellPrict; + } + final String? productSkuName = jsonConvert.convert( + json['productSkuName']); + if (productSkuName != null) { + singleSales.productSkuName = productSkuName; + } + final dynamic productSkuList = json['productSkuList']; + if (productSkuList != null) { + singleSales.productSkuList = productSkuList; + } + final dynamic platterLsit = json['platterLsit']; + if (platterLsit != null) { + singleSales.platterLsit = platterLsit; + } + final int? giveNum = jsonConvert.convert(json['giveNum']); + if (giveNum != null) { + singleSales.giveNum = giveNum; + } + final int? refundNum = jsonConvert.convert(json['refundNum']); + if (refundNum != null) { + singleSales.refundNum = refundNum; + } + final double? productCountPercent = jsonConvert.convert( + json['productCountPercent']); + if (productCountPercent != null) { + singleSales.productCountPercent = productCountPercent; + } + final double? productSellPricePercent = jsonConvert.convert( + json['productSellPricePercent']); + if (productSellPricePercent != null) { + singleSales.productSellPricePercent = productSellPricePercent; + } + return singleSales; +} + +Map $SingleSalesToJson(SingleSales entity) { + final Map data = {}; + data['productId'] = entity.productId; + data['saleNum'] = entity.saleNum; + data['productName'] = entity.productName; + data['productType'] = entity.productType; + data['productGroupName'] = entity.productGroupName; + data['sumPrice'] = entity.sumPrice; + data['sellPrict'] = entity.sellPrict; + data['productSkuName'] = entity.productSkuName; + data['productSkuList'] = entity.productSkuList; + data['platterLsit'] = entity.platterLsit; + data['giveNum'] = entity.giveNum; + data['refundNum'] = entity.refundNum; + data['productCountPercent'] = entity.productCountPercent; + data['productSellPricePercent'] = entity.productSellPricePercent; + return data; +} + +extension SingleSalesExtension on SingleSales { + SingleSales copyWith({ + dynamic productId, + int? saleNum, + String? productName, + dynamic productType, + String? productGroupName, + String? sumPrice, + String? sellPrict, + String? productSkuName, + dynamic productSkuList, + dynamic platterLsit, + int? giveNum, + int? refundNum, + double? productCountPercent, + double? productSellPricePercent, + }) { + return SingleSales() + ..productId = productId ?? this.productId + ..saleNum = saleNum ?? this.saleNum + ..productName = productName ?? this.productName + ..productType = productType ?? this.productType + ..productGroupName = productGroupName ?? this.productGroupName + ..sumPrice = sumPrice ?? this.sumPrice + ..sellPrict = sellPrict ?? this.sellPrict + ..productSkuName = productSkuName ?? this.productSkuName + ..productSkuList = productSkuList ?? this.productSkuList + ..platterLsit = platterLsit ?? this.platterLsit + ..giveNum = giveNum ?? this.giveNum + ..refundNum = refundNum ?? this.refundNum + ..productCountPercent = productCountPercent ?? this.productCountPercent + ..productSellPricePercent = productSellPricePercent ?? + this.productSellPricePercent; + } +} \ No newline at end of file diff --git a/lib/generated/json/sku_attr_list.g.dart b/lib/generated/json/sku_attr_list.g.dart new file mode 100644 index 00000000..1619d68f --- /dev/null +++ b/lib/generated/json/sku_attr_list.g.dart @@ -0,0 +1,89 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/sku_attr_list.dart'; + +SkuAttrList $SkuAttrListFromJson(Map json) { + final SkuAttrList skuAttrList = SkuAttrList(); + final String? attrValueId = jsonConvert.convert(json['attrValueId']); + if (attrValueId != null) { + skuAttrList.attrValueId = attrValueId; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + skuAttrList.isDelete = isDelete; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + skuAttrList.updateUser = updateUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + skuAttrList.updateTime = updateTime; + } + final String? attrId = jsonConvert.convert(json['attrId']); + if (attrId != null) { + skuAttrList.attrId = attrId; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + skuAttrList.createTime = createTime; + } + final dynamic sortOrder = json['sortOrder']; + if (sortOrder != null) { + skuAttrList.sortOrder = sortOrder; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + skuAttrList.createUser = createUser; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + skuAttrList.id = id; + } + final String? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + skuAttrList.skuId = skuId; + } + return skuAttrList; +} + +Map $SkuAttrListToJson(SkuAttrList entity) { + final Map data = {}; + data['attrValueId'] = entity.attrValueId; + data['isDelete'] = entity.isDelete; + data['updateUser'] = entity.updateUser; + data['updateTime'] = entity.updateTime; + data['attrId'] = entity.attrId; + data['createTime'] = entity.createTime; + data['sortOrder'] = entity.sortOrder; + data['createUser'] = entity.createUser; + data['id'] = entity.id; + data['skuId'] = entity.skuId; + return data; +} + +extension SkuAttrListExtension on SkuAttrList { + SkuAttrList copyWith({ + String? attrValueId, + int? isDelete, + String? updateUser, + String? updateTime, + String? attrId, + String? createTime, + dynamic sortOrder, + String? createUser, + String? id, + String? skuId, + }) { + return SkuAttrList() + ..attrValueId = attrValueId ?? this.attrValueId + ..isDelete = isDelete ?? this.isDelete + ..updateUser = updateUser ?? this.updateUser + ..updateTime = updateTime ?? this.updateTime + ..attrId = attrId ?? this.attrId + ..createTime = createTime ?? this.createTime + ..sortOrder = sortOrder ?? this.sortOrder + ..createUser = createUser ?? this.createUser + ..id = id ?? this.id + ..skuId = skuId ?? this.skuId; + } +} \ No newline at end of file diff --git a/lib/generated/json/sku_json.g.dart b/lib/generated/json/sku_json.g.dart new file mode 100644 index 00000000..08bc507c --- /dev/null +++ b/lib/generated/json/sku_json.g.dart @@ -0,0 +1,40 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/sku_json.dart'; + +SkuJson $SkuJsonFromJson(Map json) { + final SkuJson skuJson = SkuJson(); + final String? skuId = jsonConvert.convert(json['skuId']); + if (skuId != null) { + skuJson.skuId = skuId; + } + final int? skuPrice = jsonConvert.convert(json['skuPrice']); + if (skuPrice != null) { + skuJson.skuPrice = skuPrice; + } + final int? skuStock = jsonConvert.convert(json['skuStock']); + if (skuStock != null) { + skuJson.skuStock = skuStock; + } + return skuJson; +} + +Map $SkuJsonToJson(SkuJson entity) { + final Map data = {}; + data['skuId'] = entity.skuId; + data['skuPrice'] = entity.skuPrice; + data['skuStock'] = entity.skuStock; + return data; +} + +extension SkuJsonExtension on SkuJson { + SkuJson copyWith({ + String? skuId, + int? skuPrice, + int? skuStock, + }) { + return SkuJson() + ..skuId = skuId ?? this.skuId + ..skuPrice = skuPrice ?? this.skuPrice + ..skuStock = skuStock ?? this.skuStock; + } +} \ No newline at end of file diff --git a/lib/generated/json/social_info.g.dart b/lib/generated/json/social_info.g.dart new file mode 100644 index 00000000..46b02040 --- /dev/null +++ b/lib/generated/json/social_info.g.dart @@ -0,0 +1,41 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/social_info.dart'; + +SocialInfo $SocialInfoFromJson(Map json) { + final SocialInfo socialInfo = SocialInfo(); + final int? fans = jsonConvert.convert(json['fans']); + if (fans != null) { + socialInfo.fans = fans; + } + final int? follow = jsonConvert.convert(json['follow']); + if (follow != null) { + socialInfo.follow = follow; + } + final int? achievementNumber = jsonConvert.convert( + json['achievementNumber']); + if (achievementNumber != null) { + socialInfo.achievementNumber = achievementNumber; + } + return socialInfo; +} + +Map $SocialInfoToJson(SocialInfo entity) { + final Map data = {}; + data['fans'] = entity.fans; + data['follow'] = entity.follow; + data['achievementNumber'] = entity.achievementNumber; + return data; +} + +extension SocialInfoExtension on SocialInfo { + SocialInfo copyWith({ + int? fans, + int? follow, + int? achievementNumber, + }) { + return SocialInfo() + ..fans = fans ?? this.fans + ..follow = follow ?? this.follow + ..achievementNumber = achievementNumber ?? this.achievementNumber; + } +} \ No newline at end of file diff --git a/lib/generated/json/store.g.dart b/lib/generated/json/store.g.dart new file mode 100644 index 00000000..e6dda067 --- /dev/null +++ b/lib/generated/json/store.g.dart @@ -0,0 +1,279 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/store.dart'; +import 'package:huixiang/data/coupon_vo.dart'; + +import 'package:huixiang/data/product_show.dart'; + +import 'package:huixiang/data/store_type.dart'; + + +Store $StoreFromJson(Map json) { + final Store store = Store(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + store.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + store.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + store.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + store.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + store.updateUser = updateUser; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + store.tenantCode = tenantCode; + } + final bool? useErp = jsonConvert.convert(json['useErp']); + if (useErp != null) { + store.useErp = useErp; + } + final String? openStartTime = jsonConvert.convert( + json['openStartTime']); + if (openStartTime != null) { + store.openStartTime = openStartTime; + } + final String? openEndTime = jsonConvert.convert(json['openEndTime']); + if (openEndTime != null) { + store.openEndTime = openEndTime; + } + final String? perCapitaConsumption = jsonConvert.convert( + json['perCapitaConsumption']); + if (perCapitaConsumption != null) { + store.perCapitaConsumption = perCapitaConsumption; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + store.storeName = storeName; + } + final double? distance = jsonConvert.convert(json['distance']); + if (distance != null) { + store.distance = distance; + } + final String? logo = jsonConvert.convert(json['logo']); + if (logo != null) { + store.logo = logo; + } + final String? facade = jsonConvert.convert(json['facade']); + if (facade != null) { + store.facade = facade; + } + final String? shipAddress = jsonConvert.convert(json['shipAddress']); + if (shipAddress != null) { + store.shipAddress = shipAddress; + } + final dynamic remark = json['remark']; + if (remark != null) { + store.remark = remark; + } + final String? mobile = jsonConvert.convert(json['mobile']); + if (mobile != null) { + store.mobile = mobile; + } + final String? longitude = jsonConvert.convert(json['longitude']); + if (longitude != null) { + store.longitude = longitude; + } + final String? latitude = jsonConvert.convert(json['latitude']); + if (latitude != null) { + store.latitude = latitude; + } + final dynamic refundAddress = json['refundAddress']; + if (refundAddress != null) { + store.refundAddress = refundAddress; + } + final dynamic refundTel = json['refundTel']; + if (refundTel != null) { + store.refundTel = refundTel; + } + final dynamic refundContact = json['refundContact']; + if (refundContact != null) { + store.refundContact = refundContact; + } + final int? isAutoSendRefundAddress = jsonConvert.convert( + json['isAutoSendRefundAddress']); + if (isAutoSendRefundAddress != null) { + store.isAutoSendRefundAddress = isAutoSendRefundAddress; + } + final String? province = jsonConvert.convert(json['province']); + if (province != null) { + store.province = province; + } + final String? city = jsonConvert.convert(json['city']); + if (city != null) { + store.city = city; + } + final String? district = jsonConvert.convert(json['district']); + if (district != null) { + store.district = district; + } + final String? address = jsonConvert.convert(json['address']); + if (address != null) { + store.address = address; + } + final String? headName = jsonConvert.convert(json['headName']); + if (headName != null) { + store.headName = headName; + } + final String? headMobile = jsonConvert.convert(json['headMobile']); + if (headMobile != null) { + store.headMobile = headMobile; + } + final CouponVo? couponVO = jsonConvert.convert(json['couponVO']); + if (couponVO != null) { + store.couponVO = couponVO; + } + final dynamic deliveryInfo = json['deliveryInfo']; + if (deliveryInfo != null) { + store.deliveryInfo = deliveryInfo; + } + final String? businessType = jsonConvert.convert( + json['businessType']); + if (businessType != null) { + store.businessType = businessType; + } + final String? businessService = jsonConvert.convert( + json['businessService']); + if (businessService != null) { + store.businessService = businessService; + } + final List? productShow = (json['productShow'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as ProductShow) + .toList(); + if (productShow != null) { + store.productShow = productShow; + } + final StoreType? posType = jsonConvert.convert(json['posType']); + if (posType != null) { + store.posType = posType; + } + return store; +} + +Map $StoreToJson(Store entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['tenantCode'] = entity.tenantCode; + data['useErp'] = entity.useErp; + data['openStartTime'] = entity.openStartTime; + data['openEndTime'] = entity.openEndTime; + data['perCapitaConsumption'] = entity.perCapitaConsumption; + data['storeName'] = entity.storeName; + data['distance'] = entity.distance; + data['logo'] = entity.logo; + data['facade'] = entity.facade; + data['shipAddress'] = entity.shipAddress; + data['remark'] = entity.remark; + data['mobile'] = entity.mobile; + data['longitude'] = entity.longitude; + data['latitude'] = entity.latitude; + data['refundAddress'] = entity.refundAddress; + data['refundTel'] = entity.refundTel; + data['refundContact'] = entity.refundContact; + data['isAutoSendRefundAddress'] = entity.isAutoSendRefundAddress; + data['province'] = entity.province; + data['city'] = entity.city; + data['district'] = entity.district; + data['address'] = entity.address; + data['headName'] = entity.headName; + data['headMobile'] = entity.headMobile; + data['couponVO'] = entity.couponVO?.toJson(); + data['deliveryInfo'] = entity.deliveryInfo; + data['businessType'] = entity.businessType; + data['businessService'] = entity.businessService; + data['productShow'] = entity.productShow?.map((v) => v.toJson()).toList(); + data['posType'] = entity.posType?.toJson(); + return data; +} + +extension StoreExtension on Store { + Store copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? tenantCode, + bool? useErp, + String? openStartTime, + String? openEndTime, + String? perCapitaConsumption, + String? storeName, + double? distance, + String? logo, + String? facade, + String? shipAddress, + dynamic remark, + String? mobile, + String? longitude, + String? latitude, + dynamic refundAddress, + dynamic refundTel, + dynamic refundContact, + int? isAutoSendRefundAddress, + String? province, + String? city, + String? district, + String? address, + String? headName, + String? headMobile, + CouponVo? couponVO, + dynamic deliveryInfo, + String? businessType, + String? businessService, + List? productShow, + StoreType? posType, + }) { + return Store() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..tenantCode = tenantCode ?? this.tenantCode + ..useErp = useErp ?? this.useErp + ..openStartTime = openStartTime ?? this.openStartTime + ..openEndTime = openEndTime ?? this.openEndTime + ..perCapitaConsumption = perCapitaConsumption ?? this.perCapitaConsumption + ..storeName = storeName ?? this.storeName + ..distance = distance ?? this.distance + ..logo = logo ?? this.logo + ..facade = facade ?? this.facade + ..shipAddress = shipAddress ?? this.shipAddress + ..remark = remark ?? this.remark + ..mobile = mobile ?? this.mobile + ..longitude = longitude ?? this.longitude + ..latitude = latitude ?? this.latitude + ..refundAddress = refundAddress ?? this.refundAddress + ..refundTel = refundTel ?? this.refundTel + ..refundContact = refundContact ?? this.refundContact + ..isAutoSendRefundAddress = isAutoSendRefundAddress ?? + this.isAutoSendRefundAddress + ..province = province ?? this.province + ..city = city ?? this.city + ..district = district ?? this.district + ..address = address ?? this.address + ..headName = headName ?? this.headName + ..headMobile = headMobile ?? this.headMobile + ..couponVO = couponVO ?? this.couponVO + ..deliveryInfo = deliveryInfo ?? this.deliveryInfo + ..businessType = businessType ?? this.businessType + ..businessService = businessService ?? this.businessService + ..productShow = productShow ?? this.productShow + ..posType = posType ?? this.posType; + } +} \ No newline at end of file diff --git a/lib/generated/json/store_info.g.dart b/lib/generated/json/store_info.g.dart new file mode 100644 index 00000000..4a2b2f03 --- /dev/null +++ b/lib/generated/json/store_info.g.dart @@ -0,0 +1,367 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/store_info.dart'; +import 'package:huixiang/data/banner.dart'; + +import 'package:huixiang/data/coupon_vo.dart'; + +import 'package:huixiang/data/delivery_info.dart'; + +import 'package:huixiang/data/member_source.dart'; + +import 'package:huixiang/data/page.dart'; + +import 'package:huixiang/data/pickup_type.dart'; + +import 'package:huixiang/data/promotion.dart'; + +import 'package:huixiang/data/store_type.dart'; + +import 'package:huixiang/data/mini.dart'; + + +StoreInfo $StoreInfoFromJson(Map json) { + final StoreInfo storeInfo = StoreInfo(); + final String? address = jsonConvert.convert(json['address']); + if (address != null) { + storeInfo.address = address; + } + final List? bannerList = (json['bannerList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as BannerData) + .toList(); + if (bannerList != null) { + storeInfo.bannerList = bannerList; + } + final String? city = jsonConvert.convert(json['city']); + if (city != null) { + storeInfo.city = city; + } + final List? couponVOList = (json['couponVOList'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as CouponVo) + .toList(); + if (couponVOList != null) { + storeInfo.couponVOList = couponVOList; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + storeInfo.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + storeInfo.createUser = createUser; + } + final DeliveryInfo? deliveryInfo = jsonConvert.convert( + json['deliveryInfo']); + if (deliveryInfo != null) { + storeInfo.deliveryInfo = deliveryInfo; + } + final PickupType? pickupType = jsonConvert.convert( + json['pickupType']); + if (pickupType != null) { + storeInfo.pickupType = pickupType; + } + final String? district = jsonConvert.convert(json['district']); + if (district != null) { + storeInfo.district = district; + } + final String? headMobile = jsonConvert.convert(json['headMobile']); + if (headMobile != null) { + storeInfo.headMobile = headMobile; + } + final String? tel = jsonConvert.convert(json['tel']); + if (tel != null) { + storeInfo.tel = tel; + } + final String? headName = jsonConvert.convert(json['headName']); + if (headName != null) { + storeInfo.headName = headName; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + storeInfo.id = id; + } + final num? isAutoSendRefundAddress = jsonConvert.convert( + json['isAutoSendRefundAddress']); + if (isAutoSendRefundAddress != null) { + storeInfo.isAutoSendRefundAddress = isAutoSendRefundAddress; + } + final String? latitude = jsonConvert.convert(json['latitude']); + if (latitude != null) { + storeInfo.latitude = latitude; + } + final String? logo = jsonConvert.convert(json['logo']); + if (logo != null) { + storeInfo.logo = logo; + } + final bool? isVip = jsonConvert.convert(json['isVip']); + if (isVip != null) { + storeInfo.isVip = isVip; + } + final String? longitude = jsonConvert.convert(json['longitude']); + if (longitude != null) { + storeInfo.longitude = longitude; + } + final String? mobile = jsonConvert.convert(json['mobile']); + if (mobile != null) { + storeInfo.mobile = mobile; + } + final String? openEndTime = jsonConvert.convert(json['openEndTime']); + if (openEndTime != null) { + storeInfo.openEndTime = openEndTime; + } + final String? openStartTime = jsonConvert.convert( + json['openStartTime']); + if (openStartTime != null) { + storeInfo.openStartTime = openStartTime; + } + final String? perCapitaConsumption = jsonConvert.convert( + json['perCapitaConsumption']); + if (perCapitaConsumption != null) { + storeInfo.perCapitaConsumption = perCapitaConsumption; + } + final StoreType? posType = jsonConvert.convert(json['posType']); + if (posType != null) { + storeInfo.posType = posType; + } + final List? promotionList = (json['promotionList'] as List< + dynamic>?)?.map( + (e) => jsonConvert.convert(e) as Promotion).toList(); + if (promotionList != null) { + storeInfo.promotionList = promotionList; + } + final String? province = jsonConvert.convert(json['province']); + if (province != null) { + storeInfo.province = province; + } + final String? refundAddress = jsonConvert.convert( + json['refundAddress']); + if (refundAddress != null) { + storeInfo.refundAddress = refundAddress; + } + final String? refundContact = jsonConvert.convert( + json['refundContact']); + if (refundContact != null) { + storeInfo.refundContact = refundContact; + } + final String? refundTel = jsonConvert.convert(json['refundTel']); + if (refundTel != null) { + storeInfo.refundTel = refundTel; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + storeInfo.remark = remark; + } + final String? shipAddress = jsonConvert.convert(json['shipAddress']); + if (shipAddress != null) { + storeInfo.shipAddress = shipAddress; + } + final String? storeName = jsonConvert.convert(json['storeName']); + if (storeName != null) { + storeInfo.storeName = storeName; + } + final StoreTable? storeTable = jsonConvert.convert( + json['storeTable']); + if (storeTable != null) { + storeInfo.storeTable = storeTable; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + storeInfo.tenantCode = tenantCode; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + storeInfo.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + storeInfo.updateUser = updateUser; + } + final String? businessService = jsonConvert.convert( + json['businessService']); + if (businessService != null) { + storeInfo.businessService = businessService; + } + final Mini? mini = jsonConvert.convert(json['mini']); + if (mini != null) { + storeInfo.mini = mini; + } + final bool? useErp = jsonConvert.convert(json['useErp']); + if (useErp != null) { + storeInfo.useErp = useErp; + } + final bool? usePlatformVip = jsonConvert.convert( + json['usePlatformVip']); + if (usePlatformVip != null) { + storeInfo.usePlatformVip = usePlatformVip; + } + final bool? usePlatformPay = jsonConvert.convert( + json['usePlatformPay']); + if (usePlatformPay != null) { + storeInfo.usePlatformPay = usePlatformPay; + } + final String? expireTime = jsonConvert.convert(json['expireTime']); + if (expireTime != null) { + storeInfo.expireTime = expireTime; + } + final String? vipFee = jsonConvert.convert(json['vipFee']); + if (vipFee != null) { + storeInfo.vipFee = vipFee; + } + final MemberSource? memberSource = jsonConvert.convert( + json['memberSource']); + if (memberSource != null) { + storeInfo.memberSource = memberSource; + } + final PageInfo? informationVOPageVO = jsonConvert.convert( + json['informationVOPageVO']); + if (informationVOPageVO != null) { + storeInfo.informationVOPageVO = informationVOPageVO; + } + return storeInfo; +} + +Map $StoreInfoToJson(StoreInfo entity) { + final Map data = {}; + data['address'] = entity.address; + data['bannerList'] = entity.bannerList?.map((v) => v.toJson()).toList(); + data['city'] = entity.city; + data['couponVOList'] = entity.couponVOList?.map((v) => v.toJson()).toList(); + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['deliveryInfo'] = entity.deliveryInfo?.toJson(); + data['pickupType'] = entity.pickupType?.toJson(); + data['district'] = entity.district; + data['headMobile'] = entity.headMobile; + data['tel'] = entity.tel; + data['headName'] = entity.headName; + data['id'] = entity.id; + data['isAutoSendRefundAddress'] = entity.isAutoSendRefundAddress; + data['latitude'] = entity.latitude; + data['logo'] = entity.logo; + data['isVip'] = entity.isVip; + data['longitude'] = entity.longitude; + data['mobile'] = entity.mobile; + data['openEndTime'] = entity.openEndTime; + data['openStartTime'] = entity.openStartTime; + data['perCapitaConsumption'] = entity.perCapitaConsumption; + data['posType'] = entity.posType?.toJson(); + data['promotionList'] = entity.promotionList?.map((v) => v.toJson()).toList(); + data['province'] = entity.province; + data['refundAddress'] = entity.refundAddress; + data['refundContact'] = entity.refundContact; + data['refundTel'] = entity.refundTel; + data['remark'] = entity.remark; + data['shipAddress'] = entity.shipAddress; + data['storeName'] = entity.storeName; + data['storeTable'] = entity.storeTable?.toJson(); + data['tenantCode'] = entity.tenantCode; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['businessService'] = entity.businessService; + data['mini'] = entity.mini?.toJson(); + data['useErp'] = entity.useErp; + data['usePlatformVip'] = entity.usePlatformVip; + data['usePlatformPay'] = entity.usePlatformPay; + data['expireTime'] = entity.expireTime; + data['vipFee'] = entity.vipFee; + data['memberSource'] = entity.memberSource?.toJson(); + data['informationVOPageVO'] = entity.informationVOPageVO?.toJson(); + return data; +} + +extension StoreInfoExtension on StoreInfo { + StoreInfo copyWith({ + String? address, + List? bannerList, + String? city, + List? couponVOList, + String? createTime, + String? createUser, + DeliveryInfo? deliveryInfo, + PickupType? pickupType, + String? district, + String? headMobile, + String? tel, + String? headName, + String? id, + num? isAutoSendRefundAddress, + String? latitude, + String? logo, + bool? isVip, + String? longitude, + String? mobile, + String? openEndTime, + String? openStartTime, + String? perCapitaConsumption, + StoreType? posType, + List? promotionList, + String? province, + String? refundAddress, + String? refundContact, + String? refundTel, + String? remark, + String? shipAddress, + String? storeName, + StoreTable? storeTable, + String? tenantCode, + String? updateTime, + String? updateUser, + String? businessService, + Mini? mini, + bool? useErp, + bool? usePlatformVip, + bool? usePlatformPay, + String? expireTime, + String? vipFee, + MemberSource? memberSource, + PageInfo? informationVOPageVO, + }) { + return StoreInfo() + ..address = address ?? this.address + ..bannerList = bannerList ?? this.bannerList + ..city = city ?? this.city + ..couponVOList = couponVOList ?? this.couponVOList + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..deliveryInfo = deliveryInfo ?? this.deliveryInfo + ..pickupType = pickupType ?? this.pickupType + ..district = district ?? this.district + ..headMobile = headMobile ?? this.headMobile + ..tel = tel ?? this.tel + ..headName = headName ?? this.headName + ..id = id ?? this.id + ..isAutoSendRefundAddress = isAutoSendRefundAddress ?? + this.isAutoSendRefundAddress + ..latitude = latitude ?? this.latitude + ..logo = logo ?? this.logo + ..isVip = isVip ?? this.isVip + ..longitude = longitude ?? this.longitude + ..mobile = mobile ?? this.mobile + ..openEndTime = openEndTime ?? this.openEndTime + ..openStartTime = openStartTime ?? this.openStartTime + ..perCapitaConsumption = perCapitaConsumption ?? this.perCapitaConsumption + ..posType = posType ?? this.posType + ..promotionList = promotionList ?? this.promotionList + ..province = province ?? this.province + ..refundAddress = refundAddress ?? this.refundAddress + ..refundContact = refundContact ?? this.refundContact + ..refundTel = refundTel ?? this.refundTel + ..remark = remark ?? this.remark + ..shipAddress = shipAddress ?? this.shipAddress + ..storeName = storeName ?? this.storeName + ..storeTable = storeTable ?? this.storeTable + ..tenantCode = tenantCode ?? this.tenantCode + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..businessService = businessService ?? this.businessService + ..mini = mini ?? this.mini + ..useErp = useErp ?? this.useErp + ..usePlatformVip = usePlatformVip ?? this.usePlatformVip + ..usePlatformPay = usePlatformPay ?? this.usePlatformPay + ..expireTime = expireTime ?? this.expireTime + ..vipFee = vipFee ?? this.vipFee + ..memberSource = memberSource ?? this.memberSource + ..informationVOPageVO = informationVOPageVO ?? this.informationVOPageVO; + } +} \ No newline at end of file diff --git a/lib/generated/json/store_time_info.g.dart b/lib/generated/json/store_time_info.g.dart new file mode 100644 index 00000000..19be487d --- /dev/null +++ b/lib/generated/json/store_time_info.g.dart @@ -0,0 +1,41 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/store_time_info.dart'; + +StoreTimeInfo $StoreTimeInfoFromJson(Map json) { + final StoreTimeInfo storeTimeInfo = StoreTimeInfo(); + final String? openEndTime = jsonConvert.convert(json['openEndTime']); + if (openEndTime != null) { + storeTimeInfo.openEndTime = openEndTime; + } + final String? openStartTime = jsonConvert.convert( + json['openStartTime']); + if (openStartTime != null) { + storeTimeInfo.openStartTime = openStartTime; + } + final String? posType = jsonConvert.convert(json['posType']); + if (posType != null) { + storeTimeInfo.posType = posType; + } + return storeTimeInfo; +} + +Map $StoreTimeInfoToJson(StoreTimeInfo entity) { + final Map data = {}; + data['openEndTime'] = entity.openEndTime; + data['openStartTime'] = entity.openStartTime; + data['posType'] = entity.posType; + return data; +} + +extension StoreTimeInfoExtension on StoreTimeInfo { + StoreTimeInfo copyWith({ + String? openEndTime, + String? openStartTime, + String? posType, + }) { + return StoreTimeInfo() + ..openEndTime = openEndTime ?? this.openEndTime + ..openStartTime = openStartTime ?? this.openStartTime + ..posType = posType ?? this.posType; + } +} \ No newline at end of file diff --git a/lib/generated/json/store_total_money_info.g.dart b/lib/generated/json/store_total_money_info.g.dart new file mode 100644 index 00000000..8b0f0888 --- /dev/null +++ b/lib/generated/json/store_total_money_info.g.dart @@ -0,0 +1,49 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/store_total_money_info.dart'; + +StoreTotalMoneyInfo $StoreTotalMoneyInfoFromJson(Map json) { + final StoreTotalMoneyInfo storeTotalMoneyInfo = StoreTotalMoneyInfo(); + final String? storeTotalMoney = jsonConvert.convert( + json['storeTotalMoney']); + if (storeTotalMoney != null) { + storeTotalMoneyInfo.storeTotalMoney = storeTotalMoney; + } + final int? paySumCount = jsonConvert.convert(json['paySumCount']); + if (paySumCount != null) { + storeTotalMoneyInfo.paySumCount = paySumCount; + } + final int? memberCount = jsonConvert.convert(json['memberCount']); + if (memberCount != null) { + storeTotalMoneyInfo.memberCount = memberCount; + } + final String? memberTotalBalance = jsonConvert.convert( + json['memberTotalBalance']); + if (memberTotalBalance != null) { + storeTotalMoneyInfo.memberTotalBalance = memberTotalBalance; + } + return storeTotalMoneyInfo; +} + +Map $StoreTotalMoneyInfoToJson(StoreTotalMoneyInfo entity) { + final Map data = {}; + data['storeTotalMoney'] = entity.storeTotalMoney; + data['paySumCount'] = entity.paySumCount; + data['memberCount'] = entity.memberCount; + data['memberTotalBalance'] = entity.memberTotalBalance; + return data; +} + +extension StoreTotalMoneyInfoExtension on StoreTotalMoneyInfo { + StoreTotalMoneyInfo copyWith({ + String? storeTotalMoney, + int? paySumCount, + int? memberCount, + String? memberTotalBalance, + }) { + return StoreTotalMoneyInfo() + ..storeTotalMoney = storeTotalMoney ?? this.storeTotalMoney + ..paySumCount = paySumCount ?? this.paySumCount + ..memberCount = memberCount ?? this.memberCount + ..memberTotalBalance = memberTotalBalance ?? this.memberTotalBalance; + } +} \ No newline at end of file diff --git a/lib/generated/json/store_type.g.dart b/lib/generated/json/store_type.g.dart new file mode 100644 index 00000000..9a41e561 --- /dev/null +++ b/lib/generated/json/store_type.g.dart @@ -0,0 +1,33 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/store_type.dart'; + +StoreType $StoreTypeFromJson(Map json) { + final StoreType storeType = StoreType(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + storeType.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + storeType.code = code; + } + return storeType; +} + +Map $StoreTypeToJson(StoreType entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension StoreTypeExtension on StoreType { + StoreType copyWith({ + String? desc, + String? code, + }) { + return StoreType() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} \ No newline at end of file diff --git a/lib/generated/json/subscribe_param.g.dart b/lib/generated/json/subscribe_param.g.dart new file mode 100644 index 00000000..a288ed94 --- /dev/null +++ b/lib/generated/json/subscribe_param.g.dart @@ -0,0 +1,72 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/subscribe_param.dart'; + +SubscribeParam $SubscribeParamFromJson(Map json) { + final SubscribeParam subscribeParam = SubscribeParam(); + final bool? isEnableSubscribe = jsonConvert.convert( + json['isEnableSubscribe']); + if (isEnableSubscribe != null) { + subscribeParam.isEnableSubscribe = isEnableSubscribe; + } + final int? dayOrDate = jsonConvert.convert(json['dayOrDate']); + if (dayOrDate != null) { + subscribeParam.dayOrDate = dayOrDate; + } + final dynamic startAfterDays = json['startAfterDays']; + if (startAfterDays != null) { + subscribeParam.startAfterDays = startAfterDays; + } + final dynamic daysValidate = json['daysValidate']; + if (daysValidate != null) { + subscribeParam.daysValidate = daysValidate; + } + final String? subscribeStartTime = jsonConvert.convert( + json['subscribeStartTime']); + if (subscribeStartTime != null) { + subscribeParam.subscribeStartTime = subscribeStartTime; + } + final String? subscribeEndTime = jsonConvert.convert( + json['subscribeEndTime']); + if (subscribeEndTime != null) { + subscribeParam.subscribeEndTime = subscribeEndTime; + } + final List? stores = (json['stores'] as List?)?.map( + (e) => jsonConvert.convert(e) as String).toList(); + if (stores != null) { + subscribeParam.stores = stores; + } + return subscribeParam; +} + +Map $SubscribeParamToJson(SubscribeParam entity) { + final Map data = {}; + data['isEnableSubscribe'] = entity.isEnableSubscribe; + data['dayOrDate'] = entity.dayOrDate; + data['startAfterDays'] = entity.startAfterDays; + data['daysValidate'] = entity.daysValidate; + data['subscribeStartTime'] = entity.subscribeStartTime; + data['subscribeEndTime'] = entity.subscribeEndTime; + data['stores'] = entity.stores; + return data; +} + +extension SubscribeParamExtension on SubscribeParam { + SubscribeParam copyWith({ + bool? isEnableSubscribe, + int? dayOrDate, + dynamic startAfterDays, + dynamic daysValidate, + String? subscribeStartTime, + String? subscribeEndTime, + List? stores, + }) { + return SubscribeParam() + ..isEnableSubscribe = isEnableSubscribe ?? this.isEnableSubscribe + ..dayOrDate = dayOrDate ?? this.dayOrDate + ..startAfterDays = startAfterDays ?? this.startAfterDays + ..daysValidate = daysValidate ?? this.daysValidate + ..subscribeStartTime = subscribeStartTime ?? this.subscribeStartTime + ..subscribeEndTime = subscribeEndTime ?? this.subscribeEndTime + ..stores = stores ?? this.stores; + } +} \ No newline at end of file diff --git a/lib/generated/json/task.g.dart b/lib/generated/json/task.g.dart new file mode 100644 index 00000000..f831df4d --- /dev/null +++ b/lib/generated/json/task.g.dart @@ -0,0 +1,117 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/task.dart'; + +Task $TaskFromJson(Map json) { + final Task task = Task(); + final String? aspects = jsonConvert.convert(json['aspects']); + if (aspects != null) { + task.aspects = aspects; + } + final int? complateNum = jsonConvert.convert(json['complateNum']); + if (complateNum != null) { + task.complateNum = complateNum; + } + final int? conplateNum = jsonConvert.convert(json['conplateNum']); + if (conplateNum != null) { + task.conplateNum = conplateNum; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + task.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + task.createUser = createUser; + } + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + task.id = id; + } + final int? limitDay = jsonConvert.convert(json['limitDay']); + if (limitDay != null) { + task.limitDay = limitDay; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + task.name = name; + } + final int? rewardType = jsonConvert.convert(json['rewardType']); + if (rewardType != null) { + task.rewardType = rewardType; + } + final String? rewardValue = jsonConvert.convert(json['rewardValue']); + if (rewardValue != null) { + task.rewardValue = rewardValue; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + task.status = status; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + task.type = type; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + task.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + task.updateUser = updateUser; + } + return task; +} + +Map $TaskToJson(Task entity) { + final Map data = {}; + data['aspects'] = entity.aspects; + data['complateNum'] = entity.complateNum; + data['conplateNum'] = entity.conplateNum; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['id'] = entity.id; + data['limitDay'] = entity.limitDay; + data['name'] = entity.name; + data['rewardType'] = entity.rewardType; + data['rewardValue'] = entity.rewardValue; + data['status'] = entity.status; + data['type'] = entity.type; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + return data; +} + +extension TaskExtension on Task { + Task copyWith({ + String? aspects, + int? complateNum, + int? conplateNum, + String? createTime, + String? createUser, + String? id, + int? limitDay, + String? name, + int? rewardType, + String? rewardValue, + bool? status, + String? type, + String? updateTime, + String? updateUser, + }) { + return Task() + ..aspects = aspects ?? this.aspects + ..complateNum = complateNum ?? this.complateNum + ..conplateNum = conplateNum ?? this.conplateNum + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..id = id ?? this.id + ..limitDay = limitDay ?? this.limitDay + ..name = name ?? this.name + ..rewardType = rewardType ?? this.rewardType + ..rewardValue = rewardValue ?? this.rewardValue + ..status = status ?? this.status + ..type = type ?? this.type + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser; + } +} \ No newline at end of file diff --git a/lib/generated/json/tenant_info.g.dart b/lib/generated/json/tenant_info.g.dart new file mode 100644 index 00000000..0dcb4d23 --- /dev/null +++ b/lib/generated/json/tenant_info.g.dart @@ -0,0 +1,312 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/tenant_info.dart'; + +TenantInfo $TenantInfoFromJson(Map json) { + final TenantInfo tenantInfo = TenantInfo(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + tenantInfo.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + tenantInfo.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + tenantInfo.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + tenantInfo.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + tenantInfo.updateUser = updateUser; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + tenantInfo.code = code; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + tenantInfo.name = name; + } + final Type? type = jsonConvert.convert(json['type']); + if (type != null) { + tenantInfo.type = type; + } + final Status? status = jsonConvert.convert(json['status']); + if (status != null) { + tenantInfo.status = status; + } + final bool? readonly = jsonConvert.convert(json['readonly']); + if (readonly != null) { + tenantInfo.readonly = readonly; + } + final bool? usePlatformPay = jsonConvert.convert( + json['usePlatformPay']); + if (usePlatformPay != null) { + tenantInfo.usePlatformPay = usePlatformPay; + } + final bool? usePlatformVip = jsonConvert.convert( + json['usePlatformVip']); + if (usePlatformVip != null) { + tenantInfo.usePlatformVip = usePlatformVip; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + tenantInfo.money = money; + } + final String? duty = jsonConvert.convert(json['duty']); + if (duty != null) { + tenantInfo.duty = duty; + } + final String? address = jsonConvert.convert(json['address']); + if (address != null) { + tenantInfo.address = address; + } + final int? expireLimitYear = jsonConvert.convert( + json['expireLimitYear']); + if (expireLimitYear != null) { + tenantInfo.expireLimitYear = expireLimitYear; + } + final String? startTime = jsonConvert.convert(json['startTime']); + if (startTime != null) { + tenantInfo.startTime = startTime; + } + final String? expirationTime = jsonConvert.convert( + json['expirationTime']); + if (expirationTime != null) { + tenantInfo.expirationTime = expirationTime; + } + final String? contactTel = jsonConvert.convert(json['contactTel']); + if (contactTel != null) { + tenantInfo.contactTel = contactTel; + } + final String? logo = jsonConvert.convert(json['logo']); + if (logo != null) { + tenantInfo.logo = logo; + } + final String? describe = jsonConvert.convert(json['describe']); + if (describe != null) { + tenantInfo.describe = describe; + } + final dynamic account = json['account']; + if (account != null) { + tenantInfo.account = account; + } + final String? dianwodaId = jsonConvert.convert(json['dianwodaId']); + if (dianwodaId != null) { + tenantInfo.dianwodaId = dianwodaId; + } + final String? dadaId = jsonConvert.convert(json['dadaId']); + if (dadaId != null) { + tenantInfo.dadaId = dadaId; + } + final bool? showVipCard = jsonConvert.convert(json['showVipCard']); + if (showVipCard != null) { + tenantInfo.showVipCard = showVipCard; + } + final String? packageId = jsonConvert.convert(json['packageId']); + if (packageId != null) { + tenantInfo.packageId = packageId; + } + final String? packageName = jsonConvert.convert(json['packageName']); + if (packageName != null) { + tenantInfo.packageName = packageName; + } + final PosType? posType = jsonConvert.convert(json['posType']); + if (posType != null) { + tenantInfo.posType = posType; + } + return tenantInfo; +} + +Map $TenantInfoToJson(TenantInfo entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['code'] = entity.code; + data['name'] = entity.name; + data['type'] = entity.type?.toJson(); + data['status'] = entity.status?.toJson(); + data['readonly'] = entity.readonly; + data['usePlatformPay'] = entity.usePlatformPay; + data['usePlatformVip'] = entity.usePlatformVip; + data['money'] = entity.money; + data['duty'] = entity.duty; + data['address'] = entity.address; + data['expireLimitYear'] = entity.expireLimitYear; + data['startTime'] = entity.startTime; + data['expirationTime'] = entity.expirationTime; + data['contactTel'] = entity.contactTel; + data['logo'] = entity.logo; + data['describe'] = entity.describe; + data['account'] = entity.account; + data['dianwodaId'] = entity.dianwodaId; + data['dadaId'] = entity.dadaId; + data['showVipCard'] = entity.showVipCard; + data['packageId'] = entity.packageId; + data['packageName'] = entity.packageName; + data['posType'] = entity.posType?.toJson(); + return data; +} + +extension TenantInfoExtension on TenantInfo { + TenantInfo copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? code, + String? name, + Type? type, + Status? status, + bool? readonly, + bool? usePlatformPay, + bool? usePlatformVip, + String? money, + String? duty, + String? address, + int? expireLimitYear, + String? startTime, + String? expirationTime, + String? contactTel, + String? logo, + String? describe, + dynamic account, + String? dianwodaId, + String? dadaId, + bool? showVipCard, + String? packageId, + String? packageName, + PosType? posType, + }) { + return TenantInfo() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..code = code ?? this.code + ..name = name ?? this.name + ..type = type ?? this.type + ..status = status ?? this.status + ..readonly = readonly ?? this.readonly + ..usePlatformPay = usePlatformPay ?? this.usePlatformPay + ..usePlatformVip = usePlatformVip ?? this.usePlatformVip + ..money = money ?? this.money + ..duty = duty ?? this.duty + ..address = address ?? this.address + ..expireLimitYear = expireLimitYear ?? this.expireLimitYear + ..startTime = startTime ?? this.startTime + ..expirationTime = expirationTime ?? this.expirationTime + ..contactTel = contactTel ?? this.contactTel + ..logo = logo ?? this.logo + ..describe = describe ?? this.describe + ..account = account ?? this.account + ..dianwodaId = dianwodaId ?? this.dianwodaId + ..dadaId = dadaId ?? this.dadaId + ..showVipCard = showVipCard ?? this.showVipCard + ..packageId = packageId ?? this.packageId + ..packageName = packageName ?? this.packageName + ..posType = posType ?? this.posType; + } +} + +Type $TypeFromJson(Map json) { + final Type type = Type(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + type.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + type.code = code; + } + return type; +} + +Map $TypeToJson(Type entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension TypeExtension on Type { + Type copyWith({ + String? desc, + String? code, + }) { + return Type() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} + +Status $StatusFromJson(Map json) { + final Status status = Status(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + status.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + status.code = code; + } + return status; +} + +Map $StatusToJson(Status entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension StatusExtension on Status { + Status copyWith({ + String? desc, + String? code, + }) { + return Status() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} + +PosType $PosTypeFromJson(Map json) { + final PosType posType = PosType(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + posType.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + posType.code = code; + } + return posType; +} + +Map $PosTypeToJson(PosType entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension PosTypeExtension on PosType { + PosType copyWith({ + String? desc, + String? code, + }) { + return PosType() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} \ No newline at end of file diff --git a/lib/generated/json/tenant_package.g.dart b/lib/generated/json/tenant_package.g.dart new file mode 100644 index 00000000..43ecf43c --- /dev/null +++ b/lib/generated/json/tenant_package.g.dart @@ -0,0 +1,206 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/tenant_package.dart'; + +TenantPackage $TenantPackageFromJson(Map json) { + final TenantPackage tenantPackage = TenantPackage(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + tenantPackage.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + tenantPackage.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + tenantPackage.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + tenantPackage.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + tenantPackage.updateUser = updateUser; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + tenantPackage.name = name; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + tenantPackage.status = status; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + tenantPackage.remark = remark; + } + final dynamic packagePrice = json['packagePrice']; + if (packagePrice != null) { + tenantPackage.packagePrice = packagePrice; + } + final dynamic packageDiscount = json['packageDiscount']; + if (packageDiscount != null) { + tenantPackage.packageDiscount = packageDiscount; + } + final dynamic duration = json['duration']; + if (duration != null) { + tenantPackage.duration = duration; + } + final bool? enableSale = jsonConvert.convert(json['enableSale']); + if (enableSale != null) { + tenantPackage.enableSale = enableSale; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + tenantPackage.sort = sort; + } + final bool? isDefault = jsonConvert.convert(json['isDefault']); + if (isDefault != null) { + tenantPackage.isDefault = isDefault; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + tenantPackage.isDelete = isDelete; + } + final List< + TenantPackageSale>? tenantPackageSale = (json['tenantPackageSale'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as TenantPackageSale) + .toList(); + if (tenantPackageSale != null) { + tenantPackage.tenantPackageSale = tenantPackageSale; + } + return tenantPackage; +} + +Map $TenantPackageToJson(TenantPackage entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['name'] = entity.name; + data['status'] = entity.status; + data['remark'] = entity.remark; + data['packagePrice'] = entity.packagePrice; + data['packageDiscount'] = entity.packageDiscount; + data['duration'] = entity.duration; + data['enableSale'] = entity.enableSale; + data['sort'] = entity.sort; + data['isDefault'] = entity.isDefault; + data['isDelete'] = entity.isDelete; + data['tenantPackageSale'] = + entity.tenantPackageSale?.map((v) => v.toJson()).toList(); + return data; +} + +extension TenantPackageExtension on TenantPackage { + TenantPackage copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? name, + int? status, + String? remark, + dynamic packagePrice, + dynamic packageDiscount, + dynamic duration, + bool? enableSale, + int? sort, + bool? isDefault, + int? isDelete, + List? tenantPackageSale, + }) { + return TenantPackage() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..name = name ?? this.name + ..status = status ?? this.status + ..remark = remark ?? this.remark + ..packagePrice = packagePrice ?? this.packagePrice + ..packageDiscount = packageDiscount ?? this.packageDiscount + ..duration = duration ?? this.duration + ..enableSale = enableSale ?? this.enableSale + ..sort = sort ?? this.sort + ..isDefault = isDefault ?? this.isDefault + ..isDelete = isDelete ?? this.isDelete + ..tenantPackageSale = tenantPackageSale ?? this.tenantPackageSale; + } +} + +TenantPackageSale $TenantPackageSaleFromJson(Map json) { + final TenantPackageSale tenantPackageSale = TenantPackageSale(); + final String? packagePrice = jsonConvert.convert( + json['packagePrice']); + if (packagePrice != null) { + tenantPackageSale.packagePrice = packagePrice; + } + final String? originalPackagePrice = jsonConvert.convert( + json['originalPackagePrice']); + if (originalPackagePrice != null) { + tenantPackageSale.originalPackagePrice = originalPackagePrice; + } + final int? duration = jsonConvert.convert(json['duration']); + if (duration != null) { + tenantPackageSale.duration = duration; + } + final int? packageDiscount = jsonConvert.convert( + json['packageDiscount']); + if (packageDiscount != null) { + tenantPackageSale.packageDiscount = packageDiscount; + } + final bool? isRecommend = jsonConvert.convert(json['isRecommend']); + if (isRecommend != null) { + tenantPackageSale.isRecommend = isRecommend; + } + final String? saleName = jsonConvert.convert(json['saleName']); + if (saleName != null) { + tenantPackageSale.saleName = saleName; + } + final bool? canDiscount = jsonConvert.convert(json['canDiscount']); + if (canDiscount != null) { + tenantPackageSale.canDiscount = canDiscount; + } + return tenantPackageSale; +} + +Map $TenantPackageSaleToJson(TenantPackageSale entity) { + final Map data = {}; + data['packagePrice'] = entity.packagePrice; + data['originalPackagePrice'] = entity.originalPackagePrice; + data['duration'] = entity.duration; + data['packageDiscount'] = entity.packageDiscount; + data['isRecommend'] = entity.isRecommend; + data['saleName'] = entity.saleName; + data['canDiscount'] = entity.canDiscount; + return data; +} + +extension TenantPackageSaleExtension on TenantPackageSale { + TenantPackageSale copyWith({ + String? packagePrice, + String? originalPackagePrice, + int? duration, + int? packageDiscount, + bool? isRecommend, + String? saleName, + bool? canDiscount, + }) { + return TenantPackageSale() + ..packagePrice = packagePrice ?? this.packagePrice + ..originalPackagePrice = originalPackagePrice ?? this.originalPackagePrice + ..duration = duration ?? this.duration + ..packageDiscount = packageDiscount ?? this.packageDiscount + ..isRecommend = isRecommend ?? this.isRecommend + ..saleName = saleName ?? this.saleName + ..canDiscount = canDiscount ?? this.canDiscount; + } +} \ No newline at end of file diff --git a/lib/generated/json/tenant_package_calculate_details.g.dart b/lib/generated/json/tenant_package_calculate_details.g.dart new file mode 100644 index 00000000..b4f47a4c --- /dev/null +++ b/lib/generated/json/tenant_package_calculate_details.g.dart @@ -0,0 +1,50 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/tenant_package_calculate_details.dart'; + +TenantPackageCalculateDetails $TenantPackageCalculateDetailsFromJson( + Map json) { + final TenantPackageCalculateDetails tenantPackageCalculateDetails = TenantPackageCalculateDetails(); + final String? totalFee = jsonConvert.convert(json['totalFee']); + if (totalFee != null) { + tenantPackageCalculateDetails.totalFee = totalFee; + } + final String? expirationTime = jsonConvert.convert( + json['expirationTime']); + if (expirationTime != null) { + tenantPackageCalculateDetails.expirationTime = expirationTime; + } + final int? duration = jsonConvert.convert(json['duration']); + if (duration != null) { + tenantPackageCalculateDetails.duration = duration; + } + final String? packageId = jsonConvert.convert(json['packageId']); + if (packageId != null) { + tenantPackageCalculateDetails.packageId = packageId; + } + return tenantPackageCalculateDetails; +} + +Map $TenantPackageCalculateDetailsToJson( + TenantPackageCalculateDetails entity) { + final Map data = {}; + data['totalFee'] = entity.totalFee; + data['expirationTime'] = entity.expirationTime; + data['duration'] = entity.duration; + data['packageId'] = entity.packageId; + return data; +} + +extension TenantPackageCalculateDetailsExtension on TenantPackageCalculateDetails { + TenantPackageCalculateDetails copyWith({ + String? totalFee, + String? expirationTime, + int? duration, + String? packageId, + }) { + return TenantPackageCalculateDetails() + ..totalFee = totalFee ?? this.totalFee + ..expirationTime = expirationTime ?? this.expirationTime + ..duration = duration ?? this.duration + ..packageId = packageId ?? this.packageId; + } +} \ No newline at end of file diff --git a/lib/generated/json/ticket.g.dart b/lib/generated/json/ticket.g.dart new file mode 100644 index 00000000..88dc0bbb --- /dev/null +++ b/lib/generated/json/ticket.g.dart @@ -0,0 +1,213 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/ticket.dart'; + +Ticket $TicketFromJson(Map json) { + final Ticket ticket = Ticket(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + ticket.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + ticket.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + ticket.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + ticket.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + ticket.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + ticket.mid = mid; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + ticket.storeId = storeId; + } + final String? orderId = jsonConvert.convert(json['orderId']); + if (orderId != null) { + ticket.orderId = orderId; + } + final String? orderProductId = jsonConvert.convert( + json['orderProductId']); + if (orderProductId != null) { + ticket.orderProductId = orderProductId; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + ticket.productId = productId; + } + final String? productSkuId = jsonConvert.convert( + json['productSkuId']); + if (productSkuId != null) { + ticket.productSkuId = productSkuId; + } + final String? ticketWipedTimeTemplateId = jsonConvert.convert( + json['ticketWipedTimeTemplateId']); + if (ticketWipedTimeTemplateId != null) { + ticket.ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; + } + final String? amount = jsonConvert.convert(json['amount']); + if (amount != null) { + ticket.amount = amount; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + ticket.name = name; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + ticket.code = code; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + ticket.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + ticket.useEndTime = useEndTime; + } + final String? finishTime = jsonConvert.convert(json['finishTime']); + if (finishTime != null) { + ticket.finishTime = finishTime; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + ticket.type = type; + } + final dynamic source = json['source']; + if (source != null) { + ticket.source = source; + } + final dynamic takeType = json['takeType']; + if (takeType != null) { + ticket.takeType = takeType; + } + final String? style = jsonConvert.convert(json['style']); + if (style != null) { + ticket.style = style; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + ticket.state = state; + } + final bool? canSettlement = jsonConvert.convert(json['canSettlement']); + if (canSettlement != null) { + ticket.canSettlement = canSettlement; + } + final bool? canSubscribe = jsonConvert.convert(json['canSubscribe']); + if (canSubscribe != null) { + ticket.canSubscribe = canSubscribe; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + ticket.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + ticket.tenantCode = tenantCode; + } + return ticket; +} + +Map $TicketToJson(Ticket entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['storeId'] = entity.storeId; + data['orderId'] = entity.orderId; + data['orderProductId'] = entity.orderProductId; + data['productId'] = entity.productId; + data['productSkuId'] = entity.productSkuId; + data['ticketWipedTimeTemplateId'] = entity.ticketWipedTimeTemplateId; + data['amount'] = entity.amount; + data['name'] = entity.name; + data['code'] = entity.code; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['finishTime'] = entity.finishTime; + data['type'] = entity.type; + data['source'] = entity.source; + data['takeType'] = entity.takeType; + data['style'] = entity.style; + data['state'] = entity.state; + data['canSettlement'] = entity.canSettlement; + data['canSubscribe'] = entity.canSubscribe; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + return data; +} + +extension TicketExtension on Ticket { + Ticket copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? storeId, + String? orderId, + String? orderProductId, + String? productId, + String? productSkuId, + String? ticketWipedTimeTemplateId, + String? amount, + String? name, + String? code, + String? useStartTime, + String? useEndTime, + String? finishTime, + String? type, + dynamic source, + dynamic takeType, + String? style, + int? state, + bool? canSettlement, + bool? canSubscribe, + int? isDelete, + String? tenantCode, + }) { + return Ticket() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..storeId = storeId ?? this.storeId + ..orderId = orderId ?? this.orderId + ..orderProductId = orderProductId ?? this.orderProductId + ..productId = productId ?? this.productId + ..productSkuId = productSkuId ?? this.productSkuId + ..ticketWipedTimeTemplateId = ticketWipedTimeTemplateId ?? + this.ticketWipedTimeTemplateId + ..amount = amount ?? this.amount + ..name = name ?? this.name + ..code = code ?? this.code + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..finishTime = finishTime ?? this.finishTime + ..type = type ?? this.type + ..source = source ?? this.source + ..takeType = takeType ?? this.takeType + ..style = style ?? this.style + ..state = state ?? this.state + ..canSettlement = canSettlement ?? this.canSettlement + ..canSubscribe = canSubscribe ?? this.canSubscribe + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode; + } +} \ No newline at end of file diff --git a/lib/generated/json/ticket_details.g.dart b/lib/generated/json/ticket_details.g.dart new file mode 100644 index 00000000..95824376 --- /dev/null +++ b/lib/generated/json/ticket_details.g.dart @@ -0,0 +1,383 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/ticket_details.dart'; + +TicketDetails $TicketDetailsFromJson(Map json) { + final TicketDetails ticketDetails = TicketDetails(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + ticketDetails.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + ticketDetails.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + ticketDetails.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + ticketDetails.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + ticketDetails.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + ticketDetails.mid = mid; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + ticketDetails.storeId = storeId; + } + final String? orderId = jsonConvert.convert(json['orderId']); + if (orderId != null) { + ticketDetails.orderId = orderId; + } + final String? orderProductId = jsonConvert.convert( + json['orderProductId']); + if (orderProductId != null) { + ticketDetails.orderProductId = orderProductId; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + ticketDetails.productId = productId; + } + final String? productSkuId = jsonConvert.convert( + json['productSkuId']); + if (productSkuId != null) { + ticketDetails.productSkuId = productSkuId; + } + final String? ticketWipedTimeTemplateId = jsonConvert.convert( + json['ticketWipedTimeTemplateId']); + if (ticketWipedTimeTemplateId != null) { + ticketDetails.ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; + } + final String? amount = jsonConvert.convert(json['amount']); + if (amount != null) { + ticketDetails.amount = amount; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + ticketDetails.name = name; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + ticketDetails.code = code; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + ticketDetails.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + ticketDetails.useEndTime = useEndTime; + } + final dynamic finishTime = json['finishTime']; + if (finishTime != null) { + ticketDetails.finishTime = finishTime; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + ticketDetails.type = type; + } + final dynamic source = json['source']; + if (source != null) { + ticketDetails.source = source; + } + final dynamic takeType = json['takeType']; + if (takeType != null) { + ticketDetails.takeType = takeType; + } + final String? style = jsonConvert.convert(json['style']); + if (style != null) { + ticketDetails.style = style; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + ticketDetails.state = state; + } + final bool? canSettlement = jsonConvert.convert(json['canSettlement']); + if (canSettlement != null) { + ticketDetails.canSettlement = canSettlement; + } + final bool? canSubscribe = jsonConvert.convert(json['canSubscribe']); + if (canSubscribe != null) { + ticketDetails.canSubscribe = canSubscribe; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + ticketDetails.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + ticketDetails.tenantCode = tenantCode; + } + final List? ticketItemList = (json['ticketItemList'] as List< + dynamic>?) + ?.map( + (e) => jsonConvert.convert(e) as TicketItemList) + .toList(); + if (ticketItemList != null) { + ticketDetails.ticketItemList = ticketItemList; + } + final String? userName = jsonConvert.convert(json['userName']); + if (userName != null) { + ticketDetails.userName = userName; + } + final String? userAvatar = jsonConvert.convert(json['userAvatar']); + if (userAvatar != null) { + ticketDetails.userAvatar = userAvatar; + } + final int? isogenyNumber = jsonConvert.convert(json['isogenyNumber']); + if (isogenyNumber != null) { + ticketDetails.isogenyNumber = isogenyNumber; + } + final dynamic businessStartDate = json['businessStartDate']; + if (businessStartDate != null) { + ticketDetails.businessStartDate = businessStartDate; + } + final dynamic businessEndDate = json['businessEndDate']; + if (businessEndDate != null) { + ticketDetails.businessEndDate = businessEndDate; + } + return ticketDetails; +} + +Map $TicketDetailsToJson(TicketDetails entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['storeId'] = entity.storeId; + data['orderId'] = entity.orderId; + data['orderProductId'] = entity.orderProductId; + data['productId'] = entity.productId; + data['productSkuId'] = entity.productSkuId; + data['ticketWipedTimeTemplateId'] = entity.ticketWipedTimeTemplateId; + data['amount'] = entity.amount; + data['name'] = entity.name; + data['code'] = entity.code; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['finishTime'] = entity.finishTime; + data['type'] = entity.type; + data['source'] = entity.source; + data['takeType'] = entity.takeType; + data['style'] = entity.style; + data['state'] = entity.state; + data['canSettlement'] = entity.canSettlement; + data['canSubscribe'] = entity.canSubscribe; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['ticketItemList'] = + entity.ticketItemList?.map((v) => v.toJson()).toList(); + data['userName'] = entity.userName; + data['userAvatar'] = entity.userAvatar; + data['isogenyNumber'] = entity.isogenyNumber; + data['businessStartDate'] = entity.businessStartDate; + data['businessEndDate'] = entity.businessEndDate; + return data; +} + +extension TicketDetailsExtension on TicketDetails { + TicketDetails copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? storeId, + String? orderId, + String? orderProductId, + String? productId, + String? productSkuId, + String? ticketWipedTimeTemplateId, + String? amount, + String? name, + String? code, + String? useStartTime, + String? useEndTime, + dynamic finishTime, + String? type, + dynamic source, + dynamic takeType, + String? style, + int? state, + bool? canSettlement, + bool? canSubscribe, + int? isDelete, + String? tenantCode, + List? ticketItemList, + String? userName, + String? userAvatar, + int? isogenyNumber, + dynamic businessStartDate, + dynamic businessEndDate, + }) { + return TicketDetails() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..storeId = storeId ?? this.storeId + ..orderId = orderId ?? this.orderId + ..orderProductId = orderProductId ?? this.orderProductId + ..productId = productId ?? this.productId + ..productSkuId = productSkuId ?? this.productSkuId + ..ticketWipedTimeTemplateId = ticketWipedTimeTemplateId ?? + this.ticketWipedTimeTemplateId + ..amount = amount ?? this.amount + ..name = name ?? this.name + ..code = code ?? this.code + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..finishTime = finishTime ?? this.finishTime + ..type = type ?? this.type + ..source = source ?? this.source + ..takeType = takeType ?? this.takeType + ..style = style ?? this.style + ..state = state ?? this.state + ..canSettlement = canSettlement ?? this.canSettlement + ..canSubscribe = canSubscribe ?? this.canSubscribe + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..ticketItemList = ticketItemList ?? this.ticketItemList + ..userName = userName ?? this.userName + ..userAvatar = userAvatar ?? this.userAvatar + ..isogenyNumber = isogenyNumber ?? this.isogenyNumber + ..businessStartDate = businessStartDate ?? this.businessStartDate + ..businessEndDate = businessEndDate ?? this.businessEndDate; + } +} + +TicketItemList $TicketItemListFromJson(Map json) { + final TicketItemList ticketItemList = TicketItemList(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + ticketItemList.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + ticketItemList.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + ticketItemList.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + ticketItemList.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + ticketItemList.updateUser = updateUser; + } + final String? ticketId = jsonConvert.convert(json['ticketId']); + if (ticketId != null) { + ticketItemList.ticketId = ticketId; + } + final String? relationType = jsonConvert.convert( + json['relationType']); + if (relationType != null) { + ticketItemList.relationType = relationType; + } + final String? relationId = jsonConvert.convert(json['relationId']); + if (relationId != null) { + ticketItemList.relationId = relationId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + ticketItemList.name = name; + } + final String? showImage = jsonConvert.convert(json['showImage']); + if (showImage != null) { + ticketItemList.showImage = showImage; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + ticketItemList.state = state; + } + final dynamic finishTime = json['finishTime']; + if (finishTime != null) { + ticketItemList.finishTime = finishTime; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + ticketItemList.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + ticketItemList.tenantCode = tenantCode; + } + final int? canWipedNumber = jsonConvert.convert(json['canWipedNumber']); + if (canWipedNumber != null) { + ticketItemList.canWipedNumber = canWipedNumber; + } + return ticketItemList; +} + +Map $TicketItemListToJson(TicketItemList entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['ticketId'] = entity.ticketId; + data['relationType'] = entity.relationType; + data['relationId'] = entity.relationId; + data['name'] = entity.name; + data['showImage'] = entity.showImage; + data['state'] = entity.state; + data['finishTime'] = entity.finishTime; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['canWipedNumber'] = entity.canWipedNumber; + return data; +} + +extension TicketItemListExtension on TicketItemList { + TicketItemList copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? ticketId, + String? relationType, + String? relationId, + String? name, + String? showImage, + int? state, + dynamic finishTime, + int? isDelete, + String? tenantCode, + int? canWipedNumber, + }) { + return TicketItemList() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..ticketId = ticketId ?? this.ticketId + ..relationType = relationType ?? this.relationType + ..relationId = relationId ?? this.relationId + ..name = name ?? this.name + ..showImage = showImage ?? this.showImage + ..state = state ?? this.state + ..finishTime = finishTime ?? this.finishTime + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..canWipedNumber = canWipedNumber ?? this.canWipedNumber; + } +} \ No newline at end of file diff --git a/lib/generated/json/ticket_item.g.dart b/lib/generated/json/ticket_item.g.dart new file mode 100644 index 00000000..b349e973 --- /dev/null +++ b/lib/generated/json/ticket_item.g.dart @@ -0,0 +1,125 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/ticket_item.dart'; + +TicketItems $TicketItemsFromJson(Map json) { + final TicketItems ticketItems = TicketItems(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + ticketItems.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + ticketItems.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + ticketItems.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + ticketItems.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + ticketItems.updateUser = updateUser; + } + final String? ticketId = jsonConvert.convert(json['ticketId']); + if (ticketId != null) { + ticketItems.ticketId = ticketId; + } + final String? relationType = jsonConvert.convert( + json['relationType']); + if (relationType != null) { + ticketItems.relationType = relationType; + } + final String? relationId = jsonConvert.convert(json['relationId']); + if (relationId != null) { + ticketItems.relationId = relationId; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + ticketItems.name = name; + } + final String? showImage = jsonConvert.convert(json['showImage']); + if (showImage != null) { + ticketItems.showImage = showImage; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + ticketItems.state = state; + } + final String? finishTime = jsonConvert.convert(json['finishTime']); + if (finishTime != null) { + ticketItems.finishTime = finishTime; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + ticketItems.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + ticketItems.tenantCode = tenantCode; + } + final int? canWipedNumber = jsonConvert.convert(json['canWipedNumber']); + if (canWipedNumber != null) { + ticketItems.canWipedNumber = canWipedNumber; + } + return ticketItems; +} + +Map $TicketItemsToJson(TicketItems entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['ticketId'] = entity.ticketId; + data['relationType'] = entity.relationType; + data['relationId'] = entity.relationId; + data['name'] = entity.name; + data['showImage'] = entity.showImage; + data['state'] = entity.state; + data['finishTime'] = entity.finishTime; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['canWipedNumber'] = entity.canWipedNumber; + return data; +} + +extension TicketItemsExtension on TicketItems { + TicketItems copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? ticketId, + String? relationType, + String? relationId, + String? name, + String? showImage, + int? state, + String? finishTime, + int? isDelete, + String? tenantCode, + int? canWipedNumber, + }) { + return TicketItems() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..ticketId = ticketId ?? this.ticketId + ..relationType = relationType ?? this.relationType + ..relationId = relationId ?? this.relationId + ..name = name ?? this.name + ..showImage = showImage ?? this.showImage + ..state = state ?? this.state + ..finishTime = finishTime ?? this.finishTime + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..canWipedNumber = canWipedNumber ?? this.canWipedNumber; + } +} \ No newline at end of file diff --git a/lib/generated/json/ticket_record.g.dart b/lib/generated/json/ticket_record.g.dart new file mode 100644 index 00000000..e9894cdd --- /dev/null +++ b/lib/generated/json/ticket_record.g.dart @@ -0,0 +1,171 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/ticket_record.dart'; +import 'package:huixiang/data/ticket.dart'; + +import 'package:huixiang/data/ticket_item.dart'; + + +TicketRecord $TicketRecordFromJson(Map json) { + final TicketRecord ticketRecord = TicketRecord(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + ticketRecord.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + ticketRecord.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + ticketRecord.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + ticketRecord.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + ticketRecord.updateUser = updateUser; + } + final String? ticketId = jsonConvert.convert(json['ticketId']); + if (ticketId != null) { + ticketRecord.ticketId = ticketId; + } + final String? ticketCode = jsonConvert.convert(json['ticketCode']); + if (ticketCode != null) { + ticketRecord.ticketCode = ticketCode; + } + final String? ticketName = jsonConvert.convert(json['ticketName']); + if (ticketName != null) { + ticketRecord.ticketName = ticketName; + } + final List? ticketItemIds = (json['ticketItemIds'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as String) + .toList(); + if (ticketItemIds != null) { + ticketRecord.ticketItemIds = ticketItemIds; + } + final String? finishTime = jsonConvert.convert(json['finishTime']); + if (finishTime != null) { + ticketRecord.finishTime = finishTime; + } + final String? wipedUserId = jsonConvert.convert(json['wipedUserId']); + if (wipedUserId != null) { + ticketRecord.wipedUserId = wipedUserId; + } + final String? wipedUserName = jsonConvert.convert( + json['wipedUserName']); + if (wipedUserName != null) { + ticketRecord.wipedUserName = wipedUserName; + } + final String? wipedStoreId = jsonConvert.convert( + json['wipedStoreId']); + if (wipedStoreId != null) { + ticketRecord.wipedStoreId = wipedStoreId; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + ticketRecord.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + ticketRecord.tenantCode = tenantCode; + } + final Ticket? ticket = jsonConvert.convert(json['ticket']); + if (ticket != null) { + ticketRecord.ticket = ticket; + } + final List? ticketItems = (json['ticketItems'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as TicketItems) + .toList(); + if (ticketItems != null) { + ticketRecord.ticketItems = ticketItems; + } + final dynamic userName = json['userName']; + if (userName != null) { + ticketRecord.userName = userName; + } + final dynamic userAvatar = json['userAvatar']; + if (userAvatar != null) { + ticketRecord.userAvatar = userAvatar; + } + final dynamic userPhone = json['userPhone']; + if (userPhone != null) { + ticketRecord.userPhone = userPhone; + } + return ticketRecord; +} + +Map $TicketRecordToJson(TicketRecord entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['ticketId'] = entity.ticketId; + data['ticketCode'] = entity.ticketCode; + data['ticketName'] = entity.ticketName; + data['ticketItemIds'] = entity.ticketItemIds; + data['finishTime'] = entity.finishTime; + data['wipedUserId'] = entity.wipedUserId; + data['wipedUserName'] = entity.wipedUserName; + data['wipedStoreId'] = entity.wipedStoreId; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['ticket'] = entity.ticket?.toJson(); + data['ticketItems'] = entity.ticketItems?.map((v) => v.toJson()).toList(); + data['userName'] = entity.userName; + data['userAvatar'] = entity.userAvatar; + data['userPhone'] = entity.userPhone; + return data; +} + +extension TicketRecordExtension on TicketRecord { + TicketRecord copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? ticketId, + String? ticketCode, + String? ticketName, + List? ticketItemIds, + String? finishTime, + String? wipedUserId, + String? wipedUserName, + String? wipedStoreId, + int? isDelete, + String? tenantCode, + Ticket? ticket, + List? ticketItems, + dynamic userName, + dynamic userAvatar, + dynamic userPhone, + }) { + return TicketRecord() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..ticketId = ticketId ?? this.ticketId + ..ticketCode = ticketCode ?? this.ticketCode + ..ticketName = ticketName ?? this.ticketName + ..ticketItemIds = ticketItemIds ?? this.ticketItemIds + ..finishTime = finishTime ?? this.finishTime + ..wipedUserId = wipedUserId ?? this.wipedUserId + ..wipedUserName = wipedUserName ?? this.wipedUserName + ..wipedStoreId = wipedStoreId ?? this.wipedStoreId + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..ticket = ticket ?? this.ticket + ..ticketItems = ticketItems ?? this.ticketItems + ..userName = userName ?? this.userName + ..userAvatar = userAvatar ?? this.userAvatar + ..userPhone = userPhone ?? this.userPhone; + } +} \ No newline at end of file diff --git a/lib/generated/json/ticket_show.g.dart b/lib/generated/json/ticket_show.g.dart new file mode 100644 index 00000000..ec4c418e --- /dev/null +++ b/lib/generated/json/ticket_show.g.dart @@ -0,0 +1,234 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/ticket_show.dart'; + +TicketShow $TicketShowFromJson(Map json) { + final TicketShow ticketShow = TicketShow(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + ticketShow.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + ticketShow.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + ticketShow.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + ticketShow.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + ticketShow.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + ticketShow.mid = mid; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + ticketShow.storeId = storeId; + } + final String? orderId = jsonConvert.convert(json['orderId']); + if (orderId != null) { + ticketShow.orderId = orderId; + } + final String? orderProductId = jsonConvert.convert( + json['orderProductId']); + if (orderProductId != null) { + ticketShow.orderProductId = orderProductId; + } + final String? productId = jsonConvert.convert(json['productId']); + if (productId != null) { + ticketShow.productId = productId; + } + final String? productSkuId = jsonConvert.convert( + json['productSkuId']); + if (productSkuId != null) { + ticketShow.productSkuId = productSkuId; + } + final String? ticketWipedTimeTemplateId = jsonConvert.convert( + json['ticketWipedTimeTemplateId']); + if (ticketWipedTimeTemplateId != null) { + ticketShow.ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; + } + final String? amount = jsonConvert.convert(json['amount']); + if (amount != null) { + ticketShow.amount = amount; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + ticketShow.name = name; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + ticketShow.code = code; + } + final String? useStartTime = jsonConvert.convert( + json['useStartTime']); + if (useStartTime != null) { + ticketShow.useStartTime = useStartTime; + } + final String? useEndTime = jsonConvert.convert(json['useEndTime']); + if (useEndTime != null) { + ticketShow.useEndTime = useEndTime; + } + final dynamic finishTime = json['finishTime']; + if (finishTime != null) { + ticketShow.finishTime = finishTime; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + ticketShow.type = type; + } + final dynamic source = json['source']; + if (source != null) { + ticketShow.source = source; + } + final dynamic takeType = json['takeType']; + if (takeType != null) { + ticketShow.takeType = takeType; + } + final String? style = jsonConvert.convert(json['style']); + if (style != null) { + ticketShow.style = style; + } + final int? state = jsonConvert.convert(json['state']); + if (state != null) { + ticketShow.state = state; + } + final bool? canSettlement = jsonConvert.convert(json['canSettlement']); + if (canSettlement != null) { + ticketShow.canSettlement = canSettlement; + } + final bool? canSubscribe = jsonConvert.convert(json['canSubscribe']); + if (canSubscribe != null) { + ticketShow.canSubscribe = canSubscribe; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + ticketShow.isDelete = isDelete; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + ticketShow.tenantCode = tenantCode; + } + final dynamic nickName = json['nickName']; + if (nickName != null) { + ticketShow.nickName = nickName; + } + final dynamic userAvatar = json['userAvatar']; + if (userAvatar != null) { + ticketShow.userAvatar = userAvatar; + } + final dynamic userPhone = json['userPhone']; + if (userPhone != null) { + ticketShow.userPhone = userPhone; + } + return ticketShow; +} + +Map $TicketShowToJson(TicketShow entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['storeId'] = entity.storeId; + data['orderId'] = entity.orderId; + data['orderProductId'] = entity.orderProductId; + data['productId'] = entity.productId; + data['productSkuId'] = entity.productSkuId; + data['ticketWipedTimeTemplateId'] = entity.ticketWipedTimeTemplateId; + data['amount'] = entity.amount; + data['name'] = entity.name; + data['code'] = entity.code; + data['useStartTime'] = entity.useStartTime; + data['useEndTime'] = entity.useEndTime; + data['finishTime'] = entity.finishTime; + data['type'] = entity.type; + data['source'] = entity.source; + data['takeType'] = entity.takeType; + data['style'] = entity.style; + data['state'] = entity.state; + data['canSettlement'] = entity.canSettlement; + data['canSubscribe'] = entity.canSubscribe; + data['isDelete'] = entity.isDelete; + data['tenantCode'] = entity.tenantCode; + data['nickName'] = entity.nickName; + data['userAvatar'] = entity.userAvatar; + data['userPhone'] = entity.userPhone; + return data; +} + +extension TicketShowExtension on TicketShow { + TicketShow copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? storeId, + String? orderId, + String? orderProductId, + String? productId, + String? productSkuId, + String? ticketWipedTimeTemplateId, + String? amount, + String? name, + String? code, + String? useStartTime, + String? useEndTime, + dynamic finishTime, + String? type, + dynamic source, + dynamic takeType, + String? style, + int? state, + bool? canSettlement, + bool? canSubscribe, + int? isDelete, + String? tenantCode, + dynamic nickName, + dynamic userAvatar, + dynamic userPhone, + }) { + return TicketShow() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..storeId = storeId ?? this.storeId + ..orderId = orderId ?? this.orderId + ..orderProductId = orderProductId ?? this.orderProductId + ..productId = productId ?? this.productId + ..productSkuId = productSkuId ?? this.productSkuId + ..ticketWipedTimeTemplateId = ticketWipedTimeTemplateId ?? + this.ticketWipedTimeTemplateId + ..amount = amount ?? this.amount + ..name = name ?? this.name + ..code = code ?? this.code + ..useStartTime = useStartTime ?? this.useStartTime + ..useEndTime = useEndTime ?? this.useEndTime + ..finishTime = finishTime ?? this.finishTime + ..type = type ?? this.type + ..source = source ?? this.source + ..takeType = takeType ?? this.takeType + ..style = style ?? this.style + ..state = state ?? this.state + ..canSettlement = canSettlement ?? this.canSettlement + ..canSubscribe = canSubscribe ?? this.canSubscribe + ..isDelete = isDelete ?? this.isDelete + ..tenantCode = tenantCode ?? this.tenantCode + ..nickName = nickName ?? this.nickName + ..userAvatar = userAvatar ?? this.userAvatar + ..userPhone = userPhone ?? this.userPhone; + } +} \ No newline at end of file diff --git a/lib/generated/json/ticket_stats.g.dart b/lib/generated/json/ticket_stats.g.dart new file mode 100644 index 00000000..1ee7af9e --- /dev/null +++ b/lib/generated/json/ticket_stats.g.dart @@ -0,0 +1,73 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/ticket_stats.dart'; + +TicketStats $TicketStatsFromJson(Map json) { + final TicketStats ticketStats = TicketStats(); + final String? wipedDate = jsonConvert.convert(json['wipedDate']); + if (wipedDate != null) { + ticketStats.wipedDate = wipedDate; + } + final List? infoList = (json['infoList'] as List?)?.map( + (e) => jsonConvert.convert(e) as InfoList).toList(); + if (infoList != null) { + ticketStats.infoList = infoList; + } + return ticketStats; +} + +Map $TicketStatsToJson(TicketStats entity) { + final Map data = {}; + data['wipedDate'] = entity.wipedDate; + data['infoList'] = entity.infoList?.map((v) => v.toJson()).toList(); + return data; +} + +extension TicketStatsExtension on TicketStats { + TicketStats copyWith({ + String? wipedDate, + List? infoList, + }) { + return TicketStats() + ..wipedDate = wipedDate ?? this.wipedDate + ..infoList = infoList ?? this.infoList; + } +} + +InfoList $InfoListFromJson(Map json) { + final InfoList infoList = InfoList(); + final String? ticketName = jsonConvert.convert(json['ticketName']); + if (ticketName != null) { + infoList.ticketName = ticketName; + } + final String? ticketItemName = jsonConvert.convert( + json['ticketItemName']); + if (ticketItemName != null) { + infoList.ticketItemName = ticketItemName; + } + final int? wipedNumber = jsonConvert.convert(json['wipedNumber']); + if (wipedNumber != null) { + infoList.wipedNumber = wipedNumber; + } + return infoList; +} + +Map $InfoListToJson(InfoList entity) { + final Map data = {}; + data['ticketName'] = entity.ticketName; + data['ticketItemName'] = entity.ticketItemName; + data['wipedNumber'] = entity.wipedNumber; + return data; +} + +extension InfoListExtension on InfoList { + InfoList copyWith({ + String? ticketName, + String? ticketItemName, + int? wipedNumber, + }) { + return InfoList() + ..ticketName = ticketName ?? this.ticketName + ..ticketItemName = ticketItemName ?? this.ticketItemName + ..wipedNumber = wipedNumber ?? this.wipedNumber; + } +} \ No newline at end of file diff --git a/lib/generated/json/trade_summary.g.dart b/lib/generated/json/trade_summary.g.dart new file mode 100644 index 00000000..ff546f1a --- /dev/null +++ b/lib/generated/json/trade_summary.g.dart @@ -0,0 +1,107 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/trade_summary.dart'; + +TradeSummary $TradeSummaryFromJson(Map json) { + final TradeSummary tradeSummary = TradeSummary(); + final List< + SaleBusinessAnalysisVOS>? saleBusinessAnalysisVOS = (json['saleBusinessAnalysisVOS'] as List< + dynamic>?)?.map( + (e) => + jsonConvert.convert( + e) as SaleBusinessAnalysisVOS).toList(); + if (saleBusinessAnalysisVOS != null) { + tradeSummary.saleBusinessAnalysisVOS = saleBusinessAnalysisVOS; + } + final String? collectionAmount = jsonConvert.convert( + json['collectionAmount']); + if (collectionAmount != null) { + tradeSummary.collectionAmount = collectionAmount; + } + final int? collectionCount = jsonConvert.convert( + json['collectionCount']); + if (collectionCount != null) { + tradeSummary.collectionCount = collectionCount; + } + final String? refundAmount = jsonConvert.convert( + json['refundAmount']); + if (refundAmount != null) { + tradeSummary.refundAmount = refundAmount; + } + final int? refundCount = jsonConvert.convert(json['refundCount']); + if (refundCount != null) { + tradeSummary.refundCount = refundCount; + } + return tradeSummary; +} + +Map $TradeSummaryToJson(TradeSummary entity) { + final Map data = {}; + data['saleBusinessAnalysisVOS'] = + entity.saleBusinessAnalysisVOS?.map((v) => v.toJson()).toList(); + data['collectionAmount'] = entity.collectionAmount; + data['collectionCount'] = entity.collectionCount; + data['refundAmount'] = entity.refundAmount; + data['refundCount'] = entity.refundCount; + return data; +} + +extension TradeSummaryExtension on TradeSummary { + TradeSummary copyWith({ + List? saleBusinessAnalysisVOS, + String? collectionAmount, + int? collectionCount, + String? refundAmount, + int? refundCount, + }) { + return TradeSummary() + ..saleBusinessAnalysisVOS = saleBusinessAnalysisVOS ?? + this.saleBusinessAnalysisVOS + ..collectionAmount = collectionAmount ?? this.collectionAmount + ..collectionCount = collectionCount ?? this.collectionCount + ..refundAmount = refundAmount ?? this.refundAmount + ..refundCount = refundCount ?? this.refundCount; + } +} + +SaleBusinessAnalysisVOS $SaleBusinessAnalysisVOSFromJson( + Map json) { + final SaleBusinessAnalysisVOS saleBusinessAnalysisVOS = SaleBusinessAnalysisVOS(); + final String? localDateTime = jsonConvert.convert( + json['localDateTime']); + if (localDateTime != null) { + saleBusinessAnalysisVOS.localDateTime = localDateTime; + } + final String? localDateBigDecimal = jsonConvert.convert( + json['localDateBigDecimal']); + if (localDateBigDecimal != null) { + saleBusinessAnalysisVOS.localDateBigDecimal = localDateBigDecimal; + } + final String? localDateCount = jsonConvert.convert( + json['localDateCount']); + if (localDateCount != null) { + saleBusinessAnalysisVOS.localDateCount = localDateCount; + } + return saleBusinessAnalysisVOS; +} + +Map $SaleBusinessAnalysisVOSToJson( + SaleBusinessAnalysisVOS entity) { + final Map data = {}; + data['localDateTime'] = entity.localDateTime; + data['localDateBigDecimal'] = entity.localDateBigDecimal; + data['localDateCount'] = entity.localDateCount; + return data; +} + +extension SaleBusinessAnalysisVOSExtension on SaleBusinessAnalysisVOS { + SaleBusinessAnalysisVOS copyWith({ + String? localDateTime, + String? localDateBigDecimal, + String? localDateCount, + }) { + return SaleBusinessAnalysisVOS() + ..localDateTime = localDateTime ?? this.localDateTime + ..localDateBigDecimal = localDateBigDecimal ?? this.localDateBigDecimal + ..localDateCount = localDateCount ?? this.localDateCount; + } +} \ No newline at end of file diff --git a/lib/generated/json/upload_result.g.dart b/lib/generated/json/upload_result.g.dart new file mode 100644 index 00000000..2298de2b --- /dev/null +++ b/lib/generated/json/upload_result.g.dart @@ -0,0 +1,198 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/upload_result.dart'; +import 'package:huixiang/data/data_type.dart'; + + +UploadResult $UploadResultFromJson(Map json) { + final UploadResult uploadResult = UploadResult(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + uploadResult.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + uploadResult.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + uploadResult.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + uploadResult.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + uploadResult.updateUser = updateUser; + } + final DataType? dataType = jsonConvert.convert(json['dataType']); + if (dataType != null) { + uploadResult.dataType = dataType; + } + final String? submittedFileName = jsonConvert.convert( + json['submittedFileName']); + if (submittedFileName != null) { + uploadResult.submittedFileName = submittedFileName; + } + final String? treePath = jsonConvert.convert(json['treePath']); + if (treePath != null) { + uploadResult.treePath = treePath; + } + final int? grade = jsonConvert.convert(json['grade']); + if (grade != null) { + uploadResult.grade = grade; + } + final bool? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + uploadResult.isDelete = isDelete; + } + final String? folderId = jsonConvert.convert(json['folderId']); + if (folderId != null) { + uploadResult.folderId = folderId; + } + final String? url = jsonConvert.convert(json['url']); + if (url != null) { + uploadResult.url = url; + } + final String? size = jsonConvert.convert(json['size']); + if (size != null) { + uploadResult.size = size; + } + final String? folderName = jsonConvert.convert(json['folderName']); + if (folderName != null) { + uploadResult.folderName = folderName; + } + final dynamic group = json['group']; + if (group != null) { + uploadResult.group = group; + } + final String? path = jsonConvert.convert(json['path']); + if (path != null) { + uploadResult.path = path; + } + final String? relativePath = jsonConvert.convert( + json['relativePath']); + if (relativePath != null) { + uploadResult.relativePath = relativePath; + } + final dynamic fileMd5 = json['fileMd5']; + if (fileMd5 != null) { + uploadResult.fileMd5 = fileMd5; + } + final String? contextType = jsonConvert.convert(json['contextType']); + if (contextType != null) { + uploadResult.contextType = contextType; + } + final String? filename = jsonConvert.convert(json['filename']); + if (filename != null) { + uploadResult.filename = filename; + } + final String? ext = jsonConvert.convert(json['ext']); + if (ext != null) { + uploadResult.ext = ext; + } + final String? icon = jsonConvert.convert(json['icon']); + if (icon != null) { + uploadResult.icon = icon; + } + final String? createMonth = jsonConvert.convert(json['createMonth']); + if (createMonth != null) { + uploadResult.createMonth = createMonth; + } + final String? createWeek = jsonConvert.convert(json['createWeek']); + if (createWeek != null) { + uploadResult.createWeek = createWeek; + } + final String? createDay = jsonConvert.convert(json['createDay']); + if (createDay != null) { + uploadResult.createDay = createDay; + } + return uploadResult; +} + +Map $UploadResultToJson(UploadResult entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['dataType'] = entity.dataType?.toJson(); + data['submittedFileName'] = entity.submittedFileName; + data['treePath'] = entity.treePath; + data['grade'] = entity.grade; + data['isDelete'] = entity.isDelete; + data['folderId'] = entity.folderId; + data['url'] = entity.url; + data['size'] = entity.size; + data['folderName'] = entity.folderName; + data['group'] = entity.group; + data['path'] = entity.path; + data['relativePath'] = entity.relativePath; + data['fileMd5'] = entity.fileMd5; + data['contextType'] = entity.contextType; + data['filename'] = entity.filename; + data['ext'] = entity.ext; + data['icon'] = entity.icon; + data['createMonth'] = entity.createMonth; + data['createWeek'] = entity.createWeek; + data['createDay'] = entity.createDay; + return data; +} + +extension UploadResultExtension on UploadResult { + UploadResult copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + DataType? dataType, + String? submittedFileName, + String? treePath, + int? grade, + bool? isDelete, + String? folderId, + String? url, + String? size, + String? folderName, + dynamic group, + String? path, + String? relativePath, + dynamic fileMd5, + String? contextType, + String? filename, + String? ext, + String? icon, + String? createMonth, + String? createWeek, + String? createDay, + }) { + return UploadResult() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..dataType = dataType ?? this.dataType + ..submittedFileName = submittedFileName ?? this.submittedFileName + ..treePath = treePath ?? this.treePath + ..grade = grade ?? this.grade + ..isDelete = isDelete ?? this.isDelete + ..folderId = folderId ?? this.folderId + ..url = url ?? this.url + ..size = size ?? this.size + ..folderName = folderName ?? this.folderName + ..group = group ?? this.group + ..path = path ?? this.path + ..relativePath = relativePath ?? this.relativePath + ..fileMd5 = fileMd5 ?? this.fileMd5 + ..contextType = contextType ?? this.contextType + ..filename = filename ?? this.filename + ..ext = ext ?? this.ext + ..icon = icon ?? this.icon + ..createMonth = createMonth ?? this.createMonth + ..createWeek = createWeek ?? this.createWeek + ..createDay = createDay ?? this.createDay; + } +} \ No newline at end of file diff --git a/lib/generated/json/user_bill.g.dart b/lib/generated/json/user_bill.g.dart new file mode 100644 index 00000000..c8b10277 --- /dev/null +++ b/lib/generated/json/user_bill.g.dart @@ -0,0 +1,176 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/user_bill.dart'; + +UserBill $UserBillFromJson(Map json) { + final UserBill userBill = UserBill(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + userBill.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + userBill.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + userBill.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + userBill.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + userBill.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + userBill.mid = mid; + } + final String? linkId = jsonConvert.convert(json['linkId']); + if (linkId != null) { + userBill.linkId = linkId; + } + final int? pm = jsonConvert.convert(json['pm']); + if (pm != null) { + userBill.pm = pm; + } + final String? title = jsonConvert.convert(json['title']); + if (title != null) { + userBill.title = title; + } + final String? category = jsonConvert.convert(json['category']); + if (category != null) { + userBill.category = category; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + userBill.type = type; + } + final String? number = jsonConvert.convert(json['number']); + if (number != null) { + userBill.number = number; + } + final String? realNumber = jsonConvert.convert(json['realNumber']); + if (realNumber != null) { + userBill.realNumber = realNumber; + } + final String? activityMoney = jsonConvert.convert( + json['activityMoney']); + if (activityMoney != null) { + userBill.activityMoney = activityMoney; + } + final String? surplusActivityMoney = jsonConvert.convert( + json['surplusActivityMoney']); + if (surplusActivityMoney != null) { + userBill.surplusActivityMoney = surplusActivityMoney; + } + final String? greenMoney = jsonConvert.convert(json['greenMoney']); + if (greenMoney != null) { + userBill.greenMoney = greenMoney; + } + final String? surplusGreenMoney = jsonConvert.convert( + json['surplusGreenMoney']); + if (surplusGreenMoney != null) { + userBill.surplusGreenMoney = surplusGreenMoney; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + userBill.balance = balance; + } + final String? mark = jsonConvert.convert(json['mark']); + if (mark != null) { + userBill.mark = mark; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + userBill.status = status; + } + final bool? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + userBill.isDeleted = isDeleted; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + userBill.name = name; + } + return userBill; +} + +Map $UserBillToJson(UserBill entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['linkId'] = entity.linkId; + data['pm'] = entity.pm; + data['title'] = entity.title; + data['category'] = entity.category; + data['type'] = entity.type; + data['number'] = entity.number; + data['realNumber'] = entity.realNumber; + data['activityMoney'] = entity.activityMoney; + data['surplusActivityMoney'] = entity.surplusActivityMoney; + data['greenMoney'] = entity.greenMoney; + data['surplusGreenMoney'] = entity.surplusGreenMoney; + data['balance'] = entity.balance; + data['mark'] = entity.mark; + data['status'] = entity.status; + data['isDeleted'] = entity.isDeleted; + data['name'] = entity.name; + return data; +} + +extension UserBillExtension on UserBill { + UserBill copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? linkId, + int? pm, + String? title, + String? category, + String? type, + String? number, + String? realNumber, + String? activityMoney, + String? surplusActivityMoney, + String? greenMoney, + String? surplusGreenMoney, + String? balance, + String? mark, + bool? status, + bool? isDeleted, + String? name, + }) { + return UserBill() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..linkId = linkId ?? this.linkId + ..pm = pm ?? this.pm + ..title = title ?? this.title + ..category = category ?? this.category + ..type = type ?? this.type + ..number = number ?? this.number + ..realNumber = realNumber ?? this.realNumber + ..activityMoney = activityMoney ?? this.activityMoney + ..surplusActivityMoney = surplusActivityMoney ?? this.surplusActivityMoney + ..greenMoney = greenMoney ?? this.greenMoney + ..surplusGreenMoney = surplusGreenMoney ?? this.surplusGreenMoney + ..balance = balance ?? this.balance + ..mark = mark ?? this.mark + ..status = status ?? this.status + ..isDeleted = isDeleted ?? this.isDeleted + ..name = name ?? this.name; + } +} \ No newline at end of file diff --git a/lib/generated/json/user_entity.g.dart b/lib/generated/json/user_entity.g.dart new file mode 100644 index 00000000..05f80605 --- /dev/null +++ b/lib/generated/json/user_entity.g.dart @@ -0,0 +1,105 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/user_entity.dart'; + +UserEntity $UserEntityFromJson(Map json) { + final UserEntity userEntity = UserEntity(); + final String? account = jsonConvert.convert(json['account']); + if (account != null) { + userEntity.account = account; + } + final String? avatar = jsonConvert.convert(json['avatar']); + if (avatar != null) { + userEntity.avatar = avatar; + } + final String? expiration = jsonConvert.convert(json['expiration']); + if (expiration != null) { + userEntity.expiration = expiration; + } + final String? expire = jsonConvert.convert(json['expire']); + if (expire != null) { + userEntity.expire = expire; + } + final String? mobile = jsonConvert.convert(json['mobile']); + if (mobile != null) { + userEntity.mobile = mobile; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + userEntity.name = name; + } + final String? refreshToken = jsonConvert.convert( + json['refreshToken']); + if (refreshToken != null) { + userEntity.refreshToken = refreshToken; + } + final String? token = jsonConvert.convert(json['token']); + if (token != null) { + userEntity.token = token; + } + final String? tokenType = jsonConvert.convert(json['tokenType']); + if (tokenType != null) { + userEntity.tokenType = tokenType; + } + final String? userId = jsonConvert.convert(json['userId']); + if (userId != null) { + userEntity.userId = userId; + } + final String? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + userEntity.userType = userType; + } + final String? workDescribe = jsonConvert.convert( + json['workDescribe']); + if (workDescribe != null) { + userEntity.workDescribe = workDescribe; + } + return userEntity; +} + +Map $UserEntityToJson(UserEntity entity) { + final Map data = {}; + data['account'] = entity.account; + data['avatar'] = entity.avatar; + data['expiration'] = entity.expiration; + data['expire'] = entity.expire; + data['mobile'] = entity.mobile; + data['name'] = entity.name; + data['refreshToken'] = entity.refreshToken; + data['token'] = entity.token; + data['tokenType'] = entity.tokenType; + data['userId'] = entity.userId; + data['userType'] = entity.userType; + data['workDescribe'] = entity.workDescribe; + return data; +} + +extension UserEntityExtension on UserEntity { + UserEntity copyWith({ + String? account, + String? avatar, + String? expiration, + String? expire, + String? mobile, + String? name, + String? refreshToken, + String? token, + String? tokenType, + String? userId, + String? userType, + String? workDescribe, + }) { + return UserEntity() + ..account = account ?? this.account + ..avatar = avatar ?? this.avatar + ..expiration = expiration ?? this.expiration + ..expire = expire ?? this.expire + ..mobile = mobile ?? this.mobile + ..name = name ?? this.name + ..refreshToken = refreshToken ?? this.refreshToken + ..token = token ?? this.token + ..tokenType = tokenType ?? this.tokenType + ..userId = userId ?? this.userId + ..userType = userType ?? this.userType + ..workDescribe = workDescribe ?? this.workDescribe; + } +} \ No newline at end of file diff --git a/lib/generated/json/user_info.g.dart b/lib/generated/json/user_info.g.dart new file mode 100644 index 00000000..ad181b47 --- /dev/null +++ b/lib/generated/json/user_info.g.dart @@ -0,0 +1,251 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/user_info.dart'; +import 'package:huixiang/data/member_rank.dart'; + + +UserInfo $UserInfoFromJson(Map json) { + final UserInfo userInfo = UserInfo(); + final String? vipNo = jsonConvert.convert(json['vipNo']); + if (vipNo != null) { + userInfo.vipNo = vipNo; + } + final String? vipScanNo = jsonConvert.convert(json['vipScanNo']); + if (vipScanNo != null) { + userInfo.vipScanNo = vipScanNo; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + userInfo.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + userInfo.headimg = headimg; + } + final bool? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + userInfo.userType = userType; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + userInfo.sex = sex; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + userInfo.level = level; + } + final String? addressId = jsonConvert.convert(json['addressId']); + if (addressId != null) { + userInfo.addressId = addressId; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + userInfo.remark = remark; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + userInfo.phone = phone; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + userInfo.createTime = createTime; + } + final String? birth = jsonConvert.convert(json['birth']); + if (birth != null) { + userInfo.birth = birth; + } + final dynamic balance = json['balance']; + if (balance != null) { + userInfo.balance = balance; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + userInfo.money = money; + } + final String? activityMoney = jsonConvert.convert( + json['activityMoney']); + if (activityMoney != null) { + userInfo.activityMoney = activityMoney; + } + final String? expendAmount = jsonConvert.convert( + json['expendAmount']); + if (expendAmount != null) { + userInfo.expendAmount = expendAmount; + } + final String? points = jsonConvert.convert(json['points']); + if (points != null) { + userInfo.points = points; + } + final String? greenMoney = jsonConvert.convert(json['greenMoney']); + if (greenMoney != null) { + userInfo.greenMoney = greenMoney; + } + final String? raiseMoney = jsonConvert.convert(json['raiseMoney']); + if (raiseMoney != null) { + userInfo.raiseMoney = raiseMoney; + } + final String? raiseExpireTime = jsonConvert.convert( + json['raiseExpireTime']); + if (raiseExpireTime != null) { + userInfo.raiseExpireTime = raiseExpireTime; + } + final bool? isBind = jsonConvert.convert(json['isBind']); + if (isBind != null) { + userInfo.isBind = isBind; + } + final String? masterId = jsonConvert.convert(json['masterId']); + if (masterId != null) { + userInfo.masterId = masterId; + } + final dynamic inviteNumber = json['inviteNumber']; + if (inviteNumber != null) { + userInfo.inviteNumber = inviteNumber; + } + final dynamic todayInviteNumber = json['todayInviteNumber']; + if (todayInviteNumber != null) { + userInfo.todayInviteNumber = todayInviteNumber; + } + final String? masterCardRankName = jsonConvert.convert( + json['masterCardRankName']); + if (masterCardRankName != null) { + userInfo.masterCardRankName = masterCardRankName; + } + final MemberRank? memberRankVo = jsonConvert.convert( + json['memberRankVo']); + if (memberRankVo != null) { + userInfo.memberRankVo = memberRankVo; + } + final String? inviteCode = jsonConvert.convert(json['inviteCode']); + if (inviteCode != null) { + userInfo.inviteCode = inviteCode; + } + final String? signature = jsonConvert.convert(json['signature']); + if (signature != null) { + userInfo.signature = signature; + } + final String? background = jsonConvert.convert(json['background']); + if (background != null) { + userInfo.background = background; + } + final bool? hasPayPassword = jsonConvert.convert( + json['hasPayPassword']); + if (hasPayPassword != null) { + userInfo.hasPayPassword = hasPayPassword; + } + final String? happyBean = jsonConvert.convert(json['happyBean']); + if (happyBean != null) { + userInfo.happyBean = happyBean; + } + final bool? isVip = jsonConvert.convert(json['isVip']); + if (isVip != null) { + userInfo.isVip = isVip; + } + return userInfo; +} + +Map $UserInfoToJson(UserInfo entity) { + final Map data = {}; + data['vipNo'] = entity.vipNo; + data['vipScanNo'] = entity.vipScanNo; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['userType'] = entity.userType; + data['sex'] = entity.sex; + data['level'] = entity.level; + data['addressId'] = entity.addressId; + data['remark'] = entity.remark; + data['phone'] = entity.phone; + data['createTime'] = entity.createTime; + data['birth'] = entity.birth; + data['balance'] = entity.balance; + data['money'] = entity.money; + data['activityMoney'] = entity.activityMoney; + data['expendAmount'] = entity.expendAmount; + data['points'] = entity.points; + data['greenMoney'] = entity.greenMoney; + data['raiseMoney'] = entity.raiseMoney; + data['raiseExpireTime'] = entity.raiseExpireTime; + data['isBind'] = entity.isBind; + data['masterId'] = entity.masterId; + data['inviteNumber'] = entity.inviteNumber; + data['todayInviteNumber'] = entity.todayInviteNumber; + data['masterCardRankName'] = entity.masterCardRankName; + data['memberRankVo'] = entity.memberRankVo?.toJson(); + data['inviteCode'] = entity.inviteCode; + data['signature'] = entity.signature; + data['background'] = entity.background; + data['hasPayPassword'] = entity.hasPayPassword; + data['happyBean'] = entity.happyBean; + data['isVip'] = entity.isVip; + return data; +} + +extension UserInfoExtension on UserInfo { + UserInfo copyWith({ + String? vipNo, + String? vipScanNo, + String? nickname, + String? headimg, + bool? userType, + String? sex, + int? level, + String? addressId, + String? remark, + String? phone, + String? createTime, + String? birth, + dynamic balance, + String? money, + String? activityMoney, + String? expendAmount, + String? points, + String? greenMoney, + String? raiseMoney, + String? raiseExpireTime, + bool? isBind, + String? masterId, + dynamic inviteNumber, + dynamic todayInviteNumber, + String? masterCardRankName, + MemberRank? memberRankVo, + String? inviteCode, + String? signature, + String? background, + bool? hasPayPassword, + String? happyBean, + bool? isVip, + }) { + return UserInfo() + ..vipNo = vipNo ?? this.vipNo + ..vipScanNo = vipScanNo ?? this.vipScanNo + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..userType = userType ?? this.userType + ..sex = sex ?? this.sex + ..level = level ?? this.level + ..addressId = addressId ?? this.addressId + ..remark = remark ?? this.remark + ..phone = phone ?? this.phone + ..createTime = createTime ?? this.createTime + ..birth = birth ?? this.birth + ..balance = balance ?? this.balance + ..money = money ?? this.money + ..activityMoney = activityMoney ?? this.activityMoney + ..expendAmount = expendAmount ?? this.expendAmount + ..points = points ?? this.points + ..greenMoney = greenMoney ?? this.greenMoney + ..raiseMoney = raiseMoney ?? this.raiseMoney + ..raiseExpireTime = raiseExpireTime ?? this.raiseExpireTime + ..isBind = isBind ?? this.isBind + ..masterId = masterId ?? this.masterId + ..inviteNumber = inviteNumber ?? this.inviteNumber + ..todayInviteNumber = todayInviteNumber ?? this.todayInviteNumber + ..masterCardRankName = masterCardRankName ?? this.masterCardRankName + ..memberRankVo = memberRankVo ?? this.memberRankVo + ..inviteCode = inviteCode ?? this.inviteCode + ..signature = signature ?? this.signature + ..background = background ?? this.background + ..hasPayPassword = hasPayPassword ?? this.hasPayPassword + ..happyBean = happyBean ?? this.happyBean + ..isVip = isVip ?? this.isVip; + } +} \ No newline at end of file diff --git a/lib/generated/json/user_info_edit.g.dart b/lib/generated/json/user_info_edit.g.dart new file mode 100644 index 00000000..f75cf103 --- /dev/null +++ b/lib/generated/json/user_info_edit.g.dart @@ -0,0 +1,221 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/user_info_edit.dart'; + +UserInfoEdit $UserInfoEditFromJson(Map json) { + final UserInfoEdit userInfoEdit = UserInfoEdit(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + userInfoEdit.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + userInfoEdit.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + userInfoEdit.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + userInfoEdit.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + userInfoEdit.updateUser = updateUser; + } + final String? account = jsonConvert.convert(json['account']); + if (account != null) { + userInfoEdit.account = account; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + userInfoEdit.name = name; + } + final dynamic org = json['org']; + if (org != null) { + userInfoEdit.org = org; + } + final dynamic station = json['station']; + if (station != null) { + userInfoEdit.station = station; + } + final dynamic type = json['type']; + if (type != null) { + userInfoEdit.type = type; + } + final dynamic email = json['email']; + if (email != null) { + userInfoEdit.email = email; + } + final dynamic mobile = json['mobile']; + if (mobile != null) { + userInfoEdit.mobile = mobile; + } + final UserInfoEditSex? sex = jsonConvert.convert( + json['sex']); + if (sex != null) { + userInfoEdit.sex = sex; + } + final dynamic status = json['status']; + if (status != null) { + userInfoEdit.status = status; + } + final dynamic avatar = json['avatar']; + if (avatar != null) { + userInfoEdit.avatar = avatar; + } + final dynamic nation = json['nation']; + if (nation != null) { + userInfoEdit.nation = nation; + } + final dynamic education = json['education']; + if (education != null) { + userInfoEdit.education = education; + } + final dynamic positionStatus = json['positionStatus']; + if (positionStatus != null) { + userInfoEdit.positionStatus = positionStatus; + } + final dynamic workDescribe = json['workDescribe']; + if (workDescribe != null) { + userInfoEdit.workDescribe = workDescribe; + } + final dynamic passwordErrorLastTime = json['passwordErrorLastTime']; + if (passwordErrorLastTime != null) { + userInfoEdit.passwordErrorLastTime = passwordErrorLastTime; + } + final int? passwordErrorNum = jsonConvert.convert( + json['passwordErrorNum']); + if (passwordErrorNum != null) { + userInfoEdit.passwordErrorNum = passwordErrorNum; + } + final dynamic passwordExpireTime = json['passwordExpireTime']; + if (passwordExpireTime != null) { + userInfoEdit.passwordExpireTime = passwordExpireTime; + } + final String? password = jsonConvert.convert(json['password']); + if (password != null) { + userInfoEdit.password = password; + } + final dynamic lastLoginTime = json['lastLoginTime']; + if (lastLoginTime != null) { + userInfoEdit.lastLoginTime = lastLoginTime; + } + return userInfoEdit; +} + +Map $UserInfoEditToJson(UserInfoEdit entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['account'] = entity.account; + data['name'] = entity.name; + data['org'] = entity.org; + data['station'] = entity.station; + data['type'] = entity.type; + data['email'] = entity.email; + data['mobile'] = entity.mobile; + data['sex'] = entity.sex?.toJson(); + data['status'] = entity.status; + data['avatar'] = entity.avatar; + data['nation'] = entity.nation; + data['education'] = entity.education; + data['positionStatus'] = entity.positionStatus; + data['workDescribe'] = entity.workDescribe; + data['passwordErrorLastTime'] = entity.passwordErrorLastTime; + data['passwordErrorNum'] = entity.passwordErrorNum; + data['passwordExpireTime'] = entity.passwordExpireTime; + data['password'] = entity.password; + data['lastLoginTime'] = entity.lastLoginTime; + return data; +} + +extension UserInfoEditExtension on UserInfoEdit { + UserInfoEdit copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? account, + String? name, + dynamic org, + dynamic station, + dynamic type, + dynamic email, + dynamic mobile, + UserInfoEditSex? sex, + dynamic status, + dynamic avatar, + dynamic nation, + dynamic education, + dynamic positionStatus, + dynamic workDescribe, + dynamic passwordErrorLastTime, + int? passwordErrorNum, + dynamic passwordExpireTime, + String? password, + dynamic lastLoginTime, + }) { + return UserInfoEdit() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..account = account ?? this.account + ..name = name ?? this.name + ..org = org ?? this.org + ..station = station ?? this.station + ..type = type ?? this.type + ..email = email ?? this.email + ..mobile = mobile ?? this.mobile + ..sex = sex ?? this.sex + ..status = status ?? this.status + ..avatar = avatar ?? this.avatar + ..nation = nation ?? this.nation + ..education = education ?? this.education + ..positionStatus = positionStatus ?? this.positionStatus + ..workDescribe = workDescribe ?? this.workDescribe + ..passwordErrorLastTime = passwordErrorLastTime ?? + this.passwordErrorLastTime + ..passwordErrorNum = passwordErrorNum ?? this.passwordErrorNum + ..passwordExpireTime = passwordExpireTime ?? this.passwordExpireTime + ..password = password ?? this.password + ..lastLoginTime = lastLoginTime ?? this.lastLoginTime; + } +} + +UserInfoEditSex $UserInfoEditSexFromJson(Map json) { + final UserInfoEditSex userInfoEditSex = UserInfoEditSex(); + final String? desc = jsonConvert.convert(json['desc']); + if (desc != null) { + userInfoEditSex.desc = desc; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + userInfoEditSex.code = code; + } + return userInfoEditSex; +} + +Map $UserInfoEditSexToJson(UserInfoEditSex entity) { + final Map data = {}; + data['desc'] = entity.desc; + data['code'] = entity.code; + return data; +} + +extension UserInfoEditSexExtension on UserInfoEditSex { + UserInfoEditSex copyWith({ + String? desc, + String? code, + }) { + return UserInfoEditSex() + ..desc = desc ?? this.desc + ..code = code ?? this.code; + } +} \ No newline at end of file diff --git a/lib/generated/json/verify_code.g.dart b/lib/generated/json/verify_code.g.dart new file mode 100644 index 00000000..9ad3b398 --- /dev/null +++ b/lib/generated/json/verify_code.g.dart @@ -0,0 +1,77 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/verify_code.dart'; + +VerifyCode $VerifyCodeFromJson(Map json) { + final VerifyCode verifyCode = VerifyCode(); + final int? code = jsonConvert.convert(json['code']); + if (code != null) { + verifyCode.code = code; + } + final Map? data = + (json['data'] as Map?)?.map( + (k, e) => MapEntry(k, e)); + if (data != null) { + verifyCode.data = data; + } + final dynamic extra = json['extra']; + if (extra != null) { + verifyCode.extra = extra; + } + final bool? isError = jsonConvert.convert(json['isError']); + if (isError != null) { + verifyCode.isError = isError; + } + final bool? isSuccess = jsonConvert.convert(json['isSuccess']); + if (isSuccess != null) { + verifyCode.isSuccess = isSuccess; + } + final String? msg = jsonConvert.convert(json['msg']); + if (msg != null) { + verifyCode.msg = msg; + } + final String? path = jsonConvert.convert(json['path']); + if (path != null) { + verifyCode.path = path; + } + final String? timestamp = jsonConvert.convert(json['timestamp']); + if (timestamp != null) { + verifyCode.timestamp = timestamp; + } + return verifyCode; +} + +Map $VerifyCodeToJson(VerifyCode entity) { + final Map data = {}; + data['code'] = entity.code; + data['data'] = entity.data; + data['extra'] = entity.extra; + data['isError'] = entity.isError; + data['isSuccess'] = entity.isSuccess; + data['msg'] = entity.msg; + data['path'] = entity.path; + data['timestamp'] = entity.timestamp; + return data; +} + +extension VerifyCodeExtension on VerifyCode { + VerifyCode copyWith({ + int? code, + Map? data, + dynamic extra, + bool? isError, + bool? isSuccess, + String? msg, + String? path, + String? timestamp, + }) { + return VerifyCode() + ..code = code ?? this.code + ..data = data ?? this.data + ..extra = extra ?? this.extra + ..isError = isError ?? this.isError + ..isSuccess = isSuccess ?? this.isSuccess + ..msg = msg ?? this.msg + ..path = path ?? this.path + ..timestamp = timestamp ?? this.timestamp; + } +} \ No newline at end of file diff --git a/lib/generated/json/vip_badges.g.dart b/lib/generated/json/vip_badges.g.dart new file mode 100644 index 00000000..840c85e8 --- /dev/null +++ b/lib/generated/json/vip_badges.g.dart @@ -0,0 +1,103 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/vip_badges.dart'; + +VipBadges $VipBadgesFromJson(Map json) { + final VipBadges vipBadges = VipBadges(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + vipBadges.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + vipBadges.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + vipBadges.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + vipBadges.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + vipBadges.updateUser = updateUser; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + vipBadges.name = name; + } + final int? eachReward = jsonConvert.convert(json['eachReward']); + if (eachReward != null) { + vipBadges.eachReward = eachReward; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + vipBadges.code = code; + } + final String? icon = jsonConvert.convert(json['icon']); + if (icon != null) { + vipBadges.icon = icon; + } + final bool? actived = jsonConvert.convert(json['actived']); + if (actived != null) { + vipBadges.actived = actived; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + vipBadges.sort = sort; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + vipBadges.isDelete = isDelete; + } + return vipBadges; +} + +Map $VipBadgesToJson(VipBadges entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['name'] = entity.name; + data['eachReward'] = entity.eachReward; + data['code'] = entity.code; + data['icon'] = entity.icon; + data['actived'] = entity.actived; + data['sort'] = entity.sort; + data['isDelete'] = entity.isDelete; + return data; +} + +extension VipBadgesExtension on VipBadges { + VipBadges copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? name, + int? eachReward, + String? code, + String? icon, + bool? actived, + int? sort, + int? isDelete, + }) { + return VipBadges() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..name = name ?? this.name + ..eachReward = eachReward ?? this.eachReward + ..code = code ?? this.code + ..icon = icon ?? this.icon + ..actived = actived ?? this.actived + ..sort = sort ?? this.sort + ..isDelete = isDelete ?? this.isDelete; + } +} \ No newline at end of file diff --git a/lib/generated/json/vip_benefit.g.dart b/lib/generated/json/vip_benefit.g.dart new file mode 100644 index 00000000..a0852c3f --- /dev/null +++ b/lib/generated/json/vip_benefit.g.dart @@ -0,0 +1,131 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/vip_benefit.dart'; + +VipBenefit $VipBenefitFromJson(Map json) { + final VipBenefit vipBenefit = VipBenefit(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + vipBenefit.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + vipBenefit.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + vipBenefit.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + vipBenefit.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + vipBenefit.updateUser = updateUser; + } + final String? code = jsonConvert.convert(json['code']); + if (code != null) { + vipBenefit.code = code; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + vipBenefit.name = name; + } + final String? icon = jsonConvert.convert(json['icon']); + if (icon != null) { + vipBenefit.icon = icon; + } + final String? iconGrey = jsonConvert.convert(json['iconGrey']); + if (iconGrey != null) { + vipBenefit.iconGrey = iconGrey; + } + final String? introduce = jsonConvert.convert(json['introduce']); + if (introduce != null) { + vipBenefit.introduce = introduce; + } + final String? describes = jsonConvert.convert(json['describes']); + if (describes != null) { + vipBenefit.describes = describes; + } + final bool? actived = jsonConvert.convert(json['actived']); + if (actived != null) { + vipBenefit.actived = actived; + } + final int? sort = jsonConvert.convert(json['sort']); + if (sort != null) { + vipBenefit.sort = sort; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + vipBenefit.isDelete = isDelete; + } + final bool? have = jsonConvert.convert(json['have']); + if (have != null) { + vipBenefit.have = have; + } + final String? config = jsonConvert.convert(json['config']); + if (config != null) { + vipBenefit.config = config; + } + return vipBenefit; +} + +Map $VipBenefitToJson(VipBenefit entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['code'] = entity.code; + data['name'] = entity.name; + data['icon'] = entity.icon; + data['iconGrey'] = entity.iconGrey; + data['introduce'] = entity.introduce; + data['describes'] = entity.describes; + data['actived'] = entity.actived; + data['sort'] = entity.sort; + data['isDelete'] = entity.isDelete; + data['have'] = entity.have; + data['config'] = entity.config; + return data; +} + +extension VipBenefitExtension on VipBenefit { + VipBenefit copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? code, + String? name, + String? icon, + String? iconGrey, + String? introduce, + String? describes, + bool? actived, + int? sort, + int? isDelete, + bool? have, + String? config, + }) { + return VipBenefit() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..code = code ?? this.code + ..name = name ?? this.name + ..icon = icon ?? this.icon + ..iconGrey = iconGrey ?? this.iconGrey + ..introduce = introduce ?? this.introduce + ..describes = describes ?? this.describes + ..actived = actived ?? this.actived + ..sort = sort ?? this.sort + ..isDelete = isDelete ?? this.isDelete + ..have = have ?? this.have + ..config = config ?? this.config; + } +} \ No newline at end of file diff --git a/lib/generated/json/vip_card.g.dart b/lib/generated/json/vip_card.g.dart new file mode 100644 index 00000000..72e52395 --- /dev/null +++ b/lib/generated/json/vip_card.g.dart @@ -0,0 +1,227 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/vip_card.dart'; +import 'package:huixiang/data/store.dart'; + + +VipCard $VipCardFromJson(Map json) { + final VipCard vipCard = VipCard(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + vipCard.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + vipCard.createTime = createTime; + } + final dynamic createUser = json['createUser']; + if (createUser != null) { + vipCard.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + vipCard.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + vipCard.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + vipCard.mid = mid; + } + final String? openid = jsonConvert.convert(json['openid']); + if (openid != null) { + vipCard.openid = openid; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + vipCard.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + vipCard.headimg = headimg; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + vipCard.balance = balance; + } + final String? realRecharge = jsonConvert.convert( + json['realRecharge']); + if (realRecharge != null) { + vipCard.realRecharge = realRecharge; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + vipCard.sex = sex; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + vipCard.status = status; + } + final bool? onCredit = jsonConvert.convert(json['onCredit']); + if (onCredit != null) { + vipCard.onCredit = onCredit; + } + final String? loginTime = jsonConvert.convert(json['loginTime']); + if (loginTime != null) { + vipCard.loginTime = loginTime; + } + final int? loginNum = jsonConvert.convert(json['loginNum']); + if (loginNum != null) { + vipCard.loginNum = loginNum; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + vipCard.tenantCode = tenantCode; + } + final int? source = jsonConvert.convert(json['source']); + if (source != null) { + vipCard.source = source; + } + final String? expendAmount = jsonConvert.convert( + json['expendAmount']); + if (expendAmount != null) { + vipCard.expendAmount = expendAmount; + } + final int? buyTimes = jsonConvert.convert(json['buyTimes']); + if (buyTimes != null) { + vipCard.buyTimes = buyTimes; + } + final dynamic lastBuyTime = json['lastBuyTime']; + if (lastBuyTime != null) { + vipCard.lastBuyTime = lastBuyTime; + } + final dynamic vipNo = json['vip_no']; + if (vipNo != null) { + vipCard.vipNo = vipNo; + } + final dynamic expireTime = json['expireTime']; + if (expireTime != null) { + vipCard.expireTime = expireTime; + } + final int? integral = jsonConvert.convert(json['integral']); + if (integral != null) { + vipCard.integral = integral; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + vipCard.level = level; + } + final dynamic vipRegStore = json['vipRegStore']; + if (vipRegStore != null) { + vipCard.vipRegStore = vipRegStore; + } + final String? tenantName = jsonConvert.convert(json['tenantName']); + if (tenantName != null) { + vipCard.tenantName = tenantName; + } + final String? tenantLogo = jsonConvert.convert(json['tenantLogo']); + if (tenantLogo != null) { + vipCard.tenantLogo = tenantLogo; + } + final List? storeList = (json['storeList'] as List?)?.map( + (e) => jsonConvert.convert(e) as Store).toList(); + if (storeList != null) { + vipCard.storeList = storeList; + } + return vipCard; +} + +Map $VipCardToJson(VipCard entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['openid'] = entity.openid; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['balance'] = entity.balance; + data['realRecharge'] = entity.realRecharge; + data['sex'] = entity.sex; + data['status'] = entity.status; + data['onCredit'] = entity.onCredit; + data['loginTime'] = entity.loginTime; + data['loginNum'] = entity.loginNum; + data['tenantCode'] = entity.tenantCode; + data['source'] = entity.source; + data['expendAmount'] = entity.expendAmount; + data['buyTimes'] = entity.buyTimes; + data['lastBuyTime'] = entity.lastBuyTime; + data['vip_no'] = entity.vipNo; + data['expireTime'] = entity.expireTime; + data['integral'] = entity.integral; + data['level'] = entity.level; + data['vipRegStore'] = entity.vipRegStore; + data['tenantName'] = entity.tenantName; + data['tenantLogo'] = entity.tenantLogo; + data['storeList'] = entity.storeList?.map((v) => v.toJson()).toList(); + return data; +} + +extension VipCardExtension on VipCard { + VipCard copyWith({ + String? id, + String? createTime, + dynamic createUser, + String? updateTime, + String? updateUser, + String? mid, + String? openid, + String? nickname, + String? headimg, + String? balance, + String? realRecharge, + String? sex, + bool? status, + bool? onCredit, + String? loginTime, + int? loginNum, + String? tenantCode, + int? source, + String? expendAmount, + int? buyTimes, + dynamic lastBuyTime, + dynamic vipNo, + dynamic expireTime, + int? integral, + int? level, + dynamic vipRegStore, + String? tenantName, + String? tenantLogo, + List? storeList, + }) { + return VipCard() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..openid = openid ?? this.openid + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..balance = balance ?? this.balance + ..realRecharge = realRecharge ?? this.realRecharge + ..sex = sex ?? this.sex + ..status = status ?? this.status + ..onCredit = onCredit ?? this.onCredit + ..loginTime = loginTime ?? this.loginTime + ..loginNum = loginNum ?? this.loginNum + ..tenantCode = tenantCode ?? this.tenantCode + ..source = source ?? this.source + ..expendAmount = expendAmount ?? this.expendAmount + ..buyTimes = buyTimes ?? this.buyTimes + ..lastBuyTime = lastBuyTime ?? this.lastBuyTime + ..vipNo = vipNo ?? this.vipNo + ..expireTime = expireTime ?? this.expireTime + ..integral = integral ?? this.integral + ..level = level ?? this.level + ..vipRegStore = vipRegStore ?? this.vipRegStore + ..tenantName = tenantName ?? this.tenantName + ..tenantLogo = tenantLogo ?? this.tenantLogo + ..storeList = storeList ?? this.storeList; + } +} \ No newline at end of file diff --git a/lib/generated/json/vip_card_home.g.dart b/lib/generated/json/vip_card_home.g.dart new file mode 100644 index 00000000..aaf9e262 --- /dev/null +++ b/lib/generated/json/vip_card_home.g.dart @@ -0,0 +1,708 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/vip_card_home.dart'; +import 'package:huixiang/data/min_order_info.dart'; + + +VipCardHome $VipCardHomeFromJson(Map json) { + final VipCardHome vipCardHome = VipCardHome(); + final Member? member = jsonConvert.convert(json['member']); + if (member != null) { + vipCardHome.member = member; + } + final List? cards = (json['cards'] as List?)?.map( + (e) => jsonConvert.convert(e) as Cards).toList(); + if (cards != null) { + vipCardHome.cards = cards; + } + final List? coupons = (json['coupons'] as List?)?.map( + (e) => e).toList(); + if (coupons != null) { + vipCardHome.coupons = coupons; + } + final List? productVips = (json['productVips'] as List?) + ?.map( + (e) => jsonConvert.convert(e) as ProductVips) + .toList(); + if (productVips != null) { + vipCardHome.productVips = productVips; + } + return vipCardHome; +} + +Map $VipCardHomeToJson(VipCardHome entity) { + final Map data = {}; + data['member'] = entity.member?.toJson(); + data['cards'] = entity.cards?.map((v) => v.toJson()).toList(); + data['coupons'] = entity.coupons; + data['productVips'] = entity.productVips?.map((v) => v.toJson()).toList(); + return data; +} + +extension VipCardHomeExtension on VipCardHome { + VipCardHome copyWith({ + Member? member, + List? cards, + List? coupons, + List? productVips, + }) { + return VipCardHome() + ..member = member ?? this.member + ..cards = cards ?? this.cards + ..coupons = coupons ?? this.coupons + ..productVips = productVips ?? this.productVips; + } +} + +Member $MemberFromJson(Map json) { + final Member member = Member(); + final String? masterId = jsonConvert.convert(json['masterId']); + if (masterId != null) { + member.masterId = masterId; + } + final dynamic masterCardRankName = json['masterCardRankName']; + if (masterCardRankName != null) { + member.masterCardRankName = masterCardRankName; + } + final String? vipNo = jsonConvert.convert(json['vipNo']); + if (vipNo != null) { + member.vipNo = vipNo; + } + final String? nickname = jsonConvert.convert(json['nickname']); + if (nickname != null) { + member.nickname = nickname; + } + final String? headimg = jsonConvert.convert(json['headimg']); + if (headimg != null) { + member.headimg = headimg; + } + final bool? userType = jsonConvert.convert(json['userType']); + if (userType != null) { + member.userType = userType; + } + final String? sex = jsonConvert.convert(json['sex']); + if (sex != null) { + member.sex = sex; + } + final int? level = jsonConvert.convert(json['level']); + if (level != null) { + member.level = level; + } + final String? addressId = jsonConvert.convert(json['addressId']); + if (addressId != null) { + member.addressId = addressId; + } + final String? remark = jsonConvert.convert(json['remark']); + if (remark != null) { + member.remark = remark; + } + final String? phone = jsonConvert.convert(json['phone']); + if (phone != null) { + member.phone = phone; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + member.createTime = createTime; + } + final String? birth = jsonConvert.convert(json['birth']); + if (birth != null) { + member.birth = birth; + } + final dynamic balance = json['balance']; + if (balance != null) { + member.balance = balance; + } + final String? money = jsonConvert.convert(json['money']); + if (money != null) { + member.money = money; + } + final String? activityMoney = jsonConvert.convert( + json['activityMoney']); + if (activityMoney != null) { + member.activityMoney = activityMoney; + } + final String? greenMoney = jsonConvert.convert(json['greenMoney']); + if (greenMoney != null) { + member.greenMoney = greenMoney; + } + final String? expendAmount = jsonConvert.convert( + json['expendAmount']); + if (expendAmount != null) { + member.expendAmount = expendAmount; + } + final int? organic = jsonConvert.convert(json['organic']); + if (organic != null) { + member.organic = organic; + } + final String? points = jsonConvert.convert(json['points']); + if (points != null) { + member.points = points; + } + final bool? isBind = jsonConvert.convert(json['isBind']); + if (isBind != null) { + member.isBind = isBind; + } + final MemberRankVo? memberRankVo = jsonConvert.convert( + json['memberRankVo']); + if (memberRankVo != null) { + member.memberRankVo = memberRankVo; + } + final int? age = jsonConvert.convert(json['age']); + if (age != null) { + member.age = age; + } + final String? inviteCode = jsonConvert.convert(json['inviteCode']); + if (inviteCode != null) { + member.inviteCode = inviteCode; + } + final int? inviteNumber = jsonConvert.convert(json['inviteNumber']); + if (inviteNumber != null) { + member.inviteNumber = inviteNumber; + } + final int? todayInviteNumber = jsonConvert.convert( + json['todayInviteNumber']); + if (todayInviteNumber != null) { + member.todayInviteNumber = todayInviteNumber; + } + final String? signature = jsonConvert.convert(json['signature']); + if (signature != null) { + member.signature = signature; + } + final String? background = jsonConvert.convert(json['background']); + if (background != null) { + member.background = background; + } + final dynamic certification = json['certification']; + if (certification != null) { + member.certification = certification; + } + final bool? hasPayPassword = jsonConvert.convert( + json['hasPayPassword']); + if (hasPayPassword != null) { + member.hasPayPassword = hasPayPassword; + } + final bool? isVip = jsonConvert.convert(json['isVip']); + if (isVip != null) { + member.isVip = isVip; + } + final dynamic vipExpire = json['vipExpire']; + if (vipExpire != null) { + member.vipExpire = vipExpire; + } + final bool? isVipSubscribe = jsonConvert.convert( + json['isVipSubscribe']); + if (isVipSubscribe != null) { + member.isVipSubscribe = isVipSubscribe; + } + final int? vipDuration = jsonConvert.convert(json['vipDuration']); + if (vipDuration != null) { + member.vipDuration = vipDuration; + } + return member; +} + +Map $MemberToJson(Member entity) { + final Map data = {}; + data['masterId'] = entity.masterId; + data['masterCardRankName'] = entity.masterCardRankName; + data['vipNo'] = entity.vipNo; + data['nickname'] = entity.nickname; + data['headimg'] = entity.headimg; + data['userType'] = entity.userType; + data['sex'] = entity.sex; + data['level'] = entity.level; + data['addressId'] = entity.addressId; + data['remark'] = entity.remark; + data['phone'] = entity.phone; + data['createTime'] = entity.createTime; + data['birth'] = entity.birth; + data['balance'] = entity.balance; + data['money'] = entity.money; + data['activityMoney'] = entity.activityMoney; + data['greenMoney'] = entity.greenMoney; + data['expendAmount'] = entity.expendAmount; + data['organic'] = entity.organic; + data['points'] = entity.points; + data['isBind'] = entity.isBind; + data['memberRankVo'] = entity.memberRankVo?.toJson(); + data['age'] = entity.age; + data['inviteCode'] = entity.inviteCode; + data['inviteNumber'] = entity.inviteNumber; + data['todayInviteNumber'] = entity.todayInviteNumber; + data['signature'] = entity.signature; + data['background'] = entity.background; + data['certification'] = entity.certification; + data['hasPayPassword'] = entity.hasPayPassword; + data['isVip'] = entity.isVip; + data['vipExpire'] = entity.vipExpire; + data['isVipSubscribe'] = entity.isVipSubscribe; + data['vipDuration'] = entity.vipDuration; + return data; +} + +extension MemberExtension on Member { + Member copyWith({ + String? masterId, + dynamic masterCardRankName, + String? vipNo, + String? nickname, + String? headimg, + bool? userType, + String? sex, + int? level, + String? addressId, + String? remark, + String? phone, + String? createTime, + String? birth, + dynamic balance, + String? money, + String? activityMoney, + String? greenMoney, + String? expendAmount, + int? organic, + String? points, + bool? isBind, + MemberRankVo? memberRankVo, + int? age, + String? inviteCode, + int? inviteNumber, + int? todayInviteNumber, + String? signature, + String? background, + dynamic certification, + bool? hasPayPassword, + bool? isVip, + dynamic vipExpire, + bool? isVipSubscribe, + int? vipDuration, + }) { + return Member() + ..masterId = masterId ?? this.masterId + ..masterCardRankName = masterCardRankName ?? this.masterCardRankName + ..vipNo = vipNo ?? this.vipNo + ..nickname = nickname ?? this.nickname + ..headimg = headimg ?? this.headimg + ..userType = userType ?? this.userType + ..sex = sex ?? this.sex + ..level = level ?? this.level + ..addressId = addressId ?? this.addressId + ..remark = remark ?? this.remark + ..phone = phone ?? this.phone + ..createTime = createTime ?? this.createTime + ..birth = birth ?? this.birth + ..balance = balance ?? this.balance + ..money = money ?? this.money + ..activityMoney = activityMoney ?? this.activityMoney + ..greenMoney = greenMoney ?? this.greenMoney + ..expendAmount = expendAmount ?? this.expendAmount + ..organic = organic ?? this.organic + ..points = points ?? this.points + ..isBind = isBind ?? this.isBind + ..memberRankVo = memberRankVo ?? this.memberRankVo + ..age = age ?? this.age + ..inviteCode = inviteCode ?? this.inviteCode + ..inviteNumber = inviteNumber ?? this.inviteNumber + ..todayInviteNumber = todayInviteNumber ?? this.todayInviteNumber + ..signature = signature ?? this.signature + ..background = background ?? this.background + ..certification = certification ?? this.certification + ..hasPayPassword = hasPayPassword ?? this.hasPayPassword + ..isVip = isVip ?? this.isVip + ..vipExpire = vipExpire ?? this.vipExpire + ..isVipSubscribe = isVipSubscribe ?? this.isVipSubscribe + ..vipDuration = vipDuration ?? this.vipDuration; + } +} + +Cards $CardsFromJson(Map json) { + final Cards cards = Cards(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + cards.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + cards.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + cards.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + cards.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + cards.updateUser = updateUser; + } + final String? name = jsonConvert.convert(json['name']); + if (name != null) { + cards.name = name; + } + final int? duration = jsonConvert.convert(json['duration']); + if (duration != null) { + cards.duration = duration; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + cards.price = price; + } + final bool? autoSubscribe = jsonConvert.convert(json['autoSubscribe']); + if (autoSubscribe != null) { + cards.autoSubscribe = autoSubscribe; + } + final bool? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + cards.isDelete = isDelete; + } + return cards; +} + +Map $CardsToJson(Cards entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['name'] = entity.name; + data['duration'] = entity.duration; + data['price'] = entity.price; + data['autoSubscribe'] = entity.autoSubscribe; + data['isDelete'] = entity.isDelete; + return data; +} + +extension CardsExtension on Cards { + Cards copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? name, + int? duration, + String? price, + bool? autoSubscribe, + bool? isDelete, + }) { + return Cards() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..name = name ?? this.name + ..duration = duration ?? this.duration + ..price = price ?? this.price + ..autoSubscribe = autoSubscribe ?? this.autoSubscribe + ..isDelete = isDelete ?? this.isDelete; + } +} + +ProductVips $ProductVipsFromJson(Map json) { + final ProductVips productVips = ProductVips(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + productVips.id = id; + } + final String? tenantCode = jsonConvert.convert(json['tenantCode']); + if (tenantCode != null) { + productVips.tenantCode = tenantCode; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + productVips.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + productVips.createUser = createUser; + } + final String? image = jsonConvert.convert(json['image']); + if (image != null) { + productVips.image = image; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + productVips.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + productVips.updateUser = updateUser; + } + final String? supplierName = jsonConvert.convert( + json['supplierName']); + if (supplierName != null) { + productVips.supplierName = supplierName; + } + final String? storeId = jsonConvert.convert(json['storeId']); + if (storeId != null) { + productVips.storeId = storeId; + } + final String? categoryId = jsonConvert.convert(json['categoryId']); + if (categoryId != null) { + productVips.categoryId = categoryId; + } + final String? groupId = jsonConvert.convert(json['groupId']); + if (groupId != null) { + productVips.groupId = groupId; + } + final String? shortName = jsonConvert.convert(json['shortName']); + if (shortName != null) { + productVips.shortName = shortName; + } + final String? productName = jsonConvert.convert(json['productName']); + if (productName != null) { + productVips.productName = productName; + } + final String? sellDesc = jsonConvert.convert(json['sellDesc']); + if (sellDesc != null) { + productVips.sellDesc = sellDesc; + } + final String? productCode = jsonConvert.convert(json['productCode']); + if (productCode != null) { + productVips.productCode = productCode; + } + final String? weight = jsonConvert.convert(json['weight']); + if (weight != null) { + productVips.weight = weight; + } + final String? applyPrice = jsonConvert.convert(json['applyPrice']); + if (applyPrice != null) { + productVips.applyPrice = applyPrice; + } + final String? price = jsonConvert.convert(json['price']); + if (price != null) { + productVips.price = price; + } + final String? vipPrice = jsonConvert.convert(json['vipPrice']); + if (vipPrice != null) { + productVips.vipPrice = vipPrice; + } + final int? stock = jsonConvert.convert(json['stock']); + if (stock != null) { + productVips.stock = stock; + } + final int? sellCount = jsonConvert.convert(json['sellCount']); + if (sellCount != null) { + productVips.sellCount = sellCount; + } + final int? needLogistics = jsonConvert.convert(json['needLogistics']); + if (needLogistics != null) { + productVips.needLogistics = needLogistics; + } + final int? oversold = jsonConvert.convert(json['oversold']); + if (oversold != null) { + productVips.oversold = oversold; + } + final int? organic = jsonConvert.convert(json['organic']); + if (organic != null) { + productVips.organic = organic; + } + final int? status = jsonConvert.convert(json['status']); + if (status != null) { + productVips.status = status; + } + final bool? posShow = jsonConvert.convert(json['posShow']); + if (posShow != null) { + productVips.posShow = posShow; + } + final int? productType = jsonConvert.convert(json['productType']); + if (productType != null) { + productVips.productType = productType; + } + final int? productNumber = jsonConvert.convert(json['productNumber']); + if (productNumber != null) { + productVips.productNumber = productNumber; + } + final int? setMeal = jsonConvert.convert(json['setMeal']); + if (setMeal != null) { + productVips.setMeal = setMeal; + } + final int? attrStyle = jsonConvert.convert(json['attrStyle']); + if (attrStyle != null) { + productVips.attrStyle = attrStyle; + } + final String? detail = jsonConvert.convert(json['detail']); + if (detail != null) { + productVips.detail = detail; + } + final int? isDelete = jsonConvert.convert(json['isDelete']); + if (isDelete != null) { + productVips.isDelete = isDelete; + } + final String? printerFlag = jsonConvert.convert(json['printerFlag']); + if (printerFlag != null) { + productVips.printerFlag = printerFlag; + } + final dynamic materials = json['materials']; + if (materials != null) { + productVips.materials = materials; + } + final dynamic materialId = json['materialId']; + if (materialId != null) { + productVips.materialId = materialId; + } + final String? details = jsonConvert.convert(json['details']); + if (details != null) { + productVips.details = details; + } + final String? thumbnailImg = jsonConvert.convert( + json['thumbnailImg']); + if (thumbnailImg != null) { + productVips.thumbnailImg = thumbnailImg; + } + final String? info = jsonConvert.convert(json['info']); + if (info != null) { + productVips.info = info; + } + final int? buyCount = jsonConvert.convert(json['buyCount']); + if (buyCount != null) { + productVips.buyCount = buyCount; + } + final int? sellCountLimit = jsonConvert.convert(json['sellCountLimit']); + if (sellCountLimit != null) { + productVips.sellCountLimit = sellCountLimit; + } + final String? vipDiscount = jsonConvert.convert(json['vipDiscount']); + if (vipDiscount != null) { + productVips.vipDiscount = vipDiscount; + } + return productVips; +} + +Map $ProductVipsToJson(ProductVips entity) { + final Map data = {}; + data['id'] = entity.id; + data['tenantCode'] = entity.tenantCode; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['image'] = entity.image; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['supplierName'] = entity.supplierName; + data['storeId'] = entity.storeId; + data['categoryId'] = entity.categoryId; + data['groupId'] = entity.groupId; + data['shortName'] = entity.shortName; + data['productName'] = entity.productName; + data['sellDesc'] = entity.sellDesc; + data['productCode'] = entity.productCode; + data['weight'] = entity.weight; + data['applyPrice'] = entity.applyPrice; + data['price'] = entity.price; + data['vipPrice'] = entity.vipPrice; + data['stock'] = entity.stock; + data['sellCount'] = entity.sellCount; + data['needLogistics'] = entity.needLogistics; + data['oversold'] = entity.oversold; + data['organic'] = entity.organic; + data['status'] = entity.status; + data['posShow'] = entity.posShow; + data['productType'] = entity.productType; + data['productNumber'] = entity.productNumber; + data['setMeal'] = entity.setMeal; + data['attrStyle'] = entity.attrStyle; + data['detail'] = entity.detail; + data['isDelete'] = entity.isDelete; + data['printerFlag'] = entity.printerFlag; + data['materials'] = entity.materials; + data['materialId'] = entity.materialId; + data['details'] = entity.details; + data['thumbnailImg'] = entity.thumbnailImg; + data['info'] = entity.info; + data['buyCount'] = entity.buyCount; + data['sellCountLimit'] = entity.sellCountLimit; + data['vipDiscount'] = entity.vipDiscount; + return data; +} + +extension ProductVipsExtension on ProductVips { + ProductVips copyWith({ + String? id, + String? tenantCode, + String? createTime, + String? createUser, + String? image, + String? updateTime, + String? updateUser, + String? supplierName, + String? storeId, + String? categoryId, + String? groupId, + String? shortName, + String? productName, + String? sellDesc, + String? productCode, + String? weight, + String? applyPrice, + String? price, + String? vipPrice, + int? stock, + int? sellCount, + int? needLogistics, + int? oversold, + int? organic, + int? status, + bool? posShow, + int? productType, + int? productNumber, + int? setMeal, + int? attrStyle, + String? detail, + int? isDelete, + String? printerFlag, + dynamic materials, + dynamic materialId, + String? details, + String? thumbnailImg, + String? info, + int? buyCount, + int? sellCountLimit, + String? vipDiscount, + }) { + return ProductVips() + ..id = id ?? this.id + ..tenantCode = tenantCode ?? this.tenantCode + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..image = image ?? this.image + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..supplierName = supplierName ?? this.supplierName + ..storeId = storeId ?? this.storeId + ..categoryId = categoryId ?? this.categoryId + ..groupId = groupId ?? this.groupId + ..shortName = shortName ?? this.shortName + ..productName = productName ?? this.productName + ..sellDesc = sellDesc ?? this.sellDesc + ..productCode = productCode ?? this.productCode + ..weight = weight ?? this.weight + ..applyPrice = applyPrice ?? this.applyPrice + ..price = price ?? this.price + ..vipPrice = vipPrice ?? this.vipPrice + ..stock = stock ?? this.stock + ..sellCount = sellCount ?? this.sellCount + ..needLogistics = needLogistics ?? this.needLogistics + ..oversold = oversold ?? this.oversold + ..organic = organic ?? this.organic + ..status = status ?? this.status + ..posShow = posShow ?? this.posShow + ..productType = productType ?? this.productType + ..productNumber = productNumber ?? this.productNumber + ..setMeal = setMeal ?? this.setMeal + ..attrStyle = attrStyle ?? this.attrStyle + ..detail = detail ?? this.detail + ..isDelete = isDelete ?? this.isDelete + ..printerFlag = printerFlag ?? this.printerFlag + ..materials = materials ?? this.materials + ..materialId = materialId ?? this.materialId + ..details = details ?? this.details + ..thumbnailImg = thumbnailImg ?? this.thumbnailImg + ..info = info ?? this.info + ..buyCount = buyCount ?? this.buyCount + ..sellCountLimit = sellCountLimit ?? this.sellCountLimit + ..vipDiscount = vipDiscount ?? this.vipDiscount; + } +} \ No newline at end of file diff --git a/lib/generated/json/vip_counts_info.g.dart b/lib/generated/json/vip_counts_info.g.dart new file mode 100644 index 00000000..3f54eee2 --- /dev/null +++ b/lib/generated/json/vip_counts_info.g.dart @@ -0,0 +1,127 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/vip_counts_info.dart'; + +VipCountsInfo $VipCountsInfoFromJson(Map json) { + final VipCountsInfo vipCountsInfo = VipCountsInfo(); + final String? dayMoney = jsonConvert.convert(json['dayMoney']); + if (dayMoney != null) { + vipCountsInfo.dayMoney = dayMoney; + } + final String? yesterdayMoney = jsonConvert.convert( + json['yesterdayMoney']); + if (yesterdayMoney != null) { + vipCountsInfo.yesterdayMoney = yesterdayMoney; + } + final String? paySum = jsonConvert.convert(json['paySum']); + if (paySum != null) { + vipCountsInfo.paySum = paySum; + } + final String? yesterdayPaySum = jsonConvert.convert( + json['yesterdayPaySum']); + if (yesterdayPaySum != null) { + vipCountsInfo.yesterdayPaySum = yesterdayPaySum; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + vipCountsInfo.rechargeMoney = rechargeMoney; + } + final String? weekRechargeMoney = jsonConvert.convert( + json['weekRechargeMoney']); + if (weekRechargeMoney != null) { + vipCountsInfo.weekRechargeMoney = weekRechargeMoney; + } + final String? lastWeekRechargeMoney = jsonConvert.convert( + json['lastWeekRechargeMoney']); + if (lastWeekRechargeMoney != null) { + vipCountsInfo.lastWeekRechargeMoney = lastWeekRechargeMoney; + } + final int? orderNum = jsonConvert.convert(json['orderNum']); + if (orderNum != null) { + vipCountsInfo.orderNum = orderNum; + } + final int? yesterdayOrderNum = jsonConvert.convert( + json['yesterdayOrderNum']); + if (yesterdayOrderNum != null) { + vipCountsInfo.yesterdayOrderNum = yesterdayOrderNum; + } + final int? memberNum = jsonConvert.convert(json['memberNum']); + if (memberNum != null) { + vipCountsInfo.memberNum = memberNum; + } + final int? lastWeekMemberNum = jsonConvert.convert( + json['lastWeekMemberNum']); + if (lastWeekMemberNum != null) { + vipCountsInfo.lastWeekMemberNum = lastWeekMemberNum; + } + final int? weekMemberNum = jsonConvert.convert(json['weekMemberNum']); + if (weekMemberNum != null) { + vipCountsInfo.weekMemberNum = weekMemberNum; + } + final int? newMemberNum = jsonConvert.convert(json['newMemberNum']); + if (newMemberNum != null) { + vipCountsInfo.newMemberNum = newMemberNum; + } + final int? yesterdayNewMemberNum = jsonConvert.convert( + json['yesterdayNewMemberNum']); + if (yesterdayNewMemberNum != null) { + vipCountsInfo.yesterdayNewMemberNum = yesterdayNewMemberNum; + } + return vipCountsInfo; +} + +Map $VipCountsInfoToJson(VipCountsInfo entity) { + final Map data = {}; + data['dayMoney'] = entity.dayMoney; + data['yesterdayMoney'] = entity.yesterdayMoney; + data['paySum'] = entity.paySum; + data['yesterdayPaySum'] = entity.yesterdayPaySum; + data['rechargeMoney'] = entity.rechargeMoney; + data['weekRechargeMoney'] = entity.weekRechargeMoney; + data['lastWeekRechargeMoney'] = entity.lastWeekRechargeMoney; + data['orderNum'] = entity.orderNum; + data['yesterdayOrderNum'] = entity.yesterdayOrderNum; + data['memberNum'] = entity.memberNum; + data['lastWeekMemberNum'] = entity.lastWeekMemberNum; + data['weekMemberNum'] = entity.weekMemberNum; + data['newMemberNum'] = entity.newMemberNum; + data['yesterdayNewMemberNum'] = entity.yesterdayNewMemberNum; + return data; +} + +extension VipCountsInfoExtension on VipCountsInfo { + VipCountsInfo copyWith({ + String? dayMoney, + String? yesterdayMoney, + String? paySum, + String? yesterdayPaySum, + String? rechargeMoney, + String? weekRechargeMoney, + String? lastWeekRechargeMoney, + int? orderNum, + int? yesterdayOrderNum, + int? memberNum, + int? lastWeekMemberNum, + int? weekMemberNum, + int? newMemberNum, + int? yesterdayNewMemberNum, + }) { + return VipCountsInfo() + ..dayMoney = dayMoney ?? this.dayMoney + ..yesterdayMoney = yesterdayMoney ?? this.yesterdayMoney + ..paySum = paySum ?? this.paySum + ..yesterdayPaySum = yesterdayPaySum ?? this.yesterdayPaySum + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..weekRechargeMoney = weekRechargeMoney ?? this.weekRechargeMoney + ..lastWeekRechargeMoney = lastWeekRechargeMoney ?? + this.lastWeekRechargeMoney + ..orderNum = orderNum ?? this.orderNum + ..yesterdayOrderNum = yesterdayOrderNum ?? this.yesterdayOrderNum + ..memberNum = memberNum ?? this.memberNum + ..lastWeekMemberNum = lastWeekMemberNum ?? this.lastWeekMemberNum + ..weekMemberNum = weekMemberNum ?? this.weekMemberNum + ..newMemberNum = newMemberNum ?? this.newMemberNum + ..yesterdayNewMemberNum = yesterdayNewMemberNum ?? + this.yesterdayNewMemberNum; + } +} \ No newline at end of file diff --git a/lib/generated/json/vip_record_details.g.dart b/lib/generated/json/vip_record_details.g.dart new file mode 100644 index 00000000..8c1ba0fd --- /dev/null +++ b/lib/generated/json/vip_record_details.g.dart @@ -0,0 +1,175 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/vip_record_details.dart'; + +VipRecordDetails $VipRecordDetailsFromJson(Map json) { + final VipRecordDetails vipRecordDetails = VipRecordDetails(); + final String? id = jsonConvert.convert(json['id']); + if (id != null) { + vipRecordDetails.id = id; + } + final String? createTime = jsonConvert.convert(json['createTime']); + if (createTime != null) { + vipRecordDetails.createTime = createTime; + } + final String? createUser = jsonConvert.convert(json['createUser']); + if (createUser != null) { + vipRecordDetails.createUser = createUser; + } + final String? updateTime = jsonConvert.convert(json['updateTime']); + if (updateTime != null) { + vipRecordDetails.updateTime = updateTime; + } + final String? updateUser = jsonConvert.convert(json['updateUser']); + if (updateUser != null) { + vipRecordDetails.updateUser = updateUser; + } + final String? mid = jsonConvert.convert(json['mid']); + if (mid != null) { + vipRecordDetails.mid = mid; + } + final String? linkId = jsonConvert.convert(json['linkId']); + if (linkId != null) { + vipRecordDetails.linkId = linkId; + } + final int? pm = jsonConvert.convert(json['pm']); + if (pm != null) { + vipRecordDetails.pm = pm; + } + final String? title = jsonConvert.convert(json['title']); + if (title != null) { + vipRecordDetails.title = title; + } + final String? category = jsonConvert.convert(json['category']); + if (category != null) { + vipRecordDetails.category = category; + } + final String? type = jsonConvert.convert(json['type']); + if (type != null) { + vipRecordDetails.type = type; + } + final String? number = jsonConvert.convert(json['number']); + if (number != null) { + vipRecordDetails.number = number; + } + final String? realNumber = jsonConvert.convert(json['realNumber']); + if (realNumber != null) { + vipRecordDetails.realNumber = realNumber; + } + final String? balance = jsonConvert.convert(json['balance']); + if (balance != null) { + vipRecordDetails.balance = balance; + } + final String? mark = jsonConvert.convert(json['mark']); + if (mark != null) { + vipRecordDetails.mark = mark; + } + final bool? status = jsonConvert.convert(json['status']); + if (status != null) { + vipRecordDetails.status = status; + } + final bool? isDeleted = jsonConvert.convert(json['isDeleted']); + if (isDeleted != null) { + vipRecordDetails.isDeleted = isDeleted; + } + final String? tenantName = jsonConvert.convert(json['tenantName']); + if (tenantName != null) { + vipRecordDetails.tenantName = tenantName; + } + final String? rechargeMoney = jsonConvert.convert( + json['rechargeMoney']); + if (rechargeMoney != null) { + vipRecordDetails.rechargeMoney = rechargeMoney; + } + final String? giftMoney = jsonConvert.convert(json['giftMoney']); + if (giftMoney != null) { + vipRecordDetails.giftMoney = giftMoney; + } + final String? totalMoney = jsonConvert.convert(json['totalMoney']); + if (totalMoney != null) { + vipRecordDetails.totalMoney = totalMoney; + } + final String? balanceMoney = jsonConvert.convert( + json['balanceMoney']); + if (balanceMoney != null) { + vipRecordDetails.balanceMoney = balanceMoney; + } + return vipRecordDetails; +} + +Map $VipRecordDetailsToJson(VipRecordDetails entity) { + final Map data = {}; + data['id'] = entity.id; + data['createTime'] = entity.createTime; + data['createUser'] = entity.createUser; + data['updateTime'] = entity.updateTime; + data['updateUser'] = entity.updateUser; + data['mid'] = entity.mid; + data['linkId'] = entity.linkId; + data['pm'] = entity.pm; + data['title'] = entity.title; + data['category'] = entity.category; + data['type'] = entity.type; + data['number'] = entity.number; + data['realNumber'] = entity.realNumber; + data['balance'] = entity.balance; + data['mark'] = entity.mark; + data['status'] = entity.status; + data['isDeleted'] = entity.isDeleted; + data['tenantName'] = entity.tenantName; + data['rechargeMoney'] = entity.rechargeMoney; + data['giftMoney'] = entity.giftMoney; + data['totalMoney'] = entity.totalMoney; + data['balanceMoney'] = entity.balanceMoney; + return data; +} + +extension VipRecordDetailsExtension on VipRecordDetails { + VipRecordDetails copyWith({ + String? id, + String? createTime, + String? createUser, + String? updateTime, + String? updateUser, + String? mid, + String? linkId, + int? pm, + String? title, + String? category, + String? type, + String? number, + String? realNumber, + String? balance, + String? mark, + bool? status, + bool? isDeleted, + String? tenantName, + String? rechargeMoney, + String? giftMoney, + String? totalMoney, + String? balanceMoney, + }) { + return VipRecordDetails() + ..id = id ?? this.id + ..createTime = createTime ?? this.createTime + ..createUser = createUser ?? this.createUser + ..updateTime = updateTime ?? this.updateTime + ..updateUser = updateUser ?? this.updateUser + ..mid = mid ?? this.mid + ..linkId = linkId ?? this.linkId + ..pm = pm ?? this.pm + ..title = title ?? this.title + ..category = category ?? this.category + ..type = type ?? this.type + ..number = number ?? this.number + ..realNumber = realNumber ?? this.realNumber + ..balance = balance ?? this.balance + ..mark = mark ?? this.mark + ..status = status ?? this.status + ..isDeleted = isDeleted ?? this.isDeleted + ..tenantName = tenantName ?? this.tenantName + ..rechargeMoney = rechargeMoney ?? this.rechargeMoney + ..giftMoney = giftMoney ?? this.giftMoney + ..totalMoney = totalMoney ?? this.totalMoney + ..balanceMoney = balanceMoney ?? this.balanceMoney; + } +} \ No newline at end of file diff --git a/lib/generated/json/vip_rule_details.g.dart b/lib/generated/json/vip_rule_details.g.dart new file mode 100644 index 00000000..8c8f0f65 --- /dev/null +++ b/lib/generated/json/vip_rule_details.g.dart @@ -0,0 +1,47 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/vip_rule_details.dart'; + +VipRuleDetails $VipRuleDetailsFromJson(Map json) { + final VipRuleDetails vipRuleDetails = VipRuleDetails(); + final String? rule = jsonConvert.convert(json['rule']); + if (rule != null) { + vipRuleDetails.rule = rule; + } + final String? contrast = jsonConvert.convert(json['contrast']); + if (contrast != null) { + vipRuleDetails.contrast = contrast; + } + final String? qa = jsonConvert.convert(json['qa']); + if (qa != null) { + vipRuleDetails.qa = qa; + } + final String? recharge = jsonConvert.convert(json['recharge']); + if (recharge != null) { + vipRuleDetails.recharge = recharge; + } + return vipRuleDetails; +} + +Map $VipRuleDetailsToJson(VipRuleDetails entity) { + final Map data = {}; + data['rule'] = entity.rule; + data['contrast'] = entity.contrast; + data['qa'] = entity.qa; + data['recharge'] = entity.recharge; + return data; +} + +extension VipRuleDetailsExtension on VipRuleDetails { + VipRuleDetails copyWith({ + String? rule, + String? contrast, + String? qa, + String? recharge, + }) { + return VipRuleDetails() + ..rule = rule ?? this.rule + ..contrast = contrast ?? this.contrast + ..qa = qa ?? this.qa + ..recharge = recharge ?? this.recharge; + } +} \ No newline at end of file diff --git a/lib/generated/json/wx_pay.g.dart b/lib/generated/json/wx_pay.g.dart new file mode 100644 index 00000000..5b454a07 --- /dev/null +++ b/lib/generated/json/wx_pay.g.dart @@ -0,0 +1,69 @@ +import 'package:huixiang/generated/json/base/json_convert_content.dart'; +import 'package:huixiang/data/wx_pay.dart'; + +WxPay $WxPayFromJson(Map json) { + final WxPay wxPay = WxPay(); + final String? appId = jsonConvert.convert(json['appId']); + if (appId != null) { + wxPay.appId = appId; + } + final String? nonceStr = jsonConvert.convert(json['nonceStr']); + if (nonceStr != null) { + wxPay.nonceStr = nonceStr; + } + final String? packageValue = jsonConvert.convert( + json['packageValue']); + if (packageValue != null) { + wxPay.packageValue = packageValue; + } + final String? partnerId = jsonConvert.convert(json['partnerId']); + if (partnerId != null) { + wxPay.partnerId = partnerId; + } + final String? prepayId = jsonConvert.convert(json['prepayId']); + if (prepayId != null) { + wxPay.prepayId = prepayId; + } + final String? sign = jsonConvert.convert(json['sign']); + if (sign != null) { + wxPay.sign = sign; + } + final String? timeStamp = jsonConvert.convert(json['timeStamp']); + if (timeStamp != null) { + wxPay.timeStamp = timeStamp; + } + return wxPay; +} + +Map $WxPayToJson(WxPay entity) { + final Map data = {}; + data['appId'] = entity.appId; + data['nonceStr'] = entity.nonceStr; + data['packageValue'] = entity.packageValue; + data['partnerId'] = entity.partnerId; + data['prepayId'] = entity.prepayId; + data['sign'] = entity.sign; + data['timeStamp'] = entity.timeStamp; + return data; +} + +extension WxPayExtension on WxPay { + WxPay copyWith({ + String? appId, + String? nonceStr, + String? packageValue, + String? partnerId, + String? prepayId, + String? sign, + String? timeStamp, + }) { + return WxPay() + ..appId = appId ?? this.appId + ..nonceStr = nonceStr ?? this.nonceStr + ..packageValue = packageValue ?? this.packageValue + ..partnerId = partnerId ?? this.partnerId + ..prepayId = prepayId ?? this.prepayId + ..sign = sign ?? this.sign + ..timeStamp = timeStamp ?? this.timeStamp; + } +} \ No newline at end of file diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index ae88529d..b98542ed 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -10,28 +10,43 @@ import 'intl/messages_all.dart'; // ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars // ignore_for_file: join_return_with_assignment, prefer_final_in_for_each -// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes class S { S(); - - static S current; - - static const AppLocalizationDelegate delegate = - AppLocalizationDelegate(); + + static S? _current; + + static S get current { + assert(_current != null, + 'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.'); + return _current!; + } + + static const AppLocalizationDelegate delegate = AppLocalizationDelegate(); static Future load(Locale locale) { - final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString(); - final localeName = Intl.canonicalizedLocale(name); + final name = (locale.countryCode?.isEmpty ?? false) + ? locale.languageCode + : locale.toString(); + final localeName = Intl.canonicalizedLocale(name); return initializeMessages(localeName).then((_) { Intl.defaultLocale = localeName; - S.current = S(); - - return S.current; + final instance = S(); + S._current = instance; + + return instance; }); - } + } static S of(BuildContext context) { + final instance = S.maybeOf(context); + assert(instance != null, + 'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?'); + return instance!; + } + + static S? maybeOf(BuildContext context) { return Localizations.of(context, S); } @@ -7214,8 +7229,10 @@ class AppLocalizationDelegate extends LocalizationsDelegate { Locale.fromSubtags(languageCode: 'en'), Locale.fromSubtags(languageCode: 'en', countryCode: 'US'), Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN'), - Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'), - Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'), + Locale.fromSubtags( + languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'), + Locale.fromSubtags( + languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'), Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'), ]; } @@ -7228,13 +7245,11 @@ class AppLocalizationDelegate extends LocalizationsDelegate { bool shouldReload(AppLocalizationDelegate old) => false; bool _isSupported(Locale locale) { - if (locale != null) { - for (var supportedLocale in supportedLocales) { - if (supportedLocale.languageCode == locale.languageCode) { - return true; - } + for (var supportedLocale in supportedLocales) { + if (supportedLocale.languageCode == locale.languageCode) { + return true; } } return false; } -} \ No newline at end of file +} diff --git a/lib/home/activity_list_page.dart b/lib/home/activity_list_page.dart index 7cb85674..37c07160 100644 --- a/lib/home/activity_list_page.dart +++ b/lib/home/activity_list_page.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -24,7 +23,7 @@ class ActivityListPage extends StatefulWidget { class _ActivityListPage extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -37,13 +36,13 @@ class _ActivityListPage extends State }); } - List activityList; + List? activityList; queryActivity() async { final SharedPreferences value = await SharedPreferences.getInstance(); apiService = ApiService(Dio(), context: context, token: value.getString('token')); - BaseData> baseData = await apiService.informationList({ + BaseData>? baseData = await apiService?.informationList({ "pageNum": 1, "pageSize": 10, "searchKey": "", @@ -52,9 +51,9 @@ class _ActivityListPage extends State }).catchError((error) { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { _refreshController.refreshCompleted(); - activityList = baseData.data.list; + activityList = baseData?.data?.list; } } @@ -84,22 +83,26 @@ class _ActivityListPage extends State setState(() {}); }, child: ListView.builder( - itemCount: activityList == null ? 0 : activityList.length, + itemCount: activityList?.length ?? 0, physics: NeverScrollableScrollPhysics(), itemBuilder: (context, position) { return InkWell( onTap: () { Navigator.of(context).pushNamed( '/router/web_page', - arguments: {"activityId": activityList[position].id}); + arguments: { + "activityId": activityList![position].id + }, + ); }, child: FrameSeparateWidget( - child: activityItem(activityList[position]), + child: activityItem(activityList![position]), placeHolder: AspectRatio( aspectRatio: 1.34, child: Container( margin: EdgeInsets.symmetric( - horizontal: 16.w, vertical: 8.h), + horizontal: 16.w, vertical: 8.h, + ), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -148,7 +151,7 @@ class _ActivityListPage extends State child: Column( children: [ MImage( - activity.coverImg, + activity.coverImg ?? "", aspectRatio: 2.1, radius: BorderRadius.only( topLeft: Radius.circular(8), @@ -170,7 +173,7 @@ class _ActivityListPage extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - activity.mainTitle, + activity.mainTitle ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -205,7 +208,7 @@ class _ActivityListPage extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - activity.storeName == null ? "" : activity.storeName, + activity.storeName ?? "", style: TextStyle( color: Color(0xFF060606), fontWeight: MyFontWeight.regular, @@ -217,7 +220,7 @@ class _ActivityListPage extends State mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - activity.startTime.split(" ")[0], + activity.startTime?.split(" ")[0] ?? "", style: TextStyle( color: Color(0xFFB5B5B5), fontSize: 12.sp, @@ -228,7 +231,7 @@ class _ActivityListPage extends State width: 4.w, ), Text( - activity.startTime.split(" ")[1], + activity.startTime?.split(" ")[1] ?? "", style: TextStyle( color: Color(0xFFB5B5B5), fontSize: 12.sp, diff --git a/lib/home/founder_story_page.dart b/lib/home/founder_story_page.dart index f80de504..6b7e970b 100644 --- a/lib/home/founder_story_page.dart +++ b/lib/home/founder_story_page.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/MyPainter.dart'; diff --git a/lib/home/guide_page.dart b/lib/home/guide_page.dart index 49a810b3..f4e12e44 100644 --- a/lib/home/guide_page.dart +++ b/lib/home/guide_page.dart @@ -1,10 +1,8 @@ import 'dart:io'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/examine_instance.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/round_button.dart'; @@ -32,7 +30,7 @@ class _GuidePage extends State { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (sharedPreferences.getBool("isShowPrivacyPolicy") == null || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { + !(sharedPreferences.getBool("isShowPrivacyPolicy") ?? false)) { showAlertDialog(); } @@ -568,8 +566,8 @@ class _GuidePage extends State { toNext() { SharedPreferences.getInstance().then((value) { value.setBool("isFirst", false); - String token = value.getString("token"); - if (token == null || token == "") { + String? token = value.getString("token"); + if (token?.isEmpty ?? true) { Navigator.of(context).popAndPushNamed('/router/new_login_page'); } else { Navigator.of(context).popAndPushNamed('/router/main_page'); diff --git a/lib/home/help_farmers/farmers_tab.dart b/lib/home/help_farmers/farmers_tab.dart index 727a5ba2..c008e4fe 100644 --- a/lib/home/help_farmers/farmers_tab.dart +++ b/lib/home/help_farmers/farmers_tab.dart @@ -3,7 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class FarmersTab extends Decoration { @override - BoxPainter createBoxPainter([VoidCallback onChanged]) { + BoxPainter createBoxPainter([VoidCallback? onChanged]) { return _CustomBoxPainter(); } } @@ -13,7 +13,7 @@ class _CustomBoxPainter extends BoxPainter { void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) { ///每个Tab的宽高 Size tabSize = Size(32.w, 32.w); - final Offset tabOffset = Offset(offset.dx+((configuration.size.width-32.w)/2),offset.dy); + final Offset tabOffset = Offset(offset.dx + (((configuration.size?.width ?? 0) - 32.w) / 2), offset.dy); final Rect rect = tabOffset & tabSize; final Paint paint = Paint(); paint.color = Color(0xFFFFFFFF); diff --git a/lib/home/help_farmers/help_farmers_page.dart b/lib/home/help_farmers/help_farmers_page.dart index acafdd31..4ee1a421 100644 --- a/lib/home/help_farmers/help_farmers_page.dart +++ b/lib/home/help_farmers/help_farmers_page.dart @@ -1,20 +1,18 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; +import 'package:huixiang/data/good_list.dart'; import 'package:huixiang/home/help_farmers/farmers_tab.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../../generated/l10n.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/farmers_list.dart'; +import '../../data/base_data.dart'; +import '../../data/farmers.dart'; import '../../utils/flutter_utils.dart'; import '../../utils/font_weight.dart'; import '../../view_widget/custom_image.dart'; @@ -29,57 +27,47 @@ class HelpFarmersPage extends StatefulWidget { } class _HelpFarmersPage extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); - List farmersList = []; + List farmersList = []; int tabIndex = 0; @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) => { - apiService = ApiService( - Dio(), - context: context, - token: value.getString('token'), - // showLoading: true - ), - queryConfig(), - }); + apiService = ApiService( + Dio(), + context: context, + token: value.getString('token'), + // showLoading: true + ), + queryConfig(), + }); } ///助农列表 queryConfig() async { - try{ - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.getConfig().catchError((error) { + try { + BaseData>? baseData = + await apiService?.getConfig().catchError((error) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center); refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { farmersList.clear(); - farmersList.addAll(baseData.data); + farmersList.addAll(baseData!.data ?? []); refreshController.refreshCompleted(); } else { refreshController.refreshFailed(); } - }finally{ + } finally { setState(() {}); EasyLoading.dismiss(); } - } - @override Widget build(BuildContext context) { return Scaffold( @@ -106,18 +94,20 @@ class _HelpFarmersPage extends State { ), ), ), + ///去掉返回按钮 // automaticallyImplyLeading: false, centerTitle: true, flexibleSpace: FlexibleSpaceBar( - background: MImage( - (farmersList.isNotEmpty)?farmersList[tabIndex]?.agriculturaListImg : "", - fit: BoxFit.fill, - width: double.infinity, - height: 354.h, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - )), + background: MImage( + farmersList[tabIndex].agriculturaListImg ?? "", + fit: BoxFit.fill, + width: double.infinity, + height: 354.h, + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + ), expandedHeight: 354.h, bottom: PreferredSize( preferredSize: Size(double.infinity, 0), @@ -127,11 +117,11 @@ class _HelpFarmersPage extends State { alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.vertical( - top: Radius.circular(16), - ), + top: Radius.circular(16), + ), color: Color(0xFF32A060), ), - padding: EdgeInsets.only(top:7.h,bottom: 7.h), + padding: EdgeInsets.only(top: 7.h, bottom: 7.h), child: TabBar( isScrollable: true, //可滚动 @@ -151,11 +141,10 @@ class _HelpFarmersPage extends State { unselectedLabelColor: Colors.white, indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 - tabs: farmersList == null - ? [] - : farmersList - .map((e) => MyTab(text: e.typeName)) - .toList(), + tabs: farmersList + ?.map((e) => MyTab(text: "${e.typeName}")) + .toList() ?? + [], onTap: (index) { // queryConfig("AgriculturalList"); tabIndex = index; @@ -169,7 +158,7 @@ class _HelpFarmersPage extends State { ), ]; }, - body: recommend(), + body: recommend(), ), ); } @@ -179,37 +168,35 @@ class _HelpFarmersPage extends State { return Container( color: Colors.white, padding: EdgeInsets.symmetric(horizontal: 10.w), - child: (farmersList.isNotEmpty && farmersList[tabIndex].goodList.length == 0) + child: (farmersList.isNotEmpty && + (farmersList[tabIndex].goodList?.isEmpty ?? false)) ? NoDataView( - src: "assets/image/xiao_fei.webp", - isShowBtn: false, - text: "当前分类暂无商品", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), - ) - : StaggeredGridView.countBuilder( - crossAxisCount: 2, - shrinkWrap: true, - itemCount: (farmersList != null && farmersList.isNotEmpty) ? farmersList[tabIndex].goodList.length : 0, - mainAxisSpacing: 10, - crossAxisSpacing: 10, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - Navigator.of(context) - .pushNamed('/router/shop_details_page', arguments: { - "id": farmersList[tabIndex].goodList[position].id, - "storeId": farmersList[tabIndex].goodList[position].storeId, - }); - }, - child: recommendItem(farmersList[tabIndex].goodList[position]), - ); - }, - staggeredTileBuilder: (position) { - return StaggeredTile.fit(1); - }, - ), + src: "assets/image/xiao_fei.webp", + isShowBtn: false, + text: "当前分类暂无商品", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), + ) + : StaggeredGrid.count( + crossAxisCount: 2, + mainAxisSpacing: 10, + crossAxisSpacing: 10, + children: farmersList[tabIndex].goodList?.map((e) { + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed( + '/router/shop_details_page', + arguments: { + "id": e.id, + "storeId": e.storeId, + }, + ); + }, + child: recommendItem(e), + ); + }).toList() ?? + [], + ), ); } @@ -234,7 +221,7 @@ class _HelpFarmersPage extends State { MImage( goodList.productImg ?? "", fit: BoxFit.fill, - width:double.infinity, + width: double.infinity, height: 174, radius: BorderRadius.only( topLeft: Radius.circular(6), @@ -244,9 +231,13 @@ class _HelpFarmersPage extends State { fadeSrc: "assets/image/default_1.webp", ), Padding( - padding: EdgeInsets.only(top: 7.h, left: 10.w, bottom: 8.h), + padding: EdgeInsets.only( + top: 7.h, + left: 10.w, + bottom: 8.h, + ), child: Text( - goodList?.productName ?? "", + goodList.productName ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -259,12 +250,13 @@ class _HelpFarmersPage extends State { ), Padding( padding: EdgeInsets.only(left: 10.w, bottom: 12.h), - child:Row( + child: Row( children: [ Text( - AppUtils.calculateDouble(double.tryParse(goodList?.price) ?? 0), + AppUtils.calculateDouble( + double.tryParse("${goodList.price}") ?? 0), style: TextStyle( - fontSize:24.sp, + fontSize: 24.sp, fontFamily: 'APPHT', fontWeight: MyFontWeight.medium, color: Color(0xFF32A060), @@ -272,29 +264,28 @@ class _HelpFarmersPage extends State { ), Container( margin: EdgeInsets.only(left: 8.w), - padding: EdgeInsets.symmetric(vertical:3.h,horizontal: 9.w), + padding: EdgeInsets.symmetric(vertical: 3.h, horizontal: 9.w), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - boxShadow: [ - BoxShadow( - color: Color(0x1A213303), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 0, - ) - ], - color: Color(0xFF32A060), - ), - child: - Text( + borderRadius: BorderRadius.circular(100), + boxShadow: [ + BoxShadow( + color: Color(0x1A213303), + offset: Offset(0, 2), + blurRadius: 4, + spreadRadius: 0, + ), + ], + color: Color(0xFF32A060), + ), + child: Text( S.of(context).zhunongjifen, style: TextStyle( - fontSize:12.sp, + fontSize: 12.sp, fontWeight: MyFontWeight.medium, color: Colors.white, ), ), - ) + ), ], ), ), diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 68ea6e5e..a7a006fe 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/home/home_view/discount_zone.dart'; import 'package:huixiang/home/home_view/home_recommend_goods.dart'; @@ -15,18 +15,18 @@ import 'package:huixiang/home/home_view/welfare_core.dart'; import 'package:huixiang/home/points_mall_view/points_goods_title.dart'; import 'package:huixiang/home/points_mall_view/points_goods_view.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/activity_pos.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/brand.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/founder.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; -import 'package:huixiang/retrofit/data/goods_category.dart'; -import 'package:huixiang/retrofit/data/home_rank.dart'; -import 'package:huixiang/retrofit/data/login_info.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/activity_pos.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/brand.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/founder.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/goods_category.dart'; +import 'package:huixiang/data/home_rank.dart'; +import 'package:huixiang/data/login_info.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/view_widget/activity_coupons.dart'; @@ -39,7 +39,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../retrofit/data/user_info.dart'; +import '../data/user_info.dart'; import '../utils/flutter_utils.dart'; import '../view_widget/channel_dialog.dart'; import '../view_widget/custom_image.dart'; @@ -48,9 +48,9 @@ import 'home_view/shortcut_operation.dart'; class HomePage extends StatefulWidget { final Function changeTab; - final String invite; - final List interviewCouponList; - final List firstLoginCouponList; + final String? invite; + final List? interviewCouponList; + final List? firstLoginCouponList; HomePage(Key key, this.changeTab, {this.invite, this.interviewCouponList, this.firstLoginCouponList}) @@ -63,9 +63,9 @@ class HomePage extends StatefulWidget { } class HomePageState extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); - String categoryId; + String? categoryId; bool showInvite = false; bool showNew = false; @@ -80,16 +80,16 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { List activityBannerData = []; List brandData = []; List
articles = []; - Founder founder; + Founder? founder; bool isSigned = false; int totalMsg = 0; List coupons = []; int state = 1; - HomeRank homeRank; - UserInfo userInfo; + HomeRank? homeRank; + UserInfo? userInfo; dynamic mRaiseMoney = 0; //众筹金余额 int _loadCount = 0; - DioErrorType dioErrorType; + DioExceptionType? dioErrorType; @override void initState() { @@ -102,13 +102,13 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }); _onRefresh(isFirstIn: true); if (showInvite) { - inviteShowAlertDialog(widget.invite, widget.interviewCouponList[0]); + inviteShowAlertDialog(widget.invite, widget.interviewCouponList?[0]); showInvite = false; } - if ((widget.invite ?? "") != "" || - widget.interviewCouponList != null && - widget.interviewCouponList.length > 0) showInvite = true; + if ((widget.invite?.isNotEmpty ?? false) || (widget.interviewCouponList?.isNotEmpty ?? false)) { + showInvite = true; + } //判断新人弹窗 // if (widget.firstLoginCouponList != null && widget.firstLoginCouponList.length > 0) @@ -116,7 +116,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { } ///邀请成功 - inviteShowAlertDialog(invite, InterviewCouponList interviewCouponList) { + inviteShowAlertDialog(invite, InterviewCouponList? interviewCouponList) { //显示对话框 showDialog( context: context, @@ -127,15 +127,15 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { } ///活动海报弹窗 - posterShowAlertDialog(ActivityPos activityPos, firstLoginCouponList) { + posterShowAlertDialog(ActivityPos? activityPos, firstLoginCouponList) { var today = DateTime.now().day; SharedPreferences.getInstance().then((value) { if (value.getInt("today") == today && (value.getString("ActivityPosCode") ?? "") - .contains("${activityPos.code}_${value.getString("userId")};")) + .contains("${activityPos?.code}_${value.getString("userId")};")) return; value.setString("ActivityPosCode", - "${(value.getString("ActivityPosCode") ?? "")}${activityPos.code}_${value.getString("userId")};"); + "${(value.getString("ActivityPosCode") ?? "")}${activityPos?.code}_${value.getString("userId")};"); value.setInt("today", today); //显示对话框 showDialog( @@ -161,13 +161,13 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ///头部banner queryBanner() async { try { - BaseData> baseData = await apiService.queryBanner({ + BaseData>? baseData = await apiService?.queryBanner({ "model": {"type": "HOME_PAGE"}, }).catchError((onError) { dioErrorType = onError.type; }); - if (baseData != null && baseData.isSuccess) { - bannerData = baseData.data.records; + if (baseData?.isSuccess ?? false) { + bannerData = baseData?.data?.records ?? []; // if (bannerData.length > 0) swiperController.move(0, animation: false); } } finally { @@ -178,11 +178,11 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ///宣传banner queryActivityBanner() async { try { - BaseData> baseData = await apiService.queryBanner({ + BaseData>? baseData = await apiService?.queryBanner({ "model": {"type": "HOME_STORE_PAGE"}, }).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - activityBannerData = baseData.data.records; + if (baseData?.isSuccess ?? false) { + activityBannerData = baseData!.data?.records ?? []; } } finally { addLoadCount(); @@ -194,24 +194,22 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { if (_loadCount == 7) { _loadCount = 0; EasyLoading.dismiss(); - if (dioErrorType == null) - refreshController.refreshCompleted(); - else { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(dioErrorType), + String toastText = AppUtils.dioErrorTypeToString(dioErrorType); + if (toastText.isNotEmpty ?? false) { + SmartDialog.showToast(toastText, alignment: Alignment.center); - refreshController.refreshFailed(); } - if (mounted) setState(() {}); + refreshController.refreshFailed(); + if (mounted) setState(() {}); } } ///推荐排行 queryRecommendRank() async { try { - BaseData rank = - await apiService.recommendRank().catchError((onError) {}); - if (rank != null && rank.isSuccess) { - homeRank = rank.data; + BaseData? rank = await apiService?.recommendRank().catchError((onError) {}); + if (rank?.isSuccess ?? false) { + homeRank = rank!.data; } } finally { addLoadCount(); @@ -221,8 +219,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ///积分商城商品分類列表 queryGoodsCategory() async { try { - BaseData> dataCategory = - await apiService.goodsCategory({ + BaseData>? dataCategory = await apiService?.goodsCategory({ "current": 1, "map": {}, "model": {"pageNum": 1, "pageSize": 20, "searchKey": ""}, @@ -230,14 +227,10 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { "size": 20, "sort": "sortOrder" }).catchError((onError) {}); - if (dataCategory != null && - dataCategory.isSuccess && - dataCategory.data != null && - dataCategory.data.records != null && - dataCategory.data.records.length > 0) { + if ((dataCategory?.isSuccess ?? false) && (dataCategory!.data?.records?.isNotEmpty ?? false)) { gooodsCategorys.clear(); - gooodsCategorys.add(GoodsCategory(name: S.of(context).quanbu)); - gooodsCategorys.addAll(dataCategory.data.records); + gooodsCategorys.add(GoodsCategory()..name = S.of(context).quanbu); + gooodsCategorys.addAll(dataCategory.data?.records ?? []); } } finally { addLoadCount(); @@ -259,10 +252,9 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { "pageSize": 100, "state": 1 }; - BaseData> pageGoods = - await apiService.creditGoods(param).catchError((onError) {}); - if (pageGoods != null && pageGoods.isSuccess) { - goods = pageGoods.data.list; + BaseData>? pageGoods = await apiService?.creditGoods(param).catchError((onError) {}); + if (pageGoods?.isSuccess ?? false) { + goods = pageGoods?.data?.list ?? []; } } finally { if (isRefresh) @@ -277,11 +269,10 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ///查询会员信息 queryUserBalance() async { try { - BaseData baseData = - await apiService.queryInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; - mRaiseMoney = double.tryParse(userInfo.raiseMoney); + BaseData? baseData = await apiService?.queryInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; + mRaiseMoney = double.tryParse("${userInfo?.raiseMoney}") ?? 0; } } finally { addLoadCount(); @@ -312,36 +303,34 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ///活动弹窗 queryActivity() async { - BaseData baseData = - await apiService.appPopup().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - if (baseData.data?.enabled ?? true) + BaseData? baseData = await apiService?.appPopup().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + if (baseData!.data?.enabled ?? true) posterShowAlertDialog(baseData.data, widget.firstLoginCouponList); } } ///核销用户优惠券 queryWiped(memberCouponId) async { - BaseData baseData = - await apiService.wiped(memberCouponId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.wiped(memberCouponId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("核销成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } queryCoupon() async { try { - BaseData> baseData = await apiService.queryCoupon({ + BaseData>? baseData = await apiService?.queryCoupon({ "centre": true, "pageNum": 1, "pageSize": 10, "searchKey": "", "state": 0 }).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - coupons = baseData.data.list; + if (baseData?.isSuccess ?? false) { + coupons = baseData!.data?.list ?? []; } } finally { addLoadCount(); @@ -351,14 +340,6 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { _onRefresh({bool isFirstIn = false}) async { EasyLoading.show( status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } dioErrorType = null; if (isFirstIn) queryActivity(); queryBanner(); @@ -374,7 +355,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { @override void dispose() { super.dispose(); - if (refreshController != null) refreshController.dispose(); + refreshController.dispose(); } @override @@ -495,15 +476,14 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { // }), ///特惠专区 - if (coupons != null && coupons.length != 0) + if (coupons.length != 0) DiscountZone(coupons), ///特惠专区-推荐商品展示 - if (homeRank != null && - homeRank.commodityZone.length != 0) + if (homeRank?.commodityZone?.isNotEmpty ?? false) HomeRecommendGoods(homeRank), - if((homeRank?.commodityZone?.length ??0) == 0) + if(homeRank?.commodityZone?.isEmpty ?? true) SizedBox(height: 20.h,), ///助农专区 @@ -514,8 +494,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { WelfareCore(), ///吃喝玩商品热销榜 - if (homeRank != null && - homeRank.commodityList.length != 0) + if (homeRank?.commodityList?.isNotEmpty ?? false) TopSellingList(homeRank), // ///店铺推荐 @@ -567,7 +546,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { return Container( child: AspectRatio( aspectRatio: 1.25, - child: bannerData != null && bannerData.isNotEmpty + child: bannerData.isNotEmpty ? Swiper( pagination: SwiperPagination( margin: EdgeInsets.only(bottom: 12.h), @@ -591,7 +570,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }, child: Container( child: MImage( - bannerData[position].imgUrl, + bannerData[position].imgUrl ?? "", fit: BoxFit.cover, errorSrc: "assets/image/default_2_1.webp", fadeSrc: "assets/image/default_2_1.webp", @@ -627,9 +606,12 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }); break; case 4: - String router = bannerData.content; + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } // String router = "/router/store_order?{\"id\":\"1512378184161558528\",\"tenant\":\"1188\",\"storeName\":\"农场煮意\"}"; - if (router.contains("?")) { + if (router!.contains("?")) { String params = router.substring(router.indexOf("?") + 1); Map map = jsonDecode(params); Navigator.of(context).pushNamed( @@ -645,12 +627,13 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }); break; case 7: - String params = - bannerData.content.substring(bannerData.content.indexOf("?") + 1); + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?") + 1); Map map = jsonDecode(params); - Navigator.of(context).pushNamed( - bannerData.content.substring(0, bannerData.content.indexOf("?")), - arguments: map); + Navigator.of(context).pushNamed(router.substring(0, router.indexOf("?")), arguments: map); break; } } @@ -660,7 +643,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { width: double.infinity, // margin: EdgeInsets.symmetric(horizontal:14.w), height: 85.h, - child: activityBannerData != null && activityBannerData.isNotEmpty + child: activityBannerData.isNotEmpty ? Swiper( pagination: SwiperPagination( alignment: Alignment.bottomCenter, @@ -684,7 +667,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { child: Container( margin: EdgeInsets.symmetric(horizontal: 14.w), child: MImage( - activityBannerData[position].imgUrl, + activityBannerData[position].imgUrl ?? "", fit: BoxFit.cover, radius: BorderRadius.circular(6), errorSrc: "assets/image/default_2_1.webp", @@ -720,9 +703,12 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }); break; case 4: - String router = activityBannerData.content; + String? router = activityBannerData.content; + if (router?.isEmpty ?? true) { + return; + } // String router = "/router/store_order?{\"id\":\"1512378184161558528\",\"tenant\":\"1188\",\"storeName\":\"农场煮意\"}"; - if (router.contains("?")) { + if (router!.contains("?")) { String params = router.substring(router.indexOf("?") + 1); Map map = jsonDecode(params); Navigator.of(context).pushNamed( @@ -738,13 +724,16 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }); break; case 7: - String params = activityBannerData.content - .substring(activityBannerData.content.indexOf("?") + 1); + String? router = activityBannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?") + 1); Map map = jsonDecode(params); Navigator.of(context).pushNamed( - activityBannerData.content - .substring(0, activityBannerData.content.indexOf("?")), - arguments: map); + router.substring(0, router.indexOf("?")), + arguments: map, + ); break; } } @@ -773,29 +762,26 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { // 新版桌子码跳转 // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); - if (result.toString().contains("type\":\"coupon")) { + if (result == null || result !is String || (result as String).isEmpty) { + return; + } + if (result.contains("type\":\"coupon")) { ///活动优惠券赠送弹窗 activityShowAlertDialog(result.toString()); return; } - if (result.toString().contains("type\":\"wiped")) { + if (result.contains("type\":\"wiped")) { ///核销券 queryWiped(jsonDecode(result.toString())["memberCouponId"]); return; } // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = - uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; - String tenantCode = uri.queryParameters["tenantCode"] ?? - uri.queryParameters["tenant_code"]; - String shopId = - uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; - if (tableId != null && - tableId != "" && - tenantCode != null && + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"] ?? ""; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"] ?? ""; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"] ?? ""; + if (tableId != "" && tenantCode != "" && - shopId != null && shopId != "") { Navigator.of(context).pushNamed( '/router/store_order', @@ -823,7 +809,8 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { }, heightRatioWithWidth: 0.82, ); - }); + }, + ); } } diff --git a/lib/home/home_view/activity_list.dart b/lib/home/home_view/activity_list.dart index 87fd8791..38de8b7f 100644 --- a/lib/home/home_view/activity_list.dart +++ b/lib/home/home_view/activity_list.dart @@ -1,11 +1,10 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -26,7 +25,7 @@ class ActivityList extends StatefulWidget { class _ActivityList extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -39,13 +38,12 @@ class _ActivityList extends State }); } - List activityList; + List? activityList; queryActivity() async { final SharedPreferences value = await SharedPreferences.getInstance(); - apiService = - ApiService(Dio(), context: context, token: value.getString('token')); - BaseData> baseData = await apiService.informationList({ + apiService = ApiService(Dio(), context: context, token: value.getString('token')); + BaseData>? baseData = await apiService?.informationList({ "pageNum": 1, "pageSize": 10, "searchKey": "", @@ -54,9 +52,9 @@ class _ActivityList extends State }).catchError((error) { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { _refreshController.refreshCompleted(); - activityList = baseData.data.list; + activityList = baseData?.data?.list ?? []; } } @@ -94,22 +92,24 @@ class _ActivityList extends State setState(() {}); }, child: ListView.builder( - itemCount: activityList == null ? 0 : activityList.length, + itemCount: activityList?.length ?? 0, physics: NeverScrollableScrollPhysics(), itemBuilder: (context, position) { return InkWell( onTap: () { Navigator.of(context).pushNamed( '/router/web_page', - arguments: {"activityId": activityList[position].id}); + arguments: {"activityId": activityList![position].id}, + ); }, child: FrameSeparateWidget( - child: activityItem(activityList[position]), + child: activityItem(activityList![position]), placeHolder: AspectRatio( aspectRatio: 1.34, child: Container( margin: EdgeInsets.symmetric( - horizontal: 16.w, vertical: 8.h), + horizontal: 16.w, vertical: 8.h, + ), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -118,7 +118,7 @@ class _ActivityList extends State offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], borderRadius: BorderRadius.circular(8), ), @@ -159,7 +159,7 @@ class _ActivityList extends State child: Column( children: [ MImage( - activity.coverImg, + activity.coverImg ?? "", aspectRatio: 2.1, radius: BorderRadius.only( topLeft: Radius.circular(8), @@ -181,7 +181,7 @@ class _ActivityList extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - activity.mainTitle, + activity.mainTitle ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -216,7 +216,7 @@ class _ActivityList extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - activity.storeName == null ? "" : activity.storeName, + activity.storeName ?? "", style: TextStyle( color: Color(0xFF060606), fontWeight: MyFontWeight.regular, @@ -228,7 +228,7 @@ class _ActivityList extends State mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - activity.startTime.split(" ")[0], + activity.startTime?.split(" ")[0] ?? "", style: TextStyle( color: Color(0xFFB5B5B5), fontSize: 12.sp, @@ -239,7 +239,7 @@ class _ActivityList extends State width: 4.w, ), Text( - activity.startTime.split(" ")[1], + activity.startTime?.split(" ")[1] ?? "", style: TextStyle( color: Color(0xFFB5B5B5), fontSize: 12.sp, diff --git a/lib/home/home_view/brand_view.dart b/lib/home/home_view/brand_view.dart index 7a0391b7..9d89e782 100644 --- a/lib/home/home_view/brand_view.dart +++ b/lib/home/home_view/brand_view.dart @@ -1,10 +1,7 @@ - - - import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/brand.dart'; +import 'package:huixiang/data/brand.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/item_title.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -51,7 +48,9 @@ class _BrandView extends State { physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return Container( - margin: EdgeInsets.symmetric(horizontal: 3.w, vertical: 15.h), + margin: EdgeInsets.symmetric( + horizontal: 3.w, vertical: 15.h, + ), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -65,7 +64,7 @@ class _BrandView extends State { borderRadius: BorderRadius.circular(8), ), child: MImage( - widget.brandData != null ? widget.brandData[position].image : "", + widget.brandData[position].image ?? "", radius: BorderRadius.circular(8), fit: BoxFit.cover, errorSrc: "assets/image/default_2_1.webp", @@ -73,8 +72,7 @@ class _BrandView extends State { ), ); }, - itemCount: - (widget.brandData != null && widget.brandData.length > 0) ? widget.brandData.length : 0, + itemCount: widget.brandData.length ?? 0, ), ); } diff --git a/lib/home/home_view/coupon.dart b/lib/home/home_view/coupon.dart index 35b77279..939912e0 100644 --- a/lib/home/home_view/coupon.dart +++ b/lib/home/home_view/coupon.dart @@ -2,9 +2,9 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/item_title.dart'; @@ -22,7 +22,7 @@ class CouponView extends StatefulWidget { } class _CouponView extends State { - ApiService apiService; + ApiService? apiService; List coupons = []; @@ -41,7 +41,7 @@ class _CouponView extends State { } queryCoupon() async { - BaseData> baseData = await apiService.queryCoupon({ + BaseData>? baseData = await apiService?.queryCoupon({ "centre": true, "pageNum": 1, "pageSize": 10, @@ -50,15 +50,15 @@ class _CouponView extends State { }).catchError((onError) { }); coupons.clear(); - if (baseData != null && baseData.isSuccess) { - coupons.addAll(baseData.data.list); + if (baseData?.isSuccess ?? false) { + coupons.addAll(baseData?.data?.list ?? []); setState(() {}); } } @override Widget build(BuildContext context) { - return (coupons == null || coupons.length == 0) ? Container(height: 20,) : Column( + return (coupons.length == 0) ? Container(height: 20,) : Column( children: [ SizedBox( height: 20.h, @@ -138,11 +138,7 @@ class _CouponView extends State { ), ), TextSpan( - text: coupon != null - ? double.tryParse("${coupon.discountAmount}" ?? "0") - .toInt() - .toString() - : "", + text: "${double.tryParse("${coupon?.discountAmount}")?.toInt()}", style: TextStyle( fontSize: 25.sp, fontWeight: MyFontWeight.regular, @@ -153,11 +149,7 @@ class _CouponView extends State { ), ), Text( - S.of(context).manyuankeyong(coupon != null - ? double.tryParse("${coupon.fullAmount}" ?? "0") - .toInt() - .toString() - : ""), + S.of(context).manyuankeyong("${double.tryParse("${coupon.fullAmount}")?.toInt()}"), style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 14.sp, @@ -183,14 +175,15 @@ class _CouponView extends State { ), Expanded( child: Container( - margin: - EdgeInsets.symmetric(vertical: 10.h, horizontal: 15.w), + margin: EdgeInsets.symmetric( + vertical: 10.h, horizontal: 15.w, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - (coupon != null && coupon.storeList != null && coupon.storeList.length > 0) ? coupon.storeList[0].storeName ?? "" : "", + coupon.storeList?[0].storeName ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF181818), @@ -212,7 +205,7 @@ class _CouponView extends State { // width: 4.w, // ), Text( - coupon != null ? coupon.couponName ?? "" : "", + coupon.couponName ?? "", style: TextStyle( color: Color(0xFF868686), fontWeight: MyFontWeight.regular, @@ -233,7 +226,7 @@ class _CouponView extends State { (coupon.useStartTime == null && coupon.useEndTime == null) ? S.of(context).quantian - : "${coupon.useStartTime.replaceAll("-", ".").split(" ")[0]} - ${coupon.useEndTime.replaceAll("-", ".").split(" ")[0]}", + : "${coupon.useStartTime!.replaceAll("-", ".").split(" ")[0]} - ${coupon.useEndTime!.replaceAll("-", ".").split(" ")[0]}", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -246,13 +239,13 @@ class _CouponView extends State { ), GestureDetector( onTap: (){ - if((coupon?.status??0) == 0) - receiveCoupon(coupon?.id??""); + if((coupon.status??0) == 0) + receiveCoupon(coupon.id??""); }, child: RoundButton( - text: ((coupon?.status??0) == 0) ? S.of(context).lingqu : S.of(context).yilingqu, + text: ((coupon.status??0) == 0) ? S.of(context).lingqu : S.of(context).yilingqu, textColor: Colors.white, - backgroup: ((coupon?.status??0) == 0)?Color(0xFF32A060):Colors.grey, + backgroup: ((coupon.status??0) == 0)?Color(0xFF32A060):Colors.grey, radius: 100, padding: EdgeInsets.symmetric(vertical: 3.h, horizontal: 14.w), ), @@ -276,8 +269,8 @@ class _CouponView extends State { } receiveCoupon(couponId) async { - BaseData baseData = await apiService.receiveCoupon(couponId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(couponId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { queryCoupon(); showAlertDialog(); } diff --git a/lib/home/home_view/discount_zone.dart b/lib/home/home_view/discount_zone.dart index b63c3d50..ca66c1e1 100644 --- a/lib/home/home_view/discount_zone.dart +++ b/lib/home/home_view/discount_zone.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; +import 'package:huixiang/data/coupon.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -18,12 +18,11 @@ class DiscountZone extends StatefulWidget { } class _DiscountZone extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { super.initState(); - } @override @@ -154,8 +153,7 @@ class _DiscountZone extends State { ), Text( coupon != null - ? double.tryParse("${coupon.discountAmount}" ?? "0").toInt() - .toString() + ? "${double.tryParse("${coupon.discountAmount}")?.toInt()}" : "", style: TextStyle( fontSize: 30.sp, @@ -166,10 +164,7 @@ class _DiscountZone extends State { ], ), Text( - S.of(context).manyuankeyong(coupon != null - ? ("${coupon.fullAmount}" ?? "0") - .toString() - : ""), + S.of(context).manyuankeyong("${coupon?.fullAmount}"), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, @@ -249,7 +244,7 @@ class _DiscountZone extends State { ), Text( coupon != null - ? "${AppUtils.calculateDouble(double.tryParse(coupon.limitAmount) ?? 0)}" + ? "${AppUtils.calculateDouble(double.tryParse("${coupon.limitAmount}") ?? 0)}" : "", style: TextStyle( fontSize: 28.sp, @@ -267,13 +262,12 @@ class _DiscountZone extends State { children: [ Text( coupon != null - ? "${(coupon.discountPercent / 10.0 >= 10) ? 10 : coupon.discountPercent / 10.0}" ?? - "0" + ? "${((coupon.discountPercent ?? 0) / 10.0 >= 10) ? 10 : (coupon.discountPercent ?? 0) / 10.0}" : "", style: TextStyle( fontSize: 30.sp, fontWeight: FontWeight.w900, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060), + color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060), ), ), SizedBox( @@ -284,7 +278,7 @@ class _DiscountZone extends State { style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060), + color: coupon.status == 3 ? Color(0xFFB3B3B3) : Color(0xFF32A060), ), ), ], diff --git a/lib/home/home_view/featured_acticvity.dart b/lib/home/home_view/featured_acticvity.dart index bdc0c314..3c432e56 100644 --- a/lib/home/home_view/featured_acticvity.dart +++ b/lib/home/home_view/featured_acticvity.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/item_title.dart'; @@ -19,7 +18,7 @@ class FeaturedActivity extends StatefulWidget { } class _FeaturedActivity extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -27,25 +26,24 @@ class _FeaturedActivity extends State { queryActivity(); } - List activityList; + List? activityList; queryActivity() async { final SharedPreferences value = await SharedPreferences.getInstance(); - apiService = - ApiService(Dio(), context: context, token: value.getString('token')); - BaseData> baseData = await apiService.informationList({ + apiService = ApiService(Dio(), context: context, token: value.getString('token')); + BaseData>? baseData = await apiService?.informationList({ "pageNum": 1, "pageSize": 10, "searchKey": "", "type": 1, "state": 1 }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - activityList = baseData.data.list; - if (activityList != null && activityList.length == 1) - activityList.add(activityList[0]); - if (activityList != null && activityList.length == 2) - activityList.add(activityList[1]); + if (baseData?.isSuccess ?? false) { + activityList = baseData?.data?.list ?? []; + if (activityList!.length == 1) + activityList!.add(activityList![0]); + if (activityList!.length == 2) + activityList!.add(activityList![1]); } } @@ -68,14 +66,14 @@ class _FeaturedActivity extends State { margin: EdgeInsets.symmetric(horizontal: 9.w), child: Row( children: [ - if (activityList != null && activityList.length > 0) + if (activityList?.isNotEmpty ?? false) GestureDetector( onTap: () { Navigator.of(context).pushNamed('/router/web_page', - arguments: {"activityId": activityList[0].id}); + arguments: {"activityId": activityList?[0].id}); }, child: Container( - child: stackItem(18.sp, activityList[0]), + child: stackItem(18.sp, activityList?[0]), margin: EdgeInsets.symmetric(horizontal: 5.w), width: (MediaQuery.of(context).size.width - 42) / 2, height: 125.h, @@ -84,14 +82,14 @@ class _FeaturedActivity extends State { color: Colors.red, image: DecorationImage( image: NetworkImage( - activityList[0].coverImg, + activityList?[0].coverImg ?? "", ), fit: BoxFit.cover, ), ), ), ), - if (activityList != null && activityList.length > 1) + if (activityList?.isNotEmpty ?? false) Expanded( child: Container( child: Column( @@ -100,10 +98,10 @@ class _FeaturedActivity extends State { GestureDetector( onTap: () { Navigator.of(context).pushNamed('/router/web_page', - arguments: {"activityId": activityList[1].id}); + arguments: {"activityId": activityList?[1].id}); }, child: Container( - child: stackItem(12.sp, activityList[1]), + child: stackItem(12.sp, activityList?[1]), margin: EdgeInsets.symmetric(horizontal: 5.w), width: (MediaQuery.of(context).size.width - 42) / 2, height:125.h, @@ -112,7 +110,7 @@ class _FeaturedActivity extends State { color: Colors.green, image: DecorationImage( image: NetworkImage( - activityList[1].coverImg, + activityList?[1].coverImg ?? "", ), fit: BoxFit.cover, ), @@ -158,7 +156,7 @@ class _FeaturedActivity extends State { ); } - Widget stackItem(double textSize, Activity activity) { + Widget stackItem(double textSize, Activity? activity) { return Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(6), @@ -174,7 +172,7 @@ class _FeaturedActivity extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - activity.mainTitle, + activity?.mainTitle ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( diff --git a/lib/home/home_view/founder_store.dart b/lib/home/home_view/founder_store.dart index a5346775..28891dc8 100644 --- a/lib/home/home_view/founder_store.dart +++ b/lib/home/home_view/founder_store.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/founder.dart'; +import 'package:huixiang/data/founder.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/item_title.dart'; @@ -60,7 +60,7 @@ class _FounderStore extends State { clipBehavior: Clip.hardEdge, children: [ MImage( - widget.founder != null ? widget.founder.imgUrl : "", + widget.founder.imgUrl ?? "", aspectRatio: 2, radius: BorderRadius.circular(4.w), // fit: BoxFit.cover, @@ -99,7 +99,7 @@ class _FounderStore extends State { ), ), Text( - widget.founder != null ? widget.founder.name : "", + widget.founder.name ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.bold, diff --git a/lib/home/home_view/happy_help_farmers.dart b/lib/home/home_view/happy_help_farmers.dart index f75dd1ee..40777c95 100644 --- a/lib/home/home_view/happy_help_farmers.dart +++ b/lib/home/home_view/happy_help_farmers.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -14,7 +13,7 @@ class HappyHelpFarmers extends StatefulWidget { } class _HappyHelpFarmers extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { diff --git a/lib/home/home_view/home_banner.dart b/lib/home/home_view/home_banner.dart index f597a018..970e017a 100644 --- a/lib/home/home_view/home_banner.dart +++ b/lib/home/home_view/home_banner.dart @@ -1,8 +1,8 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/banner.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -52,8 +52,7 @@ class _HomeBanner extends State { // borderRadius: BorderRadius.circular(8), // ), child: MImage( - (widget.bannerData != null && - position < widget.bannerData.length) + (position < widget.bannerData.length) ? widget.bannerData[position].imgUrl ?? "" : "", // radius: BorderRadius.circular(8), @@ -64,7 +63,7 @@ class _HomeBanner extends State { ), ); }, - itemCount: (widget.bannerData != null && widget.bannerData.length > 0) + itemCount: (widget.bannerData.length > 0) ? widget.bannerData.length : 1, ), @@ -90,9 +89,12 @@ class _HomeBanner extends State { }); break; case 4: - String router = bannerData.content; + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } // String router = "/router/store_order?{\"id\":\"1512378184161558528\",\"tenant\":\"1188\",\"storeName\":\"农场煮意\"}"; - if (router.contains("?")) { + if (router!.contains("?")) { String params = router.substring(router.indexOf("?") + 1); Map map = jsonDecode(params); Navigator.of(context).pushNamed( @@ -108,9 +110,13 @@ class _HomeBanner extends State { }); break; case 7: - String params = bannerData.content.substring(bannerData.content.indexOf("?")+1); + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?")+1); Map map = jsonDecode(params); - Navigator.of(context).pushNamed(bannerData.content.substring(0,bannerData.content.indexOf("?")), arguments: map); + Navigator.of(context).pushNamed(router.substring(0,router.indexOf("?")), arguments: map); break; } } diff --git a/lib/home/home_view/home_integral_store.dart b/lib/home/home_view/home_integral_store.dart index 6e0a6b79..acd4ec40 100644 --- a/lib/home/home_view/home_integral_store.dart +++ b/lib/home/home_view/home_integral_store.dart @@ -1,11 +1,10 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; +import 'package:huixiang/data/goods.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/item_title.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class HomeIntegralStore extends StatefulWidget { @@ -67,9 +66,7 @@ class _HomeIntegralStore extends State { Widget integralStore() { return GridView.builder( - itemCount: (widget.gooods != null && widget.gooods.length > 0) - ? (widget.gooods.length > 2 ? 2 : widget.gooods.length) - : 0, + itemCount: (widget.gooods.length > 2 ? 2 : widget.gooods.length), padding: EdgeInsets.all(13.w), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), @@ -103,7 +100,7 @@ class _HomeIntegralStore extends State { child: Column( children: [ MImage( - goods.mainImgPath, + goods.mainImgPath ?? "", aspectRatio: 5 / 3, radius: BorderRadius.circular(4), fit: BoxFit.cover, @@ -127,7 +124,7 @@ class _HomeIntegralStore extends State { Expanded( flex: 1, child: Text( - goods.name, + goods.name ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xff353535), @@ -151,7 +148,7 @@ class _HomeIntegralStore extends State { height: 5.h, ), Text( - goods.description, + "${goods.description}", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -162,7 +159,7 @@ class _HomeIntegralStore extends State { ), ], ), - ) + ), ], ), ); diff --git a/lib/home/home_view/home_recommend_goods.dart b/lib/home/home_view/home_recommend_goods.dart index 672be8bb..fe9ea75d 100644 --- a/lib/home/home_view/home_recommend_goods.dart +++ b/lib/home/home_view/home_recommend_goods.dart @@ -1,7 +1,5 @@ -import 'dart:convert'; - import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/home_rank.dart'; +import 'package:huixiang/data/home_rank.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -10,7 +8,7 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class HomeRecommendGoods extends StatefulWidget { - final HomeRank homeRank; + final HomeRank? homeRank; HomeRecommendGoods(this.homeRank); @@ -21,7 +19,7 @@ class HomeRecommendGoods extends StatefulWidget { } class _HomeRecommendGoods extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); @override @@ -37,7 +35,11 @@ class _HomeRecommendGoods extends State { borderRadius: BorderRadius.circular(6), color: Colors.white, ), - margin: EdgeInsets.only(top: 8.h,left: 14.w, right: 14.w,), + margin: EdgeInsets.only( + top: 8.h, + left: 14.w, + right: 14.w, + ), child: ListView.builder( scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), @@ -48,13 +50,15 @@ class _HomeRecommendGoods extends State { Navigator.of(context).pushNamed( '/router/store_order', arguments: { - "id": widget.homeRank.commodityZone[position].storeId, - "tenant": widget.homeRank.commodityZone[position].tenantCode, + "id": widget.homeRank!.commodityZone![position].storeId, + "tenant": + widget.homeRank!.commodityZone![position].tenantCode, "storeName": "" }, ); }, - child: recommendGoodsItem(widget.homeRank?.commodityZone[position]), + child: + recommendGoodsItem(widget.homeRank!.commodityZone![position]), ); }, ), @@ -64,30 +68,35 @@ class _HomeRecommendGoods extends State { Widget recommendGoodsItem(CommodityZone commodityZone) { return Container( width: 158.w, - margin: EdgeInsets.only(right: 7.w, left: 12.w, top: 12.h,bottom: 12.h), + margin: EdgeInsets.only( + right: 7.w, + left: 12.w, + top: 12.h, + bottom: 12.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4.r), - ), - child: MImage( - commodityZone?.productImg ?? "", - fit: BoxFit.contain, - radius: BorderRadius.circular(4.r), - width: 158.w, - height: 158.h, - errorSrc: "assets/image/default_2_1.webp", - fadeSrc: "assets/image/default_2_1.webp", + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4.r), + ), + child: MImage( + commodityZone.productImg ?? "", + fit: BoxFit.contain, + radius: BorderRadius.circular(4.r), + width: 158.w, + height: 158.h, + errorSrc: "assets/image/default_2_1.webp", + fadeSrc: "assets/image/default_2_1.webp", + ), ), - ), SizedBox( height: 8.h, ), Text( - commodityZone?.productName ?? "", + commodityZone.productName ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -99,32 +108,36 @@ class _HomeRecommendGoods extends State { SizedBox( height: 4.h, ), - Expanded(child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "¥${AppUtils.calculateDouble(double.tryParse(commodityZone?.price) ?? 0)}", - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.medium, - fontFamily: 'JDZhengHT', - color: Color(0xFFF85400), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "¥${AppUtils.calculateDouble(double.tryParse("${commodityZone.price}") ?? 0)}", + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + fontFamily: 'JDZhengHT', + color: Color(0xFFF85400), + ), + ), + SizedBox( + width: 5.w, ), - ), - SizedBox(width: 5.w,), - Text( - "¥${AppUtils.calculateDouble(double.tryParse(commodityZone?.price) ?? 0)}", - style: TextStyle( - fontSize: 10.sp, - decoration: TextDecoration.lineThrough, - fontWeight: MyFontWeight.regular, - fontFamily: 'JDZhengHT', - color: Color(0xFFB3B3B3), + Text( + "¥${AppUtils.calculateDouble(double.tryParse("${commodityZone.price}") ?? 0)}", + style: TextStyle( + fontSize: 10.sp, + decoration: TextDecoration.lineThrough, + fontWeight: MyFontWeight.regular, + fontFamily: 'JDZhengHT', + color: Color(0xFFB3B3B3), + ), ), - ), - ], - )), + ], + ), + ), ], ), ); diff --git a/lib/home/home_view/hot_article.dart b/lib/home/home_view/hot_article.dart index 1c9b9e6d..ffd73ad4 100644 --- a/lib/home/home_view/hot_article.dart +++ b/lib/home/home_view/hot_article.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; +import 'package:huixiang/data/article.dart'; import 'package:huixiang/view_widget/hot_item.dart'; import 'package:huixiang/view_widget/item_title.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/home/home_view/quick_order.dart b/lib/home/home_view/quick_order.dart index 2bfa6a96..fb6bb998 100644 --- a/lib/home/home_view/quick_order.dart +++ b/lib/home/home_view/quick_order.dart @@ -7,10 +7,9 @@ import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/location.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/store.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; @@ -30,11 +29,11 @@ class QuickOrder extends StatefulWidget { } class _QuickOrder extends State { - ApiService apiService; - List storeList; - BMFCoordinate latLng; + ApiService? apiService; + List? storeList; + BMFCoordinate? latLng; - BMFMapController _mapController; + BMFMapController? _mapController; final TextEditingController editingController = TextEditingController(); @override @@ -46,7 +45,7 @@ class _QuickOrder extends State { ///门店列表 queryStore(latitude, longitude, province, city, district, searchKey) async { - BaseData> baseData = await apiService.queryStore({ + BaseData>? baseData = await apiService?.queryStore({ // "city": city, // "district": district, // "province": province, @@ -54,8 +53,8 @@ class _QuickOrder extends State { "longitude": longitude, "searchKey": searchKey }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - storeList = baseData.data; + if (baseData?.isSuccess ?? false) { + storeList = baseData!.data; } setState(() {}); } @@ -73,8 +72,8 @@ class _QuickOrder extends State { value.containsKey("city") && value.containsKey("district")) { - latLng = BMFCoordinate(double.tryParse(value.getString("latitude")), - double.tryParse(value.getString("longitude"))), + latLng = BMFCoordinate(double.tryParse("${value.getString("latitude")}") ?? 0, + double.tryParse("${value.getString("longitude")}") ?? 0), queryStore( value.getString("latitude"), value.getString("longitude"), @@ -84,12 +83,11 @@ class _QuickOrder extends State { editingController.text, ), setState(() { - if (_mapController != null) { - _mapController.updateMapOptions(BMFMapOptions( - center: latLng, - zoomLevel: 15, - )); - } + _mapController?.updateMapOptions( + BMFMapOptions( + center: latLng, + zoomLevel: 15, + )); }) } else @@ -101,23 +99,21 @@ class _QuickOrder extends State { } startLocation() async { - Location.getInstance().startLocation(context, (BaiduLocation result){ - if (result != null && - result.latitude != null && + Location.instance.startLocation(context, (BaiduLocation result){ + if (result.latitude != null && result.longitude != null) { print("location: $result"); - latLng = BMFCoordinate(result.latitude, result.longitude); + latLng = BMFCoordinate(result.latitude!, result.longitude!); BMFCalculateUtils.coordConvert( - coordinate: latLng, + coordinate: latLng!, fromType: BMF_COORD_TYPE.BD09LL, toType: BMF_COORD_TYPE.COMMON) .then((value) { this.latLng = value; - saveLatLng( - value, result.province, result.city, result.district); + saveLatLng(value!, result.province, result.city, result.district); print("union: Location result ${value.latitude} " "${value.longitude}"); - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); queryStore( "${value.latitude}", "${value.longitude}", @@ -125,11 +121,10 @@ class _QuickOrder extends State { result.city, result.district, editingController.text); - if (_mapController != null) - _mapController.updateMapOptions(BMFMapOptions( - center: value, - zoomLevel: 15, - )); + _mapController?.updateMapOptions(BMFMapOptions( + center: value, + zoomLevel: 15, + )); }); } }).then((value) {}); @@ -159,24 +154,24 @@ class _QuickOrder extends State { scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), padding: EdgeInsets.symmetric(horizontal: 10), - itemCount: storeList == null ? 0 : storeList.length, + itemCount: storeList?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { - if (storeList[position].posType.code == "NORMALSTORE") { + if (storeList![position].posType?.code == "NORMALSTORE") { showDeleteDialog(); } else { Navigator.of(context).pushNamed( '/router/store_order', arguments: { - "id": storeList[position].id, - "tenant": storeList[position].tenantCode, - "storeName": storeList[position].storeName + "id": storeList![position].id, + "tenant": storeList![position].tenantCode, + "storeName": storeList![position].storeName }, ); } }, - child: storeItem(storeList[position], position), + child: storeItem(storeList![position], position), ); }, ), @@ -212,7 +207,7 @@ class _QuickOrder extends State { right: 0, child: ClipRRect( child: MImage( - store.facade, + store.facade ?? '', width: double.infinity, height: 100, fit: BoxFit.cover, @@ -246,7 +241,7 @@ class _QuickOrder extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - store.logo, + store.logo ?? "", width: 32, height: 32, fit: BoxFit.cover, @@ -257,7 +252,7 @@ class _QuickOrder extends State { Padding( padding: EdgeInsets.only(left: 10, right: 10), child: Text( - store.storeName, + store.storeName ?? "", textAlign: TextAlign.center, style: TextStyle( fontSize: 13.sp, @@ -385,16 +380,16 @@ class _QuickOrder extends State { // 新版桌子码跳转 // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); + if (result == null || result !is String || (result as String).isEmpty) { + return; + } // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; - String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; - String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; - if (tableId != null && - tableId != "" && - tenantCode != null && + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"] ?? ""; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"] ?? ""; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"] ?? ""; + if (tableId != "" && tenantCode != "" && - shopId != null && shopId != "") { Navigator.of(context).pushNamed( '/router/store_order', diff --git a/lib/home/home_view/shortcut_operation.dart b/lib/home/home_view/shortcut_operation.dart index 3299e3fa..7e8ca613 100644 --- a/lib/home/home_view/shortcut_operation.dart +++ b/lib/home/home_view/shortcut_operation.dart @@ -1,5 +1,3 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; @@ -18,7 +16,7 @@ class ShortcutOperation extends StatefulWidget { } class _ShortcutOperation extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -30,71 +28,72 @@ class _ShortcutOperation extends State { return Container( // height: 70.h, width: double.infinity, - margin: EdgeInsets.only(bottom:16.h, left: 9.w, right: 9.w), + margin: EdgeInsets.only(bottom: 16.h, left: 9.w, right: 9.w), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( - child: GestureDetector( - onTap: () { - widget.goToOrder(0); - }, - child: Container( - width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 5), - padding: EdgeInsets.all(10.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 2), - blurRadius: 4, - spreadRadius: 1, - ) - ], - borderRadius: BorderRadius.circular(6), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - S.of(context).main_menu2, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 14.sp, - color: Colors.black, + child: GestureDetector( + onTap: () { + widget.goToOrder(0); + }, + child: Container( + width: double.infinity, + margin: EdgeInsets.symmetric(horizontal: 5), + padding: EdgeInsets.all(10.h), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 2), + blurRadius: 4, + spreadRadius: 1, + ), + ], + borderRadius: BorderRadius.circular(6), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + S.of(context).main_menu2, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 14.sp, + color: Colors.black, + ), ), - ), - SizedBox(height: 5.h), - Text( - S.of(context).xiadanzhuanjifen, - style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 12.sp, - color: Color(0xff4D4D4D), + SizedBox(height: 5.h), + Text( + S.of(context).xiadanzhuanjifen, + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + color: Color(0xff4D4D4D), + ), ), - ), - ], + ], + ), ), - ), - Image.asset( - "assets/image/home_lm.webp", - width: 24.w, - height: 31.h, - fit: BoxFit.fill, - ), - ], + Image.asset( + "assets/image/home_lm.webp", + width: 24.w, + height: 31.h, + fit: BoxFit.fill, + ), + ], + ), ), ), - )), + ), Expanded( child: GestureDetector( onTap: () { @@ -150,7 +149,7 @@ class _ShortcutOperation extends State { width: 21.w, height: 33.h, fit: BoxFit.fill, - ) + ), ], ), ), @@ -205,7 +204,8 @@ class _ShortcutOperation extends State { ), ), ], - ),), + ), + ), Image.asset( "assets/image/home_welfare.webp", width: 22.w, diff --git a/lib/home/home_view/top_selling_list.dart b/lib/home/home_view/top_selling_list.dart index 1e349ac3..91695859 100644 --- a/lib/home/home_view/top_selling_list.dart +++ b/lib/home/home_view/top_selling_list.dart @@ -1,7 +1,6 @@ -import 'dart:convert'; - import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/home_rank.dart'; +import 'package:huixiang/data/good_list.dart'; +import 'package:huixiang/data/home_rank.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -10,8 +9,10 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class TopSellingList extends StatefulWidget { - final HomeRank homeRank; + final HomeRank? homeRank; + TopSellingList(this.homeRank); + @override State createState() { return _TopSellingList(); @@ -19,7 +20,7 @@ class TopSellingList extends StatefulWidget { } class _TopSellingList extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); @override @@ -35,14 +36,16 @@ class _TopSellingList extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(6), image: DecorationImage( - image: NetworkImage( - widget?.homeRank?.commodityListImg ?? "" - ), + image: NetworkImage(widget.homeRank?.commodityListImg ?? ""), fit: BoxFit.cover, ), ), - margin: EdgeInsets.only(top: 14.h,left: 14.w,right: 14.w,), - padding: EdgeInsets.only(left: 12.w,top: 16.h), + margin: EdgeInsets.only( + top: 14.h, + left: 14.w, + right: 14.w, + ), + padding: EdgeInsets.only(left: 12.w, top: 16.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, @@ -52,7 +55,7 @@ class _TopSellingList extends State { height: 21.h, color: Color(0x33000000), alignment: Alignment.center, - child:Text( + child: Text( "${DateTime.now().month}月热推榜", style: TextStyle( fontWeight: MyFontWeight.medium, @@ -66,12 +69,12 @@ class _TopSellingList extends State { child: ListView.builder( scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), - itemCount:widget?.homeRank?.commodityList?.length ?? 0, + itemCount: widget.homeRank?.commodityList?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( - onTap: () { - }, - child: hotSaleItem(widget.homeRank.commodityList[position],position), + onTap: () {}, + child: hotSaleItem( + widget.homeRank!.commodityList![position], position), ); }, ), @@ -81,59 +84,69 @@ class _TopSellingList extends State { ); } - Widget hotSaleItem(CommodityList commodityList,index) { + Widget hotSaleItem(CommodityList commodityList, index) { + int itemLength = + (widget.homeRank?.commodityList?[index].goodList?.length ?? 0); return Container( width: 290.w, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4.r), + borderRadius: BorderRadius.circular(4.r), color: Color(0xB3FFFFFF), - ), - margin: EdgeInsets.only(right:8.w,top: 12.h), - padding:EdgeInsets.only(left:12.w,top: 12.h), + ), + margin: EdgeInsets.only(right: 8.w, top: 12.h), + padding: EdgeInsets.only(left: 12.w, top: 12.h), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - commodityList?.typeName ?? "", + commodityList.typeName ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.bold, color: Color(0xFF0D0D0D), ), - ),SizedBox( - height:10.h, ), - Expanded(child: ListView.builder( - padding: EdgeInsets.zero, - itemCount:widget.homeRank.commodityList[index].goodList.length>3?3:widget.homeRank.commodityList[index].goodList.length, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - Navigator.of(context).pushNamed( - '/router/store_order', - arguments: { - "id": widget.homeRank.commodityList[index].goodList[position].storeId, - "tenant": widget.homeRank.commodityList[index].goodList[position].tenantCode, - "storeName": "" - }, - ); - }, - child: rankingItem(widget.homeRank.commodityList[index].goodList[position],position), - ); - }, - ),) + SizedBox( + height: 10.h, + ), + Expanded( + child: ListView.builder( + padding: EdgeInsets.zero, + itemCount: itemLength > 3 ? 3 : itemLength, + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed( + '/router/store_order', + arguments: { + "id": widget.homeRank!.commodityList![index] + .goodList![position].storeId, + "tenant": widget.homeRank!.commodityList![index] + .goodList![position].tenantCode, + "storeName": "" + }, + ); + }, + child: rankingItem( + widget + .homeRank!.commodityList![index].goodList![position], + position), + ); + }, + ), + ) ], ), ); } - Widget rankingItem(GoodList goodList,index) { + Widget rankingItem(GoodList goodList, index) { return Container( - margin: EdgeInsets.only(right:14.w,top: 12.h,bottom: 12.h), + margin: EdgeInsets.only(right: 14.w, top: 12.h, bottom: 12.h), child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -150,7 +163,11 @@ class _TopSellingList extends State { fadeSrc: "assets/image/default_2_1.webp", ), Image.asset( - index == 0 ? "assets/image/ranking1.webp" :(index == 1 ? "assets/image/ranking2.webp": "assets/image/ranking3.webp"), + index == 0 + ? "assets/image/ranking1.webp" + : (index == 1 + ? "assets/image/ranking2.webp" + : "assets/image/ranking3.webp"), width: 25, height: 25, fit: BoxFit.cover, @@ -158,54 +175,59 @@ class _TopSellingList extends State { ], ), SizedBox( - width:8.w, + width: 8.w, ), - Expanded(child: - Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding(padding:EdgeInsets.only(top: 5.h,bottom: 8.h), - child: Text( - goodList?.productName ?? "", - style: TextStyle( - fontSize: 13.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF0D0D0D), - ), - ),), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "¥${AppUtils.calculateDouble(double.tryParse(goodList?.price) ?? 0)}", + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 5.h, bottom: 8.h), + child: Text( + goodList.productName ?? "", style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - fontFamily: 'JDZhengHT', + fontSize: 13.sp, + fontWeight: MyFontWeight.regular, color: Color(0xFF0D0D0D), ), ), - SizedBox(width: 5.w,), - Text( - "¥${AppUtils.calculateDouble(double.tryParse(goodList?.applyPrice) ?? 0)}", - style: TextStyle( - fontSize: 10.sp, - decoration: TextDecoration.lineThrough, - fontFamily: 'JDZhengHT', - fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D), + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "¥${AppUtils.calculateDouble(double.tryParse("${goodList.price}") ?? 0)}", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + fontFamily: 'JDZhengHT', + color: Color(0xFF0D0D0D), + ), ), - ), - ], - ), - ], - ),), + SizedBox( + width: 5.w, + ), + Text( + "¥${AppUtils.calculateDouble(double.tryParse("${goodList.applyPrice}") ?? 0)}", + style: TextStyle( + fontSize: 10.sp, + decoration: TextDecoration.lineThrough, + fontFamily: 'JDZhengHT', + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D), + ), + ), + ], + ), + ], + ), + ), Icon( Icons.add_circle, color: Color(0xFF32A060), - ) + ), ], ), ); diff --git a/lib/home/home_view/union_entry.dart b/lib/home/home_view/union_entry.dart index c3f2e69d..3a268a22 100644 --- a/lib/home/home_view/union_entry.dart +++ b/lib/home/home_view/union_entry.dart @@ -1,5 +1,3 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -19,26 +17,31 @@ class UnionEntry extends StatefulWidget { } class _UnionEntry extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { super.initState(); } - @override Widget build(BuildContext context) { return Container( height: 120.h, - width: double.infinity, - margin: EdgeInsets.only(top: 14.h,bottom: 10.h,right: 9.w,left: 9.w), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded(child:GestureDetector( - onTap: (){ + width: double.infinity, + margin: EdgeInsets.only( + top: 14.h, + bottom: 10.h, + right: 9.w, + left: 9.w, + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: GestureDetector( + onTap: () { widget.goToOrder(1); }, child: Container( @@ -65,7 +68,7 @@ class _UnionEntry extends State { width: 53.w, height: 52.h, ), - SizedBox(height:8.h), + SizedBox(height: 8.h), Text( S.of(context).chijiankang, style: TextStyle( @@ -77,90 +80,96 @@ class _UnionEntry extends State { ], ), ), - ) ), - Expanded(child:GestureDetector( - onTap: (){ + ), + ), + Expanded( + child: GestureDetector( + onTap: () { widget.goToOrder(2); }, child: Container( - margin: EdgeInsets.symmetric(horizontal: 5), - decoration: BoxDecoration( - color: Color(0xFFFFFFFF), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(6.r), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/home_he.webp", - fit: BoxFit.fill, - width: 36.w, - height: 56.h, - ), - SizedBox(height:8.h), - Text( - S.of(context).hejiankang, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 15.sp, - color: Color(0xFF0D0D0D), + margin: EdgeInsets.symmetric(horizontal: 5), + decoration: BoxDecoration( + color: Color(0xFFFFFFFF), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + borderRadius: BorderRadius.circular(6.r), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + "assets/image/home_he.webp", + fit: BoxFit.fill, + width: 36.w, + height: 56.h, ), - ), - ], - )), - ) ), - Expanded(child: GestureDetector( - onTap: (){ + SizedBox(height: 8.h), + Text( + S.of(context).hejiankang, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 15.sp, + color: Color(0xFF0D0D0D), + ), + ), + ], + ), + ), + ), + ), + Expanded( + child: GestureDetector( + onTap: () { widget.goToOrder(3); }, - child:Container( - margin: EdgeInsets.symmetric(horizontal: 5), - decoration: BoxDecoration( - color: Color(0xFFFFFFFF), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - borderRadius: BorderRadius.circular(6.r), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/home_wan.webp", - fit: BoxFit.fill, - width: 58.w, - height: 52.h, - ), - SizedBox(height:8.h), - Text( - S.of(context).wanjiankang, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 15.sp, - color: Color(0xFF0D0D0D), + child: Container( + margin: EdgeInsets.symmetric(horizontal: 5), + decoration: BoxDecoration( + color: Color(0xFFFFFFFF), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, ), - ), - ], - )), - )), - ], - ), - ); + ], + borderRadius: BorderRadius.circular(6.r), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + "assets/image/home_wan.webp", + fit: BoxFit.fill, + width: 58.w, + height: 52.h, + ), + SizedBox(height: 8.h), + Text( + S.of(context).wanjiankang, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 15.sp, + color: Color(0xFF0D0D0D), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ); } - } diff --git a/lib/home/home_view/welfare_core.dart b/lib/home/home_view/welfare_core.dart index b9944a60..eec32cc0 100644 --- a/lib/home/home_view/welfare_core.dart +++ b/lib/home/home_view/welfare_core.dart @@ -1,4 +1,3 @@ -import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; @@ -14,33 +13,37 @@ class WelfareCore extends StatefulWidget { } class _WelfareCore extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { super.initState(); } - @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.only(top: 24.h,left:10.w,right: 10.w), - child:Column( + margin: EdgeInsets.only( + top: 24.h, + left: 10.w, + right: 10.w, + ), + child: Column( children: [ Row( children: [ - Expanded(child: - Text( - S.of(context).fulizhongxin, - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 15.sp, - fontWeight: FontWeight.bold, + Expanded( + child: Text( + S.of(context).fulizhongxin, + style: TextStyle( + color: Color(0xFF0D0D0D), + fontSize: 15.sp, + fontWeight: FontWeight.bold, + ), ), - )), + ), GestureDetector( - onTap: (){ + onTap: () { Navigator.of(context).pushNamed('/router/welfare_page'); }, child: Text( @@ -51,130 +54,142 @@ class _WelfareCore extends State { fontWeight: MyFontWeight.regular, ), ), - ) + ), ], ), - SizedBox(height: 16.w,), + SizedBox( + height: 16.w, + ), Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded(child: GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed('/router/welfare_page'); - }, - child:Container( - width: double.infinity, - height:75.h, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage("assets/image/welfare1.webp"), + Expanded( + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/welfare_page'); + }, + child: Container( + width: double.infinity, + height: 75.h, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/welfare1.webp"), + ), ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).benzhouquanbao, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).benzhouquanbao, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), - ), - SizedBox(height:5.h), - Text( - S.of(context).meizhousanquanbao, - style: TextStyle( - fontSize: 11.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), + SizedBox(height: 5.h), + Text( + S.of(context).meizhousanquanbao, + style: TextStyle( + fontSize: 11.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), - ), - ], + ], + ), ), ), - )), - SizedBox(width: 10.w,), - Expanded(child: GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed('/router/invite_friends'); - }, - child:Container( - width: double.infinity, - height:75.h, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage("assets/image/welfare2.webp"), + ), + SizedBox( + width: 10.w, + ), + Expanded( + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/invite_friends'); + }, + child: Container( + width: double.infinity, + height: 75.h, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/welfare2.webp"), + ), ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).yaoqinghaoyou, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).yaoqinghaoyou, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), - ), - SizedBox(height:5.h), - Text( - S.of(context).yaoqinghaoyoudefen, - style: TextStyle( - fontSize: 11.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), + SizedBox(height: 5.h), + Text( + S.of(context).yaoqinghaoyoudefen, + style: TextStyle( + fontSize: 11.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), - ), - ], + ], + ), ), ), - ),), - SizedBox(width: 10.w,), - Expanded(child: GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed('/router/welfare_exchange'); - }, - child:Container( - width: double.infinity, - height:75.h, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage("assets/image/welfare3.webp"), + ), + SizedBox( + width: 10.w, + ), + Expanded( + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/welfare_exchange'); + }, + child: Container( + width: double.infinity, + height: 75.h, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage("assets/image/welfare3.webp"), + ), ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).jifenhuanquan, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).jifenhuanquan, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), - ), - SizedBox(height:5.h), - Text( - S.of(context).duozhongyouhui, - style: TextStyle( - fontSize: 11.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), + SizedBox(height: 5.h), + Text( + S.of(context).duozhongyouhui, + style: TextStyle( + fontSize: 11.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), - ), - ], + ], + ), ), ), - )), + ), ], ), ], diff --git a/lib/home/huixiang_brand_page.dart b/lib/home/huixiang_brand_page.dart index af0a5425..e46a46e1 100644 --- a/lib/home/huixiang_brand_page.dart +++ b/lib/home/huixiang_brand_page.dart @@ -1,18 +1,15 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_html/flutter_html.dart'; -import 'package:flutter_html/image_render.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/brand.dart'; -import 'package:huixiang/retrofit/data/brand_data.dart'; -import 'package:huixiang/retrofit/data/founder.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/brand.dart'; +import 'package:huixiang/data/brand_data.dart'; +import 'package:huixiang/data/founder.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -36,12 +33,12 @@ class _BrandPage extends State final ScrollController scrollController = ScrollController(); final RefreshController refreshController = RefreshController(); - ApiService apiService; + ApiService? apiService; List brands = []; - BrandData brandData; + BrandData? brandData; List globaKeys = []; List bannerData = []; - Founder founder; + Founder? founder; queryHome() async { EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); @@ -53,33 +50,30 @@ class _BrandPage extends State token: value.getString('token'), ); - BaseData baseData = - await apiService.queryHome().catchError((error) { + BaseData? baseData = await apiService?.queryHome().catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - brandData = baseData.data; + if (baseData?.isSuccess ?? false) { + brandData = baseData!.data; } else { refreshController.refreshFailed(); } - BaseData> banner = await apiService.queryBanner({ + BaseData>? banner = await apiService?.queryBanner({ "model": {"type": "BRAND_APP"}, }).catchError((error) { refreshController.refreshFailed(); }); bannerData.clear(); - bannerData.addAll(banner.data.records); + bannerData.addAll(banner?.data?.records ?? []); - BaseData brand = await apiService.queryHomeBrand().catchError((error) { + BaseData? brand = await apiService?.queryHomeBrand().catchError((error) { refreshController.refreshFailed(); }); - if (brand != null && brand.isSuccess) { + if (brand?.isSuccess ?? false) { brands.clear(); globaKeys.clear(); - brands.addAll((brand.data["brandList"] as List) - .map((e) => Brand.fromJson(e)) - .toList()); + brands.addAll((brand!.data["brandList"] as List?)?.map((e) => Brand.fromJson(e)).toList() ?? []); founder = Founder.fromJson(brand.data["founder"]); brands.forEach((element) { globaKeys.add(GlobalKey()); @@ -138,7 +132,7 @@ class _BrandPage extends State left: 0, right: 0, ), - if (brands != null && brands.length > 0) + if (brands.length > 0) Positioned( child: Container( color: Colors.white, @@ -172,7 +166,6 @@ class _BrandPage extends State isScroll: false, ), ]; - if (brands == null) return widgets; brands.forEach((value) { widgets.add( Container( @@ -181,15 +174,6 @@ class _BrandPage extends State color: Colors.white, child: Html( data: value.content, - customImageRenders: { - assetUriMatcher(): assetImageRender(), - networkSourceMatcher(extension: "svg"): svgNetworkImageRender(), - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, ), ), ), diff --git a/lib/home/huixiang_view/huixiang_banner.dart b/lib/home/huixiang_view/huixiang_banner.dart index 3549fba2..71c9bef3 100644 --- a/lib/home/huixiang_view/huixiang_banner.dart +++ b/lib/home/huixiang_view/huixiang_banner.dart @@ -2,8 +2,8 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/banner.dart'; import 'package:huixiang/view_widget/custom_image.dart'; class HuiXiangBanner extends StatefulWidget { @@ -48,8 +48,8 @@ class _HuiXiangBanner extends State { bannerClick(widget.bannerData[position]); }, child: MImage( - (widget.bannerData != null && position < widget.bannerData.length) - ? widget.bannerData[position].imgUrl + (position < widget.bannerData.length) + ? "${widget.bannerData[position].imgUrl}" : "", fit: BoxFit.fill, radius: BorderRadius.circular(8), @@ -58,7 +58,7 @@ class _HuiXiangBanner extends State { ), ); }, - itemCount: (widget.bannerData != null && widget.bannerData.length > 0) + itemCount: (widget.bannerData.length > 0) ? widget.bannerData.length : 1), ), @@ -85,9 +85,12 @@ class _HuiXiangBanner extends State { }); break; case 4: - String router = bannerData.content; + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } // String router = "/router/store_order?{\"id\":\"1512378184161558528\",\"tenant\":\"1188\",\"storeName\":\"农场煮意\"}"; - if (router.contains("?")) { + if (router!.contains("?")) { String params = router.substring(router.indexOf("?")+1); Map map = jsonDecode(params); Navigator.of(context).pushNamed(router.substring(0,router.indexOf("?")), arguments: map); @@ -102,9 +105,13 @@ class _HuiXiangBanner extends State { }); break; case 7: - String params = bannerData.content.substring(bannerData.content.indexOf("?")+1); + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?")+1); Map map = jsonDecode(params); - Navigator.of(context).pushNamed(bannerData.content.substring(0,bannerData.content.indexOf("?")), arguments: map); + Navigator.of(context).pushNamed(router.substring(0, router.indexOf("?")), arguments: map); break; } } diff --git a/lib/home/huixiang_view/origin_info.dart b/lib/home/huixiang_view/origin_info.dart index a28e1893..cc09b260 100644 --- a/lib/home/huixiang_view/origin_info.dart +++ b/lib/home/huixiang_view/origin_info.dart @@ -1,14 +1,13 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/brand_data.dart'; -import 'package:huixiang/retrofit/data/founder.dart'; +import 'package:huixiang/data/founder.dart'; import 'package:huixiang/utils/MyPainter.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class OriginInfo extends StatefulWidget { - final Founder founder; + final Founder? founder; OriginInfo(this.founder); @@ -51,9 +50,7 @@ class _OriginInfo extends State { children: [ ClipOval( child: MImage( - widget.founder == null - ? "" - : widget.founder.imgUrl, + widget.founder?.imgUrl ?? "", fit: BoxFit.cover, width: 60, height: 60, @@ -74,9 +71,7 @@ class _OriginInfo extends State { TextSpan( children: [ TextSpan( - text: widget.founder == null - ? "" - : widget.founder.name, + text: widget.founder?.name ?? "", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 14.sp, @@ -95,9 +90,7 @@ class _OriginInfo extends State { textDirection: TextDirection.ltr, ), Text( - widget.founder == null - ? "" - : widget.founder.description, + widget.founder?.description ?? "", overflow: isShowMore ? TextOverflow.visible : TextOverflow.ellipsis, @@ -108,35 +101,35 @@ class _OriginInfo extends State { ), ), SizedBox(height: 3.h), - if((widget?.founder?.description ?? "").length > 35) - GestureDetector( - onTap: () { - setState(() { - isShowMore = !isShowMore; - }); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - children: [ - Text( - S.of(context).gengduo, - style: TextStyle( - fontSize: 12.sp, + if ((widget.founder?.description ?? "").length > 35) + GestureDetector( + onTap: () { + setState(() { + isShowMore = !isShowMore; + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + children: [ + Text( + S.of(context).gengduo, + style: TextStyle( + fontSize: 12.sp, + color: Colors.black, + ), + ), + Icon( + (!isShowMore) + ? Icons.chevron_right + : Icons.keyboard_arrow_up, color: Colors.black, + size: 18, ), - ), - Icon( - (isShowMore != null && !isShowMore) - ? Icons.chevron_right - : Icons.keyboard_arrow_up, - color: Colors.black, - size: 18, - ), - ], + ], + ), ), - ), ], ), ), @@ -191,8 +184,8 @@ class _OriginInfo extends State { // height: 20.h, // ), Container( - margin: EdgeInsets.only(top:30), - child:InkWell( + margin: EdgeInsets.only(top: 30), + child: InkWell( onTap: () { Navigator.of(context).pushNamed('/router/founder_story_page'); }, diff --git a/lib/home/main_home_page.dart b/lib/home/main_home_page.dart index fab517d3..a0f49544 100644 --- a/lib/home/main_home_page.dart +++ b/lib/home/main_home_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/home/activity_list_page.dart'; import 'package:huixiang/home/points_mall_page.dart'; @@ -17,14 +18,12 @@ class MainHomePage extends StatefulWidget { class _MainHomePage extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - TabController tabcontroller; - List _widgetOptions; + TabController? tabcontroller; + late List _widgetOptions; @override void initState() { super.initState(); - if (tabcontroller == null) - tabcontroller = TabController(length: 3, vsync: this); _widgetOptions = [ // HomePage(() { @@ -54,7 +53,7 @@ class _MainHomePage extends State background: Color(0xFFFAFAFA), toolbarHeight: 50.h, leading: false, - brightness: Brightness.light, + systemUiOverlayStyle: SystemUiOverlayStyle.light, action: Container( margin: EdgeInsets.only(right: 8.w), child: GestureDetector( diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index 4e0d55fe..f65eee8f 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:ui'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -10,12 +9,12 @@ import 'package:huixiang/home/points_mall_view/points_goods_title.dart'; import 'package:huixiang/home/points_mall_view/points_goods_view.dart'; import 'package:huixiang/home/points_mall_view/points_mall_banner.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; -import 'package:huixiang/retrofit/data/goods_category.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/goods_category.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -34,7 +33,7 @@ class PointsMallPage extends StatefulWidget { class _PointsMallPage extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - ApiService client; + ApiService? client; final RefreshController _refreshController = RefreshController(); @override @@ -66,28 +65,24 @@ class _PointsMallPage extends State bool orderDesc = true; List goods = []; List gooodsCategorys = []; - UserInfo userInfo; + UserInfo? userInfo; List bannerData = []; queryUser() async { - BaseData> banner = await client.queryBanner({ + BaseData>? banner = await client?.queryBanner({ "model": {"type": "CREDIT_INDEX"}, }).catchError((onError) {}); - if (banner != null && - banner.isSuccess && - banner.data != null && - banner.data.records != null && - banner.data.records.length > 0) { + if ((banner?.isSuccess ?? false) && (banner?.data?.records?.isNotEmpty ?? false)) { bannerData.clear(); - bannerData.addAll(banner.data.records); + bannerData.addAll(banner?.data?.records ?? []); } - BaseData baseData = await client.queryInfo().catchError((onError){ + BaseData? baseData = await client?.queryInfo().catchError((onError) { }); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; SharedPreferences.getInstance().then((value) => { value.setString('user', jsonEncode(baseData.data)), }); @@ -98,13 +93,11 @@ class _PointsMallPage extends State EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); final SharedPreferences value = await SharedPreferences.getInstance(); - client = ApiService(Dio(), - context: context, token: value.getString('token'), showLoading: false); + client = ApiService(Dio(), context: context, token: value.getString('token'), showLoading: false); await queryUser(); - BaseData> dataCategory = - await client.goodsCategory({ + BaseData>? dataCategory = await client?.goodsCategory({ "current": 1, "map": {}, "model": {"pageNum": 1, "pageSize": 20, "searchKey": ""}, @@ -116,14 +109,10 @@ class _PointsMallPage extends State _refreshController.refreshFailed(); }); - if (dataCategory != null && - dataCategory.isSuccess && - dataCategory.data != null && - dataCategory.data.records != null && - dataCategory.data.records.length > 0) { + if ((dataCategory?.isSuccess ?? false) && (dataCategory?.data?.records?.isNotEmpty ?? false)) { gooodsCategorys.clear(); - gooodsCategorys.add(GoodsCategory(name: S.of(context).quanbu)); - gooodsCategorys.addAll(dataCategory.data.records); + gooodsCategorys.add(GoodsCategory()..name = S.of(context).quanbu); + gooodsCategorys.addAll(dataCategory?.data?.records ?? []); } var param = { @@ -134,20 +123,20 @@ class _PointsMallPage extends State "pageSize": 10, "state": 1 }; - BaseData> baseData = await client.creditGoods(param) + BaseData>? baseData = await client?.creditGoods(param) .catchError((onError) { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); EasyLoading.dismiss(); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (pageNum == 1) { goods.clear(); } - goods.addAll(baseData.data.list); + goods.addAll(baseData?.data?.list ?? []); _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData.data.pageNum == baseData.data.pages) { + if (baseData?.data?.pageNum == baseData?.data?.pages) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -158,7 +147,7 @@ class _PointsMallPage extends State } } - String categoryId; + String? categoryId; @override Widget build(BuildContext context) { @@ -170,7 +159,7 @@ class _PointsMallPage extends State physics: BouncingScrollPhysics(), footer: CustomFooter( loadStyle: LoadStyle.ShowWhenLoading, - builder: (BuildContext context, LoadStatus mode) { + builder: (BuildContext context, LoadStatus? mode) { return MyFooter(mode); }, ), @@ -231,8 +220,8 @@ class _PointsMallPage extends State await Navigator.of(context).pushNamed('/router/integral_store_page', arguments: {"goodsId": goods[index].id}); SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - String token = sharedPreferences.getString("token"); - if (token != null && token != "") queryUser(); + String? token = sharedPreferences.getString("token"); + if (token?.isNotEmpty ?? false) queryUser(); } @override diff --git a/lib/home/points_mall_view/point_mall_user.dart b/lib/home/points_mall_view/point_mall_user.dart index 13dc1d57..77287a69 100644 --- a/lib/home/points_mall_view/point_mall_user.dart +++ b/lib/home/points_mall_view/point_mall_user.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class PointMallUser extends StatefulWidget { - final UserInfo userInfo; + final UserInfo? userInfo; PointMallUser(this.userInfo); @@ -25,8 +25,8 @@ class _PointMallUser extends State { SharedPreferences.getInstance().then((value) { if (value.getString("token") == null || value.getString("token") == "") { - Navigator.of(context) - .pushNamed('/router/new_login_page', arguments: {"login": "login"}); + Navigator.of(context).pushNamed('/router/new_login_page', + arguments: {"login": "login"}); } }); }, @@ -35,7 +35,7 @@ class _PointMallUser extends State { child: Row( children: [ MImage( - widget.userInfo != null ? widget.userInfo.headimg : "", + widget.userInfo?.headimg ?? "", width: 50, height: 50, isCircle: true, @@ -63,7 +63,7 @@ class _PointMallUser extends State { : Row( children: [ Text( - widget.userInfo.nickname, + widget.userInfo?.nickname ?? "", style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.medium, @@ -93,9 +93,7 @@ class _PointMallUser extends State { ), ) : Text( - widget.userInfo == null - ? "" - : "NO.${widget.userInfo.vipNo}", + "NO.${widget.userInfo?.vipNo}", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -132,9 +130,7 @@ class _PointMallUser extends State { height: 4.h, ), Text( - (widget.userInfo != null) - ? "${widget.userInfo.points}" - : "", + "${widget.userInfo?.points}", style: TextStyle( fontSize: 16.sp, color: Color(0xFFF8BA61), @@ -143,7 +139,7 @@ class _PointMallUser extends State { ), ], ), - ) + ), ], ), ), diff --git a/lib/home/points_mall_view/points_goods_title.dart b/lib/home/points_mall_view/points_goods_title.dart index 6771343c..ff38a2c8 100644 --- a/lib/home/points_mall_view/points_goods_title.dart +++ b/lib/home/points_mall_view/points_goods_title.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/goods_category.dart'; +import 'package:huixiang/data/goods_category.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/item_title.dart'; @@ -100,13 +100,10 @@ class _PointsGoodsTitle extends State unselectedLabelColor: Color(0xff4D4D4D), indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 - tabs: widget.gooodsCategorys == null - ? [] - : widget.gooodsCategorys - .map((e) => MyTab(text: e.name)) - .toList(), + tabs: widget.gooodsCategorys?.map((e) => MyTab(text: "${e.name}")).toList() ?? [], onTap: widget.onTap, - )), + ), + ), ), ), // Container( diff --git a/lib/home/points_mall_view/points_goods_view.dart b/lib/home/points_mall_view/points_goods_view.dart index 30540ba9..7dd44c4e 100644 --- a/lib/home/points_mall_view/points_goods_view.dart +++ b/lib/home/points_mall_view/points_goods_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; +import 'package:huixiang/data/goods.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -21,23 +21,21 @@ class PointGoods extends StatefulWidget { class _PointGoods extends State { String pointPrice(Goods goods) { - if (goods == null) return ""; - if (goods?.oneBean != null && goods?.oneBean != "0") { - return "${goods?.oneBean}印章"; + if (goods.oneBean != "0") { + return "${goods.oneBean}印章"; } - if (goods?.onePrice != null && goods?.onePrice != "0") { - return S.of(context).jifen_(goods?.onePrice); - } else if ((goods?.onePrice == null || goods?.onePrice == "0") && - ((goods?.price != null && goods?.price != "0") || - (goods?.money != null && goods?.money != "0.00"))) { - return (goods?.price == "0" || goods?.price == null + if (goods.onePrice != "0") { + return S.of(context).jifen_("${goods.onePrice}"); + } else if ((goods.onePrice == "0") && + ((goods.price != "0") || (goods.money != "0.00"))) { + return (goods.price == "0" ? "" - : S.of(context).jifen_(goods?.price)) + - (goods?.money == "0" || goods?.money == null + : S.of(context).jifen_("${goods.price}")) + + (goods.money == "0" ? "" - : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}元"); - } else if (goods.oneMoney != null && goods.oneMoney != "0.00") { - return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}元"; + : " + ${AppUtils.calculateDouble(double.tryParse("${goods.money}") ?? 0)}元"); + } else if (goods.oneMoney != "0.00") { + return "${AppUtils.calculateDouble(double.tryParse("${goods.oneMoney}") ?? 0)}元"; } else { return ""; } @@ -46,44 +44,44 @@ class _PointGoods extends State { @override Widget build(BuildContext context) { return Container( - child:(widget.goods == null || widget.goods.length == 0) + child: (widget.goods.length == 0) ? NoDataView( - src: "assets/image/xiao_fei.webp", - isShowBtn: false, - text: "当前分类暂无商品", - fontSize: 16.sp, - margin: EdgeInsets.all(60.h), - ) + src: "assets/image/xiao_fei.webp", + isShowBtn: false, + text: "当前分类暂无商品", + fontSize: 16.sp, + margin: EdgeInsets.all(60.h), + ) : GridView.builder( - itemCount: widget.goods == null ? 0 : widget.goods.length, - padding: EdgeInsets.only( - left: 16.w, - right: 16.w, - top: 18.h, - bottom: 16.h, - ), - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - //一行的Widget数量 - crossAxisCount: 2, - //水平子Widget之间间距 - crossAxisSpacing: 11.w, - //垂直子Widget之间间距 - mainAxisSpacing: 16.w, - //子Widget宽高比例 0.59 - childAspectRatio: - 200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)), - ), - itemBuilder: (context, index) { - return GestureDetector( - onTap: () { - widget.onTap(index); - }, - child: buildItem(widget.goods[index]), - ); - }, - ), + itemCount: widget.goods == null ? 0 : widget.goods.length, + padding: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 18.h, + bottom: 16.h, + ), + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + //一行的Widget数量 + crossAxisCount: 2, + //水平子Widget之间间距 + crossAxisSpacing: 11.w, + //垂直子Widget之间间距 + mainAxisSpacing: 16.w, + //子Widget宽高比例 0.59 + childAspectRatio: + 200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)), + ), + itemBuilder: (context, index) { + return GestureDetector( + onTap: () { + widget.onTap(index); + }, + child: buildItem(widget.goods[index]), + ); + }, + ), ); } @@ -112,8 +110,8 @@ class _PointGoods extends State { mainAxisSize: MainAxisSize.max, children: [ MImage( - goods.mainImgPath, - aspectRatio: 158 / 158, + goods.mainImgPath ?? "", + aspectRatio: 1, radius: BorderRadius.only( topLeft: Radius.circular(6), topRight: Radius.circular(6), @@ -134,16 +132,17 @@ class _PointGoods extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( - child: Text( - goods.name, - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - color: Color(0xff353535), - fontWeight: MyFontWeight.medium, - fontSize: 15.sp, + child: Text( + goods.name ?? "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + color: Color(0xff353535), + fontWeight: MyFontWeight.medium, + fontSize: 15.sp, + ), ), - )), + ), SizedBox( height: 5.h, ), diff --git a/lib/home/points_mall_view/points_mall_banner.dart b/lib/home/points_mall_view/points_mall_banner.dart index 71624054..03337538 100644 --- a/lib/home/points_mall_view/points_mall_banner.dart +++ b/lib/home/points_mall_view/points_mall_banner.dart @@ -2,8 +2,8 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/banner.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -52,8 +52,8 @@ class _PointMallBanner extends State { borderRadius: BorderRadius.circular(8), ), child: MImage( - widget.bannerData != null && position < widget.bannerData.length - ? widget.bannerData[position].imgUrl + position < widget.bannerData.length + ? widget.bannerData[position].imgUrl ?? "" : "", radius: BorderRadius.circular(8), fit: BoxFit.cover, @@ -63,7 +63,7 @@ class _PointMallBanner extends State { ), ); }, - itemCount: (widget.bannerData != null && widget.bannerData.length > 0) ? widget.bannerData.length : 1, + itemCount: (widget.bannerData.isNotEmpty) ? widget.bannerData.length : 1, ), ), ); @@ -89,8 +89,11 @@ class _PointMallBanner extends State { }); break; case 4: - String router = bannerData.content; - if (router.contains("?")) { + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + if (router!.contains("?")) { String params = router.substring(router.indexOf("?")); params = params.replaceAll("?", ""); Map map = jsonDecode(params); @@ -106,9 +109,13 @@ class _PointMallBanner extends State { }); break; case 7: - String params = bannerData.content.substring(bannerData.content.indexOf("?")+1); + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?")+1); Map map = jsonDecode(params); - Navigator.of(context).pushNamed(bannerData.content.substring(0,bannerData.content.indexOf("?")), arguments: map); + Navigator.of(context).pushNamed(router.substring(0, router.indexOf("?")), arguments: map); break; } } diff --git a/lib/home/start_page.dart b/lib/home/start_page.dart index c01cd66c..917eb0e7 100644 --- a/lib/home/start_page.dart +++ b/lib/home/start_page.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class StartPage extends StatefulWidget { diff --git a/lib/home/trading_card_page.dart b/lib/home/trading_card_page.dart index 919e0a0f..80e6f212 100644 --- a/lib/home/trading_card_page.dart +++ b/lib/home/trading_card_page.dart @@ -1,9 +1,8 @@ -import 'dart:convert'; - import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -11,7 +10,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../retrofit/data/user_info.dart'; +import '../data/user_info.dart'; import '../view_widget/classic_header.dart'; import '../view_widget/my_footer.dart'; @@ -23,9 +22,9 @@ class TradingCardPage extends StatefulWidget { } class _TradingCardPage extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); - UserInfo userInfo; + UserInfo? userInfo; @override void initState() { @@ -45,17 +44,18 @@ class _TradingCardPage extends State { ///查询会员信息 queryUserBalance() async { - BaseData baseData = - await apiService.queryInfo().catchError((onError) { + BaseData? baseData = + await apiService?.queryInfo().catchError((onError) { refreshController.refreshFailed(); - refreshController.loadFailed();}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; + refreshController.loadFailed(); + }); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; if (mounted) setState(() {}); refreshController.refreshCompleted(); refreshController.loadComplete(); - }else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + } else { + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); refreshController.refreshFailed(); refreshController.loadFailed(); } @@ -84,7 +84,7 @@ class _TradingCardPage extends State { titleColor: Colors.white, background: Colors.transparent, leadingColor: Colors.white, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, ), body: SmartRefresher( controller: refreshController, @@ -100,105 +100,118 @@ class _TradingCardPage extends State { ), onRefresh: () { queryUserBalance(); - }, + }, physics: BouncingScrollPhysics(), scrollController: ScrollController(), child: SingleChildScrollView( physics: BouncingScrollPhysics(), - child:Container( - margin: EdgeInsets.symmetric(horizontal:14.w), - child:Column( + child: Container( + margin: EdgeInsets.symmetric(horizontal: 14.w), + child: Column( children: [ Container( width: double.infinity, - padding:EdgeInsets.only(top:24.h,bottom: 27.h) , + padding: EdgeInsets.only(top: 24.h, bottom: 27.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12), boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 4), - blurRadius: 8, - spreadRadius: 8, - ) - ], + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 4), + blurRadius: 8, + spreadRadius: 8, + ) + ], ), - child: Column( - children:[ - Image.asset( - "assets/image/my_trading.webp", - width:200.w, - fit: BoxFit.fill, - height:22.h, - ), - SizedBox(height:28.h), - Image.asset( - "assets/image/trading_logo.webp", - width:196.w, - fit: BoxFit.fill, - height:150.h, - ), - Padding(padding:EdgeInsets.only(top: 21.h,bottom: 17.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "我已收集", - style: TextStyle( - color: Colors.black, - fontSize: 14.sp, - fontWeight: MyFontWeight.regular), + child: Column(children: [ + Image.asset( + "assets/image/my_trading.webp", + width: 200.w, + fit: BoxFit.fill, + height: 22.h, + ), + SizedBox(height: 28.h), + Image.asset( + "assets/image/trading_logo.webp", + width: 196.w, + fit: BoxFit.fill, + height: 150.h, + ), + Padding( + padding: EdgeInsets.only(top: 21.h, bottom: 17.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "我已收集", + style: TextStyle( + color: Colors.black, + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ), + SizedBox( + width: 12.w, + ), + Text( + "${userInfo?.happyBean ?? 0}", + style: TextStyle( + color: Color(0xFF32A060), + fontSize: 18.sp, + fontWeight: MyFontWeight.regular, ), - SizedBox(width: 12.w,), - Text( - (userInfo?.happyBean ?? 0).toString(), - style: TextStyle( + ) + ], + ), + ), + Padding( + padding: EdgeInsets.only(bottom: 31.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(right: 1.w), + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed( + '/router/welfare_exchange'); + }, + child: Text( + "兑换区逛逛", + style: TextStyle( color: Color(0xFF32A060), - fontSize: 18.sp, - fontWeight: MyFontWeight.regular), - ) - ], - ),), - Padding(padding:EdgeInsets.only(bottom:31.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding(padding:EdgeInsets.only(right:1.w), - child: GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed('/router/welfare_exchange'); - }, - child: Text( - "兑换区逛逛", - style: TextStyle( - color: Color(0xFF32A060), - fontSize: 15.sp, - fontWeight: MyFontWeight.regular), - ), - )), - Image.asset( - "assets/image/icon_right_z.webp", - width:16, - fit: BoxFit.fill, - height:16, - color: Color(0xFF32A060), - ) - ], - ),), - Image.asset( - "assets/image/trading_text.webp", - width:314.w, - fit: BoxFit.fill, - height:98.h, - ), - ] - ), + fontSize: 15.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + ), + Image.asset( + "assets/image/icon_right_z.webp", + width: 16, + fit: BoxFit.fill, + height: 16, + color: Color(0xFF32A060), + ) + ], + ), + ), + Image.asset( + "assets/image/trading_text.webp", + width: 314.w, + fit: BoxFit.fill, + height: 98.h, + ), + ]), ), Container( width: double.infinity, - padding:EdgeInsets.symmetric(vertical: 17.h,horizontal: 32.w) , - margin: EdgeInsets.only(top:16.h), + padding: EdgeInsets.symmetric( + vertical: 17.h, + horizontal: 32.w, + ), + margin: EdgeInsets.only(top: 16.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12), @@ -208,65 +221,78 @@ class _TradingCardPage extends State { offset: Offset(0, 4), blurRadius: 8, spreadRadius: 8, - ) + ), ], ), child: Row( children: [ Image.asset( "assets/image/trading_history.webp", - width:16.h, + width: 16.h, fit: BoxFit.fill, - height:16.h, + height: 16.h, ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap:(){ + onTap: () { Navigator.of(context) .pushNamed('/router/exchange_history_page'); }, - child: Padding(padding:EdgeInsets.only(left: 4.w), - child: Text( - "兑换记录", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular), - )), + child: Padding( + padding: EdgeInsets.only(left: 4.w), + child: Text( + "兑换记录", + style: TextStyle( + color: Color(0xFF0D0D0D), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), ), Spacer(), Container( width: 1.w, - height: 35.5.h, - margin: EdgeInsets.symmetric(), - color:Color(0xFFD8D8D8)), + height: 35.5.h, + margin: EdgeInsets.symmetric(), + color: Color(0xFFD8D8D8), + ), Spacer(), Image.asset( "assets/image/trading_detail.webp", - width:16.h, + width: 16.h, fit: BoxFit.fill, - height:16.h, + height: 16.h, ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pushNamed('/router/integral_detailed_page',arguments:{"titleType":1}); + onTap: () { + Navigator.of(context).pushNamed( + '/router/integral_detailed_page', + arguments: {"titleType": 1}); }, - child: Padding(padding:EdgeInsets.only(left: 4.w), + child: Padding( + padding: EdgeInsets.only(left: 4.w), child: Text( "印章明细", style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular), - )),) + color: Color(0xFF0D0D0D), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + ), ], ), ), Container( width: double.infinity, - padding:EdgeInsets.symmetric(vertical:12.h,horizontal: 11.w) , - margin: EdgeInsets.only(top:16.h), + padding: EdgeInsets.symmetric( + vertical: 12.h, + horizontal: 11.w, + ), + margin: EdgeInsets.only(top: 16.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12), @@ -276,39 +302,46 @@ class _TradingCardPage extends State { offset: Offset(0, 4), blurRadius: 8, spreadRadius: 8, - ) + ), ], ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding(padding:EdgeInsets.only(bottom:14.h), - child: Text( - "规则介绍", - style: TextStyle( + Padding( + padding: EdgeInsets.only(bottom: 14.h), + child: Text( + "规则介绍", + style: TextStyle( color: Color(0xFF0D0D0D), fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold), - ),), - Padding(padding:EdgeInsets.only(bottom:12.h), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ), + Padding( + padding: EdgeInsets.only(bottom: 12.h), child: Text( "(1) 商品中所要求的印章达到方可兑换", style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular), - ),), + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), Text( "(2) 印章卡仅兑换商城指定商品,不能折算现金或兑换其他非指定商品项目", style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - height: 1.5.h, - fontWeight: MyFontWeight.regular), + color: Color(0xFF353535), + fontSize: 12.sp, + height: 1.5.h, + fontWeight: MyFontWeight.regular, + ), ), ], ), - ) + ), ], ), ), diff --git a/lib/home/welfare_exchange.dart b/lib/home/welfare_exchange.dart index 7bf61590..1df4db69 100644 --- a/lib/home/welfare_exchange.dart +++ b/lib/home/welfare_exchange.dart @@ -1,14 +1,13 @@ import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; -import 'package:huixiang/retrofit/data/goods_category.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/goods_category.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -30,7 +29,7 @@ class WelfareExchange extends StatefulWidget { class _WelfareExchange extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); int pageNum = 1; @@ -42,8 +41,8 @@ class _WelfareExchange extends State List goods = []; List gooods = []; List gooodsCategorys = []; - UserInfo userInfo; - String categoryId; + UserInfo? userInfo; + String? categoryId; @override void dispose() { @@ -56,102 +55,103 @@ class _WelfareExchange extends State super.initState(); SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: false), + context: context, + token: value.getString("token"), + showLoading: false), creditGoods(), }); } queryUser() async { - BaseData baseData = - await apiService.queryInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; - SharedPreferences.getInstance().then((value) => { - value.setString('user', jsonEncode(baseData.data)), - }); - } + BaseData? baseData = + await apiService?.queryInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; + SharedPreferences.getInstance().then((value) => { + value.setString('user', jsonEncode(baseData.data)), + }); + } } creditGoods({bool isLoading = true}) async { - try{ - if(isLoading) - EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - - final SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString('token'), showLoading: false); + try { + if (isLoading) + EasyLoading.show( + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black); - await queryUser(); + final SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService(Dio(), + context: context, + token: value.getString('token'), + showLoading: false); - BaseData> goodsData = await apiService.creditGoods({ - "orderDesc": true, - "orderType": 1, - "pageNum": 1, - "pageSize": 100, - "state": 1 - }).catchError((onError) { - refreshController.refreshFailed(); - }); - if (goodsData != null && goodsData.isSuccess) { - gooods.clear(); - gooods.addAll(goodsData.data.list); - } + await queryUser(); - BaseData> dataCategory = - await apiService.goodsCategory({ - "current": 1, - "map": {}, - "model": {"pageNum": 1, "pageSize": 20, "searchKey": ""}, - "order": "descending", - "size": 20, - "sort": "sortOrder" - }).catchError((onError) { - refreshController.loadFailed(); - refreshController.refreshFailed(); - }); + BaseData>? goodsData = await apiService?.creditGoods({ + "orderDesc": true, + "orderType": 1, + "pageNum": 1, + "pageSize": 100, + "state": 1 + }).catchError((onError) { + refreshController.refreshFailed(); + }); + if (goodsData?.isSuccess ?? false) { + gooods.clear(); + gooods.addAll(goodsData?.data?.list ?? []); + } - if (dataCategory != null && - dataCategory.isSuccess && - dataCategory.data != null && - dataCategory.data.records != null && - dataCategory.data.records.length > 0) { - gooodsCategorys.clear(); - gooodsCategorys.add(GoodsCategory(name: S - .of(context) - .quanbu)); - gooodsCategorys.addAll(dataCategory.data.records); - } + BaseData>? dataCategory = + await apiService?.goodsCategory({ + "current": 1, + "map": {}, + "model": {"pageNum": 1, "pageSize": 20, "searchKey": ""}, + "order": "descending", + "size": 20, + "sort": "sortOrder" + }).catchError((onError) { + refreshController.loadFailed(); + refreshController.refreshFailed(); + }); - var param = { - "categoryId": categoryId ?? "", - "orderDesc": orderDesc, - "orderType": orderType, - "pageNum": pageNum, - "pageSize": 100, - "state": 1 - }; - BaseData> pageGoods = - await apiService.creditGoods(param).catchError((onError) { - refreshController.loadFailed(); - refreshController.refreshFailed(); - }); - if (pageGoods != null && pageGoods.isSuccess) { - if (pageNum == 1) { - goods.clear(); + if ((dataCategory?.isSuccess ?? false) && + (dataCategory?.data?.records?.isNotEmpty ?? false)) { + gooodsCategorys.clear(); + gooodsCategorys.add(GoodsCategory()..name = S.of(context).quanbu); + gooodsCategorys.addAll(dataCategory?.data?.records ?? []); } - goods.addAll(pageGoods.data.list); - refreshController.refreshCompleted(); - refreshController.loadComplete(); - if (pageGoods.data.pageNum == pageGoods.data.pages) { - refreshController.loadNoData(); + + var param = { + "categoryId": categoryId ?? "", + "orderDesc": orderDesc, + "orderType": orderType, + "pageNum": pageNum, + "pageSize": 100, + "state": 1 + }; + BaseData>? pageGoods = + await apiService?.creditGoods(param).catchError((onError) { + refreshController.loadFailed(); + refreshController.refreshFailed(); + }); + if (pageGoods?.isSuccess ?? false) { + if (pageNum == 1) { + goods.clear(); + } + goods.addAll(pageGoods?.data?.list ?? []); + refreshController.refreshCompleted(); + refreshController.loadComplete(); + if (pageGoods?.data?.pageNum == pageGoods?.data?.pages) { + refreshController.loadNoData(); + } else { + pageNum += 1; + } } else { - pageNum += 1; + refreshController.loadFailed(); + refreshController.refreshFailed(); } - } else { - refreshController.loadFailed(); - refreshController.refreshFailed(); - } - }finally{ + } finally { EasyLoading.dismiss(); setState(() {}); } @@ -216,7 +216,8 @@ class _WelfareExchange extends State ), ], )), - expandedHeight: MediaQuery.of(context).size.height >= 750 ? 245.h : 258.h, + expandedHeight: + MediaQuery.of(context).size.height >= 750 ? 245.h : 258.h, bottom: PreferredSize( preferredSize: Size(double.infinity, 0), child: DefaultTabController( @@ -242,11 +243,10 @@ class _WelfareExchange extends State unselectedLabelColor: Color(0xff4D4D4D), indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 - tabs: gooodsCategorys == null - ? [] - : gooodsCategorys - .map((e) => MyTab(text: e.name)) - .toList(), + tabs: gooodsCategorys + ?.map((e) => MyTab(text: "${e.name}")) + .toList() ?? + [], onTap: (index) { categoryId = gooodsCategorys[index].id; pageNum = 1; @@ -298,7 +298,7 @@ class _WelfareExchange extends State child: Row( children: [ MImage( - userInfo != null ? userInfo.headimg : "", + userInfo?.headimg ?? "", width: 50, height: 50, isCircle: true, @@ -324,7 +324,7 @@ class _WelfareExchange extends State ), ) : Text( - userInfo.nickname, + userInfo?.nickname ?? "", style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.bold, @@ -381,16 +381,18 @@ class _WelfareExchange extends State color: Color(0xFF4C4C4C), ), ), - Padding(padding:EdgeInsets.only(left:2.w), - child: Text( - (userInfo != null) ? "${userInfo.points}" : "", - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF32A060), - fontFamily: 'JDZhengHT', - fontWeight: MyFontWeight.medium, + Padding( + padding: EdgeInsets.only(left: 2.w), + child: Text( + "${userInfo?.points}" ?? "", + style: TextStyle( + fontSize: 16.sp, + color: Color(0xFF32A060), + fontFamily: 'JDZhengHT', + fontWeight: MyFontWeight.medium, + ), ), - ),), + ), SizedBox( width: 4.w, ), @@ -398,7 +400,7 @@ class _WelfareExchange extends State "assets/image/icon_gold_coin.webp", width: 18, height: 18, - ) + ), ], ), SizedBox( @@ -414,29 +416,31 @@ class _WelfareExchange extends State color: Color(0xFF4C4C4C), ), ), - Padding(padding:EdgeInsets.only(left:2.w), + Padding( + padding: EdgeInsets.only(left: 2.w), child: Text( - (userInfo != null) ? "${userInfo?.happyBean ?? 0}" : "", + "${userInfo?.happyBean ?? 0}" ?? "", style: TextStyle( fontSize: 16.sp, color: Color(0xFF32A060), fontFamily: 'JDZhengHT', fontWeight: MyFontWeight.medium, ), - ),), + ), + ), SizedBox( - width:4.w, + width: 4.w, ), Image.asset( "assets/image/trading_logo.webp", width: 18, height: 18, - ) + ), ], ), ], ), - ) + ), ], ), ); @@ -444,16 +448,18 @@ class _WelfareExchange extends State Widget pointList() { return Container( - child: (goods == null || goods.length == 0) + child: (goods?.isEmpty ?? true) ? NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, text: "当前分类暂无商品", fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), + margin: EdgeInsets.only( + top: 120.h, left: 60.w, right: 60.w, + ), ) : GridView.builder( - itemCount: goods == null ? 0 : goods.length, + itemCount: goods?.length ?? 0, padding: EdgeInsets.only( left: 16.w, right: 16.w, @@ -470,8 +476,7 @@ class _WelfareExchange extends State //垂直子Widget之间间距 mainAxisSpacing: 16.w, //子Widget宽高比例 0.59 - childAspectRatio: - 200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)), + childAspectRatio: 200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)), ), itemBuilder: (context, index) { return GestureDetector( @@ -500,7 +505,7 @@ class _WelfareExchange extends State offset: Offset(0, 2), blurRadius: 4, spreadRadius: 0, - ) + ), ], ), child: Stack( @@ -513,7 +518,7 @@ class _WelfareExchange extends State mainAxisSize: MainAxisSize.max, children: [ MImage( - goods.mainImgPath, + goods.mainImgPath ?? "", aspectRatio: 1.1, fit: BoxFit.cover, radius: BorderRadius.only( @@ -535,7 +540,7 @@ class _WelfareExchange extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - goods.name, + goods.name ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -570,23 +575,20 @@ class _WelfareExchange extends State } String pointPrice(Goods goods) { - if (goods == null) return ""; - if(goods?.oneBean!=null && goods?.oneBean!="0"){ - return "${goods?.oneBean}印章"; - } else if (goods?.onePrice != null && goods?.onePrice != "0") { - return S.of(context).jifen_(goods?.onePrice); - } else if ((goods?.onePrice == null || goods?.onePrice == "0") && - ((goods?.price != null && goods?.price != "0") || - (goods?.money != null && goods?.money != "0.00"))) { - return (goods?.price == "0" || goods?.price == null - ? "" - : S.of(context).jifen_(goods?.price)) + - (goods?.money == "0" || goods?.money == null + if (goods.oneBean != "0") { + return "${goods.oneBean}印章"; + } else if (goods.onePrice != "0") { + return S.of(context).jifen_("${goods.onePrice}"); + } else if ((goods.onePrice == "0") && + ((goods.price != "0") || (goods.money != "0.00"))) { + return (goods.price == "0" ? "" : S.of(context).jifen_("${goods.price}")) + + (goods.money == "0" ? "" - : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}元"); - } else if (goods.oneMoney != null && goods.oneMoney != "0.00") { - return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}元"; + : " + ${AppUtils.calculateDouble(double.tryParse("${goods.money}") ?? 0)}元"); + } else if (goods.oneMoney != "0.00") { + return "${AppUtils.calculateDouble(double.tryParse("${goods.oneMoney}") ?? 0)}元"; } + return ""; } @override diff --git a/lib/home/welfare_page.dart b/lib/home/welfare_page.dart index c3fdf164..0b99abd7 100644 --- a/lib/home/welfare_page.dart +++ b/lib/home/welfare_page.dart @@ -1,16 +1,14 @@ -import 'dart:convert'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -23,7 +21,6 @@ import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:huixiang/view_widget/receive_success.dart'; import 'package:huixiang/view_widget/selector_store_dialog.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import '../view_widget/settlement_tips_dialog.dart'; @@ -35,13 +32,13 @@ class WelfarePage extends StatefulWidget { } class _WelfarePage extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); List goods = []; - Goods goodsPrice; + Goods? goodsPrice; List coupons = []; List> coupon = []; - String categoryId; + String? categoryId; bool orderDesc = true; int orderType = 1; int type = 1; @@ -65,15 +62,14 @@ class _WelfarePage extends State { "pageSize": 100, "state": 1 }; - BaseData> pageGoods = - await apiService.creditGoods(param).catchError((onError) { + BaseData>? pageGoods = await apiService?.creditGoods(param).catchError((onError) { refreshController.loadFailed(); refreshController.refreshFailed(); }); EasyLoading.dismiss(); - if (pageGoods != null && pageGoods.isSuccess) { + if (pageGoods?.isSuccess ?? false) { goods.clear(); - goods.addAll(pageGoods.data.list); + goods.addAll(pageGoods?.data?.list ?? []); } } finally { addLoadCount(); @@ -82,43 +78,39 @@ class _WelfarePage extends State { queryCoupon() async { try{ - BaseData> baseData = await apiService.queryCoupon({ - "centre": true, - "pageNum": 1, - "pageSize": 100, - "searchKey": "", - "state": 0 - }).catchError((onError) { - SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), - alignment: Alignment.center); - }); - coupons.clear(); - coupon.clear(); - if (baseData != null && baseData.isSuccess) { - coupons.addAll(baseData.data.list); - for (var i = 0; i < coupons.length ~/ 3 + 1; i++) { - List con = []; - con = coupons - .skip(i * 3) - .take((i * 3 < coupons.length) ? 3 : (coupons.length - (i * 3))) - .toList(); - coupon.add(con); + BaseData>? baseData = await apiService?.queryCoupon({ + "centre": true, + "pageNum": 1, + "pageSize": 100, + "searchKey": "", + "state": 0 + }).catchError((onError) { + SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), + alignment: Alignment.center); + }); + coupons.clear(); + coupon.clear(); + if (baseData?.isSuccess ?? false) { + coupons.addAll(baseData?.data?.list ?? []); + for (var i = 0; i < coupons.length ~/ 3 + 1; i++) { + List con = []; + con = coupons + .skip(i * 3) + .take((i * 3 < coupons.length) ? 3 : (coupons.length - (i * 3))) + .toList(); + coupon.add(con); + } + if (coupon.length > 0 && coupon[coupon.length - 1].isEmpty) + coupon.removeAt(coupon.length - 1); + setState(() {}); } - if (coupon.length > 0 && coupon[coupon.length - 1].isEmpty) - coupon.removeAt(coupon.length - 1); - setState(() {}); - }}finally{ + } finally { addLoadCount(); } } _onRefresh() async{ EasyLoading.show(status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); - } queryGoods(); queryCoupon(); } @@ -163,7 +155,7 @@ class _WelfarePage extends State { title: S.of(context).fulizhongxin, titleColor: Colors.white, titleSize: 18.sp, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, ), body: SmartRefresher( controller: refreshController, @@ -318,7 +310,7 @@ class _WelfarePage extends State { Widget weekList(List cops) { return Expanded( - child: (cops == null && cops.length == 0) + child: (cops?.isEmpty ?? true) ? NoDataView( src: "assets/image/ka.webp", isShowBtn: false, @@ -327,7 +319,7 @@ class _WelfarePage extends State { ) : ListView.builder( padding: EdgeInsets.zero, - itemCount: cops.length, + itemCount: cops.length ?? 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -366,7 +358,7 @@ class _WelfarePage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - cop != null ? cop.couponName ?? "" : "", + cop.couponName ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -380,7 +372,7 @@ class _WelfarePage extends State { ), (cop.status == 0) ? Text( - "发放时间: ${cop?.publishStartTime ?? ""}", + "发放时间: ${cop.publishStartTime ?? ""}", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -392,7 +384,7 @@ class _WelfarePage extends State { ), ) : Text( - "有效期至 ${cop?.useEndTime ?? ""}", + "有效期至 ${cop.useEndTime ?? ""}", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -405,7 +397,8 @@ class _WelfarePage extends State { ) ], ), - )), + ), + ), Column( // mainAxisAlignment: MainAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.end, @@ -416,7 +409,7 @@ class _WelfarePage extends State { child: weekBtn(cop), ) ], - ) + ), ], ), ); @@ -447,11 +440,7 @@ class _WelfarePage extends State { height: 4.h, ), Text( - coupon != null - ? double.tryParse("${cop.discountAmount}" ?? "0") - .toInt() - .toString() - : "", + "${double.tryParse("${cop.discountAmount}")?.toInt()}", style: TextStyle( fontSize: 24.sp, fontWeight: MyFontWeight.semi_bold, @@ -462,8 +451,7 @@ class _WelfarePage extends State { ], ), Text( - S.of(context).manyuankeyong( - coupon != null ? ("${cop.fullAmount}" ?? "0").toString() : ""), + S.of(context).manyuankeyong("${cop.fullAmount}"), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, @@ -487,8 +475,7 @@ class _WelfarePage extends State { style: TextStyle( fontSize: 22.sp, fontWeight: MyFontWeight.semi_bold, - color: - cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), + color: cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), ), ), ], @@ -519,8 +506,7 @@ class _WelfarePage extends State { style: TextStyle( fontSize: 26.sp, fontWeight: MyFontWeight.semi_bold, - color: - cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), + color: cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), ), ), ], @@ -551,8 +537,7 @@ class _WelfarePage extends State { style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.medium, - color: - cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), + color: cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), ), ), SizedBox( @@ -560,15 +545,12 @@ class _WelfarePage extends State { ), Text( cop.limitAmount != "0.00" - ? (coupon != null - ? "${AppUtils.calculateDouble(double.tryParse(cop.limitAmount) ?? 0)}" - : "") + ? "${AppUtils.calculateDouble(double.tryParse("${cop.limitAmount}") ?? 0)}" : "", style: TextStyle( fontSize: 24.sp, fontWeight: FontWeight.bold, - color: - cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), + color: cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), ), ), ], @@ -587,16 +569,12 @@ class _WelfarePage extends State { children: [ Text( cop.discountPercent != 0 - ? (coupon != null - ? "${(cop.discountPercent / 10.0 >= 10) ? 10 : cop.discountPercent / 10.0}" ?? - "0" - : "") + ? "${((cop.discountPercent ?? 0) / 10.0 >= 10) ? 10 : (cop.discountPercent ?? 0) / 10.0}" : "", style: TextStyle( fontSize: 30.sp, fontWeight: MyFontWeight.semi_bold, - color: - cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), + color: cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), ), ), SizedBox( @@ -607,8 +585,7 @@ class _WelfarePage extends State { style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.semi_bold, - color: - cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), + color: cop.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), ), ), ], @@ -665,7 +642,10 @@ class _WelfarePage extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(3), border: Border.all( - width: 1, color: Color(0xFF32A060), style: BorderStyle.solid), + width: 1, + color: Color(0xFF32A060), + style: BorderStyle.solid, + ), color: Colors.transparent, ), alignment: Alignment.center, @@ -680,13 +660,14 @@ class _WelfarePage extends State { ), ), ); + return SizedBox(); } ///领取优惠券 receiveCoupon(couponId) async { couponIndex = swiperIndex; - BaseData baseData = await apiService.receiveCoupon(couponId); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(couponId); + if (baseData?.isSuccess ?? false) { queryCoupon(); showAlertDialog(); } else { @@ -694,7 +675,7 @@ class _WelfarePage extends State { clickBgDismissTemp: false, widget: SettlementTips( () {}, - text: baseData.msg, + text: "${baseData?.msg}", )); } } @@ -803,7 +784,7 @@ class _WelfarePage extends State { SizedBox( height: 12, ), - (goods == null || goods.length == 0) + (goods.length == 0) ? NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, @@ -874,7 +855,7 @@ class _WelfarePage extends State { mainAxisSize: MainAxisSize.max, children: [ MImage( - goods.mainImgPath, + goods.mainImgPath ?? "", aspectRatio: 1.1, fit: BoxFit.cover, radius: BorderRadius.only( @@ -896,7 +877,7 @@ class _WelfarePage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - goods.name, + goods.name ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -929,23 +910,23 @@ class _WelfarePage extends State { } String pointPrice(Goods goodsPrice) { - if (goodsPrice == null) return ""; - if (goodsPrice?.oneBean != null && goodsPrice?.oneBean != "0") { - return "${goodsPrice?.oneBean}印章"; - } else if (goodsPrice?.onePrice != null && goodsPrice?.onePrice != "0") { - return S.of(context).jifen_(goodsPrice?.onePrice); - } else if ((goodsPrice?.onePrice == null || goodsPrice?.onePrice == "0") && - ((goodsPrice?.price != null && goodsPrice?.price != "0") || - (goodsPrice?.money != null && goodsPrice?.money != "0.00"))) { - return (goodsPrice?.price == "0" || goodsPrice?.price == null + if (goodsPrice.oneBean != "0") { + return "${goodsPrice.oneBean}印章"; + } else if (goodsPrice.onePrice != "0") { + return S.of(context).jifen_("${goodsPrice.onePrice}"); + } else if ((goodsPrice.onePrice == "0") && + ((goodsPrice.price != "0") || + (goodsPrice.money != "0.00"))) { + return (goodsPrice.price == "0" ? "" - : S.of(context).jifen_(goodsPrice?.price)) + - (goodsPrice?.money == "0" || goodsPrice?.money == null + : S.of(context).jifen_("${goodsPrice.price}")) + + (goodsPrice.money == "0" ? "" - : " + ${AppUtils.calculateDouble(double.tryParse(goodsPrice?.money) ?? 0)}元"); - } else if (goodsPrice.oneMoney != null && goodsPrice.oneMoney != "0.00") { - return "${AppUtils.calculateDouble(double.tryParse(goodsPrice.oneMoney) ?? 0)}元"; + : " + ${AppUtils.calculateDouble(double.tryParse("${goodsPrice.money}") ?? 0)}元"); + } else if (goodsPrice.oneMoney != "0.00") { + return "${AppUtils.calculateDouble(double.tryParse("${goodsPrice.oneMoney}") ?? 0)}元"; } + return ""; } ///活动任务 @@ -1080,7 +1061,7 @@ class _WelfarePage extends State { color: Color(0xFFFFFFFF), ), ), - ) + ), ], ), ); diff --git a/lib/integral/integral_detailed_page.dart b/lib/integral/integral_detailed_page.dart index 79f56d29..dd0a1580 100644 --- a/lib/integral/integral_detailed_page.dart +++ b/lib/integral/integral_detailed_page.dart @@ -3,10 +3,10 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_bill.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_bill.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -30,10 +30,10 @@ class IntegralDetailedPage extends StatefulWidget { class _IntegralDetailedPage extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - List _tabs; - TabController tabController; - ApiService apiService; - UserInfo userInfo; + List _tabs = []; + TabController? tabController; + ApiService? apiService; + UserInfo? userInfo; int current = 1; List userBill = []; RefreshController refreshController = RefreshController(); @@ -52,7 +52,7 @@ class _IntegralDetailedPage extends State tabController = TabController(length: 2, vsync: this) ..addListener(() { current = 1; - if (tabController.index == 0) { + if (tabController?.index == 0) { queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_ADD" :""); } else { queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_sub",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :""); @@ -73,13 +73,13 @@ class _IntegralDetailedPage extends State SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), context: context, token: value.getString("token")), - userInfo = UserInfo.fromJson(jsonDecode(value.getString('user'))), + userInfo = UserInfo.fromJson(jsonDecode(value.getString('user') ?? "")), queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_ADD" :""), }); } queryDetail(category,type) async { - BaseData> baseData = await apiService.queryBillInfo({ + BaseData>? baseData = await apiService?.queryBillInfo({ "current": current, "model": {"category": category, "title": widget.arguments["titleType"] == 1 ? "":"bill_title_point", "type": type}, "order": "descending", @@ -90,11 +90,11 @@ class _IntegralDetailedPage extends State refreshController.refreshFailed(); }); if (current == 1) userBill.clear(); - if (baseData != null && baseData.isSuccess) { - userBill.addAll(baseData.data.records); + if (baseData?.isSuccess ?? false) { + userBill.addAll(baseData?.data?.records ?? []); refreshController.loadComplete(); refreshController.refreshCompleted(); - if (current * 10 > int.tryParse(baseData.data.total)) { + if (current * 10 > (int.tryParse("${baseData?.data?.total}") ?? 0)) { refreshController.loadNoData(); } else { current += 1; @@ -109,7 +109,7 @@ class _IntegralDetailedPage extends State _onRefresh() { current = 1; - if (tabController.index == 0) { + if (tabController?.index == 0) { queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_ADD" :""); } else { queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_sub",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :""); @@ -117,7 +117,7 @@ class _IntegralDetailedPage extends State } _loadMore() { - if (tabController.index == 0) { + if (tabController?.index == 0) { queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_get",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :""); } else { queryDetail(widget.arguments["titleType"] == 1 ? "" : "bill_cate_point_sub",widget.arguments["titleType"] == 1 ?"BILL_TYPE_BEAN_SUB" :""); @@ -136,8 +136,10 @@ class _IntegralDetailedPage extends State elevation: 0, title: Text( S.of(context).mingxi, - style: - TextStyle(fontWeight: FontWeight.w500, color: Colors.white), + style: TextStyle( + fontWeight: FontWeight.w500, + color: Colors.white, + ), ), centerTitle: false, leading: GestureDetector( @@ -174,7 +176,7 @@ class _IntegralDetailedPage extends State crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - userInfo != null ? (widget.arguments["titleType"] == 1 ? (userInfo?.happyBean ?? 0) : userInfo.points) : "0", + userInfo != null ? (widget.arguments["titleType"] == 1 ? (userInfo?.happyBean ?? "0") : "${userInfo?.points}") : "0", style: TextStyle( color: Colors.white, fontWeight: MyFontWeight.medium, @@ -233,7 +235,7 @@ class _IntegralDetailedPage extends State ), onRefresh: _onRefresh, onLoading: _loadMore, - child: (userBill == null || userBill.length == 0) + child: (userBill.length == 0) ? NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, @@ -292,7 +294,7 @@ class _IntegralDetailedPage extends State Container( margin: EdgeInsets.only(top: 2.h), child: Text( - "${tabController.index == 0 ? "+" : "-"}${double.tryParse(userBill[position].number ?? "0").toInt().toString()}", + "${tabController?.index == 0 ? "+" : "-"}${(double.tryParse("${userBill[position].number}") ?? 0).toInt()}", style: TextStyle( color: Color(0xFF4D4D4D), fontSize: 14.sp, @@ -353,7 +355,8 @@ class _IntegralDetailedPage extends State // ], // ), ); - }), + }, + ), ), ), ), diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index 771ec56e..6698e627 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -1,15 +1,16 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/integral/intergra_view/in_for_points.dart'; import 'package:huixiang/integral/intergra_view/integral_vip.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/rank.dart'; -import 'package:huixiang/retrofit/data/sign_info.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/rank.dart'; +import 'package:huixiang/data/sign_info.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -30,10 +31,10 @@ class IntegralPage extends StatefulWidget { } class _IntegralPage extends State { - ApiService apiService; - SignInfo signInfo; + ApiService? apiService; + SignInfo? signInfo; - UserInfo userInfo; + UserInfo? userInfo; List ranks = []; int rankLevel = 1; final ScrollController scrollController = ScrollController(); @@ -49,35 +50,28 @@ class _IntegralPage extends State { token: value.getString("token"), showLoading: false, ); - userInfo = UserInfo.fromJson(jsonDecode(value.getString("user"))); + userInfo = UserInfo.fromJson(jsonDecode(value.getString("user")??"")); - BaseData> rankData = - await apiService.rankList().catchError((onError) { + BaseData>? rankData = await apiService?.rankList().catchError((onError) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), alignment: Alignment.center); refreshController.refreshFailed(); }); - if (rankData != null && rankData.isSuccess) { + if (rankData?.isSuccess ?? false) { ranks.clear(); - ranks.addAll(rankData.data); + ranks.addAll(rankData!.data ?? []); refreshController.refreshCompleted(); } else { refreshController.refreshFailed(); } - if (userInfo != null && - userInfo.memberRankVo != null && - ranks != null && - ranks.length > 0) { - rankLevel = (ranks - .indexWhere((element) => element.id == userInfo.memberRankVo.id) + - 1); + if (ranks.length > 0) { + rankLevel = (ranks.indexWhere((element) => element.id == userInfo?.memberRankVo?.id) + 1); } - BaseData baseData = - await apiService.signInInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - signInfo = baseData.data; + BaseData? baseData = await apiService?.signInInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + signInfo = baseData!.data; refreshController.refreshCompleted(); } EasyLoading.dismiss(); @@ -124,15 +118,16 @@ class _IntegralPage extends State { title: "", titleColor: Colors.white, titleSize: 16.sp, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, action: Container( alignment: Alignment.center, margin: EdgeInsets.only(right: 16.w), child: GestureDetector( onTap: () { Navigator.of(context).pushNamed( - '/router/integral_detailed_page', - arguments: {"titleType": 2}); + '/router/integral_detailed_page', + arguments: {"titleType": 2}, + ); }, child: Text( S.of(context).mingxi, @@ -176,13 +171,8 @@ class _IntegralPage extends State { signInfo, userInfo, "${(signInfo?.signInList?.length) ?? "0"}", - ((signInfo?.rewardList != null && - signInfo.rewardList.length > - (signInfo?.signInList?.length ?? - 0)) - ? signInfo.rewardList[ - signInfo?.signInList?.length ?? 0] - : 0) + (((signInfo?.rewardList?.length ?? 0) > (signInfo?.signInList?.length ?? 0)) + ? (signInfo?.rewardList?[signInfo?.signInList?.length ?? 0] ?? 0) : 0) .toString()), ///立即签到 @@ -205,19 +195,19 @@ class _IntegralPage extends State { ///立即签到 _signIn() async { - if ((signInfo != null && signInfo.todayHasSignin)) { + if ((signInfo?.todayHasSignin ?? false)) { SmartDialog.showToast("今日已签到了", alignment: Alignment.center); return; } EasyLoading.show( status: S.of(context).zhengzaijiazai, maskType: EasyLoadingMaskType.black); - BaseData baseData = await apiService.signIn().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.signIn().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() {}); SmartDialog.show( - widget: SignInWidget("${signInfo.signInList.length + 1}", - "${signInfo.rewardList[signInfo.signInList.length]}")); + widget: SignInWidget("${(signInfo?.signInList?.length ?? 0) + 1}", + "${signInfo?.rewardList?[(signInfo?.signInList?.length ?? 0)]}")); } else { EasyLoading.dismiss(); } diff --git a/lib/integral/intergra_view/in_for_points.dart b/lib/integral/intergra_view/in_for_points.dart index 9ca9d8d9..80d10ec1 100644 --- a/lib/integral/intergra_view/in_for_points.dart +++ b/lib/integral/intergra_view/in_for_points.dart @@ -2,15 +2,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:flutter_svg/svg.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/sign_info.dart'; +import 'package:huixiang/data/sign_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/round_button.dart'; - class InForPoints extends StatefulWidget { - - final SignInfo signInfo; + final SignInfo? signInfo; final Function signIn; InForPoints(this.signInfo, this.signIn); @@ -19,17 +17,15 @@ class InForPoints extends StatefulWidget { State createState() { return _InForPoints(); } - } class _InForPoints extends State { - @override Widget build(BuildContext context) { return Container( width: double.infinity, margin: EdgeInsets.symmetric(horizontal: 14.w, vertical: 6.h), - padding: EdgeInsets.symmetric(horizontal:12.w, vertical: 16.h), + padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 16.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8), @@ -59,7 +55,7 @@ class _InForPoints extends State { ), ), SizedBox( - width:3.w, + width: 3.w, ), Text( S.of(context).lianxuqiandaolingqushuangbeijifen, @@ -74,40 +70,36 @@ class _InForPoints extends State { SizedBox( height: 12.h, ), - StaggeredGridView.countBuilder( + StaggeredGrid.count( crossAxisCount: 4, - shrinkWrap: true, - itemCount: 7, mainAxisSpacing: 8, crossAxisSpacing: 18, - padding: EdgeInsets.only(bottom: 32), - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return signInItem(position); - }, - staggeredTileBuilder: (position) { - return StaggeredTile.count(position == 6 ? 2 : 1, 1.28); - }, + children: childItems(), ), InkWell( - onTap: widget.signIn, + onTap: () { + widget.signIn?.call(); + }, child: Container( alignment: Alignment.center, child: RoundButton( width: double.infinity, height: 34.h, - text: (widget.signInfo != null && widget.signInfo.todayHasSignin) + text: (widget.signInfo?.todayHasSignin ?? false) ? S.of(context).yiqiandao : "签到", - textColor: (widget.signInfo != null && widget.signInfo.todayHasSignin) - ? Color(0xFFB3B3B3) - : Colors.white, - backgroup: (widget.signInfo != null && widget.signInfo.todayHasSignin) + textColor: (widget.signInfo?.todayHasSignin ?? false) + ? Color(0xFFB3B3B3) + : Colors.white, + backgroup: (widget.signInfo?.todayHasSignin ?? false) ? Color(0xFFF5F6FA) : Color(0xFF32A060), fontSize: 16.sp, fontWeight: MyFontWeight.bold, - padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), + padding: EdgeInsets.symmetric( + horizontal: 16.w, + vertical: 6.h, + ), radius: 20.w, ), ), @@ -117,129 +109,136 @@ class _InForPoints extends State { ); } + List childItems() { + List widgets = []; + for (int i = 0; i < 7; i++) { + widgets.add(signInItem(i)); + } + return widgets; + } +// StaggeredTile.count(position == 6 ? 2 : 1, 1.28); Widget signInItem(position) { if (position == 6) { - return Container( - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xFFF5F6FA), - borderRadius: BorderRadius.circular(4), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "0${position + 1}", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - Container( - alignment: Alignment.center, - height: 30.h, - child: Text( - S.of(context).shenmijifendali, + return StaggeredGridTile.count( + crossAxisCellCount: 2, + mainAxisCellCount: 1.28, + child: Container( + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xFFF5F6FA), + borderRadius: BorderRadius.circular(4), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "0${position + 1}", style: TextStyle( - color: Color(0xFF727272), - fontWeight: FontWeight.bold, - fontSize: 10.sp, + color: Color(0xFF353535), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, ), ), - ), - Text( - "", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, + Container( + alignment: Alignment.center, + height: 30.h, + child: Text( + S.of(context).shenmijifendali, + style: TextStyle( + color: Color(0xFF727272), + fontWeight: FontWeight.bold, + fontSize: 10.sp, + ), + ), ), - ), - ], + Text( + "", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ], + ), + flex: 1, ), - flex: 1, - ), - Container( - alignment: Alignment.center, - child: Image.asset( - "assets/image/icon_gold_blessing.webp", - width: 59, - height: 59, + Container( + alignment: Alignment.center, + child: Image.asset( + "assets/image/icon_gold_blessing.webp", + width: 59, + height: 59, + ), ), - ), - ], + ], + ), ), ); } else { - return Container( - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: (widget.signInfo != null && - widget.signInfo.signInList != null && - widget.signInfo.signInList.length > position) - ? Color(0xFF32A060) - : Color(0xFFF5F6FA), - borderRadius: BorderRadius.circular(4), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "0${position + 1}", - style: TextStyle( - color: (widget.signInfo != null && - widget.signInfo.signInList != null && - widget.signInfo.signInList.length > position) - ? Colors.white - : Color(0xFF353535), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - Container( - alignment: Alignment.center, - child: SvgPicture.asset( - "assets/svg/qiandao.svg", - width: 30, - height: 30, - ), - ), - Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 2.h, - ), - child: Text( - (widget.signInfo != null && - widget.signInfo.rewardList != null && - widget.signInfo.rewardList.length > position) - ? "+${widget.signInfo.rewardList[position]}" - : "+10", + return StaggeredGridTile.count( + crossAxisCellCount: 1, + mainAxisCellCount: 1.28, + child: Container( + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: ((widget.signInfo?.signInList?.length ?? 0) > position) + ? Color(0xFF32A060) + : Color(0xFFF5F6FA), + borderRadius: BorderRadius.circular(4), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "0${position + 1}", style: TextStyle( - color: (widget.signInfo != null && - widget.signInfo.signInList != null && - widget.signInfo.signInList.length > position) + color: ((widget.signInfo?.signInList?.length ?? 0) > position) ? Colors.white - : Color(0xFF727272), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, + : Color(0xFF353535), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, ), ), - ), - ], + Container( + alignment: Alignment.center, + child: SvgPicture.asset( + "assets/svg/qiandao.svg", + width: 30, + height: 30, + ), + ), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 2.h, + ), + child: Text( + ((widget.signInfo?.rewardList?.length ?? 0) > position) + ? "+${widget.signInfo?.rewardList?[position]}" + : "+10", + style: TextStyle( + color: + ((widget.signInfo?.rewardList?.length ?? 0) > position) + ? Colors.white + : Color(0xFF727272), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + ], + ), ), ); } } - - } diff --git a/lib/integral/intergra_view/integral_task.dart b/lib/integral/intergra_view/integral_task.dart index e9bb165a..5108fac5 100644 --- a/lib/integral/intergra_view/integral_task.dart +++ b/lib/integral/intergra_view/integral_task.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/sign_info.dart'; -import 'package:huixiang/retrofit/data/task.dart'; +import 'package:huixiang/data/sign_info.dart'; +import 'package:huixiang/data/task.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/round_button.dart'; @@ -9,7 +9,7 @@ import 'package:huixiang/view_widget/round_button.dart'; import '../../view_widget/no_data_view.dart'; class IntegralTask extends StatefulWidget { - final SignInfo signInfo; + final SignInfo? signInfo; IntegralTask(this.signInfo); @@ -59,31 +59,15 @@ class _IntegralTask extends State { ), Expanded( child: Container( - child: (widget.signInfo != null && - widget.signInfo.taskList != null && - widget.signInfo.taskList.length > 0) + child: (widget.signInfo?.taskList?.isNotEmpty ?? false) ? ListView.builder( padding: EdgeInsets.only(left: 10.w, top: 20.h), physics: BouncingScrollPhysics(), - // loop: false, - // pagination: SwiperPagination( - // alignment: Alignment.bottomCenter, - // builder: DotSwiperPaginationBuilder( - // size: 8, - // activeSize: 8, - // space: 5, - // activeColor: Colors.black, - // color: Colors.black.withAlpha(76), - // ), - // ), itemBuilder: (context, position) { - return taskItem(widget.signInfo.taskList[position]); + return taskItem(widget.signInfo!.taskList![position]); }, - itemCount: (widget.signInfo != null && - widget.signInfo.taskList != null && - widget.signInfo.taskList.length > 0) - ? widget.signInfo.taskList.length - : 0) + itemCount: widget.signInfo?.taskList?.length ?? 0, + ) : NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, @@ -93,30 +77,28 @@ class _IntegralTask extends State { ), ), flex: 1, - ) + ), ], ), ); } Widget taskPage(position) { - if (widget.signInfo == null || widget.signInfo.taskList == null) - return Container(); return Container( margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 16.h), child: Column( children: [ - taskItem(widget.signInfo.taskList[position * 3 + 0]), - if (widget.signInfo.taskList.length > (position * 3 + 1)) - taskItem(widget.signInfo.taskList[position * 3 + 1]), - if (widget.signInfo.taskList.length > (position * 3 + 2)) - taskItem(widget.signInfo.taskList[position * 3 + 2]), + taskItem(widget.signInfo?.taskList?[position * 3 + 0]), + if ((widget.signInfo?.taskList?.length ?? 0) > (position * 3 + 1)) + taskItem(widget.signInfo?.taskList?[position * 3 + 1]), + if ((widget.signInfo?.taskList?.length ?? 0) > (position * 3 + 2)) + taskItem(widget.signInfo?.taskList?[position * 3 + 2]), ], ), ); } - taskImg(String taskType) { + taskImg(String? taskType) { switch (taskType) { case "bill_type_point_order": return "assets/image/icon_integral_login.webp"; @@ -134,14 +116,14 @@ class _IntegralTask extends State { return "assets/image/icon_integral_login.webp"; } - Widget taskItem(Task task) { + Widget taskItem(Task? task) { return Container( margin: EdgeInsets.only(top: 8.h, bottom: 8.h), alignment: Alignment.center, child: Row( children: [ Image.asset( - taskImg(task.type), + taskImg(task?.type), width: 24.w, height: 24.h, ), @@ -155,7 +137,7 @@ class _IntegralTask extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - task.name, + task?.name ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.regular, @@ -168,7 +150,7 @@ class _IntegralTask extends State { Row( children: [ Text( - "+${double.tryParse(task.rewardValue).toInt()}", + "+${(double.tryParse("${task?.rewardValue}") ?? 0).toInt()}", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -180,7 +162,7 @@ class _IntegralTask extends State { ), Text( S.of(context).wancheng_( - "${task.complateNum ?? task.conplateNum}/${task.limitDay}"), + "${task?.complateNum ?? task?.conplateNum}/${task?.limitDay}"), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -192,17 +174,17 @@ class _IntegralTask extends State { ], ), ), - task.limitDay == (task.complateNum ?? task.conplateNum) + task?.limitDay == (task?.complateNum ?? task?.conplateNum) ? RoundButton( - text: task.limitDay == (task.complateNum ?? task.conplateNum) + text: task?.limitDay == (task?.complateNum ?? task?.conplateNum) ? S.of(context).yiwancheng : S.of(context).quwancheng, textColor: - task.limitDay == (task.complateNum ?? task.conplateNum) + task?.limitDay == (task?.complateNum ?? task?.conplateNum) ? Color(0xFF808080) : Colors.white, backgroup: - task.limitDay == (task.complateNum ?? task.conplateNum) + task?.limitDay == (task?.complateNum ?? task?.conplateNum) ? Color(0xFFF5F6FA) : Color(0xFF32A060), radius: 12.w, @@ -214,13 +196,13 @@ class _IntegralTask extends State { ), ) : RoundButton( - text: "x${double.tryParse(task.rewardValue).toInt()}", + text: "x${(double.tryParse("${task?.rewardValue}") ?? 0).toInt()}", textColor: - task.limitDay == (task.complateNum ?? task.conplateNum) + task?.limitDay == (task?.complateNum ?? task?.conplateNum) ? Color(0xFF808080) : Colors.white, backgroup: - task.limitDay == (task.complateNum ?? task.conplateNum) + task?.limitDay == (task?.complateNum ?? task?.conplateNum) ? Color(0xFFF5F6FA) : Color(0xFF00BF00), icons: Image.asset( diff --git a/lib/integral/intergra_view/integral_vip.dart b/lib/integral/intergra_view/integral_vip.dart index ffd036ed..12d82e0c 100644 --- a/lib/integral/intergra_view/integral_vip.dart +++ b/lib/integral/intergra_view/integral_vip.dart @@ -1,21 +1,21 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/sign_info.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/sign_info.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/custom_image.dart'; class IntegralVip extends StatefulWidget { - final SignInfo signInfo; - final UserInfo userinfo; + final SignInfo? signInfo; + final UserInfo? userinfo; final rankLevel; final String day; final String integral; - IntegralVip(this.rankLevel, this.signInfo, this.userinfo,this.day,this.integral); + IntegralVip(this.rankLevel, this.signInfo, this.userinfo, this.day,this.integral); @override State createState() { @@ -33,7 +33,7 @@ class _IntegralVip extends State { child: Row( children: [ MImage( - widget.userinfo != null ? widget.userinfo.headimg : "", + widget.userinfo?.headimg ?? "", width: 50, height: 50, isCircle: true, @@ -86,7 +86,7 @@ class _IntegralVip extends State { width:6.w, ), Text( - widget?.userinfo?.points ?? "", + widget.userinfo?.points ?? "", style: TextStyle( fontSize: 14.sp, color: Colors.white, @@ -95,7 +95,7 @@ class _IntegralVip extends State { ), ], ), - ) + ), // Container( // width: 2.w, // height: 32.h, diff --git a/lib/integral_store/integral_store_details_page.dart b/lib/integral_store/integral_store_details_page.dart index 73d266e8..b0189b0a 100644 --- a/lib/integral_store/integral_store_details_page.dart +++ b/lib/integral_store/integral_store_details_page.dart @@ -3,13 +3,12 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; -import 'package:flutter_html/image_render.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -21,7 +20,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class IntegralStoreDetailsPage extends StatefulWidget { - final Map arguments; + final Map? arguments; IntegralStoreDetailsPage({this.arguments}); @@ -32,9 +31,9 @@ class IntegralStoreDetailsPage extends StatefulWidget { } class _IntegralStoreDetailsPage extends State { - ApiService apiService; - String points; - String happyBean; + ApiService? apiService; + String? points; + String? happyBean; int payType = 0; final ScrollController scrollController = ScrollController(); final RefreshController refreshController = RefreshController(); @@ -48,33 +47,32 @@ class _IntegralStoreDetailsPage extends State { ApiService(Dio(), context: context, token: value.getString("token")); queryGoodsById(); if (value.getString('user') != null) { - points = UserInfo.fromJson(jsonDecode(value.getString('user'))).points; - happyBean = UserInfo.fromJson(jsonDecode(value.getString('user'))).happyBean; + points = UserInfo.fromJson(jsonDecode(value.getString('user')!)).points; + happyBean = UserInfo.fromJson(jsonDecode(value.getString('user')!)).happyBean; } }); } - Goods goods; + Goods? goods; ///查询积分商品详情 queryGoodsById() async { - BaseData baseData = await apiService - .creditGoodsById(widget.arguments["goodsId"]) + BaseData? baseData = await apiService?.creditGoodsById(widget.arguments?["goodsId"] ?? "") .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - goods = baseData.data; - if(goods != null && happyBean != null && double.tryParse(goods?.oneBean ?? "0") - != 0 && double.tryParse(goods?.oneBean ?? "0") <= double.tryParse(happyBean)){ + goods = baseData?.data; + if(double.parse(goods?.oneBean ?? "0") != 0 + && double.parse(goods?.oneBean ?? "0") <= (double.tryParse("${happyBean}") ?? 0)){ payType = 1; - } else if(goods != null && points != null && double.tryParse(goods.onePrice) - != 0 && double.tryParse(goods.onePrice) <= double.tryParse(points)){ + } else if((double.tryParse("${goods?.onePrice}") ?? 0) != 0 + && (double.tryParse("${goods?.onePrice}") ?? 0) <= (double.tryParse("${points}") ?? 0)){ payType = 2; - } else if (goods != null && points != null && double.tryParse(goods.price) != 0 && double.tryParse(goods.price) - <= double.tryParse(points) && double.tryParse(goods.money) != 0.00){ + } else if ((double.tryParse("${goods?.price}") ?? 0) != 0 + && (double.tryParse("${goods?.price}") ?? 0) <= (double.tryParse("${points}") ?? 0) + && (double.tryParse("${goods?.money}") ?? 0) != 0.00){ payType = 3; - } else if (goods != null && points != null - && double.tryParse(goods.oneMoney) != 0.00){ + } else if ((double.tryParse("${goods?.oneMoney}") ?? 0) != 0.00){ payType = 4; } refreshController.refreshCompleted(); @@ -85,16 +83,14 @@ class _IntegralStoreDetailsPage extends State { } String pointPrice(){ - if(goods == null) - return ""; - if(goods?.oneBean!=null && goods?.oneBean!="0"){ + if(goods?.oneBean != "0"){ return "${goods?.oneBean}印章"; - }else if(goods?.onePrice!=null && goods?.onePrice!="0"){ - return S.of(context).jifen_(goods?.onePrice); - }else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){ - return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}元"); - }else if(goods.oneMoney != null && goods.oneMoney != "0.00"){ - return "${AppUtils.calculateDouble(double.tryParse(goods?.oneMoney) ?? 0)}元"; + } else if(goods?.onePrice!="0") { + return S.of(context).jifen_("${goods?.onePrice}"); + } else if((goods?.onePrice == "0") && ((goods?.price != "0") || (goods?.money != "0.00"))) { + return (goods?.price== "0" ? "" : S.of(context).jifen_("${goods?.price}")) + (goods?.money== "0" ? "" : " + ${AppUtils.calculateDouble(double.tryParse("${goods?.money}") ?? 0)}元"); + } else if(goods?.oneMoney != "0.00") { + return "${AppUtils.calculateDouble(double.tryParse("${goods?.oneMoney}") ?? 0)}元"; } return ""; } @@ -146,24 +142,16 @@ class _IntegralStoreDetailsPage extends State { ), ), ), - if (goods?.detail != null && - goods.detail != "") + if (goods?.detail?.isNotEmpty ?? false) Container( color: Colors.white, padding: EdgeInsets.only(bottom: 40.h), child: Html( - data: goods?.detail??"", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, + data: goods?.detail ?? "", ), ), ], - ) + ), ], ), ), @@ -173,9 +161,9 @@ class _IntegralStoreDetailsPage extends State { ), GestureDetector( onTap: () { - if(payType > 0){ + if (payType > 0) { toExchangeOrder(); - }else{ + } else { SmartDialog.showToast(pointPrice().contains("印章")?"您的印章数量不足!" : "您的积分不足!", alignment: Alignment.center); return; } @@ -204,7 +192,7 @@ class _IntegralStoreDetailsPage extends State { ), ), ), - ) + ), ], ), ); @@ -214,23 +202,23 @@ class _IntegralStoreDetailsPage extends State { toExchangeOrder() async { await Navigator.of(context) .pushNamed('/router/exchange_order_page', arguments: { - "goodsId": goods.id, - "name": goods.name, - "money": goods.money, - "onePrice":goods.onePrice, - "oneMoney":goods.oneMoney, - "oneBean":goods.oneBean, - "price": goods.price, - "image": goods.mainImgPath, + "goodsId": goods?.id, + "name": goods?.name, + "money": goods?.money, + "onePrice":goods?.onePrice, + "oneMoney":goods?.oneMoney, + "oneBean":goods?.oneBean, + "price": goods?.price, + "image": goods?.mainImgPath, "payType":payType, - "useTyped": goods.canPick + "useTyped": (goods?.canPick ?? false) ? 1 - : goods.canDelivery + : (goods?.canDelivery ?? false) ? 2 : 3, }); var shared = await SharedPreferences.getInstance(); - points = UserInfo.fromJson(jsonDecode(shared.getString('user'))).points; + points = UserInfo.fromJson(jsonDecode(shared.getString('user') ?? "")).points; setState(() {}); } @@ -246,14 +234,17 @@ class _IntegralStoreDetailsPage extends State { offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], - color: Colors.white), + color: Colors.white, + ), child: Column( children: [ swiper(), Container( - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + padding: EdgeInsets.fromLTRB( + 16.w, 16.h, 16.w, 16.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, @@ -300,7 +291,7 @@ class _IntegralStoreDetailsPage extends State { height: 8.h, ), Text( - goods == null ? "" : goods.name, + goods?.name ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontWeight: MyFontWeight.semi_bold, @@ -312,7 +303,7 @@ class _IntegralStoreDetailsPage extends State { height: 11.h, ), Text( - goods == null ? "" : goods.description, + goods?.description ?? "", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -321,7 +312,7 @@ class _IntegralStoreDetailsPage extends State { ), ], ), - ) + ), ], ), ); @@ -348,14 +339,12 @@ class _IntegralStoreDetailsPage extends State { return goods == null ? Container() : MImage( - goods.viceImgPaths.elementAt(position), + goods!.viceImgPaths?.elementAt(position) ?? "", fit: BoxFit.cover, ) ; }, - itemCount: (goods == null || goods.viceImgPaths == null) - ? 1 - : goods.viceImgPaths.length, + itemCount: goods?.viceImgPaths?.length ?? 1, ), GestureDetector( onTap: () { diff --git a/lib/login/captcha/block_puzzle_captcha.dart b/lib/login/captcha/block_puzzle_captcha.dart index 9c4d6496..a605fdbd 100644 --- a/lib/login/captcha/block_puzzle_captcha.dart +++ b/lib/login/captcha/block_puzzle_captcha.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:io'; import 'dart:math'; import 'package:dio/dio.dart'; @@ -17,7 +16,7 @@ class BlockPuzzleCaptchaPage extends StatefulWidget { final VoidSuccessCallback onSuccess; //拖放完成后验证成功回调 final VoidCallback onFail; //拖放完成后验证失败回调 - BlockPuzzleCaptchaPage({this.onSuccess, this.onFail}); + BlockPuzzleCaptchaPage({required this.onSuccess, required this.onFail}); @override _BlockPuzzleCaptchaPageState createState() => _BlockPuzzleCaptchaPageState(); @@ -47,10 +46,10 @@ class _BlockPuzzleCaptchaPageState extends State int _checkMilliseconds = 0; //滑动时间 bool _showTimeLine = false; //是否显示动画部件 bool _checkSuccess = false; //校验是否成功 - AnimationController controller; + late AnimationController controller; //高度动画 - Animation offsetAnimation; + late Animation offsetAnimation; //底部部件key GlobalKey _containerKey = new GlobalKey(); @@ -81,10 +80,8 @@ class _BlockPuzzleCaptchaPageState extends State _showTimeLine = false; }); //回调 - if (widget.onSuccess != null) { - widget.onSuccess(content); - } - //关闭验证码 + widget.onSuccess(content); + //关闭验证码 print(content); Navigator.pop(context); }); @@ -109,10 +106,8 @@ class _BlockPuzzleCaptchaPageState extends State }); loadCaptcha(); //回调 - if (widget.onFail != null) { - widget.onFail(); - } - }); + widget.onFail(); + }); }); } @@ -154,12 +149,6 @@ class _BlockPuzzleCaptchaPageState extends State ApiService apiIpService = ApiService(Dio(), context: context); ClickWordCaptchaModel baseData = await apiIpService .captchaGet({"captchaType": "blockPuzzle"}).catchError((onError) {}); - if (baseData == null) { - setState(() { - secretKey = ""; - }); - return; - } sliderXMoved = 0; sliderStartX = 0; @@ -185,7 +174,7 @@ class _BlockPuzzleCaptchaPageState extends State } //校验验证码 - void checkCaptcha(sliderXMoved, captchaToken, {BuildContext myContext}) { + void checkCaptcha(sliderXMoved, captchaToken, {BuildContext? myContext}) { setState(() { sliderMoveFinish = true; }); @@ -476,10 +465,9 @@ class _BlockPuzzleCaptchaPageState extends State onPanUpdate: (updateDetails) { ///更新 // print(updateDetails.localPosition); - double _w1 = _baseImageKey.currentContext.size.width - - _slideImageKey.currentContext.size.width; - double offset = - updateDetails.localPosition.dx - sliderStartX; + double _w1 = (_baseImageKey.currentContext?.size?.width ?? 0) - + (_slideImageKey.currentContext?.size?.width ?? 0); + double offset = updateDetails.localPosition.dx - sliderStartX; if (offset < 0) { offset = 0; } @@ -504,7 +492,8 @@ class _BlockPuzzleCaptchaPageState extends State width: _bottomSliderSize, height: _bottomSliderSize, margin: EdgeInsets.only( - left: sliderXMoved > 0 ? sliderXMoved : 1), + left: sliderXMoved > 0 ? sliderXMoved : 1, + ), decoration: BoxDecoration( border: Border( top: BorderSide( @@ -531,7 +520,8 @@ class _BlockPuzzleCaptchaPageState extends State ), ) ], - )) + ), + ) : Container(); } } @@ -540,13 +530,15 @@ class MaxScaleTextWidget extends StatelessWidget { final double max; final Widget child; - MaxScaleTextWidget({Key key, this.max = 1.0, this.child}) : super(key: key); + MaxScaleTextWidget({Key? key, this.max = 1.0, required this.child}) : super(key: key); @override Widget build(BuildContext context) { var data = MediaQuery.of(context); var textScaleFactor = min(max, data.textScaleFactor); return MediaQuery( - data: data.copyWith(textScaleFactor: textScaleFactor), child: child); + data: data.copyWith(textScaler: TextScaler.linear(textScaleFactor)), + child: child, + ); } } diff --git a/lib/login/captcha/click_word_captcha.dart b/lib/login/captcha/click_word_captcha.dart index 1afba266..52a78b76 100644 --- a/lib/login/captcha/click_word_captcha.dart +++ b/lib/login/captcha/click_word_captcha.dart @@ -14,7 +14,7 @@ class ClickWordCaptcha extends StatefulWidget { final VoidSuccessCallback onSuccess; //文字点击后验证成功回调 final VoidCallback onFail; //文字点击完成后验证失败回调 - const ClickWordCaptcha({Key key, this.onSuccess, this.onFail}) + const ClickWordCaptcha({Key? key, required this.onSuccess, required this.onFail}) : super(key: key); @override @@ -72,23 +72,14 @@ class _ClickWordCaptchaState extends State { _changeResultState(); ApiService apiIpService = ApiService(Dio(), context: context); ClickWordCaptchaModel baseData = await apiIpService.captchaGet({"captchaType": "clickWord"}).catchError((onError) {}); - if (baseData == null) { - _clickWordCaptchaModel.secretKey = ""; - bottomTitle = "加载失败,请刷新"; - _clickWordCaptchaState = ClickWordCaptchaState.normal; - _changeResultState(); - return; - } - else { - _clickWordCaptchaModel = baseData; - var baseR = await WidgetUtil.getImageWH( - image: Image.memory( - Base64Decoder().convert(_clickWordCaptchaModel.imgStr))); - baseSize = baseR.size; - - bottomTitle = "请依次点击【${_clickWordCaptchaModel.wordStr}】"; - } - + _clickWordCaptchaModel = baseData; + var baseR = await WidgetUtil.getImageWH( + image: Image.memory( + Base64Decoder().convert(_clickWordCaptchaModel.imgStr))); + baseSize = baseR.size; + + bottomTitle = "请依次点击【${_clickWordCaptchaModel.wordStr}】"; + _clickWordCaptchaState = ClickWordCaptchaState.normal; _changeResultState(); } @@ -142,10 +133,8 @@ class _ClickWordCaptchaState extends State { await Future.delayed(Duration(milliseconds: 1000)); _loadCaptcha(); //回调 - if (widget.onFail != null) { - widget.onFail(); + widget.onFail(); } - } //校验成功 _checkSuccess(String pointJson) async { @@ -158,10 +147,8 @@ class _ClickWordCaptchaState extends State { print(cryptedStr); //回调 pointJson 是经过es加密之后的信息 - if (widget.onSuccess != null) { - widget.onSuccess(cryptedStr); - } - //关闭 + widget.onSuccess(cryptedStr); + //关闭 Navigator.pop(context); } @@ -332,7 +319,7 @@ class ClickWordCaptchaModel { this.wordStr = ""}); //解析数据转换模型 - static ClickWordCaptchaModel fromMap(Map map) { + static ClickWordCaptchaModel fromJson(Map map) { ClickWordCaptchaModel captchaModel = ClickWordCaptchaModel(); captchaModel.imgStr = map["originalImageBase64"] ?? ""; captchaModel.jigsawImageBase64 = map["jigsawImageBase64"] ?? ""; diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index d91d16fb..8a963d10 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -1,20 +1,18 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'dart:ui'; import 'package:flutter/gestures.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/login_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/login_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/retrofit/data/user_entity.dart'; +import 'package:huixiang/data/user_entity.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:huixiang/generated/l10n.dart'; @@ -26,7 +24,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart'; class LoginPage extends StatefulWidget { - final Map arguments; + final Map? arguments; LoginPage({this.arguments}); @@ -52,22 +50,22 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { var _sendCodeStatus = 0; GlobalKey loginKey = GlobalKey(); - ApiService client; + ApiService? client; - ScrollController scrollController; + ScrollController? scrollController; final int initAlpha = 89; int alpha = 89; int changeAlpha = 0; - Animation animation; - Animation doubleAnimation; + late Animation animation; + late Animation doubleAnimation; bool invitationCode = true; - String areaCode; + String? areaCode; isLogin() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (sharedPreferences.getBool("isShowPrivacyPolicy") == null || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { + !(sharedPreferences.getBool("isShowPrivacyPolicy") ?? false)) { showAlertDialog(); } @@ -88,12 +86,12 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { double offsetBtn = 0; double rota = 1.04; - Image image; + Image? image; buildImageInfo(BuildContext context) async { image = Image.asset("assets/image/laoban.webp"); double screenWidth = MediaQuery.of(this.context).size.width; - image.image + image?.image .resolve(ImageConfiguration()) .addListener(ImageStreamListener((ImageInfo info, bool _) { double width = info.image.width.toDouble(); @@ -122,29 +120,25 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { alignmentEnd = Alignment.bottomRight; animationStart(); - scrollController.addListener(() { - RenderBox renderBox = loginKey.currentContext.findRenderObject(); + scrollController?.addListener(() { + RenderBox? renderBox = loginKey.currentContext?.findRenderObject() as RenderBox?; - offsetBtn = scrollController.offset; + double offset = scrollController?.offset ?? 0; + offsetBtn = offset; var screenHeight = MediaQuery.of(context).size.height; var scrollHeight = screenHeight * 1.47; - var height = scrollHeight - renderBox.size.height; - var chaHeight = screenHeight - renderBox.size.height; - changeAlpha = - (scrollController.offset / (height - chaHeight) * (255)).toInt(); + var height = scrollHeight - (renderBox?.size.height ?? 0); + var chaHeight = screenHeight - (renderBox?.size.height ?? 0); + changeAlpha = (offset / (height - chaHeight) * (255)).toInt(); changeAlpha = (changeAlpha > 255 ? 255 : changeAlpha); changeAlpha = (changeAlpha < 0 ? 0 : changeAlpha); - alpha = (initAlpha + - scrollController.offset / - (height - chaHeight) * - (255 - initAlpha)) - .toInt(); + alpha = (initAlpha + offset / (height - chaHeight) * (255 - initAlpha)).toInt(); alpha = (alpha > 255 ? 255 : alpha); alpha = (alpha < 0 ? 0 : alpha); }); _controllerPhone.addListener(() { - if (_controllerPhone.text != null && _controllerPhone.text != "") { + if (_controllerPhone.text != "") { if (isPhone(_controllerPhone.text)) { statusPhoneTextColor = Color(0xFF353535); statusPhoneLineColor = Color(0xFF32A060); @@ -162,7 +156,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { }); _controllerCode.addListener(() { - if (_controllerCode.text != null && _controllerCode.text != "") { + if (_controllerCode.text != "") { if (_controllerCode.text.length == 6) { statusCodeTextColor = Color(0xFF353535); statusCodeLineColor = Color(0xFF32A060); @@ -181,8 +175,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { _controllerInviteCode.addListener(() { print(_controllerInviteCode.text); - if (_controllerInviteCode.text != null && - _controllerInviteCode.text != "") { + if (_controllerInviteCode.text != "") { if (_controllerInviteCode.text.length == 6) { statusInviteTextColor = Color(0xFF353535); statusInviteLineColor = Color(0xFF32A060); @@ -211,7 +204,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { _sendCode() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { + !(sharedPreferences.getBool("isShowPrivacyPolicy") ?? false)) { showAlertDialog(); return; } @@ -228,11 +221,10 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { return; } if (_sendCodeStatus == 0) { - client - .sendVerify( + client?.sendVerify( {"areaCode": areaCode, "mobile": mobile, "verification": ""}) .then((value) => { - if (value.isSuccess) + if (value?.isSuccess ?? false) {_sendCodeStatus = 1, countdown()} else { @@ -249,17 +241,17 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { } } - Timer _timer; + Timer? _timer; countdown() { - if (_timer != null && _timer.isActive) return; + if (_timer?.isActive ?? true) return; int countdown = 60; _timer = Timer.periodic(Duration(seconds: 1), (timer) { countdown--; if (countdown == 0) { btnText = S.of(context).send_code; _sendCodeStatus = 0; - _timer.cancel(); + _timer?.cancel(); } else { btnText = S.of(context).resend_in_seconds(countdown); } @@ -273,8 +265,8 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { @override void dispose() { - if (_timer != null && _timer.isActive) _timer.cancel(); - if (animatedContainer != null) animatedContainer.dispose(); + if (_timer?.isActive ?? true) _timer?.cancel(); + animatedContainer.dispose(); super.dispose(); } @@ -285,7 +277,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { } SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { + !(sharedPreferences.getBool("isShowPrivacyPolicy") ?? false)) { showAlertDialog(); return; } @@ -331,30 +323,28 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { EasyLoading.show( status: S.of(context).zhengzaijiazai, maskType: EasyLoadingMaskType.black); - BaseData value = - await client.memberLogin(param).catchError((error) { + BaseData? value = await client?.memberLogin(param).catchError((error) { print(error.message); SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center); }); // EasyLoading.show(status: S.of(context).zhengzaijiazai); Future.delayed(Duration(seconds: 2), () { - if (value != null && value.isSuccess) { - saveUserJson(value.data.authInfo.toJson()); + if (value?.isSuccess ?? false) { + saveUserJson(value!.data?.authInfo?.toJson()); eventBus.fire(EventType(3)); Navigator.of(context).pushNamedAndRemoveUntil( '/router/main_page', (route) => false, arguments: { "invite": invite, - "interviewCouponList": value.data.interviewCouponList, - "firstLoginCouponList": value.data.firstLoginCouponList + "interviewCouponList": value.data?.interviewCouponList, + "firstLoginCouponList": value.data?.firstLoginCouponList }); EasyLoading.dismiss(); } else { - if (value?.msg != null) - SmartDialog.showToast("${value?.msg ?? ""}", - alignment: Alignment.center); + SmartDialog.showToast("${value?.msg}", + alignment: Alignment.center); } }); } @@ -363,18 +353,18 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { var userEntity = UserEntity.fromJson(userJson); SharedPreferences.getInstance().then((value) => { value.setString('userJson', jsonEncode(userJson)), - value.setString('token', userEntity.token), - value.setString('userId', userEntity.userId), - value.setString('nick', userEntity.name), - value.setString('mobile', userEntity.mobile), + value.setString('token', "${userEntity.token}"), + value.setString('userId', "${userEntity.userId}"), + value.setString('nick', "${userEntity.name}"), + value.setString('mobile', "${userEntity.mobile}"), }); } - AnimationController animatedContainer; + late AnimationController animatedContainer; - Alignment alignmentBegin; - Alignment alignmentEnd; - Alignment alignmentProgress; + late Alignment alignmentBegin; + late Alignment alignmentEnd; + late Alignment alignmentProgress; listener() { alignmentProgress = animation.value; @@ -426,7 +416,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { buildImageInfo(this.context); } catch (ex) {} - if (animatedContainer != null && !animatedContainer.isAnimating) { + if (!animatedContainer.isAnimating) { animatedContainer.forward(); } return AnimatedCrossFade( @@ -645,12 +635,8 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { child: InkWell( onTap: () { print("11111"); - if (widget.arguments != null) { - Navigator.of(context).pop(); - } else { - Navigator.of(context).popAndPushNamed('/router/main_page'); - } - }, + Navigator.of(context).pop(); + }, child: Visibility( visible: (changeAlpha / 255) > 0, child: Opacity( @@ -727,7 +713,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { color: statusPhoneTextColor, ), onChanged: (value) { - if (value != null && value.isNotEmpty) { + if (value.isNotEmpty) { if (isPhone(value)) { mobileStatus = 1; } else { @@ -804,7 +790,7 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { color: statusCodeTextColor, ), onChanged: (value) { - if (value != null && value.isNotEmpty) { + if (value.isNotEmpty) { if (value.length == 6) { verifyStatus = 1; } else { @@ -1068,12 +1054,12 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { } scrollToTop() { - RenderBox renderBox = loginKey.currentContext.findRenderObject(); + RenderBox? renderBox = loginKey.currentContext?.findRenderObject() as RenderBox?; var screenHeight = MediaQuery.of(context).size.height; var scrollHeight = screenHeight * 1.47; - var height = scrollHeight - renderBox.size.height; - var chaHeight = screenHeight - renderBox.size.height; - scrollController.animateTo(height - chaHeight, + var height = scrollHeight - (renderBox?.size.height ?? 0); + var chaHeight = screenHeight - (renderBox?.size.height ?? 0); + scrollController?.animateTo(height - chaHeight, duration: Duration(milliseconds: 500), curve: Curves.ease); } diff --git a/lib/login/login_store_select.dart b/lib/login/login_store_select.dart index 00837cc0..b54171e4 100644 --- a/lib/login/login_store_select.dart +++ b/lib/login/login_store_select.dart @@ -1,15 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import '../generated/l10n.dart'; -import '../retrofit/data/channels_list.dart'; -import '../retrofit/retrofit_api.dart'; +import '../data/channels.dart'; class LoginStoreSelect extends StatefulWidget { - final Map arguments; + final Map? arguments; LoginStoreSelect({this.arguments}); @@ -20,13 +18,13 @@ class LoginStoreSelect extends StatefulWidget { } class _LoginStoreSelect extends State { - ChannelsList channelsList; + Channels? channelsList; int channelIndex = 0; @override void initState() { super.initState(); - channelsList = widget.arguments["channelsList"]; + channelsList = widget.arguments?["channelsList"] ?? []; } @override @@ -43,29 +41,35 @@ class _LoginStoreSelect extends State { body: Container( color: Color(0xFFFFFFFF), height: double.infinity, - child: Column( - children: [ - Padding(padding:EdgeInsets.only(top:18.h,bottom:20.h,left:18.w), - child: Row( - children: [ - Image.asset( - "assets/image/login_channel.webp", - fit: BoxFit.fill, - width:24, - height:24, - ), - SizedBox(width:12.w), - Text( - "Hi,您是通过什么途径了解到这款APP的?", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 15.sp, - color: Color(0xFF181818), - ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: 18.h, + bottom: 20.h, + left: 18.w, + ), + child: Row( + children: [ + Image.asset( + "assets/image/login_channel.webp", + fit: BoxFit.fill, + width: 24, + height: 24, + ), + SizedBox(width: 12.w), + Text( + "Hi,您是通过什么途径了解到这款APP的?", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 15.sp, + color: Color(0xFF181818), ), - ], - )), - Expanded(child: ListView.builder( + ), + ], + )), + Expanded( + child: ListView.builder( physics: BouncingScrollPhysics(), shrinkWrap: true, itemBuilder: (context, position) { @@ -78,12 +82,13 @@ class _LoginStoreSelect extends State { child: channelItem(position), ); }, - itemCount:(channelsList != null && (channelsList?.channels?.length ?? 0) > 0) ? channelsList.channels.length : 0, - )), - if(channelsList != null && (channelsList.channels.length) > 0) + itemCount: channelsList?.channel?.length ?? 0, + ), + ), + if (channelsList?.channel?.isNotEmpty ?? false) GestureDetector( onTap: () { - Navigator.pop(context,channelsList.channels[channelIndex]); + Navigator.pop(context, channelsList?.channel?[channelIndex]); }, child: Container( width: double.infinity, @@ -93,8 +98,11 @@ class _LoginStoreSelect extends State { borderRadius: BorderRadius.circular(27), ), margin: EdgeInsets.only( - left: 16, right: 16, bottom: 21), - padding: EdgeInsets.symmetric(vertical:18.h), + left: 16, + right: 16, + bottom: 21, + ), + padding: EdgeInsets.symmetric(vertical: 18.h), child: Text( S.of(context).queren, style: TextStyle( @@ -104,17 +112,17 @@ class _LoginStoreSelect extends State { ), ), ), - ) - ], - ), + ), + ], + ), ), ); } - Widget channelItem(index){ - return Container( - height:52 , - margin: EdgeInsets.only(bottom: 12,left: 14,right: 14), + Widget channelItem(index) { + return Container( + height: 52, + margin: EdgeInsets.only(bottom: 12, left: 14, right: 14), child: Stack( alignment: Alignment.bottomRight, children: [ @@ -124,15 +132,19 @@ class _LoginStoreSelect extends State { decoration: BoxDecoration( borderRadius: new BorderRadius.circular(6), border: Border.all( - color: channelIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7), + color: channelIndex == index + ? Color(0xFF32A060) + : Color(0xFFF7F7F7), width: channelIndex == index ? 1 : 0, ), - color:channelIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7), + color: channelIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7), ), alignment: Alignment.centerLeft, - padding: EdgeInsets.only(left: 12,), + padding: EdgeInsets.only( + left: 12, + ), child: Text( - channelsList.channels[index], + channelsList?.channel?[index] ?? "", style: TextStyle( fontWeight: MyFontWeight.bold, fontSize: 14.sp, diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index f885a00e..c6018a39 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -3,17 +3,17 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/channels.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/examine_instance.dart'; -import 'package:huixiang/retrofit/data/login_info.dart'; -import 'package:huixiang/retrofit/data/user_entity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/examine_instance.dart'; +import 'package:huixiang/data/login_info.dart'; +import 'package:huixiang/data/user_entity.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/flutter_utils.dart'; @@ -25,14 +25,11 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart'; import '../main.dart'; -import '../retrofit/business_api.dart'; -import '../retrofit/data/business_login_info.dart'; -import '../retrofit/data/channels_list.dart'; import '../utils/business_instance.dart'; import 'captcha/block_puzzle_captcha.dart'; class NewLoginPage extends StatefulWidget { - final Map arguments; + final Map? arguments; NewLoginPage({this.arguments}); @@ -43,7 +40,7 @@ class NewLoginPage extends StatefulWidget { } class _NewLoginPage extends State { - ApiService apiService; + ApiService? apiService; var _controllerPhone = TextEditingController(); var _controllerCode = TextEditingController(); var _controllerInviteCode = TextEditingController(); @@ -55,12 +52,12 @@ class _NewLoginPage extends State { var btnText = S.current.send_code; var _sendCodeStatus = 0; var checkStatus = false; - Timer _timer; + Timer? _timer; bool isShowLogin = false; String area = "+86"; - String channelName; - ChannelsList channelsList; - String mobile; + String? channelName; + Channels? channelsList; + String? mobile; @override void initState() { @@ -69,17 +66,16 @@ class _NewLoginPage extends State { } queryChannels() async{ - BaseData baseData = await apiService.appChannels().catchError((error) { + BaseData? baseData = await apiService?.appChannels().catchError((error) { print(error.message); SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center); }); - if (baseData != null && baseData.isSuccess) { - channelsList = baseData.data; + if (baseData?.isSuccess ?? false) { + channelsList = baseData!.data; setState((){}); } else { - if (baseData?.msg != null) - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -89,7 +85,7 @@ class _NewLoginPage extends State { }; _controllerPhone.addListener(() { - if (_controllerPhone.text != null && _controllerPhone.text != "") { + if (_controllerPhone.text != "") { if (isPhone(_controllerPhone.text)) { statusPhoneTextColor = Color(0xFF353535); statusPhoneLineColor = Color(0xFF32A060); @@ -107,7 +103,7 @@ class _NewLoginPage extends State { }); _controllerCode.addListener(() { - if (_controllerCode.text != null && _controllerCode.text != "") { + if (_controllerCode.text != "") { if (_controllerCode.text.length == 6) { statusCodeTextColor = Color(0xFF353535); statusCodeLineColor = Color(0xFF32A060); @@ -128,7 +124,7 @@ class _NewLoginPage extends State { _sendCode() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { + !(sharedPreferences.getBool("isShowPrivacyPolicy") ?? false)) { showAlertDialog(); return; } @@ -160,14 +156,14 @@ class _NewLoginPage extends State { Color statusCodeLineColor = Color(0xFFE7E3E3); countdown() { - if (_timer != null && _timer.isActive) return; + if (_timer?.isActive ?? true) return; int countdown = 60; _timer = Timer.periodic(Duration(seconds: 1), (timer) { countdown--; if (countdown == 0) { btnText = S.of(context).send_code; _sendCodeStatus = 0; - _timer.cancel(); + _timer?.cancel(); } else { btnText = S.of(context).resend_in_seconds(countdown); } @@ -178,7 +174,7 @@ class _NewLoginPage extends State { _login() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { + !(sharedPreferences.getBool("isShowPrivacyPolicy") ?? false)) { showAlertDialog(); return; } @@ -223,17 +219,16 @@ class _NewLoginPage extends State { "regChannel":channelName ?? "" }; EasyLoading.show(status: S.of(context).zhengzaijiazai,maskType: EasyLoadingMaskType.black); - BaseData value = await apiService.memberLogin(param).catchError((error) { + BaseData? value = await apiService?.memberLogin(param).catchError((error) { print(error.message); SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center); }); // EasyLoading.show(status: S.of(context).zhengzaijiazai); - if (value != null && value.isSuccess) { - var userInfo = LoginInfo.fromJson(value.data); - ExamineInstance.instance.isExamine = - userInfo.authInfo.account == "13800138000"; - saveUserJson(userInfo.authInfo.toJson()); + if (value?.isSuccess ?? false) { + var userInfo = value!.data; + ExamineInstance.instance.isExamine = userInfo.authInfo?.account == "13800138000"; + saveUserJson(userInfo.authInfo?.toJson()); eventBus.fire(EventType(3)); Navigator.of(context).pushNamedAndRemoveUntil( @@ -244,8 +239,7 @@ class _NewLoginPage extends State { "firstLoginCouponList": userInfo.firstLoginCouponList }); } else { - if (value.msg != null) - SmartDialog.showToast(value?.msg, alignment: Alignment.center); + SmartDialog.showToast("${value?.msg}", alignment: Alignment.center); } EasyLoading.dismiss(); } @@ -254,17 +248,17 @@ class _NewLoginPage extends State { var userEntity = UserEntity.fromJson(userJson); SharedPreferences.getInstance().then((value) => { value.setString('userJson', jsonEncode(userJson)), - value.setString('token', userEntity.token), - value.setString('userId', userEntity.userId), - value.setString('nick', userEntity.name), - value.setString('mobile', userEntity.mobile), + value.setString('token', "${userEntity.token}"), + value.setString('userId', "${userEntity.userId}"), + value.setString('nick', "${userEntity.name}"), + value.setString('mobile', "${userEntity.mobile}"), }); } isLogin() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (sharedPreferences.getBool("isShowPrivacyPolicy") == null || - !sharedPreferences.getBool("isShowPrivacyPolicy")) { + !(sharedPreferences.getBool("isShowPrivacyPolicy") ?? false)) { showAlertDialog(); } @@ -272,14 +266,7 @@ class _NewLoginPage extends State { sharedPreferences.getString("token") != null && sharedPreferences.getString("token") != "") { ExamineInstance.instance.isExamine = sharedPreferences.getString("mobile") == "13800138000"; - if (sharedPreferences.getString("identitySwitch") != null && sharedPreferences.getString("identitySwitch") != "2" && (sharedPreferences.getString("account")!= "" || - sharedPreferences.getString("password")!= "")) { - businessLogin(sharedPreferences.getString("account"), - sharedPreferences.getString("password")); - } else { - Navigator.of(context) - .popAndPushNamed('/router/main_page'); - } + Navigator.of(context).popAndPushNamed('/router/main_page'); } else { apiService = ApiService(Dio(), context: context); initController(); @@ -288,51 +275,12 @@ class _NewLoginPage extends State { } } - businessLogin(account, password) async { - var param = { - "grantType": "password", - "account": account, - "password": password, - }; - EasyLoading.show( - status: S.of(context).zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - - BusinessApiService businessService = - BusinessApiService(Dio(), context: context); - BaseData baseData = - await businessService.annoToken(param).catchError((error) { - print(error.message); - }); - if (baseData != null && baseData.isSuccess) { - var businessLoginInfo = BusinessLoginInfo.fromJson(baseData.data); - if(businessLoginInfo.storeList.length > 1) { - businessLoginInfo.storeList.insert(0, StoreList(name: "所有门店")); - } - BusinessInstance.instance.businessTenant = businessLoginInfo.tenantCode; - BusinessInstance.instance.businessToken = businessLoginInfo.token; - BusinessInstance.instance.expirationTime = businessLoginInfo?.expirationTime ?? ""; - BusinessInstance.instance.serviceStatus = businessLoginInfo?.status?.desc ?? ""; - if (businessLoginInfo.storeList.length > 1) { - Navigator.of(context) - .popAndPushNamed('/router/select_shop', arguments: { - "businessLoginInfo": businessLoginInfo, - }); - } else { - Navigator.of(context) - .popAndPushNamed('/router/business_page', arguments: { - "businessLoginInfo": businessLoginInfo, - }); - } - } else { - Navigator.of(context).popAndPushNamed('/router/business_login_page'); - } - EasyLoading.dismiss(); - } @override void dispose() { - if (_timer != null && _timer.isActive) _timer.cancel(); + if (_timer?.isActive ?? true) { + _timer?.cancel(); + } super.dispose(); } @@ -383,7 +331,8 @@ class _NewLoginPage extends State { isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst, duration: Duration(milliseconds: Platform.isIOS ? 1000 : 1000), ), - )); + ), + ); } void refresh() { @@ -452,7 +401,7 @@ class _NewLoginPage extends State { .then((value) { if (value != null) setState(() { - area = value; + area = value as String; }); }); }, @@ -481,7 +430,7 @@ class _NewLoginPage extends State { color: Color(0xFF353535), ), onChanged: (value) { - if (value != null && value.isNotEmpty) { + if (value.isNotEmpty) { if (isPhone(value)) { mobileStatus = 1; } else { @@ -565,8 +514,7 @@ class _NewLoginPage extends State { color: statusCodeTextColor, ), onChanged: (value) { - if (value != null && - value.isNotEmpty) { + if (value.isNotEmpty) { if (value.length == 6) { verifyStatus = 1; } else { @@ -649,19 +597,25 @@ class _NewLoginPage extends State { SizedBox( height: 30.h, ), - if((channelsList?.isOpen ?? false) == true) + if (channelsList?.isOpen ?? false) GestureDetector( onTap: (){ - Navigator.of(context).pushNamed('/router/login_store_select',arguments: { - "channelsList":channelsList, - }).then((value) => { + Navigator.of(context).pushNamed( + '/router/login_store_select',arguments: { + "channelsList":channelsList, + }, + ).then((value) => { setState(() { - if (value != null) channelName = value; + if (value != null) { + channelName = value as String; + } }) }); }, child:Container( - padding: EdgeInsets.only(left:12.w,right:12.w,top:16.h,bottom:16.h), + padding: EdgeInsets.only( + left: 12.w, right: 12.w, top: 16.h, bottom: 16.h + ), margin: EdgeInsets.only(bottom:30.h), decoration: BoxDecoration( color: Color(0xFFF1F1F1), @@ -669,22 +623,17 @@ class _NewLoginPage extends State { ), child: Row( children: [ - if(channelName == null) - Image.asset( - "assets/image/login_store.webp", - fit: BoxFit.fill, - width:14, - height:14, - ), SizedBox(width: 3.w,), - Expanded(child:Text( + Expanded( + child:Text( channelName ?? "邀请来源(选填)", style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: channelName == null ? 12.sp : 13.sp, color:channelName == null ? Color(0xFF868686) : Color(0xFF1A1A1A), ), - )), + ), + ), Icon( Icons.arrow_forward_ios, size: 16, @@ -705,8 +654,7 @@ class _NewLoginPage extends State { }); }, checkColor: Color(0xFFFFFFFF), - fillColor: - MaterialStateProperty.all(Color(0xFF32A060)), + fillColor: MaterialStateProperty.all(Color(0xFF32A060)), ), Expanded( child: Text.rich( @@ -754,8 +702,10 @@ class _NewLoginPage extends State { color: Color(0xFF010101), ), ), - ]), - )), + ], + ), + ), + ), SizedBox( width: 30, ) @@ -843,8 +793,9 @@ class _NewLoginPage extends State { showDialog( context: context, builder: (BuildContext context) { - return WillPopScope( - onWillPop: () async => false, + return PopScope( + onPopInvoked: (isPop) {}, + canPop: false, child: SimpleDialog( titlePadding: EdgeInsets.all(10), backgroundColor: Colors.transparent, @@ -894,7 +845,8 @@ class _NewLoginPage extends State { style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14.sp, - color: Color(0xff32A060)), + color: Color(0xff32A060), + ), recognizer: TapGestureRecognizer() ..onTap = () { Navigator.of(context) @@ -1022,20 +974,21 @@ class _NewLoginPage extends State { } sendSms(v) async{ - BaseData baseData = await apiService.sendVerify({"areaCode":area, "mobile": mobile, "verification": v}).catchError((onError) { + BaseData? baseData = await apiService?.sendVerify({"areaCode":area, "mobile": mobile, "verification": v}).catchError((onError) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), alignment: Alignment.center);}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { _sendCodeStatus = 1; countdown(); - SmartDialog.showToast(baseData.data, - alignment: Alignment.center); - }else{ - btnText = S.of(context).send_code; - _sendCodeStatus = 0; - SmartDialog.showToast("${baseData.msg}", - alignment: Alignment.center); - refresh(); + SmartDialog.showToast(baseData!.data, alignment: Alignment.center); + } else { + btnText = S.of(context).send_code; + _sendCodeStatus = 0; + SmartDialog.showToast( + "${baseData?.msg}", + alignment: Alignment.center, + ); + refresh(); } } } diff --git a/lib/login/phone_address_page.dart b/lib/login/phone_address_page.dart index cd7e50ad..02473711 100644 --- a/lib/login/phone_address_page.dart +++ b/lib/login/phone_address_page.dart @@ -1,6 +1,5 @@ import 'dart:convert'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -16,7 +15,7 @@ class PhoneAddressPage extends StatefulWidget { class _PhoneAddressPage extends State { RefreshController refreshController = RefreshController(); - Map areaMap; + late Map areaMap; List areaList = []; @override @@ -26,9 +25,8 @@ class _PhoneAddressPage extends State { } void areaCode() async { - var value = - await rootBundle.loadString('assets/map_style/area_code_full.json'); - areaMap = jsonDecode(value); + var value = await rootBundle.loadString('assets/map_style/area_code_full.json'); + areaMap = jsonDecode(value) ?? {}; areaMap.forEach((key, value) { areaList.add(key); }); diff --git a/lib/main.dart b/lib/main.dart index 72b6792b..64232d00 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,4 @@ import 'dart:io'; -import 'dart:ui'; import 'package:event_bus/event_bus.dart'; import 'package:flutter/cupertino.dart'; @@ -8,6 +7,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:get/get.dart'; import 'package:huixiang/address/address_map_page.dart'; import 'package:huixiang/address/edit_address_page.dart'; import 'package:huixiang/community/community_details.dart'; @@ -44,7 +44,7 @@ import 'package:huixiang/order/write_off_success_page.dart'; import 'package:huixiang/qr/invite_friends.dart'; import 'package:huixiang/qr/qr_code_scan.dart'; import 'package:huixiang/qr/qr_share.dart'; -import 'package:huixiang/retrofit/data/examine_instance.dart'; +import 'package:huixiang/data/examine_instance.dart'; import 'package:huixiang/setting/about_page.dart'; import 'package:huixiang/setting/account_security_page.dart'; import 'package:huixiang/setting/binding_phone_page.dart'; @@ -85,50 +85,6 @@ import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/web/web_turntable_activity.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'business_system/business_page.dart'; -import 'business_system/date_select/custom_page.dart'; -import 'business_system/date_select/day_report_page.dart'; -import 'business_system/date_select/monthly_report_page.dart'; -import 'business_system/date_select/week_report_page.dart'; -import 'business_system/goods/add_goods/add_goods_page.dart'; -import 'business_system/goods/add_goods/edit_specs_detail.dart'; -import 'business_system/goods/add_goods/set_goods_specs.dart'; -import 'business_system/goods/add_goods/set_goods_specs_value.dart'; -import 'business_system/goods/add_goods/set_meal.dart'; -import 'business_system/goods/goods_search_page.dart'; -import 'business_system/goods/on_sale/add_assort.dart'; -import 'business_system/goods/on_sale/batch_shelf.dart'; -import 'business_system/goods/on_sale/goods_assort.dart'; -import 'business_system/goods/on_sale/goods_sort.dart'; -import 'business_system/goods/reservation_ page.dart'; -import 'business_system/home/cashier/cashier_page.dart'; -import 'business_system/home/vip/record_details.dart'; -import 'business_system/home/consumer_ranking_page.dart'; -import 'business_system/home/flow_page.dart'; -import 'business_system/home/hot _selling_page.dart'; -import 'business_system/home/select_shop.dart'; -import 'business_system/home/overview/trade_overview_page.dart'; -import 'business_system/home/vip/add_vip.dart'; -import 'business_system/home/vip/business_vip_page.dart'; -import 'business_system/home/vip/member_details_page.dart'; -import 'business_system/home/vip/pay_success_page.dart'; -import 'business_system/home/vip/vip_recharge_page.dart'; -import 'business_system/login/business_login_page.dart'; -import 'business_system/login/register_retrieve_password.dart'; -import 'business_system/mine/account_information.dart'; -import 'business_system/mine/clerk_manage/add_new_clerk_page.dart'; -import 'business_system/mine/clerk_manage/clerk_manage_page.dart'; -import 'business_system/mine/merchant_info.dart'; -import 'business_system/mine/security_setting.dart'; -import 'business_system/mine/service_subscription/function_version_detail.dart'; -import 'business_system/mine/service_subscription/service_purchase_record.dart'; -import 'business_system/mine/service_subscription/service_subscription_page.dart'; -import 'business_system/mine/shop_image_info.dart'; -import 'business_system/mine/shop_reservation_code.dart'; -import 'business_system/order/business_order_detail.dart'; -import 'business_system/order/order_write_off.dart'; -import 'business_system/order/request_refund.dart'; -import 'business_system/scan_code_page.dart'; import 'community/community_view/class_details.dart'; import 'community/headlines/headlines_column_details.dart'; import 'community/new_community_details.dart'; @@ -180,7 +136,7 @@ void main() async { DeviceOrientation.portraitUp, ]); SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - Locale locale; + Locale? locale; if (sharedPreferences.containsKey("language") && sharedPreferences.getString("language") == "tw") { locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'); @@ -190,7 +146,7 @@ void main() async { } ImgCachePath(); // initSdk(); - bool isFirst = sharedPreferences.getBool("isFirst"); + bool? isFirst = sharedPreferences.getBool("isFirst"); runApp(MyApp(locale, isFirst)); // FlutterBugly.postCatchedException((){ @@ -198,16 +154,12 @@ void main() async { // FlutterBugly.init(androidAppId: "204f207673",iOSAppId: "8bb92ba0f6"); } -// final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); - - - EventBus eventBus = EventBus(sync: true); +Route? lastRoutePage; -Route lastRoutePage; class MyApp extends StatelessWidget { - final Locale appLocale; - final bool isFirst; + final Locale? appLocale; + final bool? isFirst; MyApp(this.appLocale, this.isFirst); @@ -219,16 +171,16 @@ class MyApp extends StatelessWidget { ), child: ScreenUtilInit( designSize: Size(375, 812), - builder: () => MaterialApp( + builder: (BuildContext context, Widget? child,) => GetMaterialApp( debugShowCheckedModeBanner: false, title: Platform.isAndroid ? (ExamineInstance.instance.isExamine?"海峡姐妹":""):"", theme: ThemeData( primarySwatch: Colors.blue, // fontFamily: 'JDZhengHT', textTheme: TextTheme( - button: TextStyle(fontSize: 24.sp), - bodyText1: TextStyle(fontSize: 12.sp), - bodyText2: TextStyle(fontSize: 16.sp), + labelLarge: TextStyle(fontSize: 24.sp), + bodyLarge: TextStyle(fontSize: 12.sp), + bodyMedium: TextStyle(fontSize: 16.sp), ), ), localeResolutionCallback: (locale, supportedLocales) { @@ -242,10 +194,12 @@ class MyApp extends StatelessWidget { GlobalCupertinoLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], - localeListResolutionCallback: - (List locales, Iterable supportedLocales) { - print("locale: ${locales[0]}"); - Locale locale; + localeListResolutionCallback: (List? locales, Iterable supportedLocales) { + if (locales?.isEmpty ?? true) { + return appLocale; + } + print("locale: ${locales![0]}"); + Locale? locale; if (locales[0].countryCode == "TW") { locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'); } else if (locales[0].countryCode == "US"){ @@ -263,20 +217,20 @@ class MyApp extends StatelessWidget { // ScreenUtil.setContext(context); return MediaQuery( data: MediaQuery.of(context).copyWith( - textScaleFactor: AppUtils.textScale(context), + textScaler: TextScaler.linear(AppUtils.textScale(context)), ), child: FlutterSmartDialog(child: widget), ); }, ), onGenerateRoute: (settings) { - final String name = settings.name; - if(lastRoutePage?.settings?.name == name){ - if(lastRoutePage?.settings?.name == "/router/personal_page" - && lastRoutePage.navigator != null) - lastRoutePage.navigator.pop(); + final String? name = settings.name; + if(lastRoutePage?.settings.name == name){ + if(lastRoutePage?.settings.name == "/router/personal_page" + && lastRoutePage?.navigator != null) + lastRoutePage?.navigator?.pop(); } - final Function pageContentBuilder = routers[name]; + final Function? pageContentBuilder = routers[name]; if (pageContentBuilder != null) { final Route route = CupertinoPageRoute( builder: (context) { @@ -489,92 +443,4 @@ Map routers = { TradingCardPage(), '/router/union_select_city': (context, {arguments}) => UnionSelectCity(arguments:arguments), - '/router/business_login_page': (context, {arguments}) => - BusinessLoginPage(arguments: arguments), - '/router/business_page': (context, {arguments}) => - BusinessPage(arguments: arguments), - '/router/flow_page': (context, {arguments}) => - FlowPage(arguments: arguments), - '/router/select_shop': (context, {arguments}) => - SelectShop(arguments:arguments), - '/router/trade_overview_page': (context, {arguments}) => - TradeOverviewPage(arguments: arguments,), - '/router/goods_search_page': (context, {arguments}) => - GoodsSearchPage(arguments: arguments), - '/router/goods_assort': (context, {arguments}) => - GoodsAssort(arguments: arguments), - '/router/add_assort': (context, {arguments}) => - AddAssort(arguments: arguments), - '/router/goods_sort': (context, {arguments}) => - GoodsSort(arguments: arguments), - '/router/batch_shelf': (context, {arguments}) => - BatchShelf(arguments: arguments), - '/router/business_order_detail': (context, {arguments}) => - BusinessOrderDetail(arguments: arguments), - '/router/order_write_off': (context, {arguments}) => - OrderWriteOff(arguments: arguments), - '/router/security_setting': (context, {arguments}) => - SecuritySetting(arguments: arguments), - '/router/merchant_info': (context, {arguments}) => - MerchantInfo(arguments: arguments), - '/router/account_information': (context, {arguments}) => - AccountInformation(arguments: arguments), - '/router/request_refund': (context, {arguments}) => - RequestRefund(arguments:arguments), - '/router/day_report_page': (context, {arguments}) => - DayReportPage(), - '/router/week_report_page': (context, {arguments}) => - WeekReportPage(), - '/router/monthly_report_page': (context, {arguments}) => - MonthlyReportPage(), - '/router/custom_page': (context, {arguments}) => - CustomPage(arguments:arguments), - '/router/shop_image_info': (context, {arguments}) => - ShopImageInfo(arguments:arguments), - '/router/scan_code_page': (context, {arguments}) => - ScanCodePage(arguments:arguments), - '/router/business_vip_page': (context, {arguments}) => - BusinessVipPage(arguments:arguments), - '/router/reservation_page': (context, {arguments}) => - ReservationPage(arguments:arguments), - '/router/add_vip': (context, {arguments}) => - AddVip(arguments:arguments), - '/router/hot_selling_page': (context, {arguments}) => - HotSellingPage(arguments:arguments), - '/router/vip_recharge_page': (context, {arguments}) => - VipRechargePage(arguments:arguments), - '/router/pay_success_page': (context, {arguments}) => - PaySuccessPage(arguments:arguments), - '/router/cashier_page': (context, {arguments}) => - CashierPage(arguments:arguments), - '/router/consumer_ranking_page': (context, {arguments}) => - ConsumerRankingPage(arguments:arguments), - '/router/shop_reservation_code': (context, {arguments}) => - ShopReservationCode(arguments:arguments), - '/router/clerk_manage_page': (context, {arguments}) => - ClerkManagePage(arguments:arguments), - '/router/add_new_clerk_page': (context, {arguments}) => - AddNewClerkPage(arguments:arguments), - '/router/member_details_page': (context, {arguments}) => - MemberDetailsPage(arguments:arguments), - '/router/record_details': (context, {arguments}) => - RecordDetails(arguments:arguments), - '/router/service_subscription_page': (context, {arguments}) => - ServiceSubscriptionPage(arguments:arguments), - '/router/add_goods_page': (context, {arguments}) => - AddGoodsPage(arguments:arguments), - '/router/set_goods_specs': (context, {arguments}) => - SetGoodsSpecs(arguments:arguments), - '/router/edit_specs_detail': (context, {arguments}) => - EditSpecsDetail(arguments:arguments), - '/router/set_meal': (context, {arguments}) => - SetMeal(arguments:arguments), - '/router/function_version_detail': (context, {arguments}) => - FunctionVersionDetail(arguments:arguments), - '/router/register_retrieve_password': (context, {arguments}) => - RegisterRetrievePassword(arguments:arguments), - '/router/service_purchase_record': (context, {arguments}) => - ServicePurchaseRecord(arguments:arguments), - '/router/set_goods_specs_value': (context, {arguments}) => - SetGoodsSpecsValue(arguments:arguments), }; diff --git a/lib/main_page.dart b/lib/main_page.dart index 07ef90c8..50e314c6 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -13,10 +13,10 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/home/home_page.dart'; import 'package:huixiang/main.dart'; import 'package:huixiang/mine/mine_page.dart'; -import 'package:huixiang/retrofit/data/app_update.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/examine_instance.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/app_update.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/examine_instance.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/union/union_page.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -27,19 +27,19 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/native_event_handler.dart'; import 'package:huixiang/view_widget/update_dialog.dart'; import 'package:huixiang/vip/vip_page.dart'; -import 'package:package_info/package_info.dart'; +import 'package:package_info_plus/package_info_plus.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart'; import 'package:sharesdk_plugin/sharesdk_register.dart'; import 'package:tpns_flutter_plugin/android/xg_android_api.dart'; import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; -import 'package:umeng_common_sdk/umeng_common_sdk.dart'; +// import 'package:umeng_common_sdk/umeng_common_sdk.dart'; import 'community/order_page.dart'; class MainPage extends StatefulWidget { - final Map arguments; + final Map? arguments; MainPage({this.arguments}); @@ -50,18 +50,18 @@ class MainPage extends StatefulWidget { } class _MainPage extends State with WidgetsBindingObserver { - List _widgetOptions; + List? _widgetOptions; - List icons; + List? icons; final GlobalKey homePageKey = GlobalKey(); final GlobalKey minePageKey = GlobalKey(); final GlobalKey unionPageKey = GlobalKey(); final GlobalKey vipPageKey = GlobalKey(); // List iconn; - ApiService apiService; + ApiService? apiService; int lastTime = DateTime.now().millisecondsSinceEpoch; - String _platformVersion = 'Unknown'; + // String? _platformVersion = 'Unknown'; @override void dispose() { @@ -95,13 +95,14 @@ class _MainPage extends State with WidgetsBindingObserver { super.initState(); pageController = PageController( initialPage: - widget.arguments != null && widget.arguments["index"] != null - ? widget.arguments["index"] + widget.arguments != null && widget.arguments!["index"] != null + ? widget.arguments!["index"] : 0); - if (widget.arguments != null && widget.arguments["index"] != null) - clickIndex = widget.arguments["index"]; + if (widget.arguments != null && widget.arguments!["index"] != null) + clickIndex = widget.arguments!["index"]; WidgetsBinding.instance.addObserver(this); EasyLoading.instance + ..displayDuration = const Duration(milliseconds: 20000) ..indicatorType = EasyLoadingIndicatorType.circle // ..indicatorType = EasyLoadingIndicatorType.wave // ..indicatorType = EasyLoadingIndicatorType.threeBounce @@ -114,9 +115,9 @@ class _MainPage extends State with WidgetsBindingObserver { ..dismissOnTap = false; initSdk(); - UmengCommonSdk.initCommon('6491509087568a379b5a1345', '6491509087568a379b5a1345', 'Umeng'); - UmengCommonSdk.setPageCollectionModeManual(); - initPlatformState(); + // UmengCommonSdk.initCommon('6491509087568a379b5a1345', '6491509087568a379b5a1345', 'Umeng'); + // UmengCommonSdk.setPageCollectionModeManual(); + // initPlatformState(); pushRoute(); @@ -125,14 +126,14 @@ class _MainPage extends State with WidgetsBindingObserver { var firstLoginCouponList; if (widget.arguments != null && - (widget.arguments["invite"] ?? "") != "" && - widget.arguments["interviewCouponList"] != null) { - invite = widget.arguments["invite"]; - interviewCouponList = widget.arguments["interviewCouponList"]; + (widget.arguments!["invite"] ?? "") != "" && + widget.arguments!["interviewCouponList"] != null) { + invite = widget.arguments!["invite"]; + interviewCouponList = widget.arguments!["interviewCouponList"]; } if (widget.arguments != null && - widget.arguments["firstLoginCouponList"] != null) { - firstLoginCouponList = widget.arguments["firstLoginCouponList"]; + widget.arguments!["firstLoginCouponList"] != null) { + firstLoginCouponList = widget.arguments!["firstLoginCouponList"]; } _widgetOptions = [ @@ -141,14 +142,14 @@ class _MainPage extends State with WidgetsBindingObserver { homePageKey, (index, jpIndex) { if (index == 1) { - if (unionPageKey?.currentState != null) { - UnionPageState state = unionPageKey.currentState; + if (unionPageKey.currentState != null) { + UnionPageState state = unionPageKey.currentState! as UnionPageState; state.jumpIndex(jpIndex); } else - _widgetOptions[1] = UnionPage(unionPageKey, jpIndex); + _widgetOptions?[1] = UnionPage(unionPageKey, jpIndex); } setState(() { - pageController.jumpToPage(index); + pageController?.jumpToPage(index); }); }, invite: invite, @@ -193,20 +194,18 @@ class _MainPage extends State with WidgetsBindingObserver { final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); - Future initPlatformState() async { - String platformVersion; - try { - platformVersion = (await UmengCommonSdk.platformVersion); - } on PlatformException { - platformVersion = 'Failed to get platform version.'; - } - - if (!mounted) return; - - setState(() { - _platformVersion = platformVersion; - }); - } + // Future initPlatformState() async { + // String? platformVersion; + // try { + // platformVersion = (await UmengCommonSdk.platformVersion); + // } on PlatformException { + // platformVersion = 'Failed to get platform version.'; + // } + // if (!mounted) return; + // setState(() { + // _platformVersion = platformVersion; + // }); + // } initSdk() async { xgFlutterPlugin.stopXg(); @@ -280,8 +279,8 @@ class _MainPage extends State with WidgetsBindingObserver { value.setString("pushData", event[Platform.isAndroid ? "customMessage" : "custom"]); }); - if (ModalRoute.of(context).isActive && - ModalRoute.of(context).isCurrent) { + if ((ModalRoute.of(context)?.isActive ?? false) + && (ModalRoute.of(context)?.isCurrent ?? false)) { pushRoute(); } else { Navigator.of(context) @@ -294,8 +293,7 @@ class _MainPage extends State with WidgetsBindingObserver { if (jsonDecode(event["customMessage"])["typed"] == 6) { // HomePageState state = homePageKey.currentState; // state.queryMsgStats(); - - MinePageState state = minePageKey.currentState; + MinePageState state = minePageKey.currentState as MinePageState; state.queryMsgStats(); } } catch (ex) {} @@ -317,98 +315,96 @@ class _MainPage extends State with WidgetsBindingObserver { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (sharedPreferences.getString("token") == null || sharedPreferences.getString("token") == "") return; - String startIntent; + String? startIntent; if (Platform.isAndroid) startIntent = await Bridge.getStartIntent(); - print("intent:$startIntent"); + print("intent:${startIntent}"); String pushData = ""; if (startIntent != null && startIntent != "") { pushData = startIntent; // pushData = """{"typed":1,"info":"1420304936817655808"}"""; } else { - pushData = sharedPreferences.getString("pushData"); + pushData = sharedPreferences.getString("pushData") ?? ""; } - if (pushData == null || pushData == "") return; + if (pushData == "") return; Map pushMap = jsonDecode(pushData); - if (pushMap != null) { - String routeName = ""; - Map params = {}; - switch (pushMap["typed"].toString()) { - case "1": - case "ARTICLE": - routeName = "/router/web_page"; - params["articleId"] = pushMap["info"]; - break; - case "2": - case "ACTIVITY": - routeName = "/router/web_page"; - params["activityId"] = pushMap["info"]; - break; - case "3": - case "SHOP": - routeName = "/router/store_order"; - params["id"] = pushMap["info"]; - params["tenant"] = pushMap["tenant"]; - params["storeName"] = pushMap["storeName"]; - break; - case "4": - case "CREDIT_GOODS": - routeName = "/router/integral_store_page"; - params["goodsId"] = pushMap["info"]; - break; - case "5": - case "ORDER": - routeName = "/router/order_details"; - params["id"] = pushMap["info"]; - break; - case "6": - case "MEMBER": - routeName = "/router/community_details"; - params["businessId"] = pushMap["info"]; - break; - case "8": - case "WALLET": - routeName = "/router/mine_wallet"; - params["id"] = pushMap["info"]; - break; - case "9": - case "WELFARE": - routeName = "/router/welfare_page"; - params["id"] = pushMap["info"]; - break; - case "12": - case "COUPON": - routeName = "/router/coupon_page"; - params["id"] = pushMap["info"]; - break; - case "13": - case "CATE_BEAN": - routeName = "/router/trading_card_page"; - params["id"] = pushMap["info"]; - break; - } - sharedPreferences.setString("pushData", ""); - print("xgPushClickAction: routeName: $routeName"); - if (routeName != "") { - Navigator.of(context).pushNamed(routeName, arguments: params); - } + String routeName = ""; + Map params = {}; + switch (pushMap["typed"].toString()) { + case "1": + case "ARTICLE": + routeName = "/router/web_page"; + params["articleId"] = pushMap["info"]; + break; + case "2": + case "ACTIVITY": + routeName = "/router/web_page"; + params["activityId"] = pushMap["info"]; + break; + case "3": + case "SHOP": + routeName = "/router/store_order"; + params["id"] = pushMap["info"]; + params["tenant"] = pushMap["tenant"]; + params["storeName"] = pushMap["storeName"]; + break; + case "4": + case "CREDIT_GOODS": + routeName = "/router/integral_store_page"; + params["goodsId"] = pushMap["info"]; + break; + case "5": + case "ORDER": + routeName = "/router/order_details"; + params["id"] = pushMap["info"]; + break; + case "6": + case "MEMBER": + routeName = "/router/community_details"; + params["businessId"] = pushMap["info"]; + break; + case "8": + case "WALLET": + routeName = "/router/mine_wallet"; + params["id"] = pushMap["info"]; + break; + case "9": + case "WELFARE": + routeName = "/router/welfare_page"; + params["id"] = pushMap["info"]; + break; + case "12": + case "COUPON": + routeName = "/router/coupon_page"; + params["id"] = pushMap["info"]; + break; + case "13": + case "CATE_BEAN": + routeName = "/router/trading_card_page"; + params["id"] = pushMap["info"]; + break; + } + sharedPreferences.setString("pushData", ""); + print("xgPushClickAction: routeName: $routeName"); + if (routeName != "") { + Navigator.of(context).pushNamed(routeName, arguments: params); + } } - } queryUserInfo() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); if (sharedPreferences.getString("token") == null || sharedPreferences.getString("token") == "") return; - BaseData baseDate = await ApiService( + BaseData? baseDate = await ApiService( Dio(), context: context, - token: sharedPreferences.getString('token'), + token: sharedPreferences.getString('token') ?? "", ).queryInfo().catchError((onError) {}); sharedPreferences.setString('user', jsonEncode(baseDate.data)); //用户登录时,注册推送的标识是手机号 - String mobile = baseDate.data.phone; - if (mobile != null && mobile != "") { - xgFlutterPlugin.setAccount(mobile, AccountType.PHONE_NUMBER); + String? mobile = baseDate.data?.phone; + if (mobile != "") { + xgFlutterPlugin.setAccount(mobile!, AccountType.PHONE_NUMBER); // xgFlutterPlugin.unbindWithIdentifier(identify: mobile, bindType: XGBindType.account) xgFlutterPlugin.bindWithIdentifier( identify: mobile, bindType: XGBindType.account); @@ -428,40 +424,37 @@ class _MainPage extends State with WidgetsBindingObserver { apiService = ApiService( Dio(), context: context, - token: value.getString("token"), + token: value.getString("token") ?? "", ); } PackageInfo packageInfo = await PackageInfo.fromPlatform(); - BaseData baseData = - await apiService.appVersion().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.appVersion().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { // baseData.data.appLastVersion = "2.0.17"; // baseData.data.appLastVersionUp = "1.0.1"; - if (AppUtils.versionCompare( - packageInfo.version, baseData.data?.appLastVersion) && - AppUtils.versionCompare(value.getString("appLastVersion") ?? "1.0.0", - baseData.data?.appLastVersion)) { + if (AppUtils.versionCompare(packageInfo.version, baseData!.data?.appLastVersion ?? "") && + AppUtils.versionCompare(value.getString("appLastVersion") ?? "1.0.0", baseData.data?.appLastVersion ?? "")) { showDialog( context: context, barrierDismissible: false, builder: (BuildContext context) { - return WillPopScope( + return PopScope( + onPopInvoked: (isPop) {}, + canPop: false, child: UpdateDialog(packageInfo.version, baseData.data), - onWillPop: () async { - return Future.value(false); - }); + ); }, ); } else { return; } } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); Navigator.of(context).pop(); } } - PageController pageController; + PageController? pageController; @override Widget build(BuildContext context) { @@ -470,7 +463,7 @@ class _MainPage extends State with WidgetsBindingObserver { body: Container( child: PageView( controller: pageController, - children: _widgetOptions, + children: _widgetOptions ?? [], physics: NeverScrollableScrollPhysics(), onPageChanged: (index) { clickIndex = index; @@ -531,7 +524,7 @@ class _MainPage extends State with WidgetsBindingObserver { // if (index == 1) { // debugDumpApp(); // } - pageController.jumpToPage(clickIndex); + pageController?.jumpToPage(clickIndex); }); }, child: Container( @@ -546,32 +539,8 @@ class _MainPage extends State with WidgetsBindingObserver { SizedBox( height: 4.h, ), - // AnimatedCrossFade( - // firstChild: SvgPicture.asset( - // icons[index], - // width: 30, - // height: 30, - // fit: BoxFit.contain, - // ), - // // Image.asset( - // // icons[index], - // // width: 30, - // // height: 30, - // // fit: BoxFit.contain, - // // ), - // secondChild: Image.asset( - // iconn[index], - // width: 30, - // height: 30, - // fit: BoxFit.contain, - // ), - // crossFadeState: isSelected - // ? CrossFadeState.showFirst - // : CrossFadeState.showSecond, - // duration: Duration(milliseconds: 200), - // ), SvgPicture.asset( - icons[index], + icons?[index] ?? "", width: 30, height: 30, color: isSelected ? Color(0xFF32A060) : Color(0xFFE6E6E6), diff --git a/lib/message/system_details.dart b/lib/message/system_details.dart index 7e70d7f0..9521ddf1 100644 --- a/lib/message/system_details.dart +++ b/lib/message/system_details.dart @@ -4,9 +4,9 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/message.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/message.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -20,7 +20,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class SystemDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; SystemDetails({this.arguments}); @@ -31,7 +31,7 @@ class SystemDetails extends StatefulWidget { } class _SystemDetails extends State { - ApiService apiService; + ApiService? apiService; int pageNum = 1; List messages = []; int msgType = 0; @@ -48,10 +48,11 @@ class _SystemDetails extends State { @override void initState() { super.initState(); - msgType = widget.arguments["msgType"]; + msgType = widget.arguments?["msgType"] ?? 0; SharedPreferences.getInstance().then((value) { - apiService = ApiService(Dio(), token: value.getString("token"),showLoading: true, context: context); + apiService = ApiService(Dio(), + token: value.getString("token"), showLoading: true, context: context); queryMessage(); }); } @@ -62,7 +63,7 @@ class _SystemDetails extends State { } queryMessage() async { - BaseData> baseData = await apiService.msgList({ + BaseData>? baseData = await apiService?.msgList({ "pageNum": pageNum, "pageSize": 10, "searchKey": "", @@ -72,15 +73,15 @@ class _SystemDetails extends State { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (pageNum == 1) { messages.clear(); } - messages.addAll(baseData.data.list); + messages.addAll(baseData?.data?.list ?? []); _refreshController.loadComplete(); _refreshController.refreshCompleted(); if (mounted) setState(() {}); - if (pageNum * 10 > int.tryParse(baseData.data.total)) { + if (pageNum * 10 > (int.tryParse("${baseData?.data?.total}") ?? 0)) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -93,40 +94,40 @@ class _SystemDetails extends State { ///关注/取关会员 _vipFollow(followId, isFollow) async { - BaseData baseData = await apiService.follow(followId); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.follow(followId); + if (baseData?.isSuccess ?? false) { // widget.refresh(); queryMessage(); SmartDialog.showToast(isFollow ? "取关成功" : "关注成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } ///评论 回复 _reply(messageRelational) { - var messageRelational = jsonDecode(messages[indexMsg].relational); + var messageRelational = jsonDecode(messages[indexMsg].relational ?? ""); messageRelational["additionId"].toString(); hintText = S.of(context).huifu_("${messageRelational["nickname"]}"); } ///动态发布评论 _queryMemberComment(String content) async { - var messageRelational = jsonDecode(messages[indexMsg].relational); - BaseData baseData = await apiService.memberComment({ + var messageRelational = jsonDecode(messages[indexMsg].relational ?? ""); + BaseData? baseData = await apiService?.memberComment({ "content": content, "parentId": messageRelational["additionId"].toString(), "relationalId": messageRelational["businessId"].toString(), "relationalType": 4 }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { commentTextController.text = ""; FocusScope.of(context).unfocus(); Navigator.of(context).pop(); SmartDialog.showToast("发布成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -157,7 +158,7 @@ class _SystemDetails extends State { physics: BouncingScrollPhysics(), footer: CustomFooter( loadStyle: LoadStyle.ShowWhenLoading, - builder: (BuildContext context, LoadStatus mode) { + builder: (BuildContext context, LoadStatus? mode) { return (messages.length == 0) ? Container() : MyFooter(mode); }, ), @@ -189,40 +190,46 @@ class _SystemDetails extends State { ///订单通知 Widget orderMessage() { return Container( - color: Colors.white, - width: double.infinity, - padding: - EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - (messages == null || messages.length == 0) - ? NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text: S.of(context).haimeiyouxiaoxi, - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) - : ListView.builder( - padding: EdgeInsets.only(top: 16), - itemCount: messages.length, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - // if (messages[position].typed == 2) { - // Navigator.of(context) - // .pushNamed('/router/exchange_order_details'); - // } - }, - child: orderMessageItem(messages[position]), - ); - }), - ], - )); + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.only( + top: 10.h, + bottom: 20.h, + left: 20.w, + right: 20.w, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + (messages.length == 0) + ? NoDataView( + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: S.of(context).haimeiyouxiaoxi, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + // if (messages[position].typed == 2) { + // Navigator.of(context) + // .pushNamed('/router/exchange_order_details'); + // } + }, + child: orderMessageItem(messages[position]), + ); + }, + ), + ], + ), + ); } Widget orderMessageItem(Message message) { @@ -265,7 +272,7 @@ class _SystemDetails extends State { ], ), Text( - message.updateTime, + message.updateTime ?? "", style: TextStyle( fontSize: 10.sp, color: Color(0xFFA29E9E), @@ -284,7 +291,7 @@ class _SystemDetails extends State { children: [ Expanded( child: Text( - message.content, + message.content ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -304,10 +311,10 @@ class _SystemDetails extends State { height: 1, width: double.infinity, color: Color(0XFFF7F7F7), - ) + ), ], ), - ) + ), ], ), ); @@ -316,40 +323,46 @@ class _SystemDetails extends State { ///充值消息通知 Widget rechargeMessage() { return Container( - color: Colors.white, - width: double.infinity, - padding: - EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - (messages == null || messages.length == 0) - ? NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text: S.of(context).haimeiyouxiaoxi, - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) - : ListView.builder( - padding: EdgeInsets.only(top: 16), - itemCount: messages.length, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - // if (messages[position].typed == 2) { - // Navigator.of(context) - // .pushNamed('/router/exchange_order_details'); - // } - }, - child: rechargeMessageItem(messages[position]), - ); - }), - ], - )); + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.only( + top: 10.h, + bottom: 20.h, + left: 20.w, + right: 20.w, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + (messages.length == 0) + ? NoDataView( + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: S.of(context).haimeiyouxiaoxi, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + // if (messages[position].typed == 2) { + // Navigator.of(context) + // .pushNamed('/router/exchange_order_details'); + // } + }, + child: rechargeMessageItem(messages[position]), + ); + }, + ), + ], + ), + ); } Widget rechargeMessageItem(Message message) { @@ -388,11 +401,11 @@ class _SystemDetails extends State { fontWeight: FontWeight.bold, color: Color(0xFF060606), ), - ) + ), ], ), Text( - message.updateTime, + message.updateTime ?? "", style: TextStyle( fontSize: 10.sp, color: Color(0xFFA29E9E), @@ -424,7 +437,7 @@ class _SystemDetails extends State { children: [ Expanded( child: Text( - message.content, + message.content ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -436,7 +449,7 @@ class _SystemDetails extends State { Icon( Icons.keyboard_arrow_right, color: Colors.black, - ) + ), ], ), Container( @@ -444,10 +457,10 @@ class _SystemDetails extends State { height: 1, width: double.infinity, color: Color(0XFFF7F7F7), - ) + ), ], ), - ) + ), ], ), ); @@ -456,49 +469,55 @@ class _SystemDetails extends State { ///点赞通知 Widget fabulousMessage() { return Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - (messages == null || messages.length == 0) - ? NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text: S.of(context).haimeiyouxiaoxi, - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) - : ListView.builder( - padding: EdgeInsets.only(top: 16), - itemCount: messages.length, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - Navigator.of(context).pushNamed( - '/router/community_details', - arguments: { - "businessId": - jsonDecode(messages[position].relational)[ - "businessId"] - .toString(), - "mid": messages[position].mid - }, - ); - }, - child: fabulousMessageItem(messages[position]), - ); - }), - ], - )); + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.only( + bottom: 20.h, + left: 20.w, + right: 20.w, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + (messages.length == 0) + ? NoDataView( + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: S.of(context).haimeiyouxiaoxi, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + Navigator.of(context).pushNamed( + '/router/community_details', + arguments: { + "businessId": + jsonDecode(messages[position].relational ?? "")[ + "businessId"] + .toString(), + "mid": messages[position].mid + }, + ); + }, + child: fabulousMessageItem(messages[position]), + ); + }, + ), + ], + ), + ); } Widget fabulousMessageItem(Message message) { - var messageRelational = jsonDecode(message.relational); + var messageRelational = jsonDecode(message.relational ?? ""); return Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, @@ -517,95 +536,99 @@ class _SystemDetails extends State { width: 8, ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text(messageRelational["nickname"] ?? "", + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + messageRelational["nickname"] ?? "", style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 14.sp, - color: Color(0xFF1A1A1A))), - SizedBox( - width: 8.w, - ), - Text( - "点赞了", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold, + fontSize: 14.sp, + color: Color(0xFF1A1A1A), + ), ), - ), - ], - ), - SizedBox( - height: 8, - ), - Text( - message.updateTime, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFFA29E9E), - ), - ), - SizedBox( - height: 12.h, - ), - Container( - width: double.infinity, - color: Color(0xFFF2F2F2), - padding: EdgeInsets.all(5), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Text( - // "我的评论:", - // style: TextStyle( - // fontSize: 12.sp, - // height: 1.3, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFF1A1A1A), - // ), - // ), - MImage( - messageRelational["nickname"], - width: 38, - height: 38, - isCircle: true, - fit: BoxFit.cover, - radius: BorderRadius.circular(2), - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", + SizedBox( + width: 8.w, ), - SizedBox(width: 2.w), - Expanded( - child: Text( - messageRelational["content"] ?? "", - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 12.sp, - height: 1.3, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), + Text( + "点赞了", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xFF32A060), ), - ) + ), ], ), - ), - Container( - margin: EdgeInsets.only(top: 16.h, bottom: 16.h), - height: 1.h, - width: double.infinity, - color: Color(0xFFF7F7F7), - ), - ], - )), + SizedBox( + height: 8, + ), + Text( + message.updateTime ?? "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFFA29E9E), + ), + ), + SizedBox( + height: 12.h, + ), + Container( + width: double.infinity, + color: Color(0xFFF2F2F2), + padding: EdgeInsets.all(5), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Text( + // "我的评论:", + // style: TextStyle( + // fontSize: 12.sp, + // height: 1.3, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFF1A1A1A), + // ), + // ), + MImage( + messageRelational["nickname"], + width: 38, + height: 38, + isCircle: true, + fit: BoxFit.cover, + radius: BorderRadius.circular(2), + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + SizedBox(width: 2.w), + Expanded( + child: Text( + messageRelational["content"] ?? "", + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + height: 1.3, + fontWeight: MyFontWeight.regular, + color: Color(0xFF808080), + ), + ), + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 16.h, bottom: 16.h), + height: 1.h, + width: double.infinity, + color: Color(0xFFF7F7F7), + ), + ], + ), + ), ], ), ); @@ -616,12 +639,16 @@ class _SystemDetails extends State { return Container( color: Colors.white, width: double.infinity, - padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w), + padding: EdgeInsets.only( + bottom: 20.h, + left: 20.w, + right: 20.w, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ - (messages == null || messages.length == 0) + (messages.length == 0) ? NoDataView( src: "assets/image/icon_empty.webp", isShowBtn: false, @@ -640,10 +667,10 @@ class _SystemDetails extends State { Navigator.of(context).pushNamed( '/router/community_details', arguments: { - "businessId": - jsonDecode(messages[position].relational)[ - "businessId"] - .toString(), + "businessId": jsonDecode( + messages[position].relational ?? + "")["businessId"] + .toString(), "mid": messages[position].mid }, ); @@ -656,14 +683,14 @@ class _SystemDetails extends State { } Widget commentMessageItem(Message message, index) { - var messageRelational = jsonDecode(message.relational); + var messageRelational = jsonDecode(message.relational ?? ""); return Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - messageRelational["avatar"], + messageRelational["avatar"] ?? "", width: 44, height: 44, isCircle: true, @@ -675,194 +702,198 @@ class _SystemDetails extends State { width: 8, ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text(messageRelational["nickname"], + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + messageRelational["nickname"], style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 14.sp, - color: Color(0xFF1A1A1A))), - SizedBox( - width: 8.w, - ), - Text( - "评论了", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold, + fontSize: 14.sp, + color: Color(0xFF1A1A1A), + ), ), + SizedBox( + width: 8.w, + ), + Text( + "评论了", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xFF32A060), + ), + ), + ], + ), + SizedBox( + height: 8, + ), + Text( + message.updateTime ?? "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFFA29E9E), ), - ], - ), - SizedBox( - height: 8, + ), + ], + ), + ), + GestureDetector( + onTap: () { + setState(() { + indexMsg = index; + showDeleteDialog(); + _reply(messageRelational); + }); + }, + child: Container( + height: 22.h, + width: 40.w, + padding: EdgeInsets.only(left: 2, right: 2), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(11), + border: Border.all( + width: 1, + color: Color(0xFF00A359), + style: BorderStyle.solid, + ), ), - Text( - message.updateTime, + child: Text( + "回复", style: TextStyle( fontSize: 12.sp, - color: Color(0xFFA29E9E), + fontWeight: MyFontWeight.medium, + color: Color(0xFF00A359), ), ), - ], - ), - ), - GestureDetector( - onTap: () { - setState(() { - indexMsg = index; - showDeleteDialog(); - _reply(messageRelational); - }); - }, - child: Container( - height: 22.h, - width: 40.w, - padding: EdgeInsets.only(left: 2, right: 2), - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(11), - border: Border.all( - width: 1, - color: Color(0xFF00A359), - style: BorderStyle.solid, - ), - ), - child: Text( - "回复", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF00A359), - ), ), ), - ) - ], - ), - SizedBox( - height: 8.h, - ), - // Text( - // messageRelational["content"], - // maxLines: 2, - // overflow: TextOverflow.ellipsis, - // style: TextStyle( - // fontSize: 12.sp, - // height: 1.3, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFF1A1A1A), - // ), - // ), - // SizedBox(height:12.h,), - // Container( - // width: double.infinity, - // color:Color(0xFFF2F2F2), - // padding:EdgeInsets.all(5), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Text( - // "我的评论:", - // style: TextStyle( - // fontSize: 12.sp, - // height: 1.3, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFF1A1A1A), - // ), - // ), - // // MImage( - // // "", - // // width: 38, - // // height: 38, - // // isCircle: true, - // // fit: BoxFit.cover, - // // radius: BorderRadius.circular(2), - // // errorSrc: "assets/image/default_1.png", - // // fadeSrc: "assets/image/default_1.png", - // // ), - // SizedBox(width:2.w), - // Expanded(child:Text( - // "文本,是指书面语言的表现形式文本,文本,是指书面语言的表现形式文本。", - // maxLines: 2, - // overflow:TextOverflow.ellipsis, - // style: TextStyle( - // fontSize: 12.sp, - // height: 1.3, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFF808080), - // ), - // ),) - // ], - // ), - // ), - Container( - width: double.infinity, - color: Color(0xFFF2F2F2), - padding: EdgeInsets.all(5), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Text( - // "我的评论:", - // style: TextStyle( - // fontSize: 12.sp, - // height: 1.3, - // fontWeight: MyFontWeight.regular, - // color: Color(0xFF1A1A1A), - // ), - // ), - MImage( - messageRelational["nickname"], - width: 38, - height: 38, - isCircle: true, - fit: BoxFit.cover, - radius: BorderRadius.circular(2), - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ), - SizedBox(width: 2.w), - Expanded( - child: Text( - messageRelational["content"], - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 12.sp, - height: 1.3, - fontWeight: MyFontWeight.regular, - color: Color(0xFF808080), - ), - ), - ) ], ), - ), - Container( - margin: EdgeInsets.only(top: 16.h, bottom: 16.h), - height: 1.h, - width: double.infinity, - color: Color(0xFFF7F7F7), - ), - ], - )), + SizedBox( + height: 8.h, + ), + // Text( + // messageRelational["content"], + // maxLines: 2, + // overflow: TextOverflow.ellipsis, + // style: TextStyle( + // fontSize: 12.sp, + // height: 1.3, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFF1A1A1A), + // ), + // ), + // SizedBox(height:12.h,), + // Container( + // width: double.infinity, + // color:Color(0xFFF2F2F2), + // padding:EdgeInsets.all(5), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // "我的评论:", + // style: TextStyle( + // fontSize: 12.sp, + // height: 1.3, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFF1A1A1A), + // ), + // ), + // // MImage( + // // "", + // // width: 38, + // // height: 38, + // // isCircle: true, + // // fit: BoxFit.cover, + // // radius: BorderRadius.circular(2), + // // errorSrc: "assets/image/default_1.png", + // // fadeSrc: "assets/image/default_1.png", + // // ), + // SizedBox(width:2.w), + // Expanded(child:Text( + // "文本,是指书面语言的表现形式文本,文本,是指书面语言的表现形式文本。", + // maxLines: 2, + // overflow:TextOverflow.ellipsis, + // style: TextStyle( + // fontSize: 12.sp, + // height: 1.3, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFF808080), + // ), + // ),) + // ], + // ), + // ), + Container( + width: double.infinity, + color: Color(0xFFF2F2F2), + padding: EdgeInsets.all(5), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Text( + // "我的评论:", + // style: TextStyle( + // fontSize: 12.sp, + // height: 1.3, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFF1A1A1A), + // ), + // ), + MImage( + messageRelational["nickname"], + width: 38, + height: 38, + isCircle: true, + fit: BoxFit.cover, + radius: BorderRadius.circular(2), + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + SizedBox(width: 2.w), + Expanded( + child: Text( + messageRelational["content"], + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + height: 1.3, + fontWeight: MyFontWeight.regular, + color: Color(0xFF808080), + ), + ), + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 16.h, bottom: 16.h), + height: 1.h, + width: double.infinity, + color: Color(0xFFF7F7F7), + ), + ], + ), + ), ], ), ); @@ -871,44 +902,50 @@ class _SystemDetails extends State { ///关注通知 Widget followMessage() { return Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - (messages == null || messages.length == 0) - ? NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text: S.of(context).haimeiyouxiaoxi, - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) - : ListView.builder( - padding: EdgeInsets.only(top: 16), - itemCount: messages.length, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - // if (messages[position].typed == 2) { - // Navigator.of(context) - // .pushNamed('/router/exchange_order_details'); - // } - }, - child: followMessageItem(messages[position]), - ); - }), - ], - )); + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.only( + bottom: 20.h, + left: 20.w, + right: 20.w, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + (messages.length == 0) + ? NoDataView( + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: S.of(context).haimeiyouxiaoxi, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + // if (messages[position].typed == 2) { + // Navigator.of(context) + // .pushNamed('/router/exchange_order_details'); + // } + }, + child: followMessageItem(messages[position]), + ); + }, + ), + ], + ), + ); } Widget followMessageItem(Message message) { - var messageRelational = jsonDecode(message.relational); - if (message.relational.startsWith("{")) + var messageRelational = jsonDecode(message.relational ?? ""); + if (message.relational?.startsWith("{") ?? false) { return Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, @@ -927,81 +964,84 @@ class _SystemDetails extends State { width: 8, ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text(messageRelational["nickname"], + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + messageRelational["nickname"], style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 14.sp, - color: Color(0xFF1A1A1A))), - SizedBox( - width: 8.w, - ), - Text( - "关注了你", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold, + fontSize: 14.sp, + color: Color(0xFF1A1A1A), + ), + ), + SizedBox( + width: 8.w, ), + Text( + "关注了你", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xFF32A060), + ), + ), + ], + ), + SizedBox( + height: 8, + ), + Text( + message.updateTime ?? "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFFA29E9E), ), - ], - ), - SizedBox( - height: 8, - ), - Text( - message.updateTime, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFFA29E9E), ), - ), - ], + ], + ), ), - ), - GestureDetector( + GestureDetector( onTap: () { setState(() { _vipFollow(messageRelational["mid"].toString(), - message?.followed ?? false); + message.followed ?? false); }); }, child: RoundButton( height: 21.h, width: 56.w, padding: EdgeInsets.all(2), - backgroup: (message?.followed ?? false) + backgroup: (message.followed ?? false) ? Color(0xFFE6E6E6) : Color(0xFF32A060), - textColor: (message?.followed ?? false) + textColor: (message.followed ?? false) ? Color(0xFF808080) : Colors.white, - text: (message?.followed ?? false) ? "已关注" : "回关", + text: (message.followed ?? false) ? "已关注" : "回关", radius: 20, icons: Icon( - (message?.followed ?? false) + (message.followed ?? false) ? Icons.check : Icons.add, - color: (message?.followed ?? false) + color: (message.followed ?? false) ? Color(0xFF808080) : Colors.white, size: 12, ), - ) + ), // Container( // height: 21.h, // width:56.w, @@ -1041,23 +1081,26 @@ class _SystemDetails extends State { // ], // ), // ) - ), - ], - ), - SizedBox( - height: 8.h, - ), - Container( - margin: EdgeInsets.only(top: 16.h, bottom: 16.h), - height: 1.h, - width: double.infinity, - color: Color(0xFFF7F7F7), - ), - ], - )), + ), + ], + ), + SizedBox( + height: 8.h, + ), + Container( + margin: EdgeInsets.only(top: 16.h, bottom: 16.h), + height: 1.h, + width: double.infinity, + color: Color(0xFFF7F7F7), + ), + ], + ), + ), ], ), ); + } + return Container(); } ///动态弹窗 diff --git a/lib/message/system_message.dart b/lib/message/system_message.dart index 7312b58b..689b8604 100644 --- a/lib/message/system_message.dart +++ b/lib/message/system_message.dart @@ -2,14 +2,13 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/message.dart'; -import 'package:huixiang/retrofit/data/msg_stats.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/message.dart'; +import 'package:huixiang/data/msg_stats.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:huixiang/view_widget/round_button.dart'; @@ -25,7 +24,7 @@ class SystemMessagePage extends StatefulWidget { } class _SystemMessagePage extends State { - ApiService apiService; + ApiService? apiService; int pageNum = 1; List messages = []; Map msgNumber = { @@ -57,7 +56,7 @@ class _SystemMessagePage extends State { } queryMessage() async { - BaseData> baseData = await apiService.msgList({ + BaseData>? baseData = await apiService?.msgList({ "pageNum": pageNum, "pageSize": 10, "searchKey": "", @@ -68,12 +67,12 @@ class _SystemMessagePage extends State { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (pageNum == 1) { messages.clear(); } List message = []; - message.addAll(baseData.data.list); + message.addAll(baseData?.data?.list ?? []); message.forEach((element) { if (element.typed == 2 || element.typed == 3) { messages.add(element); @@ -82,7 +81,7 @@ class _SystemMessagePage extends State { _refreshController.loadComplete(); _refreshController.refreshCompleted(); if (mounted) setState(() {}); - if (pageNum * 10 > int.tryParse(baseData.data.total)) { + if (pageNum * 10 > (int.tryParse("${baseData?.data?.total}") ?? 0)) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -94,24 +93,16 @@ class _SystemMessagePage extends State { } queryMsgStats() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.stats().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = + await apiService?.stats().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { msgNumber.forEach((key, value) { msgNumber[key] = 0; }); - baseData.data.forEach((element) { + baseData!.data?.forEach((element) { if (msgNumber.containsKey(element.name)) { - msgNumber[element.name] = element.number; + msgNumber["${element.name}"] = element.number ?? 0; } }); }); @@ -162,7 +153,7 @@ class _SystemMessagePage extends State { physics: BouncingScrollPhysics(), footer: CustomFooter( loadStyle: LoadStyle.ShowWhenLoading, - builder: (BuildContext context, LoadStatus mode) { + builder: (BuildContext context, LoadStatus? mode) { return (messages.length == 0) ? Container() : MyFooter(mode); }, ), @@ -184,7 +175,8 @@ class _SystemMessagePage extends State { color: Colors.white, padding: EdgeInsets.only( top: MediaQuery.of(context).padding.top + 10.h, - bottom: 15.h,right: 16.w), + bottom: 15.h, + right: 16.w), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, @@ -196,7 +188,9 @@ class _SystemMessagePage extends State { }, child: Container( alignment: Alignment.centerRight, - margin: EdgeInsets.only(left: 12,), + margin: EdgeInsets.only( + left: 12, + ), padding: EdgeInsets.all(6), child: Icon( Icons.arrow_back_ios, @@ -238,7 +232,7 @@ class _SystemMessagePage extends State { ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ + onTap: () { Navigator.of(context).pushNamed('/router/system_details', arguments: {"msgType": 6}).then((value) { setState(() { @@ -246,11 +240,12 @@ class _SystemMessagePage extends State { }); }); }, - child:messageItem("assets/image/icon_pl.webp", S.of(context).pinglun, msgNumber["6"].toString()), + child: messageItem("assets/image/icon_pl.webp", + S.of(context).pinglun, msgNumber["6"].toString()), ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ + onTap: () { Navigator.of(context).pushNamed('/router/system_details', arguments: {"msgType": 5}).then((value) { setState(() { @@ -258,11 +253,12 @@ class _SystemMessagePage extends State { }); }); }, - child: messageItem("assets/image/icon_z.webp", S.of(context).dianzan, msgNumber["5"].toString()), + child: messageItem("assets/image/icon_z.webp", + S.of(context).dianzan, msgNumber["5"].toString()), ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ + onTap: () { Navigator.of(context).pushNamed('/router/system_details', arguments: {"msgType": 4}).then((value) { setState(() { @@ -270,19 +266,25 @@ class _SystemMessagePage extends State { }); }); }, - child:messageItem("assets/image/icon_gz.webp", S.of(context).guanzhu,msgNumber["4"].toString()), + child: messageItem("assets/image/icon_gz.webp", + S.of(context).guanzhu, msgNumber["4"].toString()), ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pushNamed('/router/system_notice').then((value) { + onTap: () { + Navigator.of(context) + .pushNamed('/router/system_notice') + .then((value) { setState(() { msgNumber["2"] = 0; msgNumber["3"] = 0; }); }); }, - child:messageItem("assets/image/icon_system_message.webp", S.of(context).xitongxiaoxi, (msgNumber["2"]+msgNumber["3"]).toString()), + child: messageItem( + "assets/image/icon_system_message.webp", + S.of(context).xitongxiaoxi, + "${(msgNumber["2"] ?? 0) + (msgNumber["3"] ?? 0)}"), ), // newsSurvey(), // SizedBox( @@ -300,7 +302,12 @@ class _SystemMessagePage extends State { Widget messageItem(img, title, messageNum) { return Container( - padding: EdgeInsets.only(top:14.h, left:14.w, bottom:10.h, right:14.w), + padding: EdgeInsets.only( + top: 14.h, + left: 14.w, + bottom: 10.h, + right: 14.w, + ), decoration: BoxDecoration( color: Colors.white, ), @@ -326,37 +333,40 @@ class _SystemMessagePage extends State { SizedBox( width: 9.w, ), - if(messageNum != "0") - ((double.tryParse(messageNum) < 100)? - Container( - width: 16, - height: 16, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - color: Color(0xFFFF441A), - ), - child: RoundButton( - text:messageNum, - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFFFF441A), - fontSize: 10.sp, - radius: 100, - )): - Container( - padding: EdgeInsets.symmetric(horizontal:4.w,vertical:2.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - color: Color(0xFFFF441A), - ), - child: RoundButton( - text:"99+", - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFFFF441A), - fontSize: 10.sp, - radius: 100, - ))), + if (messageNum != "0") + (((double.tryParse(messageNum) ?? 0) < 100) + ? Container( + width: 16, + height: 16, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + color: Color(0xFFFF441A), + ), + child: RoundButton( + text: messageNum, + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFFFF441A), + fontSize: 10.sp, + radius: 100, + ), + ) + : Container( + padding: EdgeInsets.symmetric( + horizontal: 4.w, vertical: 2.h), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + color: Color(0xFFFF441A), + ), + child: RoundButton( + text: "99+", + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFFFF441A), + fontSize: 10.sp, + radius: 100, + ), + )), Spacer(), Icon( Icons.keyboard_arrow_right, @@ -364,13 +374,13 @@ class _SystemMessagePage extends State { ), ], ), - if(title != S.of(context).xitongxiaoxi) - Container( - margin: EdgeInsets.only(top: 12.h), - width: double.infinity, - height: 1.h, - color: Color(0xFFF7F7F7), - ) + if (title != S.of(context).xitongxiaoxi) + Container( + margin: EdgeInsets.only(top: 12.h), + width: double.infinity, + height: 1.h, + color: Color(0xFFF7F7F7), + ), ], ), ); @@ -383,176 +393,185 @@ class _SystemMessagePage extends State { child: Row( children: [ Expanded( - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/system_details', - arguments: {"msgType": 5}).then((value) { - setState(() { - msgNumber["5"] = 0; - }); - }); - }, - child: Column( + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/system_details', + arguments: {"msgType": 5}).then((value) { + setState(() { + msgNumber["5"] = 0; + }); + }); + }, + child: Column( + children: [ + Stack( children: [ - Stack( - children: [ - Image.asset( - "assets/image/icon_z.webp", - width: 40, - height: 40, - ), - if (msgNumber["5"].toString() != "0") - Container( - width: 48, - alignment: Alignment.topRight, - child: Container( - width: 20, - height: 17, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - border: Border.all( - width: 1, - color: Colors.white, - style: BorderStyle.solid, - ), - color: Color(0xFFFF441A), - ), - child: RoundButton( - text: msgNumber["5"].toString(), - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFFFF441A), - fontSize: 8.sp, - radius: 100, - )), - ) - ], + Image.asset( + "assets/image/icon_z.webp", + width: 40, + height: 40, ), - SizedBox(height: 6.h), - Text( - S.of(context).dianzan, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF060606), + if (msgNumber["5"].toString() != "0") + Container( + width: 48, + alignment: Alignment.topRight, + child: Container( + width: 20, + height: 17, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + border: Border.all( + width: 1, + color: Colors.white, + style: BorderStyle.solid, + ), + color: Color(0xFFFF441A), + ), + child: RoundButton( + text: msgNumber["5"].toString(), + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFFFF441A), + fontSize: 8.sp, + radius: 100, + ), + ), ), - ) ], - ))), + ), + SizedBox(height: 6.h), + Text( + S.of(context).dianzan, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF060606), + ), + ) + ], + ), + ), + ), Expanded( - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/system_details', - arguments: {"msgType": 6}).then((value) { - setState(() { - msgNumber["6"] = 0; - }); - }); - }, - child: Column( + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/system_details', + arguments: {"msgType": 6}).then((value) { + setState(() { + msgNumber["6"] = 0; + }); + }); + }, + child: Column( + children: [ + Stack( children: [ - Stack( - children: [ - Image.asset( - "assets/image/icon_pl.webp", - width: 40, - height: 40, - ), - if (msgNumber["6"].toString() != "0") - Container( - width: 48, - alignment: Alignment.topRight, - child: Container( - width: 16, - height: 16, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - border: Border.all( - width: 1, - color: Colors.white, - style: BorderStyle.solid, - ), - color: Color(0xFFFF441A), - ), - child: RoundButton( - text: msgNumber["6"].toString(), - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFFFF441A), - fontSize: 8.sp, - radius: 100, - )), - ) - ], + Image.asset( + "assets/image/icon_pl.webp", + width: 40, + height: 40, ), - SizedBox(height: 6.h), - Text( - S.of(context).pinglun, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF060606), + if (msgNumber["6"].toString() != "0") + Container( + width: 48, + alignment: Alignment.topRight, + child: Container( + width: 16, + height: 16, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + border: Border.all( + width: 1, + color: Colors.white, + style: BorderStyle.solid, + ), + color: Color(0xFFFF441A), + ), + child: RoundButton( + text: msgNumber["6"].toString(), + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFFFF441A), + fontSize: 8.sp, + radius: 100, + ), + ), ), - ), ], - ))), + ), + SizedBox(height: 6.h), + Text( + S.of(context).pinglun, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF060606), + ), + ), + ], + ), + ), + ), Expanded( - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/system_details', - arguments: {"msgType": 4}).then((value) { - setState(() { - msgNumber["4"] = 0; - }); - }); - }, - child: Column( + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/system_details', + arguments: {"msgType": 4}).then((value) { + setState(() { + msgNumber["4"] = 0; + }); + }); + }, + child: Column( + children: [ + Stack( children: [ - Stack( - children: [ - Image.asset( - "assets/image/icon_gz.webp", - width: 40, - height: 40, - ), - if (msgNumber["4"].toString() != "0") - Container( - width: 48, - alignment: Alignment.topRight, - child: Container( - width: 16, - height: 16, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - border: Border.all( - width: 1, - color: Colors.white, - style: BorderStyle.solid, - ), - color: Color(0xFFFF441A), - ), - child: RoundButton( - text: msgNumber["4"].toString(), - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFFFF441A), - fontSize: 8.sp, - radius: 100, - )), - ) - ], + Image.asset( + "assets/image/icon_gz.webp", + width: 40, + height: 40, ), - SizedBox(height: 6.h), - Text( - S.of(context).guanzhu, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF060606), + if (msgNumber["4"].toString() != "0") + Container( + width: 48, + alignment: Alignment.topRight, + child: Container( + width: 16, + height: 16, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + border: Border.all( + width: 1, + color: Colors.white, + style: BorderStyle.solid, + ), + color: Color(0xFFFF441A), + ), + child: RoundButton( + text: msgNumber["4"].toString(), + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFFFF441A), + fontSize: 8.sp, + radius: 100, + ), + ), ), - ), ], - ))), + ), + SizedBox(height: 6.h), + Text( + S.of(context).guanzhu, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF060606), + ), + ), + ], + ), + ), + ), ], ), ); @@ -560,59 +579,61 @@ class _SystemMessagePage extends State { Widget buildMessage() { return Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.all(20.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - S.of(context).xitongxiaoxi, - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, - color: Colors.black, - ), + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.all(20.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + S.of(context).xitongxiaoxi, + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + color: Colors.black, ), - (messages == null || messages.length == 0) - ? NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text: S.of(context).haimeiyouxiaoxi, - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) - : ListView.builder( - padding: EdgeInsets.only(top: 16), - itemCount: messages.length, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - if (messages[position].typed == 2) - Navigator.of(context).pushNamed( - '/router/system_details', - arguments: {"msgType": 2}).then((value) { - setState(() { - msgNumber["2"] = 0; - }); + ), + (messages.length == 0) + ? NoDataView( + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: S.of(context).haimeiyouxiaoxi, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + if (messages[position].typed == 2) + Navigator.of(context).pushNamed( + '/router/system_details', + arguments: {"msgType": 2}).then((value) { + setState(() { + msgNumber["2"] = 0; }); - else if (messages[position].typed == 3) - Navigator.of(context).pushNamed( - '/router/system_details', - arguments: {"msgType": 3}).then((value) { - setState(() { - msgNumber["3"] = 0; - }); + }); + else if (messages[position].typed == 3) + Navigator.of(context).pushNamed( + '/router/system_details', + arguments: {"msgType": 3}).then((value) { + setState(() { + msgNumber["3"] = 0; }); - }, - child: buildMessageItem(messages[position]), - ); - }), - ], - )); + }); + }, + child: buildMessageItem(messages[position]), + ); + }, + ), + ], + ), + ); } Widget buildMessageItem(Message message) { @@ -653,91 +674,94 @@ class _SystemMessagePage extends State { width: 12.w, ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( child: Text( - (message.typed == 1) - ? S.of(context).xitongtongzhi - : (message.typed == 2) - ? S.of(context).dingdanxiaoxi - : S.of(context).chongzhixiaoxi, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF060606), + (message.typed == 1) + ? S.of(context).xitongtongzhi + : (message.typed == 2) + ? S.of(context).dingdanxiaoxi + : S.of(context).chongzhixiaoxi, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF060606), + ), + ), ), - )), - Text( - message.updateTime, - style: TextStyle( - fontSize: 10.sp, - color: Color(0xFFA29E9E), + Text( + message.updateTime ?? "", + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), ), - ), - ], - ), - SizedBox( - height: 4.h, - ), - (message.typed != 3) - ? Row( - mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Text( - S.of(context).ninyouyigexindedingdan, - style: TextStyle( - fontSize: 10.sp, - color: Color(0xFF353535), + ], + ), + SizedBox( + height: 4.h, + ), + (message.typed != 3) + ? Row( + mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Text( + S.of(context).ninyouyigexindedingdan, + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFF353535), + ), ), ), - ), - if (msgNumber["2"].toString() != "0") - RoundButton( - width: 16, - height: 16, - text: msgNumber["2"].toString(), - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFFFF441A), - fontSize: 10.sp, - radius: 100, - ), - ], - ) - : Row( - mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( + if (msgNumber["2"].toString() != "0") + RoundButton( + width: 16, + height: 16, + text: msgNumber["2"].toString(), + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFFFF441A), + fontSize: 10.sp, + radius: 100, + ), + ], + ) + : Row( + mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( child: Text( - message.content, - style: TextStyle( - fontSize: 10.sp, - color: Color(0xFF353535), - ), - )), - if (msgNumber["3"].toString() != "0") - RoundButton( - width: 16, - height: 16, - text: msgNumber["3"].toString(), - textColor: Colors.white, - fontWeight: MyFontWeight.regular, - backgroup: Color(0xFFFF441A), - fontSize: 10.sp, - radius: 100, + message.content ?? "", + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFF353535), + ), + ), ), - ], - ), - ], - )), + if (msgNumber["3"].toString() != "0") + RoundButton( + width: 16, + height: 16, + text: msgNumber["3"].toString(), + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFFFF441A), + fontSize: 10.sp, + radius: 100, + ), + ], + ), + ], + ), + ), ], ), Container( diff --git a/lib/message/system_notice.dart b/lib/message/system_notice.dart index 47d23f30..c8a850e5 100644 --- a/lib/message/system_notice.dart +++ b/lib/message/system_notice.dart @@ -1,26 +1,19 @@ -import 'dart:convert'; - import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/message.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/message.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class SystemNotice extends StatefulWidget { - @override State createState() { return _SystemNotice(); @@ -28,7 +21,7 @@ class SystemNotice extends StatefulWidget { } class _SystemNotice extends State { - ApiService apiService; + ApiService? apiService; int pageNum = 1; List messages = []; int msgType = 0; @@ -60,7 +53,7 @@ class _SystemNotice extends State { } queryMessage() async { - BaseData> baseData = await apiService.msgList({ + BaseData>? baseData = await apiService?.msgList({ "pageNum": pageNum, "pageSize": 10, "searchKey": "", @@ -71,12 +64,12 @@ class _SystemNotice extends State { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (pageNum == 1) { messages.clear(); } List message = []; - message.addAll(baseData.data.list); + message.addAll(baseData?.data?.list ?? []); message.forEach((element) { if (element.typed == 2 || element.typed == 3) { messages.add(element); @@ -85,7 +78,7 @@ class _SystemNotice extends State { _refreshController.loadComplete(); _refreshController.refreshCompleted(); if (mounted) setState(() {}); - if (pageNum * 10 > int.tryParse(baseData.data.total)) { + if (pageNum * 10 > (int.tryParse("${baseData?.data?.total}") ?? 0)) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -108,7 +101,7 @@ class _SystemNotice extends State { physics: BouncingScrollPhysics(), footer: CustomFooter( loadStyle: LoadStyle.ShowWhenLoading, - builder: (BuildContext context, LoadStatus mode) { + builder: (BuildContext context, LoadStatus? mode) { return (messages.length == 0) ? Container() : MyFooter(mode); }, ), @@ -178,42 +171,42 @@ class _SystemNotice extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ - (messages == null || messages.length == 0) + (messages.length == 0) ? NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text: S.of(context).haimeiyouxiaoxi, - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: S.of(context).haimeiyouxiaoxi, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) : ListView.builder( - padding: EdgeInsets.only(top: 16), - itemCount: messages.length, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - if (messages[position].typed == 2) - Navigator.of(context).pushNamed( - '/router/system_details', - arguments: {"msgType": 2}); - else if (messages[position].typed == 3) - Navigator.of(context).pushNamed( - '/router/system_details', - arguments: {"msgType": 3}); - }, - child: buildMessageItem(messages[position]), - ); - }), + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + if (messages[position].typed == 2) + Navigator.of(context).pushNamed( + '/router/system_details', + arguments: {"msgType": 2}); + else if (messages[position].typed == 3) + Navigator.of(context).pushNamed( + '/router/system_details', + arguments: {"msgType": 3}); + }, + child: buildMessageItem(messages[position]), + ); + }), ], )); } Widget buildMessageItem(Message message) { return Container( - margin: EdgeInsets.only(top: 8.h, bottom: 8.h,left: 16.w,right: 17.w), + margin: EdgeInsets.only(top: 8.h, bottom: 8.h, left: 16.w, right: 17.w), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, @@ -226,8 +219,8 @@ class _SystemNotice extends State { (message.typed == 1) ? "assets/image/icon_order.webp" : (message.typed == 2) - ? "assets/image/icon_order.webp" - : "assets/image/icon_cz.webp", + ? "assets/image/icon_order.webp" + : "assets/image/icon_cz.webp", width: 24.w, height: 24.h, ), @@ -243,19 +236,19 @@ class _SystemNotice extends State { children: [ Expanded( child: Text( - (message.typed == 1) - ? S.of(context).xitongtongzhi - : (message.typed == 2) + (message.typed == 1) + ? S.of(context).xitongtongzhi + : (message.typed == 2) ? S.of(context).dingdanxiaoxi : S.of(context).chongzhixiaoxi, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF060606), - ), - )), + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF060606), + ), + )), Text( - message.updateTime, + message.updateTime ?? "", style: TextStyle( fontSize: 10.sp, color: Color(0xFFA29E9E), @@ -268,43 +261,43 @@ class _SystemNotice extends State { ), (message.typed != 3) ? Row( - mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Text( - S.of(context).ninyouyigexindedingdan, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF353535), - ), - ), - ), - Icon( - Icons.keyboard_arrow_right, - size: 24, - ), - ], - ) + mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Text( + S.of(context).ninyouyigexindedingdan, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF353535), + ), + ), + ), + Icon( + Icons.keyboard_arrow_right, + size: 24, + ), + ], + ) : Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Expanded( - child: Text( - message.content, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF353535), + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Expanded( + child: Text( + message.content ?? "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF353535), + ), + ), ), - )), - - Icon( - Icons.keyboard_arrow_right, - size: 24, - ), - ], - ), + Icon( + Icons.keyboard_arrow_right, + size: 24, + ), + ], + ), Container( margin: EdgeInsets.only(top: 16.h, bottom: 8.h), height: 1.h, diff --git a/lib/mine/coupon_page.dart b/lib/mine/coupon_page.dart index c7edf812..1045ce0f 100644 --- a/lib/mine/coupon_page.dart +++ b/lib/mine/coupon_page.dart @@ -1,12 +1,10 @@ -import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -30,8 +28,8 @@ class CouponPage extends StatefulWidget { } class _CouponPage extends State { - ApiService apiService; - RefreshController _refreshController; + ApiService? apiService; + late RefreshController _refreshController; int networkStatus = 0; @override @@ -62,7 +60,7 @@ class _CouponPage extends State { } queryCard() async { - BaseData> baseData = await apiService.queryCard({ + BaseData>? baseData = await apiService?.queryCard({ "centre": true, "pageNum": pageNum, "pageSize": 10, @@ -73,15 +71,17 @@ class _CouponPage extends State { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - coupons.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData?.data?.list?.isNotEmpty ?? false) { + if (pageNum == 1) { + coupons.clear(); + } + coupons.addAll(baseData!.data!.list!); } - coupons.addAll(baseData.data.list); setState(() { _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData.data.pageNum == baseData.data.pages) { + if (baseData?.data?.pageNum == baseData?.data?.pages) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -241,7 +241,7 @@ class _CouponPage extends State { child: couponItemSm(), ); }, - ):((coupons != null && coupons.length > 0) + ):((coupons.length > 0) ? ListView.builder( itemBuilder: (context, position) { return GestureDetector( @@ -300,9 +300,8 @@ class _CouponPage extends State { } receiveCoupon(couponId) async { - BaseData baseData = - await apiService.receiveCoupon(couponId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(couponId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { _onRefresh(); showAlertDialog(); } @@ -315,7 +314,8 @@ class _CouponPage extends State { backgroundColor: Colors.transparent, builder: (context) { return SelectorStoreWidget(storeList); - }); + }, + ); } showAlertDialog() { @@ -335,7 +335,8 @@ class _CouponPage extends State { backgroundColor: Colors.transparent, builder: (context) { return CouponDetailsWidget(coupons[index]); - }); + }, + ); } Widget couponItemSm(){ @@ -343,7 +344,9 @@ class _CouponPage extends State { height:143.h, width: double.infinity, margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), - padding: EdgeInsets.only(right:13.w,top: 12.h,bottom: 13.h,left: 18.w), + padding: EdgeInsets.only( + right:13.w,top: 12.h,bottom: 13.h,left: 18.w, + ), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(6), @@ -394,7 +397,8 @@ class _CouponPage extends State { ), ), ], - )), + ), + ), Column( children: [ Shimmer.fromColors( diff --git a/lib/mine/coupons_page.dart b/lib/mine/coupons_page.dart index 77b6c654..1d6ff022 100644 --- a/lib/mine/coupons_page.dart +++ b/lib/mine/coupons_page.dart @@ -1,12 +1,10 @@ -import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/coupon_details_dialog.dart'; @@ -27,8 +25,8 @@ class CouponsPage extends StatefulWidget { } class _CouponsPage extends State { - ApiService apiService; - RefreshController _refreshController; + ApiService? apiService; + late RefreshController _refreshController; @override void dispose() { @@ -57,7 +55,7 @@ class _CouponsPage extends State { } queryCard() async { - BaseData> baseData = await apiService.queryCard({ + BaseData>? baseData = await apiService?.queryCard({ "centre": true, "pageNum": pageNum, "pageSize": 10, @@ -67,15 +65,17 @@ class _CouponsPage extends State { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - coupons.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData?.data?.list?.isNotEmpty ?? false) { + if (pageNum == 1) { + coupons.clear(); + } + coupons.addAll(baseData!.data!.list!); } - coupons.addAll(baseData.data.list); setState(() { _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData.data.pageNum == baseData.data.pages) { + if (baseData?.data?.pageNum == baseData?.data?.pages) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -165,7 +165,7 @@ class _CouponsPage extends State { ), onRefresh: _onRefresh, onLoading: queryCard, - child: (coupons != null && coupons.length > 0) + child: (coupons.isNotEmpty) ? ListView.builder( itemBuilder: (context, position) { return GestureDetector( @@ -203,14 +203,16 @@ class _CouponsPage extends State { ), ); }, - itemCount: coupons != null ? coupons.length : 0, + itemCount: coupons.length ?? 0, ) : NoDataView( src: "assets/image/ka.webp", isShowBtn: false, text: "目前暂无优惠券,请到领劵中心领取哦~", fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h,left:60,right:60), + margin: EdgeInsets.only( + top: 120.h, left:60, right:60, + ), ), ), ), @@ -220,8 +222,8 @@ class _CouponsPage extends State { } receiveCoupon(couponId) async { - BaseData baseData = await apiService.receiveCoupon(couponId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(couponId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { _onRefresh(); showAlertDialog(); } @@ -234,7 +236,8 @@ class _CouponsPage extends State { backgroundColor: Colors.transparent, builder: (context) { return SelectorStoreWidget(storeList); - }); + }, + ); } showAlertDialog() { @@ -255,6 +258,7 @@ class _CouponsPage extends State { backgroundColor: Colors.transparent, builder: (context) { return CouponDetailsWidget(coupons[index]); - }); + }, + ); } } diff --git a/lib/mine/edit_name.dart b/lib/mine/edit_name.dart index b50fa4fe..e6214f07 100644 --- a/lib/mine/edit_name.dart +++ b/lib/mine/edit_name.dart @@ -8,7 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class EditName extends StatefulWidget { final Map arguments; - EditName({this.arguments}); + EditName({required this.arguments}); @override State createState() { @@ -33,7 +33,7 @@ class _EditName extends State { child: GestureDetector( onTap: () { String name = _controller.text; - if (name != null && name != "") { + if (name != "") { Navigator.of(context).pop(name); } else { SmartDialog.showToast("请输入用户名", alignment: Alignment.center); @@ -50,44 +50,45 @@ class _EditName extends State { ), ), body: GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child:Container( - margin: EdgeInsets.all(16), - child: Column( - children: [ - TextField( - style: TextStyle( - height: 1.h, - fontSize: 16.sp, - ), - onChanged: (value) {}, - controller: _controller, - keyboardType: TextInputType.text, - decoration: InputDecoration( - errorBorder: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - hintText: widget.arguments['nick'], - // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), - hintStyle: TextStyle( - fontSize: 10.sp, - color: Color(0xFFA29E9E), + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child: Container( + margin: EdgeInsets.all(16), + child: Column( + children: [ + TextField( + style: TextStyle( + height: 1.h, + fontSize: 16.sp, ), + onChanged: (value) {}, + controller: _controller, + keyboardType: TextInputType.text, + decoration: InputDecoration( + errorBorder: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + hintText: widget.arguments['nick'], + // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), + hintStyle: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), + ), + textInputAction: TextInputAction.next, + inputFormatters: [LengthLimitingTextInputFormatter(10)], + maxLines: 1, ), - textInputAction: TextInputAction.next, - inputFormatters: [LengthLimitingTextInputFormatter(10)], - maxLines: 1, - ), - Container( - height: 1.h, - color: Color(0xFF32A060), - ), - ], + Container( + height: 1.h, + color: Color(0xFF32A060), + ), + ], + ), ), - )), + ), ); } } diff --git a/lib/mine/edit_signature.dart b/lib/mine/edit_signature.dart index 19be0aeb..d2550af7 100644 --- a/lib/mine/edit_signature.dart +++ b/lib/mine/edit_signature.dart @@ -1,15 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class EditSignature extends StatefulWidget { final Map arguments; - EditSignature({this.arguments}); + EditSignature({required this.arguments}); @override State createState() { @@ -34,7 +32,7 @@ class _EditSignature extends State { child: GestureDetector( onTap: () { String signature = _controller.text; - if (signature != null && signature != "") { + if (signature != "") { Navigator.of(context).pop(signature); } else { SmartDialog.showToast("请输入个性签名~", alignment: Alignment.center); @@ -45,58 +43,63 @@ class _EditSignature extends State { height: 24.h, alignment: Alignment.center, decoration: BoxDecoration( - color: Color(0xFF319E5F), - borderRadius: BorderRadius.all(Radius.circular(4))), + color: Color(0xFF319E5F), + borderRadius: BorderRadius.all( + Radius.circular(4), + ), + ), child: Text( S.of(context).baocun, style: TextStyle( - color: Colors.white, - fontSize: 14.sp, - fontWeight: FontWeight.bold), + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.bold, + ), ), ), ), ), ), body: GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child:Container( - margin: EdgeInsets.all(16), - child: Column( - children: [ - TextField( - maxLines: 5, - controller: _controller, - keyboardType: TextInputType.text, - onChanged: (value) { - setState(() { - textLength = value.length; - }); - }, - maxLength: 50, - decoration: InputDecoration( - errorBorder: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - hintText: widget.arguments['signature'], - // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), - hintStyle: TextStyle( - fontSize: 10.sp, - color: Color(0xFFA29E9E), + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child: Container( + margin: EdgeInsets.all(16), + child: Column( + children: [ + TextField( + maxLines: 5, + controller: _controller, + keyboardType: TextInputType.text, + onChanged: (value) { + setState(() { + textLength = value.length; + }); + }, + maxLength: 50, + decoration: InputDecoration( + errorBorder: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + hintText: widget.arguments['signature'], + // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), + hintStyle: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), ), + textInputAction: TextInputAction.next, ), - textInputAction: TextInputAction.next, - ), - Container( - height: 1.h, - color: Color(0xFFD8D8D8), - ), - ], + Container( + height: 1.h, + color: Color(0xFFD8D8D8), + ), + ], + ), ), - )), + ), ); } } diff --git a/lib/mine/fans_page.dart b/lib/mine/fans_page.dart index 76181c8f..0fdb29cc 100644 --- a/lib/mine/fans_page.dart +++ b/lib/mine/fans_page.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/follow_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/follow.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -29,12 +28,11 @@ class FansPage extends StatefulWidget { } } -class _FansPage extends State - with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - RefreshController _refreshController; +class _FansPage extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { + late RefreshController _refreshController; int pageNum = 1; - List list = []; - ApiService apiService; + List list = []; + ApiService? apiService; @override void initState() { @@ -51,14 +49,7 @@ class _FansPage extends State ///我的关注列表 _queryFollowList() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: sharedPreferences.getString("token"), - showLoading: false, - ); - BaseData> baseData = await apiService.followList({ + BaseData>? baseData = await apiService?.followList({ "isMyFans": true, "pageNum": 1, "pageSize": 100, @@ -69,13 +60,15 @@ class _FansPage extends State _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - list.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData?.data?.list?.isNotEmpty ?? false) { + if (pageNum == 1) { + list.clear(); + } + list.addAll(baseData!.data!.list!); } - list.addAll(baseData.data.list); print("list: ${list.length}"); - if (int.tryParse(baseData.data.total) < (pageNum * 10)) { + if ((int.tryParse("${baseData?.data?.total}") ?? 0) < (pageNum * 10)) { _refreshController.loadNoData(); } setState(() {}); @@ -84,13 +77,13 @@ class _FansPage extends State //关注/取关会员 _vipFollow(followId,isFollow) async { - BaseData baseData = await apiService.follow(followId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.follow(followId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { widget.refresh(); _queryFollowList(); SmartDialog.showToast(isFollow?"取关成功":"关注成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -112,14 +105,16 @@ class _FansPage extends State controller: _refreshController, onRefresh: (){_queryFollowList();}, physics: BouncingScrollPhysics(), - child: (list == null || list.length == 0)? NoDataView( + child: (list.isEmpty) ? NoDataView( src: "assets/image/fen_si.webp", isShowBtn: false, text: "目前暂无粉丝,听说多发动态可以涨粉哦~", fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), - ):ListView.builder( - itemCount: list == null ? 0 : list.length, + margin: EdgeInsets.only( + top: 120.h,left: 60.w,right: 60.w, + ), + ) : ListView.builder( + itemCount: list.length ?? 0, padding: EdgeInsets.symmetric(vertical: 8.h), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), @@ -142,15 +137,17 @@ class _FansPage extends State ); } - Widget fansItem(ListData list) { + Widget fansItem(Follow list) { return Container( - margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), + margin: EdgeInsets.symmetric( + horizontal: 16.w, vertical: 16.h, + ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - list != null ? (list.avatar ?? "") : "", + list.avatar ?? "", width: 44, height: 44, isCircle: true, @@ -164,13 +161,14 @@ class _FansPage extends State Expanded( flex: 1, child: Text( - list != null ? (list.nickname ?? "") : "", + list.nickname ?? "", style: TextStyle( color: Color(0xFF1A1A1A), fontSize: 14.sp, fontWeight: MyFontWeight.medium, ), - )), + ), + ), Container( width: 56.w, height: 25.h, @@ -181,23 +179,23 @@ class _FansPage extends State child: GestureDetector( onTap: () { setState(() { - _vipFollow(list.mid,list?.isFollow ?? false); + _vipFollow(list.mid, list.isFollow ?? false); }); }, child: RoundButton( - backgroup: (list?.isFollow ?? false) + backgroup: (list.isFollow ?? false) ? Color(0xFFE6E6E6) : Color(0xFF32A060), - textColor: (list?.isFollow ?? false) + textColor: (list.isFollow ?? false) ? Color(0xFF808080) : Colors.white, - text: (list?.isFollow ?? false) ? "已关注" : "关注", + text: (list.isFollow ?? false) ? "已关注" : "关注", radius: 20, icons: Icon( - (list?.isFollow ?? false) + (list.isFollow ?? false) ? Icons.check : Icons.add, - color: (list?.isFollow ?? false) + color: (list.isFollow ?? false) ? Color(0xFF808080) : Colors.white, size: 14, diff --git a/lib/mine/follow_page.dart b/lib/mine/follow_page.dart index 2a5718ad..3a07d06d 100644 --- a/lib/mine/follow_page.dart +++ b/lib/mine/follow_page.dart @@ -1,12 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/follow_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/follow.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -20,9 +17,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class FollowPage extends StatefulWidget { final Function refresh; - FollowPage( - this.refresh - ); + FollowPage(this.refresh); @override State createState() { @@ -30,11 +25,12 @@ class FollowPage extends StatefulWidget { } } -class _FollowPage extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin{ - RefreshController _refreshController; - ApiService apiService; +class _FollowPage extends State + with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { + late RefreshController _refreshController; + ApiService? apiService; int pageNum = 1; - List list = []; + List list = []; @override void initState() { @@ -51,14 +47,7 @@ class _FollowPage extends State with SingleTickerProviderStateMixin, ///我的关注列表 _queryFollowList() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: sharedPreferences.getString("token"), - showLoading: false, - ); - BaseData> baseData = await apiService.followList({ + BaseData>? baseData = await apiService?.followList({ "isMyFans": false, "pageNum": 1, "pageSize": 100, @@ -69,13 +58,15 @@ class _FollowPage extends State with SingleTickerProviderStateMixin, _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - list.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData?.data?.list?.isNotEmpty ?? false) { + if (pageNum == 1) { + list.clear(); + } + list.addAll(baseData!.data!.list!); } - list.addAll(baseData.data.list); print("list: ${list.length}"); - if (int.tryParse(baseData.data.total) < (pageNum * 10)) { + if ((int.tryParse("${baseData?.data?.total}") ?? 0) < (pageNum * 10)) { _refreshController.loadNoData(); } setState(() {}); @@ -84,13 +75,13 @@ class _FollowPage extends State with SingleTickerProviderStateMixin, ///关注/取关会员 _vipFollow(followId) async { - BaseData baseData = await apiService.follow(followId); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.follow(followId); + if (baseData?.isSuccess ?? false) { widget.refresh(); _queryFollowList(); SmartDialog.showToast("取关成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -99,52 +90,58 @@ class _FollowPage extends State with SingleTickerProviderStateMixin, return Scaffold( body: Container( margin: EdgeInsets.only(top: 2), - color:Colors.white, + color: Colors.white, child: SmartRefresher( - enablePullDown: true, - enablePullUp: false, - header: MyHeader(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - controller: _refreshController, - onRefresh: (){_queryFollowList();}, - physics: BouncingScrollPhysics(), - child:(list == null || list.length == 0)? NoDataView( - src: "assets/image/guan_zhu.webp", - isShowBtn: false, - text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), - ):ListView.builder( - itemCount: list == null ? 0 : list.length, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - scrollDirection: Axis.vertical, - padding: EdgeInsets.symmetric(vertical: 8.h), - itemBuilder: (context, position) { - return Container( - child: followItem(list[position]), - ); + enablePullDown: true, + enablePullUp: false, + header: MyHeader(), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + controller: _refreshController, + onRefresh: () { + _queryFollowList(); }, - ) - ), + physics: BouncingScrollPhysics(), + child: (list.isEmpty) + ? NoDataView( + src: "assets/image/guan_zhu.webp", + isShowBtn: false, + text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~", + fontSize: 16.sp, + margin: EdgeInsets.only( + top: 120.h, + left: 60.w, + right: 60.w, + ), + ) + : ListView.builder( + itemCount: list.length ?? 0, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + scrollDirection: Axis.vertical, + padding: EdgeInsets.symmetric(vertical: 8.h), + itemBuilder: (context, position) { + return Container( + child: followItem(list[position]), + ); + }, + )), ), ); } - - Widget followItem(ListData list) { + Widget followItem(Follow list) { return Container( margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), - child:Row( + child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment:CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - list != null ? (list.avatar ?? "") : "", + (list.avatar ?? ""), width: 44, height: 44, isCircle: true, @@ -153,16 +150,18 @@ class _FollowPage extends State with SingleTickerProviderStateMixin, fadeSrc: "assets/image/default_1.webp", ), SizedBox( - width:8, + width: 8, ), - Expanded(child:Text( - list != null ? (list.nickname ?? "") : "", - style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, + Expanded( + child: Text( + list.nickname ?? "", + style: TextStyle( + color: Color(0xFF1A1A1A), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), ), - )), + ), Container( width: 56.w, height: 25.h, @@ -170,32 +169,33 @@ class _FollowPage extends State with SingleTickerProviderStateMixin, borderRadius: BorderRadius.circular(11.w), color: Color(0xFFE6E6E6), ), - child: - GestureDetector(onTap: (){ - _vipFollow(list.mid); - }, - child:Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment:CrossAxisAlignment.center, - children: [ - Icon( - Icons.check, - color: Color(0xFF808080), - size: 14, - ), - SizedBox( - width:4, - ), - Text( - "已关注", - style: TextStyle( + child: GestureDetector( + onTap: () { + _vipFollow(list.mid); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Icon( + Icons.check, color: Color(0xFF808080), - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, + size: 14, + ), + SizedBox( + width: 4, ), - ), - ], - ),), + Text( + "已关注", + style: TextStyle( + color: Color(0xFF808080), + fontSize: 10.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ), + ), ), ], ), diff --git a/lib/mine/invitation_record.dart b/lib/mine/invitation_record.dart index d2f0bdcf..1c8f5cb1 100644 --- a/lib/mine/invitation_record.dart +++ b/lib/mine/invitation_record.dart @@ -1,20 +1,17 @@ import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/invitation_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/invitation.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -28,11 +25,11 @@ class InvitationRecord extends StatefulWidget { class _InvitationRecord extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; + ApiService? apiService; RefreshController _refreshController = RefreshController(); ScrollController scrollController = ScrollController(); - List invitationList = []; - UserInfo userInfo; + List invitationList = []; + UserInfo? userInfo; int pageNum = 1; @override @@ -48,27 +45,21 @@ class _InvitationRecord extends State ///邀请记录 queryInviteMember() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.inviteMemberList({ + BaseData>? baseData = + await apiService?.inviteMemberList({ "searchKey": "", "pageNum": 1, "pageSize": 100, }).catchError((error) { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - invitationList.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData?.data?.list?.isNotEmpty ?? false) { + if (pageNum == 1) { + invitationList.clear(); + } + invitationList.addAll(baseData!.data!.list!); } - invitationList.addAll(baseData.data.list); setState(() { _refreshController.refreshCompleted(); }); @@ -78,25 +69,17 @@ class _InvitationRecord extends State } queryUserInfo() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseDate = - await apiService.queryInfo().catchError((onError) { + BaseData? baseDate = + await apiService?.queryInfo().catchError((onError) { _refreshController.refreshFailed(); }); - if (baseDate != null && baseDate.isSuccess) { + if (baseDate?.isSuccess ?? false) { setState(() { - userInfo = baseDate.data; + userInfo = baseDate!.data; }); SharedPreferences.getInstance().then( - (value) => { - value.setString('user', jsonEncode(baseDate.data)), + (value) => { + value.setString('user', jsonEncode(baseDate!.data)), }, ); _refreshController.refreshCompleted(); @@ -130,40 +113,135 @@ class _InvitationRecord extends State ), ), Container( - padding: EdgeInsets.only( - top: MediaQuery.of(context).padding.top, - left: 16.w, - right: 16.w), - child: Column( - children: [ - GestureDetector( - onTap: (){ - Navigator.of(context).pop(); - }, - child:Padding( - padding: EdgeInsets.only(top: 15.h, bottom: 30.h), - child: Row( + padding: EdgeInsets.only( + top: MediaQuery.of(context).padding.top, + left: 16.w, + right: 16.w), + child: Column( + children: [ + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Padding( + padding: EdgeInsets.only( + top: 15.h, + bottom: 30.h, + ), + child: Row( + children: [ + Icon( + Icons.arrow_back_ios, + size: 24, + ), + SizedBox( + width: 1.w, + ), + Text( + "我的邀请记录", + style: TextStyle( + fontSize: 18.sp, + color: Color(0xFF000000), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ], + ), + ), + ), + Container( + margin: EdgeInsets.only(bottom: 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( children: [ - Icon( - Icons.arrow_back_ios, - size: 24, + Text( + "${userInfo?.todayInviteNumber ?? 0}", + style: TextStyle( + color: Color(0xFF000000), + fontSize: 30.sp, + fontWeight: MyFontWeight.medium, + ), ), SizedBox( - width: 1.w, + height: 4, ), Text( - "我的邀请记录", + "今日邀请", + style: TextStyle( + color: Color(0xFF808080), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + ), + ), + ), + Container( + width: 1.w, + height: 32.h, + margin: EdgeInsets.only(left: 20.w, right: 20.w), + color: Color(0xFFD2D2D2), + ), + Expanded( + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + "${userInfo?.inviteNumber ?? 0}", style: TextStyle( - fontSize: 18.sp, color: Color(0xFF000000), - fontWeight: MyFontWeight.semi_bold, + fontSize: 30.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox( + height: 4, + ), + Text( + "累计邀请", + style: TextStyle( + color: Color(0xFF808080), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, ), ), ], - )) + ), + ), + ), + ], ), - Container( - margin: EdgeInsets.only(bottom: 16.h), + ), + Expanded( + child: Container( + width: double.infinity, + padding: EdgeInsets.only( + top: 20.h, + left: 16.w, + right: 16.w, + ), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8), @@ -176,195 +254,123 @@ class _InvitationRecord extends State ), ], ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, + child: Column( children: [ - Expanded( - child: Container( - color: Colors.transparent, - padding: EdgeInsets.all(16), - child: Column( - children: [ - Text( - (userInfo?.todayInviteNumber ?? 0).toString(), - style: TextStyle( - color: Color(0xFF000000), - fontSize: 30.sp, - fontWeight: MyFontWeight.medium, - ), - ), - SizedBox( - height: 4, - ), - Text( - "今日邀请", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ))), + Text( + "邀请记录", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + SizedBox( + height: 8.h, + ), Container( - width: 1.w, - height: 32.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w), - color: Color(0xFFD2D2D2), + width: 34.w, + height: 2.h, + margin: EdgeInsets.only(bottom: 20.h), + color: Color(0xFF32A060), ), - Expanded( - child: Container( - color: Colors.transparent, - padding: EdgeInsets.all(16), - child: Column( - children: [ - Text( - (userInfo?.inviteNumber ?? 0).toString(), - style: TextStyle( - color: Color(0xFF000000), - fontSize: 30.sp, - fontWeight: MyFontWeight.medium, - ), - ), - SizedBox( - height: 4, - ), - Text( - "累计邀请", - style: TextStyle( - color: Color(0xFF808080), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ))), - ], - ), - ), - Expanded( - child: Container( - width: double.infinity, - padding: EdgeInsets.only( - top: 20.h, left: 16.w, right: 16.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ), - ], - ), - child: Column( - children: [ - Text( - "邀请记录", + Row( + children: [ + Expanded( + child: Text( + S.of(context).shoujihao, style: TextStyle( color: Color(0xFF353535), - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, ), ), - SizedBox( - height: 8.h, + ), + Text( + "注册时间", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, ), - Container( - width: 34.w, - height: 2.h, - margin: EdgeInsets.only(bottom: 20.h), - color: Color(0xFF32A060), - ), - Row( - children: [ - Expanded( - child: Text( - S.of(context).shoujihao, - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - Text( - "注册时间", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), - Expanded(child: - (invitationList.length == null || invitationList.length == 0) - ? NoDataView( - src: "assets/image/icon_empty.webp", - isShowBtn: false, - text:"还没有邀请记录哦~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ): - ListView.builder( - itemCount:invitationList.length, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - scrollDirection: Axis.vertical, - padding: EdgeInsets.symmetric(vertical: 8.h), - itemBuilder: (context, position) { - return Container( - child: invitationItem(invitationList[position]), - ); - }, - ),) - ], - ))), - ], - )), + ), + ], + ), + Expanded( + child: (invitationList.isEmpty) + ? NoDataView( + src: "assets/image/icon_empty.webp", + isShowBtn: false, + text: "还没有邀请记录哦~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + itemCount: invitationList.length, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + scrollDirection: Axis.vertical, + padding: + EdgeInsets.symmetric(vertical: 8.h), + itemBuilder: (context, position) { + return Container( + child: invitationItem( + invitationList[position]), + ); + }, + ), + ), + ], + ), + ), + ), + ], + ), + ), ], ), ], ); } - Widget invitationItem(InvitationList invitationList) { + Widget invitationItem(Invitation invitationList) { return Container( - child: Column(children: [ - Padding(padding: EdgeInsets.symmetric(vertical: 12.h), - child: - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded(child:Text( - AppUtils.phoneEncode(invitationList?.phone ?? ""), - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ),), - Text( - invitationList?.createTime ?? "", - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 12.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Text( + AppUtils.phoneEncode(invitationList.phone ?? ""), + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ), ), - ) - ], - ),), + Text( + invitationList.createTime ?? "", + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ) + ], + ), + ), Container( - width:double.infinity, - height:1.h, + width: double.infinity, + height: 1.h, color: Color(0xFFF7F7F7), ), - ])); + ], + ), + ); } @override diff --git a/lib/mine/manage_address_page.dart b/lib/mine/manage_address_page.dart index f918399e..edb7b963 100644 --- a/lib/mine/manage_address_page.dart +++ b/lib/mine/manage_address_page.dart @@ -1,10 +1,8 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/address.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/address.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; @@ -16,7 +14,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ManageAddressPage extends StatefulWidget { - final Map arguments; + final Map? arguments; ManageAddressPage({this.arguments}); @@ -27,7 +25,7 @@ class ManageAddressPage extends StatefulWidget { } class _ManageAddressPage extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -40,13 +38,13 @@ class _ManageAddressPage extends State { }); } - List
addressList; + List
? addressList; queryMemberAddress() async { - BaseData> baseData = await apiService.queryMemberAddress(); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.queryMemberAddress(); + if (baseData?.isSuccess ?? false) { checkIndex = 0; - addressList = baseData.data; + addressList = baseData?.data; setState(() {}); } } @@ -64,7 +62,7 @@ class _ManageAddressPage extends State { body: Column( children: [ Expanded( - child: (addressList == null || addressList.length == 0) + child: (addressList?.isEmpty ?? true) ? NoDataView( src:"assets/image/di_zhi.webp", isShowBtn: false, @@ -73,20 +71,19 @@ class _ManageAddressPage extends State { margin: EdgeInsets.only(top: 120.h), ) : ListView.builder( - itemCount: addressList == null ? 0 : addressList.length, + itemCount: addressList?.length ?? 0, physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return InkWell( onTap: () { - if (widget.arguments["isSelector"]) { + if (widget.arguments?["isSelector"] ?? false) { Navigator.of(context).pop({ - "id": "${addressList[position].id}", - "address": "${addressList[position].address}", + "id": "${addressList?[position].id}", + "address": "${addressList?[position].addressStr}", }); } }, - child: - buildAddressItem(addressList[position], position), + child: buildAddressItem(addressList![position], position), ); }, ), @@ -99,7 +96,9 @@ class _ManageAddressPage extends State { child: Container( width: MediaQuery.of(context).size.width, padding: EdgeInsets.all(16), - margin:EdgeInsets.symmetric(horizontal: 16.w,vertical:25.h), + margin:EdgeInsets.symmetric( + horizontal: 16.w,vertical:25.h, + ), alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF32A060), @@ -120,20 +119,19 @@ class _ManageAddressPage extends State { ); } - addAddress({Address address}) async { - if (address != null) { - await Navigator.of(context) - .pushNamed('/router/address_edit_page', arguments: address.toJson()); - } else { - await Navigator.of(context).pushNamed('/router/address_edit_page'); - } + addAddress({Address? address}) async { + await Navigator.of(context).pushNamed('/router/address_edit_page', arguments: address?.toJson()); queryMemberAddress(); } Widget buildAddressItem(Address address, position) { return Container( - margin: EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 8), - padding: EdgeInsets.only(left: 6, right: 16, top: 16, bottom: 8), + margin: EdgeInsets.only( + left: 16, right: 16, top: 8, bottom: 8, + ), + padding: EdgeInsets.only( + left: 6, right: 16, top: 16, bottom: 8, + ), decoration: BoxDecoration( boxShadow: [ BoxShadow( @@ -156,7 +154,7 @@ class _ManageAddressPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - address.username, + address.username ?? "", style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.semi_bold, @@ -172,7 +170,7 @@ class _ManageAddressPage extends State { children: [ Expanded( child: IconText( - address.phone, + address.phone ?? "", leftImage: "assets/image/icon_address_call.webp", iconSize: 16.sp, ), @@ -193,7 +191,7 @@ class _ManageAddressPage extends State { height: 4.h, ), IconText( - "${address.address}", + "${address.addressStr}", isMax: true, textAxisAlignment: CrossAxisAlignment.start, textStyle: TextStyle( @@ -236,7 +234,7 @@ class _ManageAddressPage extends State { style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.regular, - color: address.isDefault + color: (address?.isDefault ?? false) ? Color(0xFF39B54A) : Color(0xFFA29E9E), ), @@ -345,9 +343,8 @@ class _ManageAddressPage extends State { int checkIndex = 0; deleteAddress(position) async { - BaseData baseData = - await apiService.deleteAddress(addressList[position].toJson()); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.deleteAddress(addressList?[position].toJson() ?? {}); + if (baseData?.isSuccess ?? false) { queryMemberAddress(); } } diff --git a/lib/mine/mine_card_invalid_page.dart b/lib/mine/mine_card_invalid_page.dart index 492237c0..7f1e9761 100644 --- a/lib/mine/mine_card_invalid_page.dart +++ b/lib/mine/mine_card_invalid_page.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/coupon_widget.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -21,9 +20,9 @@ class MineCardInvalidPage extends StatefulWidget { } class _MineCardInvalidPage extends State { - RefreshController _refreshController; + late RefreshController _refreshController; - ApiService apiService; + ApiService? apiService; @override void dispose() { @@ -52,7 +51,7 @@ class _MineCardInvalidPage extends State { } queryCard() async { - BaseData> baseData = await apiService.queryCard({ + BaseData>? baseData = await apiService?.queryCard({ "centre": true, "pageNum": pageNum, "pageSize": 10, @@ -62,15 +61,17 @@ class _MineCardInvalidPage extends State { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - coupons.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData?.data?.list?.isNotEmpty ?? false) { + if (pageNum == 1) { + coupons.clear(); + } + coupons.addAll(baseData!.data!.list!); } - coupons.addAll(baseData.data.list); setState(() { _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData.data.pageNum == baseData.data.pages) { + if (baseData?.data?.pageNum == baseData?.data?.pages) { _refreshController.loadNoData(); } else { pageNum += 1; diff --git a/lib/mine/mine_card_page.dart b/lib/mine/mine_card_page.dart index 0b09bd31..f990e3db 100644 --- a/lib/mine/mine_card_page.dart +++ b/lib/mine/mine_card_page.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/mine/vip_card_page.dart'; diff --git a/lib/mine/mine_greenery.dart b/lib/mine/mine_greenery.dart index a088468f..081c90aa 100644 --- a/lib/mine/mine_greenery.dart +++ b/lib/mine/mine_greenery.dart @@ -1,33 +1,17 @@ -import 'dart:io'; - import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_html/flutter_html.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:fluwx/fluwx.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/home/points_mall_view/points_goods_view.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/goods.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/recharge_list.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; -import 'package:huixiang/retrofit/data/vip_rule_details.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/item_input_widget.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -39,11 +23,11 @@ class MineGreenery extends StatefulWidget { } class _MineGreenery extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); final ScrollController scrollController = ScrollController(); int pageNum = 1; - String categoryId; + String? categoryId; bool orderDesc = true; int orderType = 1; List goods = []; @@ -53,9 +37,10 @@ class _MineGreenery extends State { super.initState(); SharedPreferences.getInstance().then((value) => { - apiService = ApiService(Dio(), context: context, token: value.getString("token")), - pointGoodsList(), - }); + apiService = ApiService(Dio(), + context: context, token: value.getString("token")), + pointGoodsList(), + }); } pointGoodsList() async { @@ -67,22 +52,24 @@ class _MineGreenery extends State { "pageSize": 10, "state": 1 }; - BaseData> pageGoods = - await apiService.creditGoods(param).catchError((onError) { + BaseData>? pageGoods = + await apiService?.creditGoods(param).catchError((onError) { refreshController.loadFailed(); refreshController.refreshFailed(); }); EasyLoading.dismiss(); - if (pageGoods != null && pageGoods.isSuccess) { - setState(() { - if (pageNum == 1) { - goods.clear(); - } - goods.addAll(pageGoods.data.list); - }); + if (pageGoods?.isSuccess ?? false) { + if (pageGoods?.data?.list?.isNotEmpty ?? false) { + setState(() { + if (pageNum == 1) { + goods.clear(); + } + goods.addAll(pageGoods!.data!.list!); + }); + } refreshController.refreshCompleted(); refreshController.loadComplete(); - if (pageGoods.data.pageNum == pageGoods.data.pages) { + if (pageGoods?.data?.pageNum == pageGoods?.data?.pages) { refreshController.loadNoData(); } else { pageNum += 1; @@ -114,7 +101,8 @@ class _MineGreenery extends State { }, physics: BouncingScrollPhysics(), scrollController: scrollController, - child: Container(color: Color(0xFF32A060), + child: Container( + color: Color(0xFF32A060), child: Stack( children: [ Container( @@ -128,16 +116,16 @@ class _MineGreenery extends State { ), padding: EdgeInsets.only( top: 23.h + MediaQuery.of(context).padding.top, - left: 14.w,right: 14.w), - child: - Column( + left: 14.w, + right: 14.w), + child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ Spacer(), Container( alignment: Alignment.bottomCenter, - child:Column( + child: Column( children: [ Image.asset( "assets/image/shu3.webp", @@ -153,8 +141,7 @@ class _MineGreenery extends State { ), ), ], - ) - ), + )), ], ), ), @@ -169,36 +156,38 @@ class _MineGreenery extends State { width: double.infinity, margin: EdgeInsets.only( top: 23.h + MediaQuery.of(context).padding.top, - left: 14.w,right: 14.w), + left: 14.w, + right: 14.w), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ GestureDetector( - onTap: (){ - Navigator.of(context).pop(); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Icon( - Icons.arrow_back_ios, - size: 24, - ), - Spacer(), - Text( - "我的绿叶", - style: TextStyle( - fontSize: 17.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF0D0D0D), + onTap: () { + Navigator.of(context).pop(); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Icon( + Icons.arrow_back_ios, + size: 24, + ), + Spacer(), + Text( + "我的绿叶", + style: TextStyle( + fontSize: 17.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF0D0D0D), + ), ), - ), - Spacer() - ], + Spacer() + ], + ), ), - ), goodsRecommendList(), spreadImage(), billDetailed(), @@ -216,7 +205,6 @@ class _MineGreenery extends State { ); } - ///大家都在买 Widget goodsRecommendList() { return Container( @@ -225,54 +213,54 @@ class _MineGreenery extends State { Container( width: double.infinity, height: 497.h, - margin: EdgeInsets.only(top:310.h), + margin: EdgeInsets.only(top: 310.h), decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(6)), + borderRadius: BorderRadius.all( + Radius.circular(6), + ), ), - padding: EdgeInsets.only(top:16.h), + padding: EdgeInsets.only(top: 16.h), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded(child: - GridView.builder( - itemCount:goods == null ? 0 :goods.length, - padding: EdgeInsets.only( - left: 16.w, - right: 16.w, - top: 18.h, - bottom: 16.h, - ), - shrinkWrap: true, - physics: BouncingScrollPhysics(), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - //一行的Widget数量 - crossAxisCount: 2, - //水平子Widget之间间距 - crossAxisSpacing: 11.w, - //垂直子Widget之间间距 - mainAxisSpacing: 16.w, - //子Widget宽高比例 0.59 - childAspectRatio: - 200 / (281 / 2 + (281 / 2) * AppUtils.textScale(context)), + Expanded( + child: GridView.builder( + itemCount: goods.length ?? 0, + padding: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 18.h, + bottom: 16.h, + ), + shrinkWrap: true, + physics: BouncingScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + //一行的Widget数量 + crossAxisCount: 2, + //水平子Widget之间间距 + crossAxisSpacing: 11.w, + //垂直子Widget之间间距 + mainAxisSpacing: 16.w, + //子Widget宽高比例 0.59 + childAspectRatio: 200 / + (281 / 2 + (281 / 2) * AppUtils.textScale(context)), + ), + itemBuilder: (context, index) { + return GestureDetector( + onTap: () {}, + child: buildItem(goods[index]), + ); + }, ), - itemBuilder: (context, index) { - return GestureDetector( - onTap: () { - - }, - child: buildItem(goods[index]), - ); - }, - )), + ), ], ), ), Container( - margin: EdgeInsets.only(top:295.h), - child: - Row( + margin: EdgeInsets.only(top: 295.h), + child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -330,7 +318,7 @@ class _MineGreenery extends State { offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], // color: Colors.white, ), @@ -344,7 +332,7 @@ class _MineGreenery extends State { mainAxisSize: MainAxisSize.max, children: [ MImage( - goods.mainImgPath, + goods.mainImgPath ?? "", aspectRatio: 1.1, fit: BoxFit.cover, radius: BorderRadius.only( @@ -359,15 +347,14 @@ class _MineGreenery extends State { margin: EdgeInsets.only( right: 12.w, top: 10.h, - ),padding: EdgeInsets.only( - bottom: 8 - ), + ), + padding: EdgeInsets.only(bottom: 8), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - goods.name, + goods.name ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -377,44 +364,53 @@ class _MineGreenery extends State { ), ), Spacer(), - Expanded(child:Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - (goods?.price == null || goods.price == "0"?"":S.of(context).jifen_(goods.price)) + (goods?.money == null|| goods.money == "0.00" ?"":" + ${goods.money}元"), - style: TextStyle( - color: Color(0xFFE5600D), - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + (goods.price == "0" + ? "" + : S + .of(context) + .jifen_("${goods.price}")) + + (goods.money == "0.00" + ? "" + : " + ${goods.money}元"), + style: TextStyle( + color: Color(0xFFE5600D), + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + Text( + "+", + style: TextStyle( + color: Color(0xFFE5600D), + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + ), ), - ), - Text( - "+", - style: TextStyle( - color: Color(0xFFE5600D), - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, + Image.asset( + "assets/image/green_leaf.webp", + fit: BoxFit.cover, + width: 12, + height: 12, ), - ), - Image.asset( - "assets/image/green_leaf.webp", - fit: BoxFit.cover, - width: 12, - height: 12, - ), - Text( - "+x100", - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - color: Color(0xFF32A060), - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, + Text( + "+x100", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold, + fontSize: 16.sp, + ), ), - ), - ], - )), + ], + ), + ), ], ), ), @@ -432,15 +428,15 @@ class _MineGreenery extends State { return Container( margin: EdgeInsets.symmetric(vertical: 24.h), child: GestureDetector( - onTap: (){ + onTap: () { Navigator.of(context).pushNamed('/router/invite_friends'); }, - child:ClipRRect( - child:Image.asset( + child: ClipRRect( + child: Image.asset( "assets/image/welfare_spread.webp", - width:double.infinity, + width: double.infinity, fit: BoxFit.fill, - height:80.h, + height: 80.h, ), borderRadius: BorderRadius.circular(6), ), @@ -460,33 +456,32 @@ class _MineGreenery extends State { color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(6)), ), - padding: EdgeInsets.only(top:16.h), - margin: EdgeInsets.only(bottom: 34.h,top: 16), + padding: EdgeInsets.only(top: 16.h), + margin: EdgeInsets.only(bottom: 34.h, top: 16), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded(child: - ListView.builder( - padding: EdgeInsets.zero, - itemCount:6, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - }, - child: billDetailedItem(), - ); - }, - ),) + Expanded( + child: ListView.builder( + padding: EdgeInsets.zero, + itemCount: 6, + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () {}, + child: billDetailedItem(), + ); + }, + ), + ) ], ), ), Container( - child: - Row( + child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -503,12 +498,13 @@ class _MineGreenery extends State { decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(8)), gradient: new LinearGradient( - begin: Alignment.centerRight, - end: Alignment.centerLeft, - colors: [ - Color(0xFF32A060), - Color(0xFF9DF531), - ]), + begin: Alignment.centerRight, + end: Alignment.centerLeft, + colors: [ + Color(0xFF32A060), + Color(0xFF9DF531), + ], + ), ), child: Text( "绿叶收支明细", @@ -563,7 +559,9 @@ class _MineGreenery extends State { fontSize: 14.sp, ), ), - SizedBox(width:5.w,), + SizedBox( + width: 5.w, + ), Text( "(商品号1234567)", overflow: TextOverflow.ellipsis, @@ -576,7 +574,9 @@ class _MineGreenery extends State { ), ], ), - SizedBox(height: 8.h,), + SizedBox( + height: 8.h, + ), Text( "2022-09-09 19:22:23", overflow: TextOverflow.ellipsis, @@ -606,7 +606,7 @@ class _MineGreenery extends State { height: 14, ), ], - ) + ), ], ), Container( @@ -614,10 +614,9 @@ class _MineGreenery extends State { height: 1.h, color: Color(0xFFF2F2F2), margin: EdgeInsets.only(top: 12.h), - ) + ), ], ), ); } - } diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 4c0e444b..6aaba10e 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -1,21 +1,20 @@ import 'dart:convert'; import 'dart:io'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; import 'package:huixiang/mine/mine_view/mine_calendar.dart'; import 'package:huixiang/mine/mine_view/mine_navbar.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/examine_instance.dart'; -import 'package:huixiang/retrofit/data/msg_stats.dart'; -import 'package:huixiang/retrofit/data/rank.dart'; -import 'package:huixiang/retrofit/data/social_info.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/examine_instance.dart'; +import 'package:huixiang/data/msg_stats.dart'; +import 'package:huixiang/data/rank.dart'; +import 'package:huixiang/data/social_info.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -26,9 +25,9 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:dio/dio.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../retrofit/data/banner.dart'; -import '../retrofit/data/coupon.dart'; -import '../retrofit/data/page.dart'; +import '../data/banner.dart'; +import '../data/coupon.dart'; +import '../data/page.dart'; import '../utils/flutter_utils.dart'; import '../view_widget/custom_image.dart'; import 'mine_view/mine_item.dart'; @@ -44,13 +43,13 @@ class MinePage extends StatefulWidget { } class MinePageState extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; - UserInfo userInfo; + ApiService? apiService; + UserInfo? userInfo; List ranks = []; - SocialInfo infoNumber; + SocialInfo? infoNumber; final RefreshController _refreshController = RefreshController(); int totalMsg = 0; - String couponNum; + String? couponNum; List activityBannerData = []; _toUserInfo() async { @@ -72,7 +71,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { @override void dispose() { super.dispose(); - if (_refreshController != null) _refreshController.dispose(); + _refreshController.dispose(); } @override @@ -102,7 +101,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { if (value.containsKey('user') && value.getString('user') != null && value.getString('user') != "") { - userInfo = UserInfo.fromJson(jsonDecode(value.getString('user'))); + userInfo = UserInfo.fromJson(jsonDecode(value.getString('user')!)); } apiService = ApiService( Dio(), @@ -111,26 +110,24 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { showLoading: false, ); - BaseData> rankData = - await apiService.rankList().catchError((onError) { + BaseData>? rankData = await apiService?.rankList().catchError((onError) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), alignment: Alignment.center); _refreshController.refreshFailed(); }); - if (rankData != null && rankData.isSuccess) { + if (rankData?.isSuccess ?? false) { ranks.clear(); - ranks.addAll(rankData.data); + ranks.addAll(rankData?.data ?? []); } - BaseData baseDate = - await apiService.queryInfo().catchError((onError) { + BaseData? baseDate = await apiService?.queryInfo().catchError((onError) { _refreshController.refreshFailed(); }); - if (baseDate != null && baseDate.isSuccess) { - userInfo = baseDate.data; + if (baseDate?.isSuccess ?? false) { + userInfo = baseDate?.data; SharedPreferences.getInstance().then( (value) => { - value.setString('user', jsonEncode(baseDate.data)), + value.setString('user', jsonEncode(baseDate?.data)), }, ); _refreshController.refreshCompleted(); @@ -143,17 +140,17 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ///宣传banner queryActivityBanner() async { SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - showLoading: false, - ); - BaseData> baseData = await apiService.queryBanner({ + apiService = ApiService( + Dio(), + context: context, + token: value.getString("token"), + showLoading: false, + ); + BaseData>? baseData = await apiService?.queryBanner({ "model": {"type": "HOME_STORE_PAGE"}, }).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - activityBannerData = baseData.data.records; + if (baseData?.isSuccess ?? false) { + activityBannerData = baseData?.data?.records ?? []; } } @@ -165,7 +162,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { token: value.getString("token"), showLoading: false, ); - BaseData> baseData = await apiService.queryCard({ + BaseData>? baseData = await apiService?.queryCard({ "centre": true, "pageNum": 1, "pageSize": 10, @@ -174,8 +171,8 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { }).catchError((error) { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - couponNum = baseData.data.total; + if (baseData?.isSuccess ?? false) { + couponNum = baseData?.data?.total; _refreshController.refreshCompleted(); } else { _refreshController.refreshFailed(); @@ -200,12 +197,11 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { showLoading: false, ); - BaseData baseData = - await apiService.socialInfo().catchError((onError) { + BaseData? baseData = await apiService?.socialInfo().catchError((onError) { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - infoNumber = baseData.data; + if (baseData?.isSuccess ?? false) { + infoNumber = baseData?.data; _refreshController.refreshCompleted(); } EasyLoading.dismiss(); @@ -213,21 +209,12 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ///消息数量 queryMsgStats() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.stats().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.stats().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { totalMsg = 0; - baseData.data.forEach((element) { - totalMsg += element.number; + baseData?.data?.forEach((element) { + totalMsg += (element.number ?? 0); }); }); } @@ -397,7 +384,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "已解锁${infoNumber != null ? infoNumber.achievementNumber.toString() : "0"}个成就", + "已解锁${infoNumber?.achievementNumber ?? 0}个成就", style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 14.sp, @@ -416,7 +403,8 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ), ), ], - )), + ), + ), Container( width: 60.w, height: 19.h, @@ -437,7 +425,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { color: Color(0xFF32A060), ), ), - ) + ), ], ) ], @@ -452,7 +440,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { width: double.infinity, margin: EdgeInsets.only(bottom:24.h), height: 85.h, - child: activityBannerData != null && activityBannerData.isNotEmpty + child: activityBannerData.isNotEmpty ? Swiper( pagination: SwiperPagination( alignment: Alignment.bottomCenter, @@ -476,7 +464,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { child: Container( margin: EdgeInsets.symmetric(horizontal: 14.w), child: MImage( - activityBannerData[position].imgUrl, + activityBannerData[position].imgUrl ?? "", fit: BoxFit.cover, radius: BorderRadius.circular(6), errorSrc: "assets/image/default_2_1.webp", @@ -512,9 +500,12 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { }); break; case 4: - String router = activityBannerData.content; + String? router = activityBannerData.content; + if (router?.isEmpty ?? true) { + return; + } // String router = "/router/store_order?{\"id\":\"1512378184161558528\",\"tenant\":\"1188\",\"storeName\":\"农场煮意\"}"; - if (router.contains("?")) { + if (router!.contains("?")) { String params = router.substring(router.indexOf("?") + 1); Map map = jsonDecode(params); Navigator.of(context).pushNamed( @@ -530,12 +521,14 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { }); break; case 7: - String params = activityBannerData.content - .substring(activityBannerData.content.indexOf("?") + 1); + String? router = activityBannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router!.indexOf("?") + 1); Map map = jsonDecode(params); Navigator.of(context).pushNamed( - activityBannerData.content - .substring(0, activityBannerData.content.indexOf("?")), + router.substring(0, router.indexOf("?")), arguments: map); break; } @@ -655,7 +648,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { child: Column( children: [ Text( - infoNumber != null ? infoNumber.follow.toString() : "0", + "${infoNumber?.follow ?? 0}", style: TextStyle( color: Color(0xFF000000), fontSize: 15.sp, @@ -692,7 +685,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { child: Column( children: [ Text( - infoNumber != null ? infoNumber.fans.toString() : "0", + "${infoNumber?.fans ?? 0}", style: TextStyle( color: Color(0xFF000000), fontSize: 15.sp, @@ -729,9 +722,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { child: Column( children: [ Text( - infoNumber != null - ? infoNumber.achievementNumber.toString() - : "0", + "${infoNumber?.achievementNumber ?? 0}", style: TextStyle( color: Color(0xFF000000), fontSize: 15.sp, diff --git a/lib/mine/mine_shop_details.dart b/lib/mine/mine_shop_details.dart index c8aa883f..602af0b2 100644 --- a/lib/mine/mine_shop_details.dart +++ b/lib/mine/mine_shop_details.dart @@ -1,19 +1,18 @@ -import 'package:barcode_widget/barcode_widget.dart'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:huixiang/data/store.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/product.dart'; -import 'package:huixiang/retrofit/data/user_bill.dart'; -import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_bill.dart'; +import 'package:huixiang/data/vip_card.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/location.dart'; -import 'package:huixiang/utils/painter_bg.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -26,7 +25,7 @@ import 'package:shimmer/shimmer.dart'; class MineShopDetails extends StatefulWidget { final Map arguments; - MineShopDetails({this.arguments}); + MineShopDetails({required this.arguments}); @override State createState() { @@ -35,7 +34,7 @@ class MineShopDetails extends StatefulWidget { } class _MineShopDetails extends State { - ApiService apiService; + ApiService? apiService; int selectType = 0; List userBill = []; int networkStatus = 0; @@ -45,7 +44,7 @@ class _MineShopDetails extends State { super.dispose(); refreshController.dispose(); consumeRefreshController.dispose(); - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); } @override @@ -59,25 +58,22 @@ class _MineShopDetails extends State { startLocation(); } - VipCard vipCard; + VipCard? vipCard; final RefreshController refreshController = RefreshController(); final RefreshController consumeRefreshController = RefreshController(); int current = 1; vipDetail(latitude, longitude) async { SharedPreferences value = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); - BaseData baseData = await apiService.vipDetail({ + BaseData? baseData = await apiService?.vipDetail({ "id": widget.arguments["id"], "latitude": "$latitude", "longitude": "$longitude", }).catchError((onError) { networkStatus= -1; }); - if (baseData != null && baseData.isSuccess) { - vipCard = baseData.data; + if (baseData?.isSuccess ?? false) { + vipCard = baseData!.data; refreshController.loadComplete(); networkStatus = 1; } else { @@ -89,9 +85,8 @@ class _MineShopDetails extends State { startLocation() async { // EasyLoading.show(status: S.current.zhengzaijiazai); - Location.getInstance().startLocation(context, (BaiduLocation result){ - if (result != null && - result.latitude != null && + Location.instance.startLocation(context, (BaiduLocation result){ + if (result.latitude != null && result.longitude != null) { vipDetail(result.latitude, result.longitude); } else { @@ -106,12 +101,7 @@ class _MineShopDetails extends State { } billInfo() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: true); - } - BaseData> baseData = await apiService.queryBillInfo({ + BaseData>? baseData = await apiService?.queryBillInfo({ "current": current, "model": {"category": "", "title": "bill_title_balance", "type": ""}, "order": "descending", @@ -124,16 +114,18 @@ class _MineShopDetails extends State { consumeRefreshController.refreshFailed(); consumeRefreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (current == 1) { userBill.clear(); } - userBill.addAll(baseData.data.records); + if (baseData?.data?.records?.isNotEmpty ?? false) { + userBill.addAll(baseData!.data!.records!); + } refreshController.refreshCompleted(); refreshController.loadComplete(); consumeRefreshController.refreshCompleted(); consumeRefreshController.loadComplete(); - if (current * 10 > int.tryParse(baseData.data.total)) { + if (current * 10 > (int.tryParse("${baseData?.data?.total}") ?? 0)) { refreshController.loadNoData(); consumeRefreshController.loadNoData(); } else { @@ -156,7 +148,7 @@ class _MineShopDetails extends State { title: S.of(context).huiyuankaxiangqing, titleColor: Colors.black, background: Colors.white, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, leadingColor: Colors.black, ), body: networkStatus == 0 ? skeletonScreen():Column( @@ -247,13 +239,11 @@ class _MineShopDetails extends State { itemBuilder: (context, position) { return GestureDetector( onTap: () {}, - child: shopItem(vipCard.storeList[position]), + child: shopItem(vipCard!.storeList![position]), ); }, padding: EdgeInsets.symmetric(vertical: 1), - itemCount: (vipCard != null && vipCard.storeList != null) - ? vipCard.storeList.length - : 0, + itemCount: vipCard?.storeList?.length ?? 0, ), ), ) @@ -285,8 +275,9 @@ class _MineShopDetails extends State { }, shrinkWrap: true, padding: EdgeInsets.symmetric(vertical: 1), - itemCount: userBill != null ? userBill.length : 0, - )), + itemCount: userBill.length ?? 0, + ), + ), ), ], ), @@ -294,7 +285,6 @@ class _MineShopDetails extends State { } int colorByName(String storeName) { - if (storeName == null) return 0xFF32A060; if (storeName.contains("百年川椒") || storeName.contains("百年川椒")) { return 0xFFC30D23; } else if (storeName.contains("海峡姐妹") || storeName.contains("海峽姐妹")) { @@ -309,7 +299,9 @@ class _MineShopDetails extends State { return Container( width: double.infinity, // height:140.h, - margin: EdgeInsets.only(bottom: 24.h, top: 14.h, left: 14.w, right: 14.w), + margin: EdgeInsets.only( + bottom: 24.h, top: 14.h, left: 14.w, right: 14.w, + ), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -327,9 +319,7 @@ class _MineShopDetails extends State { child: Row( children: [ MImage( - (vipCard?.storeList?.length ?? 0) > 0 - ? vipCard.storeList[0].logo - : "", + vipCard?.storeList?[0].logo ?? "", width: 38, height: 38, radius: BorderRadius.circular(100), @@ -341,7 +331,7 @@ class _MineShopDetails extends State { width: 6, ), Text( - vipCard != null ? vipCard.tenantName : "", + vipCard?.tenantName ?? "", style: TextStyle( color: Color(0xFFFFFFFF), fontSize: 15.sp, @@ -390,7 +380,7 @@ class _MineShopDetails extends State { height: 4.h, ), Text( - "¥ ${vipCard != null ? vipCard.balance : ""}", + "¥ ${vipCard?.balance ?? ""}", style: TextStyle( color: Color(0xFF262626), fontSize: 24.sp, @@ -413,7 +403,9 @@ class _MineShopDetails extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(bottom: 24.h, top: 14.h, left: 14.w, right: 14.w), + margin: EdgeInsets.only( + bottom: 24.h, top: 14.h, left: 14.w, right: 14.w, + ), child:Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -616,17 +608,20 @@ class _MineShopDetails extends State { }, ), ], - )); + ), + ); } - Widget shopItem(StoreListBean store) { + Widget shopItem(Store store) { return Container( decoration: BoxDecoration( borderRadius: new BorderRadius.circular(6), color: Colors.white, ), padding: EdgeInsets.all(12), - margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h), + margin: EdgeInsets.symmetric( + horizontal: 16.w, vertical: 8.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, @@ -637,7 +632,7 @@ class _MineShopDetails extends State { Expanded( flex: 1, child: Text( - (store != null) ? store.storeName : "", + store.storeName ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, @@ -649,7 +644,7 @@ class _MineShopDetails extends State { onTap: () { // Navigator.of(context).pushNamed('/router/union_detail_page', // arguments: {"id": store.id}); - if (store.posType.code == "NORMALSTORE") { + if (store.posType?.code == "NORMALSTORE") { Scan.toScan( context, store.id, @@ -698,7 +693,7 @@ class _MineShopDetails extends State { ), Expanded( child: Text( - store.address, + store.address ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 12.sp, @@ -723,7 +718,7 @@ class _MineShopDetails extends State { S.of(context).yingyeshijian((store.openStartTime == null && store.openEndTime == null) ? S.of(context).quantian - : "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))} - ${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}"), + : "${store.openStartTime?.substring(0, store.openStartTime?.lastIndexOf(":"))} - ${store.openEndTime?.substring(0, store.openEndTime?.lastIndexOf(":"))}"), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -795,7 +790,7 @@ class _MineShopDetails extends State { ], ), Text( - "-${double.tryParse(userBill.number ?? "0").toInt().toString()}元", + "-${double.tryParse("${userBill.number}") ?? 0}元", style: TextStyle( fontSize: 18.sp, fontWeight: MyFontWeight.regular, @@ -809,60 +804,58 @@ class _MineShopDetails extends State { bool isRemake = true; - String totalPrice(orderInfo) { - if (orderInfo == null) return ""; - double totalPrice = (double.tryParse(orderInfo.orderSum) + - double.tryParse(orderInfo.postFee)); - if (orderInfo.orderDetail != null && - orderInfo.orderDetail.couponDTO != null) { - totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money); - } - return "$totalPrice"; - } - - List goodsItem(List products) { - if (products == null) return []; - if (products.length > 3) { - products = products.sublist(0, 3); - } - return products - .map( - (e) => Container( - margin: EdgeInsets.symmetric(horizontal: 2.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - MImage( - e.skuImg, - width: 75.w, - height: 75.h, - fit: BoxFit.contain, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ), - SizedBox( - height: 4.h, - ), - if (isRemake) - Container( - width: 75.w, - child: Text( - e.productName, - maxLines: 1, - textAlign: TextAlign.center, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF353535), - ), - ), - ), - ], - ), - ), - ) - .toList(); - } + // String totalPrice(orderInfo) { + // if (orderInfo == null) return ""; + // double totalPrice = (double.tryParse(orderInfo.orderSum) + + // double.tryParse(orderInfo.postFee)); + // if (orderInfo.orderDetail != null && + // orderInfo.orderDetail.couponDTO != null) { + // totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money); + // } + // return "$totalPrice"; + // } + // List goodsItem(List products) { + // if (products.length > 3) { + // products = products.sublist(0, 3); + // } + // return products + // .map( + // (e) => Container( + // margin: EdgeInsets.symmetric(horizontal: 2.w), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // MImage( + // e.skuImg, + // width: 75.w, + // height: 75.h, + // fit: BoxFit.contain, + // errorSrc: "assets/image/default_1.webp", + // fadeSrc: "assets/image/default_1.webp", + // ), + // SizedBox( + // height: 4.h, + // ), + // if (isRemake) + // Container( + // width: 75.w, + // child: Text( + // e.productName, + // maxLines: 1, + // textAlign: TextAlign.center, + // overflow: TextOverflow.ellipsis, + // style: TextStyle( + // fontSize: 10.sp, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFF353535), + // ), + // ), + // ), + // ], + // ), + // ), + // ) + // .toList(); + // } } diff --git a/lib/mine/mine_shop_page.dart b/lib/mine/mine_shop_page.dart index 3a496fd4..e04715eb 100644 --- a/lib/mine/mine_shop_page.dart +++ b/lib/mine/mine_shop_page.dart @@ -1,14 +1,10 @@ -import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_bill.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/vip_card.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -16,7 +12,6 @@ import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -31,9 +26,9 @@ class MineShopPage extends StatefulWidget { class _MineShopPage extends State with WidgetsBindingObserver{ List coupons = []; - ApiService apiService; + ApiService? apiService; int current = 1; - RefreshController refreshController ; + late RefreshController refreshController ; final TextEditingController editingController = TextEditingController(); int optionIndex = 0; bool isKeyBoardShow = false; @@ -91,16 +86,15 @@ class _MineShopPage extends State with WidgetsBindingObserver{ queryVipCard({bool showLoading = true}) async { try{ if(showLoading)EasyLoading.show(status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - BaseData> baseData = - await apiService.vipList({ + BaseData>? baseData = await apiService?.vipList({ "keywords":editingController.text, }).catchError((error) { networkStatus = -1; refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { coupons.clear(); - coupons.addAll(baseData.data); + coupons.addAll(baseData!.data ?? []); refreshController.refreshCompleted(); networkStatus = 1; } else { @@ -153,7 +147,7 @@ class _MineShopPage extends State with WidgetsBindingObserver{ itemBuilder: (context, position) { return shopItemSm(); }, - ):((coupons != null && coupons.length > 0) + ):((coupons.length > 0) ? ListView.builder( padding: EdgeInsets.symmetric(vertical: 8.h), itemBuilder: (context, position) { @@ -164,7 +158,7 @@ class _MineShopPage extends State with WidgetsBindingObserver{ arguments: { "id": coupons[position].id, "tenantCode":coupons[position].tenantCode, - "storeId":coupons[position].storeList[0].id + "storeId":coupons[position].storeList?[0].id }).then((value) { queryVipCard(showLoading: false); }); @@ -172,7 +166,7 @@ class _MineShopPage extends State with WidgetsBindingObserver{ child: shopItem(coupons[position]), ); }, - itemCount: coupons != null ? coupons.length : 0, + itemCount: coupons.length ?? 0, ) : NoDataView( src: "assets/image/icon_empty.webp", @@ -221,7 +215,9 @@ class _MineShopPage extends State with WidgetsBindingObserver{ color: Color(0xFFB3B3B3), ), isCollapsed: true, - prefixIcon:Padding(padding: EdgeInsets.only(left: 5.w,right: 5.w),child: Image.asset( + prefixIcon:Padding( + padding: EdgeInsets.only(left: 5.w,right: 5.w), + child: Image.asset( "assets/image/icon_search.webp", width: 16.h, height: 16.h, @@ -233,9 +229,11 @@ class _MineShopPage extends State with WidgetsBindingObserver{ ); } - int colorByName(String storeName) { - if (storeName == null) return 0xFF32A060; - if (storeName.contains("百年川椒") || storeName.contains("百年川椒")) { + int colorByName(String? storeName) { + if (storeName?.isNotEmpty ?? false) { + return 0xFF32A060; + } + if (storeName!.contains("百年川椒") || storeName.contains("百年川椒")) { return 0xFFC30D23; } else if (storeName.contains("海峡姐妹") || storeName.contains("海峽姐妹")) { return 0xFFE4C796; @@ -266,9 +264,7 @@ class _MineShopPage extends State with WidgetsBindingObserver{ child: Row( children: [ MImage( - (vipCard?.storeList?.length ?? 0) > 0 - ? vipCard.storeList[0].logo - : "", + vipCard.storeList?[0].logo ?? "", width: 38, height: 38, fit: BoxFit.cover, @@ -327,14 +323,15 @@ class _MineShopPage extends State with WidgetsBindingObserver{ mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Expanded(child: Text( - "¥${vipCard != null ? vipCard.balance : ""}", + Expanded( + child: Text( + "¥${vipCard.balance ?? ""}", style: TextStyle( color: Color(0xFF262626), fontSize:24.sp, fontWeight: MyFontWeight.bold, ), - )), + ),), Text( "去充值", style: TextStyle( @@ -349,7 +346,7 @@ class _MineShopPage extends State with WidgetsBindingObserver{ width: 16, height: 16, color: Color(0xFF262626), - ) + ), ], ), ], @@ -363,7 +360,9 @@ class _MineShopPage extends State with WidgetsBindingObserver{ Widget shopItemSm(){ return Container( width:double.infinity, - margin: EdgeInsets.only(bottom: 12.h,top: 14.h,left: 14.w,right: 14.w), + margin: EdgeInsets.only( + bottom: 12.h,top: 14.h,left: 14.w,right: 14.w, + ), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -468,7 +467,7 @@ class _MineShopPage extends State with WidgetsBindingObserver{ width: 16, height: 16, color: Color(0xFF262626), - ) + ), ], ), ], diff --git a/lib/mine/mine_shop_recharge.dart b/lib/mine/mine_shop_recharge.dart index 6e16e407..cd998840 100644 --- a/lib/mine/mine_shop_recharge.dart +++ b/lib/mine/mine_shop_recharge.dart @@ -2,13 +2,16 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:fluwx/fluwx.dart'; +import 'package:huixiang/data/member_recharge.dart'; +import 'package:huixiang/data/store.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/vip_card.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -18,23 +21,21 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:shimmer/shimmer.dart'; +import 'package:tobias/tobias.dart'; -import '../retrofit/data/member_recharge_list.dart'; -import '../retrofit/data/rechargeActLists.dart'; -import '../retrofit/data/wx_pay.dart'; +import '../data/wx_pay.dart'; import '../retrofit/min_api.dart'; import '../utils/flutter_utils.dart'; import '../utils/min.dart'; import '../view_widget/classic_header.dart'; import '../view_widget/my_footer.dart'; import '../view_widget/no_data_view.dart'; -import '../view_widget/recharge_details_dialog.dart'; -import 'package:tobias/tobias.dart' as tobias; + class MineShopRecharge extends StatefulWidget { final Map arguments; - MineShopRecharge({this.arguments}); + MineShopRecharge({required this.arguments}); @override State createState() { @@ -43,18 +44,18 @@ class MineShopRecharge extends StatefulWidget { } class _MineShopRecharge extends State { - ApiService apiService; - MinApiService minService; - VipCard vipCard; - List memberRechargeList = []; + ApiService? apiService; + MinApiService? minService; + VipCard? vipCard; + List memberRechargeList = []; int selectIndex = 0; double discount = 100; var checkIndex = 2; dynamic payListen; int _loadCount = 0; - String tenant; - String storeId; - String minToken; + late String tenant; + late String storeId; + String? minToken; final RefreshController refreshController = RefreshController(); int networkStatus = 0; @@ -62,16 +63,19 @@ class _MineShopRecharge extends State { void dispose() { super.dispose(); refreshController.dispose(); - if (payListen != null) payListen.cancel(); } + Fluwx fluwx = Fluwx(); + Tobias tobias = Tobias(); + @override void initState() { super.initState(); storeId = widget.arguments["storeId"]; tenant = widget.arguments["tenantCode"]; _onRefresh(); - payListen = weChatResponseEventHandler.listen((event) async { + + fluwx.addSubscriber((event) async { print("payCallback: ${event.errCode}"); if (event.errCode == 0) { SmartDialog.showToast("充值成功", alignment: Alignment.center); @@ -85,15 +89,15 @@ class _MineShopRecharge extends State { ///会员卡详情 vipDetail({bool isSingle = true}) async { try { - BaseData baseData = await apiService.vipDetail({ + BaseData? baseData = await apiService?.vipDetail({ "id": widget.arguments["id"], "latitude": "", "longitude": "", }).catchError((onError) { networkStatus = -1; }); - if (baseData != null && baseData.isSuccess) { - vipCard = baseData.data; + if (baseData?.isSuccess ?? false) { + vipCard = baseData!.data; networkStatus = 1; } } finally { @@ -107,14 +111,14 @@ class _MineShopRecharge extends State { ///小程序登录 minLogin() async { try { - var baseData = await apiService.minLogin(storeId).catchError((onError) { + var baseData = await apiService?.minLogin(storeId).catchError((onError) { debugPrint(onError.toString()); }); - if (baseData != null && baseData.isSuccess) { - minToken = baseData.data["token"]; + if (baseData?.isSuccess ?? false) { + minToken = baseData!.data["token"]; SharedPreferences.getInstance().then( (value) => { - value.setString('minToken', minToken), + value.setString('minToken', "${minToken}"), value.setString('tenant', tenant), value.setString('storeId', storeId), }, @@ -133,12 +137,11 @@ class _MineShopRecharge extends State { ///充值列表 queryRechargeActList() async { try { - BaseData> baseData = - await minService.memberRechargeList().catchError((onError) { + BaseData>? baseData = await minService?.memberRechargeList().catchError((onError) { networkStatus = -1; }); - if (baseData != null && baseData.isSuccess) { - memberRechargeList = baseData.data; + if (baseData?.isSuccess ?? false) { + memberRechargeList = baseData!.data ?? []; networkStatus = 1; } } finally { @@ -148,13 +151,12 @@ class _MineShopRecharge extends State { ///门店充值 shopRecharge() async { - if (minService == null) await minLogin(); - BaseData baseData = await minService.memberRecharge({ + BaseData? baseData = await minService?.memberRecharge({ "money": 0, "rechargeId": memberRechargeList[selectIndex].id, "type": checkIndex == 2 ? "wechat" : "alipay", }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (checkIndex == 2) { if (Platform.isAndroid) { if (!(await Min.isInitialize())) { @@ -164,29 +166,34 @@ class _MineShopRecharge extends State { await Min.initialize(); } } - WxPay wxPay = WxPay.fromJson(baseData.data); - await registerWxApi( - appId: wxPay.appId, + WxPay? wxPay = WxPay.fromJson(baseData!.data); + if (wxPay?.isAnyEmpty() ?? true) { + return; + } + await fluwx.registerApi( + appId: wxPay.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + ) ); } else { - tobias.isAliPayInstalled().then((value) => { + tobias.isAliPayInstalled.then((value) => { // 判断是否安装了支付宝 if (!value) {SmartDialog.showToast("请安装支付宝", alignment: Alignment.center)} else { - tobias.aliPay(baseData.data["body"]).then((payRes) { + tobias.pay(baseData!.data["body"]).then((payRes) { if (payRes['resultStatus'] == 9000 || payRes['resultStatus'] == '9000') { SmartDialog.showToast("充值成功", @@ -201,19 +208,13 @@ class _MineShopRecharge extends State { }); } } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } _onRefresh() async { EasyLoading.show( status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); - } - if (minService == null) await minLogin(); vipDetail(isSingle: false); queryRechargeActList(); } @@ -235,7 +236,7 @@ class _MineShopRecharge extends State { title: S.of(context).dianpuchongzhi, titleColor: Colors.black, background: Colors.white, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, leadingColor: Colors.black, ), body: SmartRefresher( @@ -255,15 +256,11 @@ class _MineShopRecharge extends State { : Column( children: [ shopRechargeCard(), - (memberRechargeList != null && - (memberRechargeList?.length ?? 0) > 0) + (memberRechargeList?.isNotEmpty ?? false) ? Expanded( child: ListView.builder( padding: EdgeInsets.zero, - itemCount: (memberRechargeList != null && - (memberRechargeList?.length ?? 0) > 0) - ? memberRechargeList.length - : 0, + itemCount: memberRechargeList.length ?? 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -274,20 +271,21 @@ class _MineShopRecharge extends State { selectIndex = position; }); }, - child: rechargeItem( - memberRechargeList[position], position)); + child: rechargeItem(memberRechargeList[position], position), + ); }, - )) + ), + ) : NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, text: "当前店铺暂无充值套餐~", fontSize: 16.sp, margin: EdgeInsets.only( - top: 90.h, left: 60.w, right: 60.w), + top: 90.h, left: 60.w, right: 60.w, + ), ), - if (memberRechargeList != null && - (memberRechargeList?.length ?? 0) > 0) + if (memberRechargeList?.isNotEmpty ?? false) Container( width: double.infinity, margin: EdgeInsets.only(left: 16, right: 16), @@ -372,8 +370,7 @@ class _MineShopRecharge extends State { ], ), ), - if (memberRechargeList != null && - (memberRechargeList?.length ?? 0) > 0) + if (memberRechargeList?.isNotEmpty ?? false) Align( alignment: Alignment.bottomCenter, child: GestureDetector( @@ -407,12 +404,12 @@ class _MineShopRecharge extends State { ) ], ), - )); + ), + ); } ///卡片背景底色 int colorByName(String storeName) { - if (storeName == null) return 0xFF32A060; if (storeName.contains("百年川椒") || storeName.contains("百年川椒")) { return 0xFFC30D23; } else if (storeName.contains("海峡姐妹") || storeName.contains("海峽姐妹")) { @@ -532,8 +529,11 @@ class _MineShopRecharge extends State { height: 69.h, decoration: BoxDecoration( borderRadius: BorderRadius.circular(4), - color: Colors.white), - margin: EdgeInsets.only(bottom: 14.h, left: 14.w, right: 14.w), + color: Colors.white, + ), + margin: EdgeInsets.only( + bottom: 14.h, left: 14.w, right: 14.w, + ), padding: EdgeInsets.only(left: 16), child: Flex( direction: Axis.horizontal, @@ -569,7 +569,9 @@ class _MineShopRecharge extends State { width: 1.w, height: 37.h, color: Color(0xFF979797), - margin: EdgeInsets.only(right: 16.w, left: 12), + margin: EdgeInsets.only( + right: 16.w, left: 12, + ), ), Expanded( flex: 2, @@ -628,11 +630,14 @@ class _MineShopRecharge extends State { ], ) ], - )) + ), + ) ], - )); + ), + ); }, - )), + ), + ), Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, @@ -744,7 +749,8 @@ class _MineShopRecharge extends State { borderRadius: BorderRadius.circular(27), ), margin: EdgeInsets.only( - top: 12.h, left: 16.w, right: 16.w, bottom: 21.h), + top: 12.h, left: 16.w, right: 16.w, bottom: 21.h, + ), ), ) ], @@ -762,8 +768,9 @@ class _MineShopRecharge extends State { child: Container( width: double.infinity, // height:140.h, - margin: - EdgeInsets.only(bottom: 24.h, top: 14.h, left: 14.w, right: 14.w), + margin: EdgeInsets.only( + bottom: 24.h, top: 14.h, left: 14.w, right: 14.w, + ), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -781,9 +788,7 @@ class _MineShopRecharge extends State { child: Row( children: [ MImage( - (vipCard?.storeList?.length ?? 0) > 0 - ? vipCard.storeList[0].logo - : "", + vipCard?.storeList?[0].logo ?? "", width: 38, height: 38, radius: BorderRadius.circular(100), @@ -795,7 +800,7 @@ class _MineShopRecharge extends State { width: 6, ), Text( - vipCard != null ? vipCard.tenantName : "", + vipCard?.tenantName ?? "", style: TextStyle( color: Color(0xFFFFFFFF), fontSize: 15.sp, @@ -849,7 +854,7 @@ class _MineShopRecharge extends State { children: [ Expanded( child: Text( - "¥ ${vipCard != null ? vipCard.balance : ""}", + "¥ ${vipCard?.balance ?? ""}", style: TextStyle( color: Color(0xFF262626), fontSize: 24.sp, @@ -887,7 +892,7 @@ class _MineShopRecharge extends State { } ///充值item - Widget rechargeItem(MemberRechargeList memberRechargeList, index) { + Widget rechargeItem(MemberRecharge memberRecharge, index) { return Container( width: double.infinity, height: 69.h, @@ -898,7 +903,8 @@ class _MineShopRecharge extends State { selectIndex == index ? Color(0xFF32A060) : Color(0xFFFAFAFA), width: selectIndex == index ? 1 : 0, ), - color: selectIndex == index ? Color(0XFFF0FAF4) : Colors.white), + color: selectIndex == index ? Color(0XFFF0FAF4) : Colors.white, + ), margin: EdgeInsets.only(bottom: 14.h, left: 14.w, right: 14.w), padding: EdgeInsets.only(left: 16), child: Flex( @@ -916,27 +922,28 @@ class _MineShopRecharge extends State { color: selectIndex == index ? Color(0xFF4D4D4D) : Color(0xFF868686), - fontWeight: MyFontWeight.regular), + fontWeight: MyFontWeight.regular, + ), ), TextSpan( - text: - "${AppUtils.calculateDouble(double.tryParse(memberRechargeList.rechargeMoney) ?? 0)}元", + text: "${AppUtils.calculateDouble(double.tryParse("${memberRecharge.rechargeMoney}") ?? 0)}元", style: TextStyle( fontSize: 18.sp, fontFamily: 'JDZhengHT', color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.semi_bold), + fontWeight: MyFontWeight.semi_bold, + ), ), ]), ), - )), + ), + ), Container( width: 1.w, height: 37.h, - color: - selectIndex == index ? Color(0xFF32A060) : Color(0xFF979797), + color: selectIndex == index ? Color(0xFF32A060) : Color(0xFF979797), margin: EdgeInsets.only(right: 16.w, left: 12), ), Expanded( @@ -954,18 +961,19 @@ class _MineShopRecharge extends State { color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.regular), + fontWeight: MyFontWeight.regular, + ), ), TextSpan( - text: - "${((memberRechargeList?.limitNum ?? 0) != 0 && ((memberRechargeList?.limitNum ?? 0) - (memberRechargeList?.useNum ?? 0) <= 0)) ? (AppUtils.calculateDouble(double.tryParse(memberRechargeList.rechargeMoney) ?? 0)) : (AppUtils.calculateDouble((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) + (double.tryParse(memberRechargeList.giftdMoney) ?? 0) + ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) - ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) * (discount / 100)))))}元", + text: "${((memberRecharge.limitNum ?? 0) != 0 && ((memberRecharge.limitNum ?? 0) - (memberRecharge.useNum ?? 0) <= 0)) ? (AppUtils.calculateDouble(double.tryParse("${memberRecharge.rechargeMoney}") ?? 0)) : (AppUtils.calculateDouble((double.tryParse("${memberRecharge.rechargeMoney}") ?? 0) + (double.tryParse("${memberRecharge.giftdMoney}") ?? 0) + ((double.tryParse("${memberRecharge.rechargeMoney}") ?? 0) - ((double.tryParse("${memberRecharge.rechargeMoney}") ?? 0) * (discount / 100)))))}元", style: TextStyle( fontSize: 18.sp, fontFamily: 'JDZhengHT', color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.semi_bold), + fontWeight: MyFontWeight.semi_bold, + ), ), ]), ), @@ -976,7 +984,7 @@ class _MineShopRecharge extends State { onTap: () { setState(() { if (selectIndex == index) - showRecharge(memberRechargeList, index); + showRecharge(memberRecharge, index); }); }, child: Row( @@ -1001,11 +1009,14 @@ class _MineShopRecharge extends State { : Color(0xFF868686), ), ], - )), + ), + ), ], - )) + ), + ), ], - )); + ), + ); } Widget checkView(var index) { @@ -1023,7 +1034,7 @@ class _MineShopRecharge extends State { } ///充值说明底部弹窗 - showRecharge(MemberRechargeList memberRechargeList, index) { + showRecharge(MemberRecharge memberRecharge, index) { showModalBottomSheet( context: context, backgroundColor: Colors.transparent, @@ -1034,7 +1045,9 @@ class _MineShopRecharge extends State { color: Colors.white, borderRadius: new BorderRadius.only( topLeft: const Radius.circular(25.0), - topRight: const Radius.circular(25.0))), + topRight: const Radius.circular(25.0), + ), + ), child: Container( height: 355, child: SingleChildScrollView( @@ -1046,7 +1059,7 @@ class _MineShopRecharge extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( - child: Container( + child: Container( margin: EdgeInsets.symmetric(vertical: 12.h), alignment: Alignment.center, child: Text( @@ -1057,7 +1070,8 @@ class _MineShopRecharge extends State { color: Color(0xFF353535), ), ), - )), + ), + ), GestureDetector( onTap: () { setState(() { @@ -1092,15 +1106,7 @@ class _MineShopRecharge extends State { child: Container( color: Colors.white, child: Html( - data: memberRechargeList?.remark ?? "", - customImageRenders: { - networkSourceMatcher(): - networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, + data: memberRecharge?.remark ?? "", ), ), ) @@ -1113,7 +1119,7 @@ class _MineShopRecharge extends State { }); } - Widget shopItem(StoreListBean store) { + Widget shopItem(Store store) { return Container( decoration: BoxDecoration( borderRadius: new BorderRadius.circular(6), @@ -1131,7 +1137,7 @@ class _MineShopRecharge extends State { Expanded( flex: 1, child: Text( - (store != null) ? store.storeName : "", + store.storeName ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, @@ -1143,7 +1149,7 @@ class _MineShopRecharge extends State { onTap: () { // Navigator.of(context).pushNamed('/router/union_detail_page', // arguments: {"id": store.id}); - if (store.posType.code == "NORMALSTORE") { + if (store.posType?.code == "NORMALSTORE") { Scan.toScan( context, store.id, @@ -1192,7 +1198,7 @@ class _MineShopRecharge extends State { ), Expanded( child: Text( - store.address, + store.address ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 12.sp, @@ -1217,7 +1223,7 @@ class _MineShopRecharge extends State { S.of(context).yingyeshijian((store.openStartTime == null && store.openEndTime == null) ? S.of(context).quantian - : "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))} - ${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}"), + : "${store.openStartTime?.substring(0, store.openStartTime?.lastIndexOf(":"))} - ${store.openEndTime?.substring(0, store.openEndTime?.lastIndexOf(":"))}"), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, diff --git a/lib/mine/mine_view/calendar_page.dart b/lib/mine/mine_view/calendar_page.dart index ca76ba09..9a52183b 100644 --- a/lib/mine/mine_view/calendar_page.dart +++ b/lib/mine/mine_view/calendar_page.dart @@ -10,14 +10,14 @@ class CalendarPage extends StatefulWidget { } class _CalendarPage extends State with TickerProviderStateMixin { - AnimationController _animationController; - CalendarController _calendarController; + late AnimationController _animationController; + // CalendarController _calendarController; @override void initState() { super.initState(); - _calendarController = CalendarController(); + // _calendarController = CalendarController(); _animationController = AnimationController( vsync: this, @@ -30,19 +30,19 @@ class _CalendarPage extends State with TickerProviderStateMixin { @override void dispose() { _animationController.dispose(); - _calendarController.dispose(); + // _calendarController.dispose(); super.dispose(); } - void _onDaySelected(DateTime day, List events, List holidays) { + void _onDaySelected(DateTime selectedDay, DateTime focusedDay) { print('CALLBACK: _onDaySelected'); } - void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) { - print('CALLBACK: _onVisibleDaysChanged'); - } + // void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) { + // print('CALLBACK: _onVisibleDaysChanged'); + // } - void _onCalendarCreated(DateTime first, DateTime last, CalendarFormat format) { + void _onCalendarCreated(PageController pageController) { print('CALLBACK: _onCalendarCreated'); } @@ -60,27 +60,29 @@ class _CalendarPage extends State with TickerProviderStateMixin { Widget _buildTableCalendar() { return TableCalendar( - calendarController: _calendarController, startingDayOfWeek: StartingDayOfWeek.monday, availableGestures: AvailableGestures.none, headerStyle: HeaderStyle( - centerHeaderTitle: false, - leftChevronVisible: false, - rightChevronVisible: false, - formatButtonVisible: false, + titleCentered: false, + leftChevronVisible: false, + rightChevronVisible: false, + formatButtonVisible: false, ), calendarStyle: CalendarStyle( outsideDaysVisible: false, - selectedColor: Color(0xFF32A060), - weekendStyle: TextStyle().copyWith(color: Color(0xFF333333)), - todayColor: Color(0xFFD5EBDE), + selectedDecoration: BoxDecoration().copyWith(color: Color(0xFF32A060)), + selectedTextStyle: TextStyle().copyWith(color: Color(0xFF333333)), + todayTextStyle: TextStyle().copyWith(color: Color(0xFFD5EBDE)), ), daysOfWeekStyle: DaysOfWeekStyle( weekendStyle: TextStyle().copyWith(color: Color(0xFF4D4D4D)), ), onDaySelected: _onDaySelected, - onVisibleDaysChanged: _onVisibleDaysChanged, + // onVisibleDaysChanged: _onVisibleDaysChanged, onCalendarCreated: _onCalendarCreated, + focusedDay: DateTime.now(), + firstDay: DateTime.now(), + lastDay: DateTime.now(), ); } diff --git a/lib/mine/mine_view/community_follow.dart b/lib/mine/mine_view/community_follow.dart index b0f7acd6..0eff3f8c 100644 --- a/lib/mine/mine_view/community_follow.dart +++ b/lib/mine/mine_view/community_follow.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/mine/follow_page.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/social_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/social_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -15,7 +14,7 @@ import '../fans_page.dart'; class CommunityFollow extends StatefulWidget { - final Map arguments; + final Map? arguments; CommunityFollow({this.arguments}); @@ -27,28 +26,30 @@ class CommunityFollow extends StatefulWidget { class _CommunityFollow extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - ApiService apiService; - SocialInfo infoNumber; - int status; + ApiService? apiService; + SocialInfo? infoNumber; + late int status; @override void initState() { super.initState(); + status = widget.arguments?["status"] ?? 0; querySocialInfo(); - status = widget.arguments["status"]; } ///个人社交信息(粉丝/关注数量/成就数量) querySocialInfo() async { SharedPreferences value = await SharedPreferences.getInstance(); apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: true); + context: context, + token: value.getString("token"), + showLoading: true + ); - BaseData baseData = - await apiService.socialInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.socialInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { - infoNumber = baseData.data; + infoNumber = baseData?.data; }); } EasyLoading.dismiss(); @@ -56,6 +57,7 @@ class _CommunityFollow extends State @override Widget build(BuildContext context) { + super.build(context); return DefaultTabController( length: 2, initialIndex: status, diff --git a/lib/mine/mine_view/mine_calendar.dart b/lib/mine/mine_view/mine_calendar.dart index 06956aaf..f956f67c 100644 --- a/lib/mine/mine_view/mine_calendar.dart +++ b/lib/mine/mine_view/mine_calendar.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index d40d6dc5..ff29c2a2 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -9,10 +9,8 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:url_launcher/url_launcher.dart'; -import '../../retrofit/business_api.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/business_login_info.dart'; -import '../../retrofit/data/examine_instance.dart'; +import '../../data/base_data.dart'; +import '../../data/examine_instance.dart'; import '../../utils/business_instance.dart'; class MineItem extends StatefulWidget { @@ -25,49 +23,6 @@ class MineItem extends StatefulWidget { class _MineItem extends State { var isShowMore = false; - login(account, password) async { - SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - var param = { - "grantType": "password", - "account": account, - "password": password, - }; - EasyLoading.show( - status: S.of(context).zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - - BusinessApiService businessService = - BusinessApiService(Dio(), context: context); - BaseData baseData = - await businessService.annoToken(param).catchError((error) { - print(error.message); - }); - if (baseData != null && baseData.isSuccess) { - var businessLoginInfo = BusinessLoginInfo.fromJson(baseData.data); - if(businessLoginInfo.storeList.length > 1) { - businessLoginInfo.storeList.insert(0, StoreList(name: "所有门店")); - } - BusinessInstance.instance.businessTenant = businessLoginInfo.tenantCode; - BusinessInstance.instance.businessToken = businessLoginInfo.token; - BusinessInstance.instance.expirationTime = businessLoginInfo?.expirationTime ?? ""; - BusinessInstance.instance.serviceStatus = businessLoginInfo?.status?.desc ?? ""; - sharedPreferences.setString('identitySwitch', "1"); - if (businessLoginInfo.storeList.length > 1) { - Navigator.of(context) - .pushReplacementNamed('/router/select_shop', arguments: { - "businessLoginInfo": businessLoginInfo, - }); - } else { - Navigator.of(context) - .pushReplacementNamed('/router/business_page', arguments: { - "businessLoginInfo": businessLoginInfo, - }); - } - } else { - Navigator.of(context).pushNamed('/router/business_login_page'); - } - EasyLoading.dismiss(); - } @override Widget build(BuildContext context) { @@ -350,27 +305,6 @@ class _MineItem extends State { ), ), ), - - ///商家管理 - Expanded( - child: ExamineInstance.instance.isExamine ? Container():InkWell( - onTap: () { - SharedPreferences.getInstance().then((value) { - if (value.getString("account") == "" || - value.getString("password") == "") { - Navigator.of(context).pushNamed('/router/business_login_page'); - } else { - login(value.getString("account"), - value.getString("password")); - } - }); - }, - child: mineItem( - "商家管理", - "assets/image/business.webp", - ), - ), - ), Expanded( child: Container(), ), diff --git a/lib/mine/mine_view/mine_navbar.dart b/lib/mine/mine_view/mine_navbar.dart index 14c096f0..48465537 100644 --- a/lib/mine/mine_view/mine_navbar.dart +++ b/lib/mine/mine_view/mine_navbar.dart @@ -1,17 +1,16 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../retrofit/data/social_info.dart'; -import '../../retrofit/data/user_info.dart'; +import '../../data/social_info.dart'; +import '../../data/user_info.dart'; class MineNavbar extends StatefulWidget { - final String couponNum; - final UserInfo userInfo; - final SocialInfo infoNumber; + final String? couponNum; + final UserInfo? userInfo; + final SocialInfo? infoNumber; final GestureTapCallback toIntegralPage; final Function queryCoupon; @@ -166,7 +165,7 @@ class _MineNavbar extends State { }); }, child: mineBottomItem( - widget?.couponNum ?? "0", + widget.couponNum ?? "0", S.of(context).youhuiquan, ), ), @@ -185,7 +184,7 @@ class _MineNavbar extends State { // }); }, child: mineBottomItem( - widget?.userInfo?.points?? "0", + widget.userInfo?.points ?? "0", S.of(context).jifen, ), ), @@ -205,7 +204,7 @@ class _MineNavbar extends State { }); });}, child: mineBottomItem( - "${widget?.infoNumber?.follow ?? "0"}", + "${widget.infoNumber?.follow ?? "0"}", S.of(context).guanzhu, ), ), @@ -226,7 +225,7 @@ class _MineNavbar extends State { }); }, child: mineBottomItem( - "${widget?.infoNumber?.fans ?? "0"}", + "${widget.infoNumber?.fans ?? "0"}", S.of(context).fensi, ), ), @@ -245,13 +244,13 @@ class _MineNavbar extends State { }); }, child: mineBottomItem( - widget?.userInfo?.happyBean?? "0", + widget.userInfo?.happyBean ?? "0", S.of(context).yinzhang, ), ), ), ], - ) + ), ], ), ); diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 92f153ac..a223e926 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -1,35 +1,32 @@ import 'dart:convert'; -import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/social_info.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/social_info.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/activity_coupons.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:huixiang/view_widget/request_permission.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import '../../retrofit/data/rank.dart'; +import '../../data/rank.dart'; import '../../view_widget/mine_vip_entry.dart'; // import 'package:qrscan/qrscan.dart' as scanner; class MineView extends StatefulWidget { - final UserInfo userInfo; + final UserInfo? userInfo; final GestureTapCallback toUserInfo; final GestureTapCallback toIntegralPage; final Function messageZero; final int totalMsg; - final SocialInfo infoNumber; + final SocialInfo? infoNumber; final List ranks; MineView(this.userInfo, this.toUserInfo, this.toIntegralPage, @@ -42,24 +39,16 @@ class MineView extends StatefulWidget { } class _MineView extends State { - ApiService apiService; + ApiService? apiService; String levelText = "普通用户"; ///核销用户优惠券 queryWiped(memberCouponId) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.wiped(memberCouponId); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.wiped(memberCouponId); + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("核销成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -185,26 +174,27 @@ class _MineView extends State { // 新版桌子码跳转 // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); - if (result.toString().contains("type\":\"coupon")) { + if (result == null && result !is String) { + return; + } + result = result as String; + if (result.contains("type\":\"coupon")) { ///活动优惠券赠送弹窗 activityShowAlertDialog(result.toString()); return; } - if (result.toString().contains("type\":\"wiped")) { + if (result.contains("type\":\"wiped")) { ///核销券 queryWiped(jsonDecode(result.toString())["memberCouponId"]); return; } // String result = await scanner.scan(); Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; - String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; - String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; - if (tableId != null && - tableId != "" && - tenantCode != null && + String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"] ?? ""; + String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"] ?? ""; + String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"] ?? ""; + if (tableId != "" && tenantCode != "" && - shopId != null && shopId != "") { Navigator.of(context).pushNamed( '/router/store_order', @@ -217,9 +207,9 @@ class _MineView extends State { ); return; } - String title = uri.queryParameters["title"]; - if (result.toString().contains("http:") || - result.toString().contains("https:")) { + String title = uri.queryParameters["title"] ?? ""; + if (result.contains("http:") || + result.contains("https:")) { ///扫码跳转任意网页 Navigator.of(context).pushNamed( '/router/scan_web', @@ -246,7 +236,6 @@ class _MineView extends State { ///我的信息部分 Widget mineView() { - print("---" + widget.userInfo.toString()); return Container( alignment: Alignment.center, margin: EdgeInsets.only(left: 16.w), @@ -261,7 +250,7 @@ class _MineView extends State { child: Stack( children: [ MImage( - widget.userInfo == null ? "" : widget.userInfo.headimg, + widget.userInfo?.headimg ?? "", isCircle: true, width: 60, height: 60, @@ -308,14 +297,12 @@ class _MineView extends State { children: [ InkWell( onTap: () { - if (widget.userInfo == null) { - LoginTipsDialog().show(context); - } + }, child: Text( widget.userInfo == null ? S.of(context).denglu - : "${widget.userInfo.nickname == "" ? "回乡" : widget.userInfo.nickname}", + : "${widget.userInfo!.nickname ?? "回乡"}", style: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.bold, @@ -323,7 +310,7 @@ class _MineView extends State { ), ), ), - if (widget.userInfo.level != 1) + if (widget.userInfo?.level != 1) Image.asset( "assets/image/icon_user.webp", width: 18.w, @@ -434,12 +421,10 @@ class _MineView extends State { tag: "vip", ranks: widget.ranks, userInfo: widget.userInfo, - rank: double.tryParse(widget.userInfo?.expendAmount ?? "0") - .toInt(), + rank: int.tryParse("${widget.userInfo?.expendAmount}") ?? 0, rankMax: widget.userInfo?.memberRankVo?.nextOrigin ?? 0, createTime: widget.userInfo?.createTime ?? "", ), ); - } } diff --git a/lib/mine/mine_view/wallet_coupon_view.dart b/lib/mine/mine_view/wallet_coupon_view.dart index 5a76028e..d3958933 100644 --- a/lib/mine/mine_view/wallet_coupon_view.dart +++ b/lib/mine/mine_view/wallet_coupon_view.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; diff --git a/lib/mine/mine_vip/binding_assistant_card.dart b/lib/mine/mine_vip/binding_assistant_card.dart index 527e64d0..d9d23c2f 100644 --- a/lib/mine/mine_vip/binding_assistant_card.dart +++ b/lib/mine/mine_vip/binding_assistant_card.dart @@ -2,8 +2,7 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/address.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -23,7 +22,7 @@ class _BindingAssistantCard extends State { TextEditingController addressController = TextEditingController(); TextEditingController houseNumberController = TextEditingController(); - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -37,20 +36,12 @@ class _BindingAssistantCard extends State { ///绑定副卡 queryBindSecondCard(phone) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.bindSecondCard(phone).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.bindSecondCard(phone).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("绑定成功", alignment: Alignment.center); Navigator.of(context).pop(true); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } diff --git a/lib/mine/mine_vip/legal_right_details.dart b/lib/mine/mine_vip/legal_right_details.dart index 39885109..5043c31f 100644 --- a/lib/mine/mine_vip/legal_right_details.dart +++ b/lib/mine/mine_vip/legal_right_details.dart @@ -1,16 +1,14 @@ -import 'dart:io'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/second_card_list.dart'; -import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/second_card.dart'; +import 'package:huixiang/data/vip_benefit.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -22,7 +20,7 @@ import 'package:huixiang/view_widget/round_button.dart'; import 'package:shared_preferences/shared_preferences.dart'; class LegalRightDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; LegalRightDetails({this.arguments}); @@ -33,12 +31,12 @@ class LegalRightDetails extends StatefulWidget { } class _LegalRightDetails extends State { - ApiService apiService; - List vipBenefitList = []; + ApiService? apiService; + List vipBenefitList = []; final SwiperController controller = SwiperController(); int checkIndex = 0; ScrollController _scrollController = ScrollController(); - List secondCardList = []; + List secondCardList = []; bool offsetOnEnd = false; @override @@ -48,28 +46,19 @@ class _LegalRightDetails extends State { apiService = ApiService(Dio(), context: context, token: value.getString("token")); }); - vipBenefitList.addAll(widget.arguments["vipBenefitList"]); + vipBenefitList.addAll(widget.arguments?["vipBenefitList"] ?? []); querySecondCardList(); } ///副卡列表 querySecondCardList() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.secondCardList().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.secondCardList().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { secondCardList.clear(); - secondCardList.addAll(baseData.data); + secondCardList.addAll(baseData?.data ?? []); if (secondCardList.length < 5) { - var isSecondCard = SecondCardList(); + var isSecondCard = SecondCard(); isSecondCard.isAdd = true; secondCardList.add(isSecondCard); } @@ -80,20 +69,12 @@ class _LegalRightDetails extends State { ///解绑副卡 queryUnbindSecondCard(phone) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.unbindSecondCard(phone).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.unbindSecondCard(phone).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { querySecondCardList(); SmartDialog.showToast("解绑成功", alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -216,7 +197,7 @@ class _LegalRightDetails extends State { ), SizedBox(width: 6.w), Text( - vipBenefitList[checkIndex].name, + vipBenefitList[checkIndex].name ?? "", style: TextStyle( fontSize: 17.sp, fontWeight: FontWeight.bold, @@ -266,24 +247,16 @@ class _LegalRightDetails extends State { SizedBox( height: 8.h, ), - if (vipBenefitList[checkIndex]?.introduce != null && - vipBenefitList[checkIndex].introduce != "") + if (vipBenefitList[checkIndex].introduce != "") Container( color: Color(0xFFFFF6E9), child: Html( - data: vipBenefitList[checkIndex]?.introduce ?? "", + data: vipBenefitList[checkIndex].introduce ?? "", style: { "html": Style( color: Color(0xFF674119), ), }, - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, ), ), SizedBox( @@ -300,32 +273,24 @@ class _LegalRightDetails extends State { SizedBox( height: 8, ), - if (vipBenefitList[checkIndex]?.describes != null && - vipBenefitList[checkIndex].describes != "") + if (vipBenefitList[checkIndex].describes != "") Container( color: Color(0xFFFFF6E9), child: Html( - data: vipBenefitList[checkIndex]?.describes ?? "", + data: vipBenefitList[checkIndex].describes ?? "", style: { "html": Style( color: Color(0xFF674119), ), }, - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, ), ), SizedBox( height: 20, ), if (vipBenefitList[checkIndex].name == "副卡" && - vipBenefitList[checkIndex].actived && - vipBenefitList[checkIndex].have) + (vipBenefitList[checkIndex].actived ?? false) && + (vipBenefitList[checkIndex].have ?? false)) Container( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -352,7 +317,8 @@ class _LegalRightDetails extends State { ], ), ), - )) + ), + ), ], ), ); @@ -447,7 +413,7 @@ class _LegalRightDetails extends State { } ///权益列表 - Widget legalRightItem(VipBenefitList vipBenefitList, index) { + Widget legalRightItem(VipBenefit vipBenefitList, index) { return Column( children: [ Expanded( @@ -462,14 +428,14 @@ class _LegalRightDetails extends State { alignment: Alignment.bottomCenter, children: [ MImage( - vipBenefitList?.icon ?? "", + vipBenefitList.icon ?? "", width:51, height: 51, isCircle: true, errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", ), - if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have) + if (!(vipBenefitList.actived ?? false) || (!(vipBenefitList.actived ?? false) && !(vipBenefitList.have ?? false))) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -497,7 +463,7 @@ class _LegalRightDetails extends State { ], ), ), - if ( vipBenefitList.actived && !vipBenefitList.have) + if ((vipBenefitList.actived ?? false) && !(vipBenefitList.have ?? false)) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -531,7 +497,7 @@ class _LegalRightDetails extends State { height: 8.h, ), Text( - vipBenefitList.name, + vipBenefitList.name ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, @@ -544,7 +510,8 @@ class _LegalRightDetails extends State { ], ), ), - )), + ), + ), if (index == checkIndex) Container( width: 33, @@ -574,7 +541,7 @@ class _LegalRightDetails extends State { return Column( children: [ GridView.builder( - itemCount: secondCardList == null ? 0 : secondCardList.length, + itemCount: secondCardList.length ?? 0, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( @@ -598,7 +565,7 @@ class _LegalRightDetails extends State { ); } - Widget assistantItem(SecondCardList secondCardList) { + Widget assistantItem(SecondCard secondCardList) { return Container( alignment: Alignment.center, child: !(secondCardList.isAdd ?? false) @@ -608,7 +575,7 @@ class _LegalRightDetails extends State { alignment: Alignment.bottomRight, children: [ MImage( - secondCardList?.headimg ?? "", + secondCardList.headimg ?? "", width: 50, height: 50, isCircle: true, @@ -635,7 +602,7 @@ class _LegalRightDetails extends State { height: 5.h, ), Text( - AppUtils.phoneEncode(secondCardList?.phone ?? ""), + AppUtils.phoneEncode(secondCardList.phone ?? ""), style: TextStyle( color: Color(0xFF79572D), fontWeight: MyFontWeight.regular, diff --git a/lib/mine/mine_vip/mine_attainment_page.dart b/lib/mine/mine_vip/mine_attainment_page.dart index ac7986b0..3d017690 100644 --- a/lib/mine/mine_vip/mine_attainment_page.dart +++ b/lib/mine/mine_vip/mine_attainment_page.dart @@ -1,13 +1,13 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:huixiang/data/achivement_detail_list.dart'; +import 'package:huixiang/data/vip_benefit.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/achievement_detail_list.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/social_info.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/retrofit/data/vip_badges_list.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/social_info.dart'; +import 'package:huixiang/data/user_info.dart'; +import 'package:huixiang/data/vip_badges.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -23,7 +23,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import '../../view_widget/no_data_view.dart'; class MineAttainmentPage extends StatefulWidget { - final Map arguments; + final Map? arguments; MineAttainmentPage({this.arguments}); @@ -34,46 +34,38 @@ class MineAttainmentPage extends StatefulWidget { } class _MineAttainmentPage extends State { - ApiService apiService; + ApiService? apiService; final RefreshController _refreshController = RefreshController(); - UserInfo userInfo; - List vipBadgesList = []; - List achievementDetail = []; + UserInfo? userInfo; + List vipBadgesList = []; + List achievementDetail = []; int checkPosition = 0; - SocialInfo infoNumber; + SocialInfo? infoNumber; final RefreshController refreshController = RefreshController(); @override void dispose() { super.dispose(); - if (_refreshController != null) _refreshController.dispose(); + _refreshController.dispose(); } @override void initState() { super.initState(); - userInfo = widget.arguments["userInfo"]; + userInfo = widget.arguments?["userInfo"]; queryAttainmentBadges(); querySocialInfo(); } ///成就徽章分类 queryAttainmentBadges() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.findBadges({}).catchError((error) { + BaseData>? baseData = + await apiService?.findBadges({}).catchError((error) { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { vipBadgesList.clear(); - vipBadgesList.addAll(baseData.data); + vipBadgesList.addAll(baseData?.data ?? []); setState(() { _refreshController.refreshCompleted(); }); @@ -84,21 +76,13 @@ class _MineAttainmentPage extends State { ///成就分类弹窗详情 queryAchievementDetail(index) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService - .getAchievementDetail(vipBadgesList[index].id) + BaseData>? baseData = await apiService + ?.getAchievementDetail(vipBadgesList[index].id ?? "") .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { achievementDetail.clear(); - achievementDetail.addAll(baseData.data); + achievementDetail.addAll(baseData?.data ?? []); showDeleteDialog(index); }); } @@ -115,11 +99,11 @@ class _MineAttainmentPage extends State { showLoading: false, ); - BaseData baseData = - await apiService.socialInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = + await apiService?.socialInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { - infoNumber = baseData.data; + infoNumber = baseData?.data; refreshController.refreshCompleted(); }); } @@ -192,8 +176,14 @@ class _MineAttainmentPage extends State { SizedBox(height: 28.h), Container( margin: EdgeInsets.only( - left: 16.w, right: 16.w, top: 26.h, bottom: 8.h), - padding: EdgeInsets.symmetric(vertical: 20.h,), + left: 16.w, + right: 16.w, + top: 26.h, + bottom: 8.h, + ), + padding: EdgeInsets.symmetric( + vertical: 20.h, + ), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -210,43 +200,46 @@ class _MineAttainmentPage extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding(padding:EdgeInsets.symmetric(horizontal:20.w), - child: - Row( - children: [ - Text( - S.of(context).chengjiuhuizhang, - style: TextStyle( + Padding( + padding: EdgeInsets.symmetric(horizontal: 20.w), + child: Row( + children: [ + Text( + S.of(context).chengjiuhuizhang, + style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14.sp, - color: Color(0xFF353535)), - ), - SizedBox(width: 4), - Text( - "(", - style: TextStyle( + color: Color(0xFF353535), + ), + ), + SizedBox(width: 4), + Text( + "(", + style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14, - color: Color(0xFF353535)), - ), - Text( - infoNumber != null - ? infoNumber.achievementNumber.toString() - : "0", - style: TextStyle( + color: Color(0xFF353535), + ), + ), + Text( + "${infoNumber?.achievementNumber ?? 0}", + style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14, - color: Color(0xFF32A060)), - ), - Text( - "/${vipBadgesList.length})", - style: TextStyle( + color: Color(0xFF32A060), + ), + ), + Text( + "/${vipBadgesList.length})", + style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14, - color: Color(0xFF353535)), - ), - ], - )), + color: Color(0xFF353535), + ), + ), + ], + ), + ), SizedBox(height: 12.h), attainmentBadge(), ], @@ -263,9 +256,9 @@ class _MineAttainmentPage extends State { ///成就徽章列表 Widget attainmentBadge() { - return (vipBadgesList != null && (vipBadgesList?.length ?? 0) > 0) + return (vipBadgesList.isNotEmpty) ? GridView.builder( - itemCount: vipBadgesList == null ? 0 : vipBadgesList.length, + itemCount: vipBadgesList.length ?? 0, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( @@ -282,12 +275,12 @@ class _MineAttainmentPage extends State { ), itemBuilder: (context, index) { return GestureDetector( - onTap: () { - setState(() { - queryAchievementDetail(index); - }); - }, - child: badgeItem(vipBadgesList[index]) + onTap: () { + setState(() { + queryAchievementDetail(index); + }); + }, + child: badgeItem(vipBadgesList[index]), ); }, ) @@ -301,13 +294,13 @@ class _MineAttainmentPage extends State { ; } - Widget badgeItem(VipBadgesList vipBadgesList) { + Widget badgeItem(VipBadges vipBadgesList) { return Container( alignment: Alignment.center, child: Column( children: [ MImage( - vipBadgesList?.icon ?? "", + vipBadgesList.icon ?? "", width: 80.h, height: 80.h, fit: BoxFit.cover, @@ -318,7 +311,7 @@ class _MineAttainmentPage extends State { height: 4.h, ), Text( - vipBadgesList?.name ?? "", + vipBadgesList.name ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF181818), @@ -336,10 +329,7 @@ class _MineAttainmentPage extends State { showDialog( context: context, builder: (context) { - return StatefulBuilder(builder: ( - context, - state, - ) { + return StatefulBuilder(builder: (context, state) { return AlertDialog( content: Container( width: MediaQuery.of(context).size.width - 84, @@ -363,7 +353,7 @@ class _MineAttainmentPage extends State { ), MImage( // this.vipBadgesList[index].icon, - achievementDetail[checkPosition].icon, + achievementDetail[checkPosition].icon ?? "", width: 150, height: 150, fit: BoxFit.cover, @@ -383,7 +373,7 @@ class _MineAttainmentPage extends State { height: 6.h, ), Text( - "再${vipBadgesList.length > index ? vipBadgesList[index].name : ""} ${AppUtils.calculateDouble(double.tryParse(achievementDetail.length > checkPosition ? achievementDetail[checkPosition].lessScore : "") ?? 0)} 即可升级", + "再${vipBadgesList.length > index ? vipBadgesList[index].name : ""} ${AppUtils.calculateDouble(double.tryParse(achievementDetail.length > checkPosition ? "${achievementDetail[checkPosition].lessScore}" : "0") ?? 0)} 即可升级", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -402,7 +392,8 @@ class _MineAttainmentPage extends State { style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 12.sp, - color: Color(0xFF515151)), + color: Color(0xFF515151), + ), ), SizedBox(width: 8), Column( @@ -411,14 +402,14 @@ class _MineAttainmentPage extends State { children: achievementDetail[checkPosition].rewardList != null ? achievementDetail[checkPosition] - .rewardList - .map((e) { + .rewardList!.map((e) { return Text( rewardStr(e), style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 12.sp, - color: Color(0xFF515151)), + color: Color(0xFF515151), + ), ); }).toList() : [], @@ -433,9 +424,7 @@ class _MineAttainmentPage extends State { shrinkWrap: true, scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), - itemCount: achievementDetail == null - ? 0 - : achievementDetail.length, + itemCount: achievementDetail.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { @@ -449,7 +438,7 @@ class _MineAttainmentPage extends State { }, ), ), - ) + ), ], ), ), @@ -470,8 +459,7 @@ class _MineAttainmentPage extends State { } ///徽章级别列表 - Widget badgeGradeItem( - AchievementDetailList achievementDetail, var position, var size) { + Widget badgeGradeItem(AchivementDetailList achievementDetail, var position, var size) { return Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, @@ -481,7 +469,7 @@ class _MineAttainmentPage extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ MImage( - achievementDetail?.icon ?? "", + achievementDetail.icon ?? "", width: checkPosition == position ? 50 : 30, height: checkPosition == position ? 50 : 30, fit: BoxFit.cover, @@ -490,7 +478,7 @@ class _MineAttainmentPage extends State { ), SizedBox(height: 10), Text( - achievementDetail?.name ?? "", + achievementDetail.name ?? "", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -513,7 +501,8 @@ class _MineAttainmentPage extends State { ), ), SizedBox(height: 20), - ]) + ], + ), ], ); } diff --git a/lib/mine/mine_vip/mine_vip_core.dart b/lib/mine/mine_vip/mine_vip_core.dart index f9447fd1..6be28bce 100644 --- a/lib/mine/mine_vip/mine_vip_core.dart +++ b/lib/mine/mine_vip/mine_vip_core.dart @@ -1,39 +1,36 @@ import 'dart:io'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:fluwx/fluwx.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/rank.dart'; -import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; -import 'package:huixiang/retrofit/data/vip_rule_details.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/rank.dart'; +import 'package:huixiang/data/vip_benefit.dart'; +import 'package:huixiang/data/vip_rule_details.dart'; +import 'package:huixiang/data/wx_pay.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/mine_vip_view.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/vip_dialog.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../../retrofit/data/user_info.dart'; +import '../../data/user_info.dart'; import '../../view_widget/classic_header.dart'; import '../../view_widget/my_footer.dart'; class MineVipCore extends StatefulWidget { final Map arguments; - MineVipCore({this.arguments}); + MineVipCore({required this.arguments}); @override State createState() { @@ -42,16 +39,17 @@ class MineVipCore extends StatefulWidget { } class _MineVipCore extends State { - ApiService apiService; + ApiService? apiService; List ranks = []; - List vipBenefitList = []; - VipRuleDetails vipRuleDetails; + List vipBenefitList = []; + VipRuleDetails? vipRuleDetails; int checkIndex = 0; - UserInfo userInfo; - int rankNameIndex; + UserInfo? userInfo; + int? rankNameIndex; final RefreshController refreshController = RefreshController(); final SwiperController controller = SwiperController(); + Fluwx fluwx = Fluwx(); @override void initState() { @@ -71,13 +69,15 @@ class _MineVipCore extends State { // showAlertDialog("共创会员"); // value.setBool("FirstGongC", true); // } - apiService = - ApiService(Dio(), context: context, showLoading: false,token: value.getString("token")); + apiService = ApiService(Dio(), + context: context, + showLoading: false, + token: value.getString("token")); queryVipLevel(); queryBenefitList(); queryRuleDetails(); }); - weChatResponseEventHandler.listen((event) async { + fluwx.addSubscriber((event) async { print("payCallback: ${event.errCode}"); if (event.errCode == 0) { widget.arguments["rankLevel"] = ranks[checkIndex].level; @@ -90,16 +90,17 @@ class _MineVipCore extends State { }); } - String levelTipsName(int position){ - if(userInfo.memberRankVo.rankName == ranks[position].rankName) + String levelTipsName(int position) { + if (userInfo?.memberRankVo?.rankName == ranks[position].rankName) { return S.of(context).dangqiandengji; - else { - int userLevelIndex = ranks.indexWhere((element) => element.rankName == userInfo.memberRankVo.rankName); - if(userLevelIndex+1 == position) + } else { + int userLevelIndex = ranks.indexWhere( + (element) => element.rankName == userInfo?.memberRankVo?.rankName); + if (userLevelIndex + 1 == position) return "下一等级"; - else if(userLevelIndex-1 > position) + else if (userLevelIndex - 1 > position) return "已达到"; - else if(userLevelIndex-1 == position) + else if (userLevelIndex - 1 == position) return "上一等级"; else return S.of(context).zanweikaitong; @@ -108,22 +109,26 @@ class _MineVipCore extends State { ///会员等级列表 queryVipLevel() async { - BaseData> rankData = await apiService.rankList().catchError((onError) { + BaseData>? rankData = + await apiService?.rankList().catchError((onError) { refreshController.refreshFailed(); - refreshController.loadFailed();}); - if (rankData != null && rankData.isSuccess) { + refreshController.loadFailed(); + }); + if (rankData?.isSuccess ?? false) { ranks.clear(); - ranks.addAll(rankData.data); - rankNameIndex = ranks.indexWhere((element) => element.rankName == userInfo.memberRankVo.rankName); - if(rankNameIndex != -1) - checkIndex = rankNameIndex; + ranks.addAll(rankData!.data ?? []); + rankNameIndex = ranks.indexWhere( + (element) => element.rankName == userInfo?.memberRankVo?.rankName); + if ((rankNameIndex ?? -1) >= 0) { + checkIndex = rankNameIndex ?? 0; + } setState(() { controller.move((widget.arguments["rankLevel"] - 1), animation: false); }); refreshController.refreshCompleted(); refreshController.loadComplete(); } else { - SmartDialog.showToast(rankData?.msg??"", alignment: Alignment.center); + SmartDialog.showToast("${rankData?.msg}", alignment: Alignment.center); refreshController.refreshFailed(); refreshController.loadFailed(); } @@ -131,15 +136,16 @@ class _MineVipCore extends State { ///会员权益列表 queryBenefitList() async { - BaseData> baseData = - await apiService.benefitList().catchError((onError) { - refreshController.refreshFailed(); - refreshController.loadFailed();}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = + await apiService?.benefitList().catchError((onError) { + refreshController.refreshFailed(); + refreshController.loadFailed(); + }); + if (baseData?.isSuccess ?? false) { setState(() { vipBenefitList.clear(); - vipBenefitList.addAll(baseData.data); - vipBenefitList.sort((a, b) => (a.sort).compareTo(b.sort)); + vipBenefitList.addAll(baseData?.data ?? []); + vipBenefitList.sort((a, b) => (a.sort ?? 0).compareTo(b.sort ?? 0)); }); refreshController.refreshCompleted(); refreshController.loadComplete(); @@ -149,13 +155,14 @@ class _MineVipCore extends State { ///会员权益介绍/规则/说明/储值说明 queryRuleDetails() async { - BaseData baseData = - await apiService.vipBenefit().catchError((onError) { - refreshController.refreshFailed(); - refreshController.loadFailed();}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = + await apiService?.vipBenefit().catchError((onError) { + refreshController.refreshFailed(); + refreshController.loadFailed(); + }); + if (baseData?.isSuccess ?? false) { setState(() { - vipRuleDetails = baseData.data; + vipRuleDetails = baseData?.data; }); refreshController.refreshCompleted(); refreshController.loadComplete(); @@ -165,36 +172,41 @@ class _MineVipCore extends State { ///购买会员等级 buyRank() async { - - if(Platform.isAndroid) { + if (Platform.isAndroid) { if (!(await Min.isInitialize())) { - //小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, - //然而充值时小程序未初始化会导致回调内部代码调用getPackage空指针, - //故而在此初始化一下 - await Min.initialize(); + //小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, + //然而充值时小程序未初始化会导致回调内部代码调用getPackage空指针, + //故而在此初始化一下 + await Min.initialize(); } } - BaseData baseData = await apiService - .rankBuy({"buyType": 2, "rankId": ranks[checkIndex].id}).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - WxPay wxPay = WxPay.fromJson(baseData.data); - await registerWxApi( - appId: wxPay.appId, + BaseData? baseData = await apiService + ?.rankBuy({"buyType": 2, "rankId": ranks[checkIndex].id}).catchError( + (onError) {}); + if (baseData?.isSuccess ?? false) { + WxPay wxPay = WxPay.fromJson(baseData!.data); + if (wxPay?.isAnyEmpty() ?? false) { + return; + } + await fluwx.registerApi( + appId: wxPay.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + ), ); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -207,466 +219,454 @@ class _MineVipCore extends State { @override Widget build(BuildContext context) { return Container( - color: Color(0xFFF7F7F7), - child: Stack( - children: [ - Container( - // padding: EdgeInsets.only(top: 40.h), - height:260.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - // border: Border.all(color: Colors.white,width: 0.5), - shape: BoxShape.rectangle, - borderRadius: BorderRadius.only( - bottomRight: Radius.circular(35), - bottomLeft: Radius.circular(35), - ), + color: Color(0xFFF7F7F7), + child: Stack( + children: [ + Container( + // padding: EdgeInsets.only(top: 40.h), + height: 260.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ], + ), + // border: Border.all(color: Colors.white,width: 0.5), + shape: BoxShape.rectangle, + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(35), + bottomLeft: Radius.circular(35), ), ), - Column( - children: [ - SizedBox(height: 40.h), - Container( - child:Row( - children: [ - Expanded( - child: GestureDetector( - onTap: () { - Navigator.of(context).pop(); - }, - child: Padding( - padding: EdgeInsets.only(left: 16.h, bottom: 10.h), - child: Row( - children: [ - Icon( - Icons.arrow_back_ios, - size: 24, - color: Colors.white, - ), - Text( - S.of(context).huiyuanzhongxin, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 18.sp, - color: Colors.white, - ), - ), - ], - ), - )), - ), - if(userInfo.masterCardRankName != null) - Container( - alignment: Alignment.center, - margin: EdgeInsets.only(right: 16.w), - child: GestureDetector( - onTap: () { - // Navigator.of(context).pushNamed('/router/integral_detailed_page'); - }, - child: Text( - "${S.of(context).dangqianzhukadengji} : ${userInfo.masterCardRankName??""}", - style: TextStyle( + ), + Column( + children: [ + SizedBox(height: 40.h), + Container( + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Padding( + padding: EdgeInsets.only(left: 16.h, bottom: 10.h), + child: Row( + children: [ + Icon( + Icons.arrow_back_ios, + size: 24, color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.medium, ), - ), + Text( + S.of(context).huiyuanzhongxin, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 18.sp, + color: Colors.white, + ), + ), + ], ), - ) - ], - ), + ), + ), + ), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(right: 16.w), + child: GestureDetector( + onTap: () { + // Navigator.of(context).pushNamed('/router/integral_detailed_page'); + }, + child: Text( + "${S.of(context).dangqianzhukadengji} : ${userInfo?.masterCardRankName}", + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ), + ), + ], ), - Expanded(child: - SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: false, - header: MyHeader( - color: Colors.white, - ), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, - ), - onRefresh: () { - _onRefresh(); + ), + Expanded( + child: SmartRefresher( + controller: refreshController, + enablePullDown: true, + enablePullUp: false, + header: MyHeader( + color: Colors.white, + ), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); }, + ), + onRefresh: () { + _onRefresh(); + }, + physics: BouncingScrollPhysics(), + scrollController: ScrollController(), + child: SingleChildScrollView( physics: BouncingScrollPhysics(), - scrollController: ScrollController(), - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - children: [ - ///会员卡 - if(ranks.length > 0) - Container( - height: (MediaQuery.of(context).size.width) / - 1.78 * - AppUtils.textScale(context), - child: Swiper( - viewportFraction: 0.95, - loop: false, - physics: BouncingScrollPhysics(), - index: checkIndex, - controller: controller, - onIndexChanged: (index) { - setState(() { - checkIndex = index; - }); - }, - itemBuilder: (context, position) { - return vipCar(position); - // MineVipView( - // vipLevel: !(ranks != null && ranks.isNotEmpty) - // ? widget.arguments["rankLevel"] - // : position + 1, - // curLevel: widget.arguments["rankLevel"], - // tag: (widget.arguments["rankLevel"] == (position + 1) || - // !(ranks != null && ranks.isNotEmpty)) - // ? "vip" - // : "", - // padding: 6.w, - // // rank: !(ranks != null && ranks.isNotEmpty) - // // ? 0 - // // : widget.arguments["expendAmount"] ?? 0, - // rankMax: !(ranks != null && ranks.isNotEmpty) - // ? 0 - // : ranks[position].rankOrigin, - // createTime: widget.arguments["createTime"], - // showRank: false, - // price: !(ranks != null && ranks.isNotEmpty) - // ? "0" - // : ranks[position].price, - // ); - }, - itemCount: - (ranks != null && ranks.isNotEmpty) ? ranks.length : 1, - ), + child: Column( + children: [ + ///会员卡 + if (ranks.length > 0) + Container( + height: (MediaQuery.of(context).size.width) / + 1.78 * + AppUtils.textScale(context), + child: Swiper( + viewportFraction: 0.95, + loop: false, + physics: BouncingScrollPhysics(), + index: checkIndex, + controller: controller, + onIndexChanged: (index) { + setState(() { + checkIndex = index; + }); + }, + itemBuilder: (context, position) { + return vipCar(position); + // MineVipView( + // vipLevel: !(ranks != null && ranks.isNotEmpty) + // ? widget.arguments["rankLevel"] + // : position + 1, + // curLevel: widget.arguments["rankLevel"], + // tag: (widget.arguments["rankLevel"] == (position + 1) || + // !(ranks != null && ranks.isNotEmpty)) + // ? "vip" + // : "", + // padding: 6.w, + // // rank: !(ranks != null && ranks.isNotEmpty) + // // ? 0 + // // : widget.arguments["expendAmount"] ?? 0, + // rankMax: !(ranks != null && ranks.isNotEmpty) + // ? 0 + // : ranks[position].rankOrigin, + // createTime: widget.arguments["createTime"], + // showRank: false, + // price: !(ranks != null && ranks.isNotEmpty) + // ? "0" + // : ranks[position].price, + // ); + }, + itemCount: (ranks.isNotEmpty) ? ranks.length : 1, ), + ), - ///会员权益 - if(vipBenefitList != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + ///会员权益 + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( children: [ - Row( - children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), - ), - SizedBox( - width: 4.w, - ), - Text( - S.of(context).huiyuanquanyi, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, - ), + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ], ), - ], + ), ), SizedBox( - height: 12.h, + width: 4.w, + ), + Text( + S.of(context).huiyuanquanyi, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, + ), ), - vipLegalRight(), ], ), - ), - - ///会员规则说明 - if(vipRuleDetails != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), + SizedBox( + height: 12.h, ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + vipLegalRight(), + ], + ), + ), + + ///会员规则说明 + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( children: [ - Row( - children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), - ), - SizedBox( - width: 4.w, - ), - Text( - S.of(context).huiyuanguize, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, - ), + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ], ), - ], + ), ), SizedBox( - height: 12.h, + width: 4.w, ), - if (vipRuleDetails?.qa != null && vipRuleDetails.qa != "") - Container( - color: Colors.white, - padding: EdgeInsets.only(left: 8.w), - child: Html( - data: vipRuleDetails?.qa ?? "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, - ), + Text( + S.of(context).huiyuanguize, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, ), + ), ], ), - ), - - ///会员级别对照表 - if(vipRuleDetails != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), + SizedBox( + height: 12.h, ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + if (vipRuleDetails?.qa?.isNotEmpty ?? false) + Container( + color: Colors.white, + padding: EdgeInsets.only(left: 8.w), + child: Html( + data: vipRuleDetails?.qa ?? "", + ), + ), + ], + ), + ), + + ///会员级别对照表 + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( children: [ - Row( - children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), - ), - SizedBox( - width: 4.w, - ), - Text( - S.of(context).huiyuanjibieduizhao, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, - ), + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ], ), - ], + ), ), SizedBox( - height: 12.h, - ), - MImage( - vipRuleDetails?.contrast ?? "", - width: double.infinity, - height: 281.h, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", + width: 4.w, ), - SizedBox( - height: 16.h, + Text( + S.of(context).huiyuanjibieduizhao, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, + ), ), ], ), - ), - - ///会员如何获得积分 - if(vipRuleDetails != null) - Container( - margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), + SizedBox( + height: 12.h, ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + MImage( + vipRuleDetails?.contrast ?? "", + width: double.infinity, + height: 281.h, + errorSrc: "assets/image/default_1.webp", + fadeSrc: "assets/image/default_1.webp", + ), + SizedBox( + height: 16.h, + ), + ], + ), + ), + + ///会员如何获得积分 + Container( + margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: + EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( children: [ - Row( - children: [ - Container( - width: 4.w, - height: 18.h, - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - colors: [ - Color(0xFF000000), - Color(0xFF585858), - ]), - ), - ), - SizedBox( - width: 4.w, - ), - Text( - S.of(context).huiyuanhuodejifen, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 16.sp, - color: Colors.black, - ), + Container( + width: 4.w, + height: 18.h, + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFF000000), + Color(0xFF585858), + ], ), - ], + ), ), SizedBox( - height: 12.h, + width: 4.w, ), - if (vipRuleDetails?.rule != null && - vipRuleDetails.rule != "") - Container( - color: Colors.white, - child: Html( - data: vipRuleDetails?.rule ?? "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, - ), + Text( + S.of(context).huiyuanhuodejifen, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Colors.black, ), + ), ], ), - ), - ], + SizedBox( + height: 12.h, + ), + if (vipRuleDetails?.rule?.isNotEmpty ?? false) + Container( + color: Colors.white, + child: Html( + data: vipRuleDetails?.rule ?? "", + ), + ), + ], + ), ), - ), + ], + ), + ), + ], + ), + ), + )), + ], + ), + if (ranks.length > checkIndex && + widget.arguments["rankLevel"] < ranks[checkIndex].level && + ranks[checkIndex].price != "0.00") + Align( + alignment: Alignment.bottomCenter, + child: InkWell( + onTap: () { + setState(() { + buyRank(); + }); + }, + child: Container( + decoration: BoxDecoration( + gradient: new LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + Color(0xFFFFDCA1), + Color(0xFFFAE4C0), ], ), ), - )), - ], - ), - if (ranks.length > checkIndex && - widget.arguments["rankLevel"] < ranks[checkIndex].level && - ranks[checkIndex].price != "0.00") - Align( - alignment: Alignment.bottomCenter, - child: InkWell( - onTap: () { - setState(() { - buyRank(); - }); - }, - child: Container( - decoration: BoxDecoration( - gradient: new LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, - colors: [ - Color(0xFFFFDCA1), - Color(0xFFFAE4C0), - ]), - ), - width: MediaQuery.of(context).size.width, - height: 54.h, - alignment: Alignment.center, - child: Text( - "${S.of(context).lijikaitong}¥${ranks.length > checkIndex ? ranks[checkIndex].price : ""}/永久", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF4A4748), - ), + width: MediaQuery.of(context).size.width, + height: 54.h, + alignment: Alignment.center, + child: Text( + "${S.of(context).lijikaitong}¥${ranks.length > checkIndex ? ranks[checkIndex].price : ""}/永久", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16.sp, + color: Color(0xFF4A4748), ), ), ), - ) - - ], - ), - ); + ), + ), + ], + ), + ); } - Widget vipCar(int position){ + Widget vipCar(int position) { return Container( - margin:EdgeInsets.fromLTRB(16.w, 16.h, 8.w, 8.h), + margin: EdgeInsets.fromLTRB(16.w, 16.h, 8.w, 8.h), width: MediaQuery.of(context).size.width - 32.w, height: ((MediaQuery.of(context).size.width - 32.w) / - 2.11 * + 2.11 * AppUtils.textScale(context)), decoration: BoxDecoration( gradient: LinearGradient( colors: [ - AppUtils.getLighterColor(ranks[position]?.color ?? "#85C9DD"), - Color(int.parse((ranks[position]?.color ?? "#85C9DD").replaceAll("#", "FF"), radix: 16)), + AppUtils.getLighterColor(ranks[position].color ?? "#85C9DD"), + Color(int.parse( + (ranks[position].color ?? "#85C9DD").replaceAll("#", "FF"), + radix: 16)), ], begin: Alignment.topLeft, end: Alignment.bottomRight, ), - borderRadius:BorderRadius.circular(8), + borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), @@ -692,17 +692,23 @@ class _MineVipCore extends State { Container( padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h), decoration: BoxDecoration( - color: Color(int.parse((ranks[position]?.color ?? "").replaceAll("#", "FF"), radix: 16)), + color: Color(int.parse( + (ranks[position].color ?? "").replaceAll("#", "FF"), + radix: 16)), borderRadius: BorderRadius.only( topLeft: Radius.circular(8), bottomRight: Radius.circular(8), ), ), - child: Text(levelTipsName(position), + child: Text( + levelTipsName(position), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, - color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), + color: Color(int.parse( + (ranks[position].textColor ?? "") + .replaceAll("#", "FF"), + radix: 16)), ), ), ), @@ -711,9 +717,12 @@ class _MineVipCore extends State { child: Text( "VIP ${ranks[position].rankName ?? ""}", style: TextStyle( - color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), + color: Color(int.parse( + (ranks[position].textColor ?? "") + .replaceAll("#", "FF"), + radix: 16)), fontWeight: MyFontWeight.semi_bold, - fontSize:22.sp, + fontSize: 22.sp, ), ), ), @@ -739,95 +748,144 @@ class _MineVipCore extends State { bottom: 12.h, ), child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - if(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员")) - Align(alignment: Alignment.centerRight, - child: Text( - (ranks[position].rankName == "共创会员") ? - (userInfo?.memberRankVo?.rankName == "共创会员" ? "永久VIP" - :"¥${AppUtils.calculateDouble(double.tryParse(ranks[position].price??""))}/永久") - : (ranks[position]?.originScore ?? 0).toString(), - overflow: TextOverflow.ellipsis, - style: TextStyle( - color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), - fontWeight: ranks[position].rankName == "共创会员" ? MyFontWeight.regular : MyFontWeight.bold, - fontSize: ranks[position].rankName == "共创会员" ? 14.sp : 20.sp, - ), - ),), - if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员")) - Padding(padding:EdgeInsets.only(bottom: 12.h), - child: Row( - children: [ - Expanded(child: - Text( - "消费满 ¥${userInfo.memberRankVo.nextOrigin ?? "0"} 升级为 ${userInfo?.memberRankVo?.nextName ?? ""}", + if (userInfo?.memberRankVo?.rankName != + ranks[position].rankName || + (userInfo?.memberRankVo?.rankName == "共创会员" && + ranks[position].rankName == "共创会员")) + Align( + alignment: Alignment.centerRight, + child: Text( + (ranks[position].rankName == "共创会员") + ? (userInfo?.memberRankVo?.rankName == "共创会员" + ? "永久VIP" + : "¥${AppUtils.calculateDouble(double.tryParse("${ranks[position].price}") ?? 0)}/永久") + : (ranks[position].originScore ?? 0).toString(), overflow: TextOverflow.ellipsis, style: TextStyle( - color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), - fontWeight:MyFontWeight.regular, - fontSize: 14.sp, + color: Color(int.parse( + (ranks[position].textColor ?? "") + .replaceAll("#", "FF"), + radix: 16)), + fontWeight: ranks[position].rankName == "共创会员" + ? MyFontWeight.regular + : MyFontWeight.bold, + fontSize: ranks[position].rankName == "共创会员" + ? 14.sp + : 20.sp, ), - ) ), - Text.rich( - TextSpan( - children: [ - TextSpan( - text:"${AppUtils.calculateDouble(double.tryParse(userInfo.expendAmount??"0"))}", + ), + if (userInfo?.memberRankVo?.rankName == + ranks[position].rankName && + (userInfo?.memberRankVo?.rankName != "共创会员" && + ranks[position].rankName != "共创会员")) + Padding( + padding: EdgeInsets.only(bottom: 12.h), + child: Row( + children: [ + Expanded( + child: Text( + "消费满 ¥${userInfo?.memberRankVo?.nextOrigin ?? "0"} 升级为 ${userInfo?.memberRankVo?.nextName ?? ""}", + overflow: TextOverflow.ellipsis, style: TextStyle( - fontSize: 24.sp, - fontWeight: MyFontWeight.medium, - color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), + color: Color(int.parse( + (ranks[position].textColor ?? "") + .replaceAll("#", "FF"), + radix: 16)), + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, ), ), + ), + Text.rich( TextSpan( - text: "/${userInfo.memberRankVo.nextOrigin ?? "0"}", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), - ), + children: [ + TextSpan( + text: + "${AppUtils.calculateDouble(double.tryParse("${userInfo?.expendAmount}") ?? 0)}", + style: TextStyle( + fontSize: 24.sp, + fontWeight: MyFontWeight.medium, + color: Color(int.parse( + (ranks[position].textColor ?? "") + .replaceAll("#", "FF"), + radix: 16)), + ), + ), + TextSpan( + text: + "/${userInfo?.memberRankVo?.nextOrigin ?? "0"}", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(int.parse( + (ranks[position].textColor ?? "") + .replaceAll("#", "FF"), + radix: 16)), + ), + ), + ], ), - ], - ), + ), + ], ), - ], - ),), - if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员")) + ), + if (userInfo?.memberRankVo?.rankName == + ranks[position].rankName && + (userInfo?.memberRankVo?.rankName != "共创会员" && + ranks[position].rankName != "共创会员")) Container( - height: 8.h, - child: ClipRRect( - borderRadius: BorderRadius.circular(6.5), - child: LinearProgressIndicator( - value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ? - (userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0, - backgroundColor: Colors.white, - color: AppUtils.getLighterColor(ranks[position]?.color ?? ""), + height: 8.h, + child: ClipRRect( + borderRadius: BorderRadius.circular(6.5), + child: LinearProgressIndicator( + value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > + ((double.tryParse( + "${userInfo?.expendAmount}") ?? + 0) + .toInt()) + ? ((checkIndex < (rankNameIndex ?? 0)) + ? (userInfo?.memberRankVo?.nextOrigin ?? 0) / + (userInfo?.memberRankVo?.nextOrigin ?? 0) + : ((double.tryParse( + "${userInfo?.expendAmount}") ?? + 0) + .toInt()) / + (userInfo?.memberRankVo?.nextOrigin ?? 0)) + : 0, + backgroundColor: Colors.white, + color: AppUtils.getLighterColor( + ranks[position].color ?? ""), + ), ), ), - ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( S.of(context).kaitongriqi( - (widget.arguments["createTime"] != null && widget.arguments["createTime"] != "") + (widget.arguments["createTime"] != null && + widget.arguments["createTime"] != "") ? widget.arguments["createTime"].split(" ")[0] - : widget.arguments["createTime"] - ), + : widget.arguments["createTime"]), style: TextStyle( - fontWeight: MyFontWeight.regular, - fontSize: 12.sp, - color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)) - ), + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + color: Color(int.parse( + ("${ranks[position].textColor}") + .replaceAll("#", "FF"), + radix: 16))), ), Icon( Icons.qr_code, size: 24, - color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)), + color: Color(int.parse( + ("${ranks[position].textColor}") + .replaceAll("#", "FF"), + radix: 16)), ), ], ), @@ -851,7 +909,7 @@ class _MineVipCore extends State { children: [ Expanded( child: Text( - rank?.rankName ?? "", + rank.rankName ?? "", textAlign: TextAlign.center, style: TextStyle( fontSize: 14.sp, @@ -881,7 +939,7 @@ class _MineVipCore extends State { ///会员权益列表 Widget vipLegalRight() { return GridView.builder( - itemCount: vipBenefitList == null ? 0 : vipBenefitList.length, + itemCount: vipBenefitList.length ?? 0, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( @@ -910,7 +968,7 @@ class _MineVipCore extends State { ); } - Widget vipLegalRightItem(VipBenefitList vipBenefitList) { + Widget vipLegalRightItem(VipBenefit vipBenefitList) { return Container( alignment: Alignment.center, child: Column( @@ -919,15 +977,22 @@ class _MineVipCore extends State { alignment: Alignment.bottomCenter, children: [ MImage( - (!vipBenefitList.actived || (!vipBenefitList.actived && !vipBenefitList.have) || (vipBenefitList.actived && !vipBenefitList.have))? - (vipBenefitList?.iconGrey ?? ""):(vipBenefitList?.icon ?? ""), + (!(vipBenefitList.actived ?? false) || + (!(vipBenefitList.actived ?? false) && + !(vipBenefitList.have ?? false)) || + ((vipBenefitList.actived ?? false) && + !(vipBenefitList.have ?? false))) + ? (vipBenefitList.iconGrey ?? "") + : (vipBenefitList.icon ?? ""), width: 36, height: 36, // fit: BoxFit.cover, errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", ), - if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have ) + if (!(vipBenefitList.actived ?? false) || + (!(vipBenefitList.actived ?? false) && + !(vipBenefitList.have ?? false))) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -955,7 +1020,8 @@ class _MineVipCore extends State { ], ), ), - if (vipBenefitList.actived && !vipBenefitList.have) + if ((vipBenefitList.actived ?? false) && + !(vipBenefitList.have ?? false)) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -989,17 +1055,18 @@ class _MineVipCore extends State { height: 5.h, ), Expanded( - child: Text( - vipBenefitList?.name ?? "", - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - style: TextStyle( - color: Color(0xFF181818), - fontWeight: MyFontWeight.regular, - fontSize: 12.sp, + child: Text( + vipBenefitList.name ?? "", + maxLines: 2, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle( + color: Color(0xFF181818), + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + ), ), - )), + ), ], ), ); diff --git a/lib/mine/mine_vip_level_page.dart b/lib/mine/mine_vip_level_page.dart index f52db033..43e0144c 100644 --- a/lib/mine/mine_vip_level_page.dart +++ b/lib/mine/mine_vip_level_page.dart @@ -1,10 +1,10 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/rank.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/rank.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -16,7 +16,7 @@ import 'package:shared_preferences/shared_preferences.dart'; class MineVipLevelPage extends StatefulWidget { final Map arguments; - MineVipLevelPage({this.arguments}); + MineVipLevelPage({required this.arguments}); @override State createState() { @@ -25,7 +25,7 @@ class MineVipLevelPage extends StatefulWidget { } class _MineVipLevelPage extends State { - ApiService apiService; + ApiService? apiService; List ranks = []; final SwiperController controller = SwiperController(); @@ -35,22 +35,21 @@ class _MineVipLevelPage extends State { super.initState(); SharedPreferences.getInstance().then((value) { - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); + apiService = ApiService(Dio(), context: context, token: value.getString("token")); queryVipLevel(); }); } queryVipLevel() async { - BaseData> rankData = await apiService.rankList().catchError((onError) {}); - if (rankData != null && rankData.isSuccess) { + BaseData>? rankData = await apiService?.rankList().catchError((onError) {}); + if (rankData?.isSuccess ?? false) { ranks.clear(); - ranks.addAll(rankData.data); + ranks.addAll(rankData!.data ?? []); setState(() { - controller.move((widget.arguments["rankLevel"] - 1), animation: false); + controller.move((widget.arguments?["rankLevel"] - 1), animation: false); }); } else { - SmartDialog.showToast(rankData.msg, alignment: Alignment.center); + SmartDialog.showToast("${rankData?.msg}", alignment: Alignment.center); } } @@ -77,18 +76,18 @@ class _MineVipLevelPage extends State { controller: controller, itemBuilder: (context, position) { return MineVipView( - vipLevel: !(ranks != null && ranks.isNotEmpty) ? widget.arguments["rankLevel"] : position + 1, + vipLevel: !(ranks.isNotEmpty) ? widget.arguments["rankLevel"] : position + 1, curLevel: widget.arguments["rankLevel"], - tag: (widget.arguments["rankLevel"] == (position + 1) || !(ranks != null && ranks.isNotEmpty)) ? "vip" : "", + tag: (widget.arguments["rankLevel"] == (position + 1) || !(ranks.isNotEmpty)) ? "vip" : "", padding: 6.w, - rank: !(ranks != null && ranks.isNotEmpty) ? 0 : widget.arguments["points"]??0, - rankMax: !(ranks != null && ranks.isNotEmpty) ? 0 : (position < (ranks.length - 1)) - ? ranks[position + 1].rankOrigin - : ranks[position].rankOrigin, + rank: !(ranks.isNotEmpty) ? 0 : widget.arguments["points"]??0, + rankMax: !(ranks.isNotEmpty) ? 0 : (position < (ranks.length - 1)) + ? (ranks[position + 1].rankOrigin ?? 0) + : (ranks[position].rankOrigin ?? 0), createTime: widget.arguments["createTime"], ); }, - itemCount: (ranks != null && ranks.isNotEmpty) ? ranks.length : 1, + itemCount: (ranks.isNotEmpty) ? ranks.length : 1, ), ), Container( @@ -279,7 +278,7 @@ class _MineVipLevelPage extends State { children: [ Expanded( child: Text( - rank?.rankName ?? "", + rank.rankName ?? "", textAlign: TextAlign.center, style: TextStyle( fontSize: 14.sp, diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index 771e404b..a3eb369a 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -1,13 +1,12 @@ import 'dart:convert'; -import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_bill.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_bill.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -17,10 +16,8 @@ import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:flutter/material.dart'; import 'package:number_precision/number_precision.dart'; -import '../utils/flutter_utils.dart'; class MineWalletPage extends StatefulWidget { @override @@ -44,22 +41,24 @@ class _MineWalletPage extends State { loadBalance(); } - UserInfo userInfo; - ApiService apiService; + UserInfo? userInfo; + ApiService? apiService; int current = 1; List userBills = []; loadBalance() async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - userInfo = - UserInfo.fromJson(jsonDecode(sharedPreferences.getString('user'))); - mgreenMoney = double.tryParse(userInfo.greenMoney); - mRaiseMoney = double.tryParse(userInfo.raiseMoney); - mBalance = double.tryParse(userInfo.money); + String? user = sharedPreferences.getString('user'); + if (user?.isNotEmpty ?? false) { + userInfo = UserInfo.fromJson(jsonDecode(user!)); + } + mgreenMoney = double.tryParse("${userInfo?.greenMoney}"); + mRaiseMoney = double.tryParse("${userInfo?.raiseMoney}"); + mBalance = double.tryParse("${userInfo?.money}"); pBalance = mBalance + mgreenMoney; - activityMoney = double.tryParse(userInfo.activityMoney); + activityMoney = double.tryParse("${userInfo?.activityMoney}"); if (mounted) setState(() {}); - String token = sharedPreferences.getString("token"); + String? token = sharedPreferences.getString("token"); apiService = ApiService(Dio(), context: context, token: token); loadBillInfo(); } @@ -70,14 +69,13 @@ class _MineWalletPage extends State { } queryUserBalance() async { - BaseData baseData = - await apiService.queryInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; - mgreenMoney = double.tryParse(userInfo.greenMoney); - mRaiseMoney = double.tryParse(userInfo.raiseMoney); - activityMoney = double.tryParse(userInfo.activityMoney); - mBalance = double.tryParse(userInfo.money); + BaseData? baseData = await apiService?.queryInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; + mgreenMoney = double.tryParse("${userInfo?.greenMoney}"); + mRaiseMoney = double.tryParse("${userInfo?.raiseMoney}"); + activityMoney = double.tryParse("${userInfo?.activityMoney}"); + mBalance = double.tryParse("${userInfo?.money}"); pBalance = mBalance + mgreenMoney; if (mounted) setState(() {}); } @@ -85,7 +83,7 @@ class _MineWalletPage extends State { loadBillInfo() async { queryUserBalance(); - BaseData> baseData = await apiService.queryBillInfo({ + BaseData>? baseData = await apiService?.queryBillInfo({ "current": current, "model": {"category": "", "title": "bill_title_balance", "type": ""}, "order": "descending", @@ -95,14 +93,16 @@ class _MineWalletPage extends State { refreshController.refreshFailed(); refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (current == 1) { userBills.clear(); } - userBills.addAll(baseData.data.records); + if (baseData!.data?.records?.isNotEmpty ?? false) { + userBills.addAll(baseData.data!.records!); + } refreshController.refreshCompleted(); refreshController.loadComplete(); - if (current * 10 > int.tryParse(baseData.data.total)) { + if (current * 10 > (int.tryParse("${baseData.data?.total}") ?? 0)) { refreshController.loadNoData(); } else { current += 1; @@ -352,14 +352,15 @@ class _MineWalletPage extends State { ), Expanded( child: Text( - integralTips ? " 有效期至${userInfo.raiseExpireTime.split(" ")[0]}" : "", + integralTips ? " 有效期至${userInfo?.raiseExpireTime?.split(" ")[0]}" : "", style: TextStyle( fontSize: 10.sp, fontFamily: 'JDZhengHT', fontWeight: MyFontWeight.light, color: Colors.white, ), - )), + ), + ), Text( "${NP.strip(mRaiseMoney)}", style: TextStyle( @@ -422,7 +423,7 @@ class _MineWalletPage extends State { height: 16.h, ), Container( - child: (userBills == null || userBills.length == 0) + child: (userBills.length == 0) ? NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, @@ -431,7 +432,7 @@ class _MineWalletPage extends State { margin: EdgeInsets.only(top: 120.h), ) : ListView.builder( - itemCount: userBills != null ? userBills.length : 0, + itemCount: userBills.length ?? 0, shrinkWrap: true, padding: EdgeInsets.only(bottom: 20.h), physics: NeverScrollableScrollPhysics(), @@ -458,12 +459,13 @@ class _MineWalletPage extends State { Expanded( flex: 7, child: Text( - userBill.type, + userBill.type ?? "", style: TextStyle( color: Colors.black, fontSize: 12.sp, ), - )), + ), + ), Expanded( flex: 4, child: Row( @@ -507,7 +509,7 @@ class _MineWalletPage extends State { Expanded( flex: 7, child: Text( - userBill.createTime, + userBill.createTime ?? "", style: TextStyle( color: Color(0xFF727272), fontSize: 10.sp, @@ -558,7 +560,7 @@ class _MineWalletPage extends State { Expanded( flex: 7, child: Text( - S.of(context).pingtaizongyue(userBill.balance), + S.of(context).pingtaizongyue("${userBill.balance}"), style: TextStyle( color: Color(0xFF727272), fontFamily: 'JDZhengHT', @@ -609,26 +611,25 @@ class _MineWalletPage extends State { } bool isZero(String money) { - if (money == null || money.isEmpty) return true; - double zero = double.tryParse(money); + if (money.isEmpty) return true; + double zero = double.tryParse(money) ?? 0; return zero == 0; } List calculateBalance(UserBill userBill, int index) { - double tbalance = double.tryParse(userBill.number ?? "0"); + double tbalance = double.tryParse("${userBill.number}") ?? 0; /// 总余额 - String surplusGreenMoney = userBill.surplusGreenMoney; - String surplusActivityMoney = userBill.surplusActivityMoney; - double surplusMoney = double.tryParse(surplusGreenMoney ?? "0"); - double surplusActivity = double.tryParse(surplusActivityMoney ?? "0"); + String surplusGreenMoney = userBill.surplusGreenMoney ?? ""; + String surplusActivityMoney = userBill.surplusActivityMoney ?? ""; + double surplusMoney = double.tryParse("${surplusGreenMoney}") ?? 0; + double surplusActivity = double.tryParse("${surplusActivityMoney}") ?? 0; - // double balance = tbalance - (surplusMoney ?? 0) - (surplusActivity ?? 0); - String greenMoney = userBill.greenMoney; - String activityMoney = userBill.activityMoney; + String greenMoney = userBill.greenMoney ?? ""; + String activityMoney = userBill.activityMoney ?? ""; - double money = double.tryParse(greenMoney ?? "0"); - double activity = double.tryParse(activityMoney ?? "0"); + double money = double.tryParse("${greenMoney}") ?? 0; + double activity = double.tryParse("${activityMoney}") ?? 0; if (index == 0) { if (money > 0) { return [S.of(context).lvbiyue, "${userBill.pm == 0 ? '-' : '+'}$money"]; diff --git a/lib/mine/personal_page.dart b/lib/mine/personal_page.dart index 88f47237..8819f303 100644 --- a/lib/mine/personal_page.dart +++ b/lib/mine/personal_page.dart @@ -7,13 +7,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart'; import 'package:huixiang/community/photo_view_gallery_screen.dart'; +import 'package:huixiang/data/member_infor.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; -import 'package:huixiang/retrofit/data/member_Infor.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/upload_result.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/comunity_comment.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/upload_result.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -27,7 +27,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; class PersonalPage extends StatefulWidget { - final Map arguments; + final Map? arguments; PersonalPage({this.arguments}); @@ -38,25 +38,25 @@ class PersonalPage extends StatefulWidget { } class _PersonalPage extends State with WidgetsBindingObserver { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); final ScrollController scrollController = ScrollController(); var isShrink = false; int pageNum = 1; - String userId; + String? userId; List
articles = []; - MemberInfor memberInfor; - String filePath; + MemberInfor? memberInfor; + String? filePath; bool isLoadMore = false; bool isRefresh = true; bool isLoadingData = false; - String memberId; + String? memberId; Map modifyInfo = {"background": ""}; @override void initState() { super.initState(); - memberId = widget.arguments["memberId"]; + memberId = widget.arguments?["memberId"]; WidgetsBinding.instance.addObserver(this); SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), @@ -74,22 +74,13 @@ class _PersonalPage extends State with WidgetsBindingObserver { ///查询会员信息 queryMember(id) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = - await apiService.memberDetail(id).catchError((error) { + BaseData? baseData = await apiService?.memberDetail(id).catchError((error) { refreshController.refreshFailed(); debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - memberInfor = baseData.data; + memberInfor = baseData!.data; }); refreshController.refreshCompleted(); } else { @@ -98,7 +89,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { } ///动态列表 - queryCommunity(String searchKey) async { + queryCommunity(String? searchKey) async { if (!isRefresh) { isRefresh = true; return; @@ -107,19 +98,11 @@ class _PersonalPage extends State with WidgetsBindingObserver { return; } isLoadingData = true; - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - userId = value.getString('userId'); - apiService = ApiService(Dio(), - context: context, - token: value.getString("token"), - showLoading: false); - } if (isLoadMore) { pageNum += 1; isLoadMore = false; } else if (searchKey == null) pageNum = 1; - BaseData> baseData = await apiService.trendList({ + BaseData>? baseData = await apiService?.trendList({ "mid": memberId == "0" ? userId : memberId, "onlyFollow": false, "onlyMe": true, @@ -128,65 +111,28 @@ class _PersonalPage extends State with WidgetsBindingObserver { "searchKey": searchKey ?? "" }).catchError((error) { debugPrint(error); - if (searchKey == null) { - refreshController.refreshFailed(); - refreshController.loadFailed(); - } }); - if (searchKey == null) { - refreshController.refreshCompleted(); - refreshController.loadComplete(); - } - if (baseData.isSuccess) { - if (searchKey != null) { - if (baseData?.data?.list != null && baseData.data.list.isNotEmpty) - articles.forEach((element) { - if (element.id == searchKey) { - element.content = jsonEncode(baseData.data.list[0].subjectInfo); - element.mainTitle = baseData.data.list[0].subject; - element.followed = baseData.data.list[0].selfFollow; - element.liked = baseData.data.list[0].selfLike; - element.authorHeadImg = baseData.data.list[0].memberInfo?.avatar; - element.authorName = baseData.data.list[0].memberInfo?.nickname; - element.location = baseData.data.list[0].location; - element.createTime = baseData.data.list[0].createTime; - element.author = baseData.data.list[0].memberInfo?.mid; - element.viewers = baseData.data.list[0]?.viewers; - element.likes = baseData.data.list[0]?.likes; - element.comments = baseData.data.list[0]?.comments; - this.isRefresh = false; - setState(() {}); - } - }); - } else { - if (pageNum == 1) { - articles.clear(); - } - baseData.data.list.forEach((element) { - var article = Article(); - article.id = element.id; - article.content = jsonEncode(element.subjectInfo); - article.mainTitle = element.subject; - article.followed = element.selfFollow; - article.liked = element.selfLike; - article.authorHeadImg = element.memberInfo?.avatar; - article.authorName = element.memberInfo?.nickname; - article.location = element.location; - article.createTime = element.createTime; - article.author = element.memberInfo?.mid; - article.viewers = element?.viewers; - article.likes = element?.likes; - article.comments = element?.comments; - articles.add(article); + if (baseData?.isSuccess ?? false) { + if (baseData!.data?.list?.isNotEmpty ?? false) + articles.forEach((element) { + if (element.id == searchKey) { + element.content = jsonEncode(baseData.data!.list![0].subjectInfo); + element.mainTitle = baseData.data!.list![0].subject; + element.followed = baseData.data!.list![0].selfFollow; + element.liked = baseData.data!.list![0].selfLike; + element.authorHeadImg = baseData.data!.list![0].memberInfo?.avatar; + element.authorName = baseData.data!.list![0].memberInfo?.nickname; + element.location = baseData.data!.list![0].location; + element.createTime = baseData.data!.list![0].createTime; + element.author = baseData.data!.list![0].memberInfo?.mid; + element.viewers = baseData.data!.list![0].viewers; + element.likes = baseData.data!.list![0].likes; + element.comments = baseData.data!.list![0].comments; + this.isRefresh = false; + setState(() {}); + } }); - setState(() {}); - // comments.sort((a,b)=>b.createTime.compareTo(a.createTime)); - // print("comments: ${comments.length}"); - if (int.tryParse(baseData.data.total) < (pageNum * 10)) { - refreshController.loadNoData(); } - } - } isLoadingData = false; } @@ -249,7 +195,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { ///拍照 openCamera() async { if (await Permission.camera.isGranted) { - Media medias = await ImagePickers.openCamera( + Media? medias = await ImagePickers.openCamera( cameraMimeType: CameraMimeType.photo, cropConfig: CropConfig( enableCrop: true, @@ -258,8 +204,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), compressSize: 500, ); - if (medias == null) return; - filePath = medias.path; + filePath = medias?.path; fileUpload(); } else { await Permission.camera.request(); @@ -285,7 +230,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { height: 200, ), ); - if (medias == null || medias.length == 0) return; + if (medias.length == 0) return; filePath = medias[0].path; setState(() {}); fileUpload(); @@ -297,8 +242,8 @@ class _PersonalPage extends State with WidgetsBindingObserver { ///调用修改用户信息接口 modifyInfos() async { - var info = await apiService.editInfo(modifyInfo).catchError((onError) {}); - if (info.isSuccess) { + var info = await apiService?.editInfo(modifyInfo).catchError((onError) {}); + if (info?.isSuccess ?? false) { setState(() { SmartDialog.showToast("用户信息修改成功", alignment: Alignment.center); }); @@ -308,13 +253,12 @@ class _PersonalPage extends State with WidgetsBindingObserver { ///文件上传 fileUpload() async { - if (filePath != null && filePath != "" && await File(filePath).exists()) { - BaseData baseData = await apiService - .upload(File(filePath), 123123123, false) + if ((filePath?.isNotEmpty ?? false) && await File(filePath!).exists()) { + BaseData? baseData = await apiService?.upload(File(filePath!), 123123123, false) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - UploadResult uploadResult = baseData.data; - modifyInfo["background"] = uploadResult.url; + if (baseData?.isSuccess ?? false) { + UploadResult? uploadResult = baseData!.data; + modifyInfo["background"] = uploadResult?.url; modifyInfos(); } } @@ -327,7 +271,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { body:SmartRefresher( controller: refreshController, enablePullDown: true, - enablePullUp: (articles == null || articles.length == 0) ? false: true, + enablePullUp: (articles.length == 0) ? false: true, header: MyHeader(), footer: CustomFooter( builder: (context, mode) { @@ -375,10 +319,13 @@ class _PersonalPage extends State with WidgetsBindingObserver { fit: BoxFit.cover, errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", - ))), + ), + ), + ), Container( margin: EdgeInsets.only( - top: 50.h, left: 16.w, right: 16.w), + top: 50.h, left: 16.w, right: 16.w, + ), alignment: Alignment.topLeft, decoration: BoxDecoration( color: Colors.transparent, @@ -444,8 +391,9 @@ class _PersonalPage extends State with WidgetsBindingObserver { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: - EdgeInsets.only(left: 86.w, top: 12.h, right: 16.w), + margin: EdgeInsets.only( + left: 86.w, top: 12.h, right: 16.w, + ), child: GestureDetector( onTap: () { setState(() { @@ -472,10 +420,12 @@ class _PersonalPage extends State with WidgetsBindingObserver { fontSize: 12.sp, color: Color(0xFF868686), fontWeight: MyFontWeight.regular, - height: 1.5.h), - )), + height: 1.5.h, + ), + ), + ), Icon( - (isShrink != null && !isShrink) + (!isShrink) ? Icons.chevron_right : Icons.keyboard_arrow_up, color: Colors.black, @@ -485,7 +435,9 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), )), Container( - margin: EdgeInsets.only(left: 16.w, right: 16.w), + margin: EdgeInsets.only( + left: 16.w, right: 16.w, + ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, @@ -500,9 +452,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { child: Column( children: [ Text( - memberInfor != null - ? memberInfor.follow.toString() - : "0", + "${memberInfor?.follow ?? 0}", style: TextStyle( color: Color(0xFF353535), fontSize: 16.sp, @@ -521,7 +471,8 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), ), ], - )), + ), + ), ), ), Expanded( @@ -534,9 +485,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { child: Column( children: [ Text( - memberInfor != null - ? memberInfor.fans.toString() - : "0", + "${memberInfor?.fans ?? 0}", style: TextStyle( color: Color(0xFF353535), fontSize: 16.sp, @@ -555,7 +504,8 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), ), ], - )), + ), + ), ), ), Expanded( @@ -568,8 +518,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { child: Column( children: [ Text( - (memberInfor?.trendTotal ?? 0) - .toString(), + "${memberInfor?.trendTotal ?? 0}", style: TextStyle( color: Color(0xFF353535), fontSize: 16.sp, @@ -588,7 +537,8 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), ), ], - )), + ), + ), ), ), Expanded( @@ -601,8 +551,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { child: Column( children: [ Text( - (memberInfor?.gainLikeTotal ?? 0) - .toString(), + "${memberInfor?.gainLikeTotal ?? 0}", style: TextStyle( color: Color(0xFF353535), fontSize: 16.sp, @@ -674,9 +623,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen( images: [ - (memberInfor?.headimg ?? "").isEmpty - ? "https://i.postimg.cc/Pq6vjfnw/default-1.webp" - : memberInfor?.headimg + memberInfor?.headimg ?? "https://i.postimg.cc/Pq6vjfnw/default-1.webp" ], //传入图片list index: 0, //传入当前点击的图片的index ), @@ -694,9 +641,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), SizedBox(width: 10.w), Text( - ((memberInfor?.nickname ?? "") == "") - ? "回乡" - : memberInfor?.nickname, + memberInfor?.nickname ?? "回乡", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 16.sp, @@ -721,7 +666,8 @@ class _PersonalPage extends State with WidgetsBindingObserver { child: Container( height: 23.h, padding: EdgeInsets.only( - left: 6.w, right: 6.w, bottom: 2.h, top: 2.h), + left: 6.w, right: 6.w, bottom: 2.h, top: 2.h, + ), alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular(100), @@ -743,18 +689,21 @@ class _PersonalPage extends State with WidgetsBindingObserver { ) ], ), - )); + ), + ); } Widget dynamicList() { return Container( - child: (articles == null || articles.length == 0) + child: (articles.length == 0) ? NoDataView( src: "assets/image/dong_tai.webp", isShowBtn: false, text: "目前暂无发布动态,要把开心的事讲出来哦~", fontSize: 16.sp, - margin: EdgeInsets.only(left: 60.w, right: 60.w, bottom:80.h), + margin: EdgeInsets.only( + left: 60.w, right: 60.w, bottom:80.h, + ), ) : ListView.builder( physics: NeverScrollableScrollPhysics(), diff --git a/lib/mine/recharge_page.dart b/lib/mine/recharge_page.dart index 5f946c78..05561699 100644 --- a/lib/mine/recharge_page.dart +++ b/lib/mine/recharge_page.dart @@ -1,17 +1,17 @@ import 'dart:io'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:fluwx/fluwx.dart'; +import 'package:huixiang/data/preferential.dart'; +import 'package:huixiang/data/recharge_act.dart'; +import 'package:huixiang/data/vip_benefit.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/rechargeActLists.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; -import 'package:huixiang/retrofit/data/vip_rule_details.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; +import 'package:huixiang/data/vip_rule_details.dart'; +import 'package:huixiang/data/wx_pay.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -21,7 +21,7 @@ import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/recharge_details_dialog.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:tobias/tobias.dart' as tobias; +import 'package:tobias/tobias.dart'; import '../view_widget/classic_header.dart'; import '../view_widget/my_footer.dart'; @@ -35,27 +35,30 @@ class RechargePage extends StatefulWidget { } class _RechargePage extends State { - ApiService apiService; + ApiService? apiService; TextEditingController controller = TextEditingController(); - VipRuleDetails vipRuleDetails; - List vipBenefitList = []; + VipRuleDetails? vipRuleDetails; + List vipBenefitList = []; Color color = Colors.black; double discount = 100; int selectIndex = 0; - UserInfo userInfo; + UserInfo? userInfo; String mBalance = "0"; - dynamic payListen; - RechargeActLists rechargeActLists; + + RechargeAct? rechargeActLists; int selectStoreIndex = 0; - String recommendName; + String? recommendName; final RefreshController refreshController = RefreshController(); int _loadCount = 0; + Fluwx fluwx = Fluwx(); + Tobias tobias = Tobias(); + @override void initState() { super.initState(); _onRefresh(); - payListen = weChatResponseEventHandler.listen((event) async { + fluwx.addSubscriber((event) async { print("payCallback: ${event.errCode}"); if (event.errCode == 0) { queryUserBalance(); @@ -68,25 +71,17 @@ class _RechargePage extends State { }); } - @override - void dispose() { - super.dispose(); - if (payListen != null) payListen.cancel(); - } ///会员权益列表 queryBenefitList() async { try { - BaseData> baseData = - await apiService.benefitList().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.benefitList().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { vipBenefitList.clear(); - vipBenefitList.addAll(baseData.data); + vipBenefitList.addAll(baseData!.data!); vipBenefitList.forEach((element) { - if (element.have && - element.config != null && - element.code == "RECHARGE") { - discount = double.parse(element.config); + if ((element.have ?? false) && element.code == "RECHARGE") { + discount = double.parse("${element.config}"); } }); } @@ -97,15 +92,14 @@ class _RechargePage extends State { queryUserBalance() async { try { - BaseData baseData = - await apiService.queryInfo().catchError((onError) { + BaseData? baseData = await apiService?.queryInfo().catchError((onError) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), alignment: Alignment.center); refreshController.refreshFailed(); refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; + if (baseData?.isSuccess ?? false) { + userInfo = baseData?.data; mBalance = userInfo?.money ?? "0"; } } finally { @@ -116,10 +110,9 @@ class _RechargePage extends State { ///会员权益介绍/规则/说明/储值说明 queryRuleDetails() async { try { - BaseData baseData = - await apiService.vipBenefit().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - vipRuleDetails = baseData.data; + BaseData? baseData = await apiService?.vipBenefit().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + vipRuleDetails = baseData!.data; } } finally { addLoadCount(); @@ -129,10 +122,9 @@ class _RechargePage extends State { ///充值列表 queryRechargeActList() async { try { - BaseData baseData = - await apiService.rechargeActList("admin").catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - rechargeActLists = baseData.data; + BaseData? baseData = await apiService?.rechargeActList("admin").catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + rechargeActLists = baseData!.data; } } finally { addLoadCount(); @@ -140,12 +132,8 @@ class _RechargePage extends State { } _onRefresh() async { - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); + EasyLoading.show(status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); SharedPreferences value = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), pay: true); queryBenefitList(); queryRuleDetails(); queryRechargeActList(); @@ -289,8 +277,7 @@ class _RechargePage extends State { // ), ], )), - if (rechargeActLists != null && - (rechargeActLists?.preferentialList?.length ?? 0) > 0) + if (rechargeActLists?.preferentialList?.isNotEmpty ?? false) Container( width: double.infinity, margin: EdgeInsets.only(left: 16, right: 16), @@ -379,7 +366,7 @@ class _RechargePage extends State { ], ), ), - if ((rechargeActLists?.isOpen ?? false) == true) + if (rechargeActLists?.isOpen ?? false) GestureDetector( onTap: () { showRecommendStore(); @@ -389,9 +376,11 @@ class _RechargePage extends State { left: 14.w, right: 16.w, top: 14.h, - bottom: 14.h), + bottom: 14.h, + ), margin: EdgeInsets.only( - bottom: 22.h, left: 14.w, right: 14.w), + bottom: 22.h, left: 14.w, right: 14.w, + ), decoration: BoxDecoration( color: Color(0xFFFAFAFA), borderRadius: BorderRadius.circular(4), @@ -423,8 +412,7 @@ class _RechargePage extends State { ], )), ), - if (rechargeActLists != null && - (rechargeActLists?.preferentialList?.length ?? 0) > 0) + if (rechargeActLists?.preferentialList?.isNotEmpty ?? false) Align( alignment: Alignment.bottomCenter, child: GestureDetector( @@ -440,7 +428,8 @@ class _RechargePage extends State { borderRadius: BorderRadius.circular(27), ), margin: EdgeInsets.only( - left: 16, right: 16, bottom: 21), + left: 16, right: 16, bottom: 21, + ), child: Text( S.of(context).querenchongzhi, style: TextStyle( @@ -561,14 +550,10 @@ class _RechargePage extends State { var checkIndex = 2; Widget rechargeList() { - return (rechargeActLists != null && - (rechargeActLists?.preferentialList?.length ?? 0) > 0) + return (rechargeActLists?.preferentialList?.isNotEmpty ?? false) ? ListView.builder( padding: EdgeInsets.zero, - itemCount: (rechargeActLists != null && - (rechargeActLists?.preferentialList?.length ?? 0) > 0) - ? rechargeActLists.preferentialList.length - : 0, + itemCount: rechargeActLists?.preferentialList?.length ?? 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -579,8 +564,8 @@ class _RechargePage extends State { selectIndex = position; }); }, - child: rechargeItem( - rechargeActLists.preferentialList[position], position)); + child: rechargeItem(rechargeActLists!.preferentialList![position], position), + ); }, ) : NoDataView( @@ -592,19 +577,18 @@ class _RechargePage extends State { ); } - Widget rechargeItem(PreferentialList preferentialList, index) { + Widget rechargeItem(PreferentialList preferential, index) { return Container( width: double.infinity, height: 69.h, decoration: BoxDecoration( borderRadius: BorderRadius.circular(4), border: Border.all( - color: - selectIndex == index ? Color(0xFF32A060) : Color(0xFFFAFAFA), + color: selectIndex == index ? Color(0xFF32A060) : Color(0xFFFAFAFA), width: selectIndex == index ? 1 : 0, ), - color: - selectIndex == index ? Color(0XFFF0FAF4) : Color(0xFFFAFAFA)), + color: selectIndex == index ? Color(0XFFF0FAF4) : Color(0xFFFAFAFA), + ), margin: EdgeInsets.only(bottom: 14.w), padding: EdgeInsets.only(left: 16), child: Flex( @@ -622,18 +606,20 @@ class _RechargePage extends State { color: selectIndex == index ? Color(0xFF4D4D4D) : Color(0xFF868686), - fontWeight: MyFontWeight.regular), + fontWeight: MyFontWeight.regular, + ), ), TextSpan( text: - "${AppUtils.calculateDouble(double.tryParse(preferentialList.rechargeMoney) ?? 0)}元", + "${AppUtils.calculateDouble(double.tryParse("${preferential.rechargeMoney}") ?? 0)}元", style: TextStyle( fontSize: 18.sp, fontFamily: 'JDZhengHT', color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.semi_bold), + fontWeight: MyFontWeight.semi_bold, + ), ), ]), ), @@ -660,18 +646,20 @@ class _RechargePage extends State { color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.regular), + fontWeight: MyFontWeight.regular, + ), ), TextSpan( text: - "${AppUtils.calculateDouble((double.tryParse(preferentialList.rechargeMoney) ?? 0) + (double.tryParse(preferentialList.giftdMoney) ?? 0) + ((double.tryParse(preferentialList.rechargeMoney) ?? 0) - ((double.tryParse(preferentialList.rechargeMoney) ?? 0) * (discount / 100))))}元", + "${AppUtils.calculateDouble((double.tryParse("${preferential.rechargeMoney}") ?? 0) + (double.tryParse("${preferential.giftdMoney}") ?? 0) + ((double.tryParse("${preferential.rechargeMoney}") ?? 0) - ((double.tryParse("${preferential.rechargeMoney}") ?? 0) * (discount / 100))))}元", style: TextStyle( fontSize: 18.sp, fontFamily: 'JDZhengHT', color: selectIndex == index ? Color(0xFF353535) : Color(0xFF868686), - fontWeight: MyFontWeight.semi_bold), + fontWeight: MyFontWeight.semi_bold, + ), ), ]), ), @@ -706,11 +694,14 @@ class _RechargePage extends State { : Color(0xFF868686), ), ], - )), + ), + ), ], - )) + ), + ) ], - )); + ), + ); } Widget checkView(var index) { @@ -733,7 +724,7 @@ class _RechargePage extends State { context: context, backgroundColor: Colors.transparent, builder: (context) { - return RechargeWidget(rechargeActLists.preferentialList[index]); + return RechargeWidget(rechargeActLists?.preferentialList?[index]); }); } @@ -808,13 +799,14 @@ class _RechargePage extends State { child: recommendStoreItem(position), ); }, - itemCount: rechargeActLists.channels.length ?? 0, - )), + itemCount: rechargeActLists?.channels?.length ?? 0, + ), + ), GestureDetector( onTap: () { setState(() { recommendName = - rechargeActLists.channels[selectStoreIndex]; + rechargeActLists?.channels?[selectStoreIndex]; Navigator.of(context).pop(); }); }, @@ -866,7 +858,7 @@ class _RechargePage extends State { left: 12, ), child: Text( - rechargeActLists?.channels[index] ?? "", + rechargeActLists?.channels?[index] ?? "", style: TextStyle( fontWeight: MyFontWeight.bold, fontSize: 14.sp, @@ -891,13 +883,13 @@ class _RechargePage extends State { // alignment: Alignment.center); // return; // } - BaseData baseData = await apiService.recharge({ + BaseData? baseData = await apiService?.recharge({ "amount": 0, - "rechargeActId": rechargeActLists.preferentialList[selectIndex].id, + "rechargeActId": rechargeActLists?.preferentialList?[selectIndex].id, "rechargeType": checkIndex, "channel": recommendName, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (checkIndex == 2) { if (Platform.isAndroid) { if (!(await Min.isInitialize())) { @@ -907,29 +899,34 @@ class _RechargePage extends State { await Min.initialize(); } } - WxPay wxPay = WxPay.fromJson(baseData.data); - await registerWxApi( - appId: wxPay.appId, + WxPay? wxPay = WxPay.fromJson(baseData?.data); + if (wxPay?.isAnyEmpty() ?? false) { + return; + } + await fluwx.registerApi( + appId: wxPay.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + ), ); } else { - tobias.isAliPayInstalled().then((value) => { + tobias.isAliPayInstalled.then((value) => { // 判断是否安装了支付宝 if (!value) {SmartDialog.showToast("请安装支付宝", alignment: Alignment.center)} else { - tobias.aliPay(baseData.data["body"]).then((payRes) { + tobias.pay(baseData?.data["body"]).then((payRes) { if (payRes['resultStatus'] == 9000 || payRes['resultStatus'] == '9000') { SmartDialog.showToast("充值成功", @@ -944,7 +941,7 @@ class _RechargePage extends State { }); } } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } } diff --git a/lib/mine/release_page.dart b/lib/mine/release_page.dart index 02712a00..b228e8f6 100644 --- a/lib/mine/release_page.dart +++ b/lib/mine/release_page.dart @@ -1,21 +1,18 @@ import 'dart:convert'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/comunity_comment.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class ReleasePage extends StatefulWidget { @override @@ -26,9 +23,9 @@ class ReleasePage extends StatefulWidget { class _ReleasePage extends State { RefreshController refreshController = RefreshController(); - ApiService apiService; + ApiService? apiService; int pageNum = 0; - String userId; + String? userId; List
articles = []; @@ -45,17 +42,8 @@ class _ReleasePage extends State { } queryCommunity() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - userId = value.getString('userId'); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } pageNum += 1; - BaseData> baseData = await apiService.trendList({ + BaseData>? baseData = await apiService?.trendList({ "mid":"", "onlyFollow": false, "onlyMe": true, @@ -69,27 +57,27 @@ class _ReleasePage extends State { refreshController.refreshCompleted(); refreshController.loadComplete(); - if (baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (pageNum == 1) { articles.clear(); } - baseData.data.list.forEach((element) { + baseData?.data?.list?.forEach((element) { var article = Article(); article.id = element.id; article.content = jsonEncode(element.subjectInfo); - article.mainTitle =element.subject; + article.mainTitle = element.subject; article.followed = element.selfFollow; article.authorHeadImg = element.memberInfo?.avatar; article.authorName = element.memberInfo?.nickname; article.createTime = element.createTime; article.author = element.memberInfo?.mid; - article.viewers = element?.viewers; - article.likes = element?.likes; - article.comments = element?.comments; + article.viewers = element.viewers; + article.likes = element.likes; + article.comments = element.comments; articles.add(article); }); // print("comments: ${comments.length}"); - if (int.tryParse(baseData.data.total) < (pageNum * 10)) { + if ((int.tryParse("${baseData?.data?.total}") ?? 0) < (pageNum * 10)) { refreshController.loadNoData(); } } diff --git a/lib/mine/roll_center_page.dart b/lib/mine/roll_center_page.dart index 8ae869f0..046112f5 100644 --- a/lib/mine/roll_center_page.dart +++ b/lib/mine/roll_center_page.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/coupon_details_dialog.dart'; @@ -27,9 +26,9 @@ class RollCenterPage extends StatefulWidget { } class _RollCenterPage extends State { - RefreshController _refreshController; + late RefreshController _refreshController; - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -50,22 +49,24 @@ class _RollCenterPage extends State { List coupons = []; queryCoupon() async { - BaseData> baseData = await apiService.queryCoupon({ + BaseData>? baseData = await apiService?.queryCoupon({ "centre": true, "pageNum": pageNum, "pageSize": 10, "searchKey": "", "state": 0 }).catchError((onError) { - _refreshController.refreshFailed(); - _refreshController.loadFailed(); + _refreshController?.refreshFailed(); + _refreshController?.loadFailed(); }); if (pageNum == 1) coupons.clear(); - if (baseData != null && baseData.isSuccess) { - coupons.addAll(baseData.data.list); + if (baseData?.isSuccess ?? false) { + if (baseData!.data != null && (baseData.data!.list?.isNotEmpty ?? false)) { + coupons.addAll(baseData.data!.list!); + } _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData.data.pageNum == baseData.data.pages) { + if (baseData.data?.pageNum == baseData.data?.pages) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -111,7 +112,7 @@ class _RollCenterPage extends State { enablePullUp: true, header: MyHeader(), footer: CustomFooter( - builder: (BuildContext context, LoadStatus mode) { + builder: (BuildContext context, LoadStatus? mode) { return MyFooter(mode); }, ), @@ -119,7 +120,7 @@ class _RollCenterPage extends State { onRefresh: refreshCoupon, onLoading: queryCoupon, physics: BouncingScrollPhysics(), - child: (coupons != null && coupons.length > 0) + child: (coupons.length > 0) ? ListView.builder( itemBuilder: (context, position) { return GestureDetector( @@ -153,7 +154,7 @@ class _RollCenterPage extends State { ), ); }, - itemCount: (coupons != null && coupons.length > 0) ? coupons.length : 0, + itemCount: (coupons.length > 0) ? coupons.length : 0, ) : NoDataView( src: "assets/image/ka.webp", @@ -170,8 +171,8 @@ class _RollCenterPage extends State { } receiveCoupon(couponId) async { - BaseData baseData = await apiService.receiveCoupon(couponId); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(couponId); + if (baseData?.isSuccess ?? false) { refreshCoupon(); showAlertDialog(); } diff --git a/lib/mine/scan_web.dart b/lib/mine/scan_web.dart index acab322e..476e9240 100644 --- a/lib/mine/scan_web.dart +++ b/lib/mine/scan_web.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; @@ -6,7 +5,7 @@ import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:webview_flutter/webview_flutter.dart'; class ScanWeb extends StatefulWidget { - final Map arguments; + final Map? arguments; ScanWeb({this.arguments}); @override @@ -17,16 +16,39 @@ class ScanWeb extends StatefulWidget { class _ScanWeb extends State { var controller = new ScrollController(); - WebViewController webViewController; - String result; - String title; + late WebViewController _webViewController; + String? result; + String? title; @override void initState() { super.initState(); - result = widget.arguments["result"]; - title = widget.arguments["title"]; + result = widget.arguments?["result"]; + title = widget.arguments?["title"]; EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); + + if (result?.isNotEmpty ?? false) { + _webViewController = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) { + // Update loading bar. + }, + onPageStarted: (String url) {}, + onPageFinished: (String url) {}, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + // if (request.url.startsWith('https://www.youtube.com/')) { + // return NavigationDecision.prevent; + // } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse(result!)); + } + } @override @@ -39,19 +61,8 @@ class _ScanWeb extends State { leadingColor: Colors.black, ), body: - WebView( - initialUrl:result, - javascriptMode: JavascriptMode.unrestricted, - onWebViewCreated: (WebViewController controller){ - webViewController =controller; - }, - onProgress: (int progress) async { - if(widget.arguments["title"] != null) - return; - title = await webViewController?.getTitle(); - setState((){}); - EasyLoading.dismiss(); - }, + WebViewWidget( + controller: _webViewController, ), ); } diff --git a/lib/mine/user_info_page.dart b/lib/mine/user_info_page.dart index 9909161f..567fd871 100644 --- a/lib/mine/user_info_page.dart +++ b/lib/mine/user_info_page.dart @@ -5,9 +5,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/upload_result.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/upload_result.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -28,7 +28,7 @@ class UserInfoPage extends StatefulWidget { } class _UserInfoPage extends State { - ApiService apiService; + ApiService? apiService; Map modifyInfo = { "birth": "", @@ -41,26 +41,28 @@ class _UserInfoPage extends State { @override void initState() { super.initState(); - SharedPreferences.getInstance().then((value) => { - print(value.getString('user')), - user = UserInfo.fromJson(jsonDecode(value.getString('user'))), - mobile = user?.phone ?? "", - modifyInfo["nickname"] = user?.nickname ??"", - modifyInfo["signature"] = user?.signature ?? "", - modifyInfo["birth"] = user?.birth ?? "", - modifyInfo["headimg"] = user?.headimg ?? "", - modifyInfo["sex"] = user?.sex ?? "", - age = AppUtils.getAgeByString(user ?.birth ?? ""), - refresh(), - apiService = ApiService(Dio(), - context: context, token: value.getString('token')), - }); + SharedPreferences.getInstance().then((value) { + String? userStr = value.getString('user'); + if (userStr?.isNotEmpty ?? false) { + print(userStr); + user = UserInfo.fromJson(jsonDecode(userStr!)); + mobile = user?.phone ?? ""; + modifyInfo["nickname"] = user?.nickname ??""; + modifyInfo["signature"] = user?.signature ?? ""; + modifyInfo["birth"] = user?.birth ?? ""; + modifyInfo["headimg"] = user?.headimg ?? ""; + modifyInfo["sex"] = user?.sex ?? ""; + age = AppUtils.getAgeByString(user?.birth ?? ""); + refresh(); + apiService = ApiService(Dio(), context: context, token: value.getString('token')); + } + }); } - String age; + String? age; String mobile = ""; String locale = "zh"; - UserInfo user; + UserInfo? user; int selectSexIndex = 0; refresh() async { @@ -206,14 +208,12 @@ class _UserInfoPage extends State { builder: (_) { return CupertinoDatePickerWidget(); }); - if (dateTime != null) { - modifyInfo["birth"] = DateFormat("yyyy-MM-dd").format(dateTime); - user.birth = modifyInfo["birth"]; - age = AppUtils.getAge(dateTime); - modifyInfos(); - setState(() {}); + modifyInfo["birth"] = DateFormat("yyyy-MM-dd").format(dateTime); + user?.birth = modifyInfo["birth"]; + age = AppUtils.getAge(dateTime); + modifyInfos(); + setState(() {}); } - } ///性别选择 showSexSelect(index) { @@ -392,7 +392,7 @@ class _UserInfoPage extends State { ///拍照 openCamera() async { if (await Permission.camera.isGranted) { - Media medias = await ImagePickers.openCamera( + Media? medias = await ImagePickers.openCamera( cameraMimeType: CameraMimeType.photo, cropConfig: CropConfig( enableCrop: true, @@ -401,8 +401,7 @@ class _UserInfoPage extends State { ), compressSize: 500, ); - if (medias == null) return; - filePath = medias.path; + filePath = medias?.path; fileUpload(); } else { await Permission.camera.request(); @@ -410,7 +409,7 @@ class _UserInfoPage extends State { } } - String filePath; + String? filePath; ///打开相册 openStorage() async { @@ -430,7 +429,7 @@ class _UserInfoPage extends State { height: 200, ), ); - if (medias == null || medias.length == 0) return; + if (medias.length == 0) return; filePath = medias[0].path; setState(() {}); fileUpload(); @@ -470,8 +469,8 @@ class _UserInfoPage extends State { ///调用修改用户信息接口 modifyInfos() async { - var info = await apiService.editInfo(modifyInfo).catchError((onError) {}); - if (info.isSuccess) { + var info = await apiService?.editInfo(modifyInfo).catchError((onError) {}); + if (info?.isSuccess ?? false) { SharedPreferences.getInstance().then((value) { value.setString('user', jsonEncode(modifyInfo)); }); @@ -479,19 +478,18 @@ class _UserInfoPage extends State { SmartDialog.showToast("用户信息修改成功", alignment: Alignment.center); }); }else{ - SmartDialog.showToast("用户信息修改失败 " + info.msg, alignment: Alignment.center); + SmartDialog.showToast("用户信息修改失败 ${info?.msg}", alignment: Alignment.center); } } ///文件上传 fileUpload() async { - if (filePath != null && filePath != "" && await File(filePath).exists()) { - BaseData baseData = await apiService - .upload(File(filePath), 123123123, false) + if ((filePath?.isNotEmpty ?? false) && await File(filePath!).exists()) { + BaseData? baseData = await apiService?.upload(File(filePath!), 123123123, false) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - UploadResult uploadResult = baseData.data; - modifyInfo["headimg"] = uploadResult.url; + if (baseData?.isSuccess ?? false) { + UploadResult? uploadResult = baseData!.data; + modifyInfo["headimg"] = uploadResult?.url; modifyInfos(); } } @@ -536,7 +534,7 @@ class _UserInfoPage extends State { if (type == 0) { return ClipRRect( borderRadius: BorderRadius.circular(4), - child: filePath == null || filePath == "" + child: (filePath?.isEmpty ?? true) ? (modifyInfo["headimg"] != null && modifyInfo["headimg"] != "" ? MImage( modifyInfo["headimg"], @@ -551,7 +549,7 @@ class _UserInfoPage extends State { fit: BoxFit.cover, )) : Image.file( - File(filePath), + File(filePath!), width: 42, height: 42, fit: BoxFit.cover, diff --git a/lib/mine/vip_balance_page.dart b/lib/mine/vip_balance_page.dart index da15a98a..663c1d45 100644 --- a/lib/mine/vip_balance_page.dart +++ b/lib/mine/vip_balance_page.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_bill.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_bill.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; @@ -24,9 +23,9 @@ class VipBalancePage extends StatefulWidget { } class _VipBalancePage extends State { - RefreshController _refreshController; + late RefreshController _refreshController; - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -45,7 +44,7 @@ class _VipBalancePage extends State { List userBills = []; queryBillInfo() async { - BaseData> baseData = await apiService.queryBillInfo({ + BaseData>? baseData = await apiService?.queryBillInfo({ "current": current, "model": { "category": "", @@ -60,15 +59,17 @@ class _VipBalancePage extends State { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (current == 1) { - userBills.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData!.data != null && (baseData.data!.records?.isNotEmpty ?? false)) { + if (current == 1) { + userBills.clear(); + } + userBills.addAll(baseData.data!.records!); } - userBills.addAll(baseData.data.records); setState(() { _refreshController.refreshCompleted(); _refreshController.loadComplete(); - if (baseData.data.pageNum == baseData.data.pages) { + if (baseData.data?.pageNum == baseData.data?.pages) { _refreshController.loadNoData(); } else { current += 1; @@ -90,7 +91,7 @@ class _VipBalancePage extends State { leadingColor: Colors.black, ), body: Container( - child: (userBills == null || userBills.length == 0) + child: (userBills.length == 0) ? NoDataView( src: "assets/image/icon_empty.webp", isShowBtn: false, @@ -134,7 +135,7 @@ class _VipBalancePage extends State { margin: EdgeInsets.only(left: 6.w, top: 12.h), alignment: Alignment.centerLeft, child: Text( - userBill.name, + userBill.name ?? "", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16.sp, @@ -174,7 +175,7 @@ class _VipBalancePage extends State { Text.rich( TextSpan(children: [ TextSpan( - text: S.of(context).yue_(userBill.balance), + text: S.of(context).yue_(userBill.balance ?? ""), style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.bold, diff --git a/lib/mine/vip_card_page.dart b/lib/mine/vip_card_page.dart index 624d8aa6..dd48cd0d 100644 --- a/lib/mine/vip_card_page.dart +++ b/lib/mine/vip_card_page.dart @@ -1,9 +1,8 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/vip_card.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -22,9 +21,9 @@ class VipCardPage extends StatefulWidget { } class _VipCardPage extends State { - RefreshController _refreshController; + late RefreshController _refreshController; - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -32,8 +31,7 @@ class _VipCardPage extends State { _refreshController = RefreshController(); SharedPreferences.getInstance().then((value) { - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); + apiService = ApiService(Dio(), context: context, token: value.getString("token")); queryVipCard(); }); } @@ -41,13 +39,14 @@ class _VipCardPage extends State { List coupons = []; queryVipCard() async { - BaseData> baseData = - await apiService.vipList({}).catchError((error) { + BaseData>? baseData = await apiService?.vipList({}).catchError((error) { _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - coupons.clear(); - coupons.addAll(baseData.data); + if (baseData?.isSuccess ?? false) { + if (baseData!.data?.isNotEmpty ?? false) { + coupons.clear(); + coupons.addAll(baseData.data!); + } setState(() { _refreshController.refreshCompleted(); }); @@ -72,7 +71,7 @@ class _VipCardPage extends State { controller: _refreshController, onRefresh: queryVipCard, physics: BouncingScrollPhysics(), - child: (coupons != null && coupons.length > 0) + child: (coupons.length > 0) ? ListView.builder( padding: EdgeInsets.symmetric(vertical: 8.h), itemBuilder: (context, position) { @@ -88,7 +87,7 @@ class _VipCardPage extends State { itemCount: coupons != null ? coupons.length : 0, ) : NoDataView( - src: "assets/image/icon_empty.webp", + src: "assets/image/icon_empty.webp", isShowBtn: false, text: "还没有会员卡~", fontSize: 16.sp, @@ -99,9 +98,11 @@ class _VipCardPage extends State { ); } - String assetsByName(String storeName) { - if (storeName == null) return "assets/image/icon_vip_bj.webp"; - if (storeName.contains("百年川椒") || storeName.contains("百年川椒")) { + String assetsByName(String? storeName) { + if (storeName?.isEmpty ?? true) { + return "assets/image/icon_vip_bj.webp"; + } + if (storeName!.contains("百年川椒") || storeName.contains("百年川椒")) { return "assets/image/icon_vip_bj.webp"; } else if (storeName.contains("海峡姐妹") || storeName.contains("海峽姐妹")) { return "assets/image/icon_milk_tea_bg.webp"; @@ -151,9 +152,7 @@ class _VipCardPage extends State { Row( children: [ MImage( - (vipCard?.storeList?.length ?? 0) > 0 - ? vipCard.storeList[0].logo - : "", + vipCard.storeList?[0].logo ?? "", width: 54, height: 54, fit: BoxFit.cover, diff --git a/lib/mine/vip_detail_page.dart b/lib/mine/vip_detail_page.dart index 068c450f..658ca8e5 100644 --- a/lib/mine/vip_detail_page.dart +++ b/lib/mine/vip_detail_page.dart @@ -1,12 +1,13 @@ import 'package:barcode_widget/barcode_widget.dart'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:huixiang/data/store.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/product.dart'; -import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/product.dart'; +import 'package:huixiang/data/vip_card.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -20,7 +21,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; class VipDetailPage extends StatefulWidget { - final Map arguments; + final Map? arguments; VipDetailPage({this.arguments}); @@ -31,13 +32,13 @@ class VipDetailPage extends StatefulWidget { } class _VipDetailPage extends State { - ApiService apiService; + ApiService? apiService; @override void dispose() { super.dispose(); refreshController.dispose(); - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); } @override @@ -51,9 +52,8 @@ class _VipDetailPage extends State { startLocation() async { // EasyLoading.show(status: S.current.zhengzaijiazai); - Location.getInstance().startLocation(context, (BaiduLocation result) { - if (result != null && - result.latitude != null && + Location.instance.startLocation(context, (BaiduLocation result) { + if (result.latitude != null && result.longitude != null) { vipDetail(result.latitude, result.longitude); } else { @@ -67,21 +67,19 @@ class _VipDetailPage extends State { }); } - VipCard vipCard; + VipCard? vipCard; final RefreshController refreshController = RefreshController(); int current = 1; vipDetail(latitude, longitude) async { final SharedPreferences value = await SharedPreferences.getInstance(); - if(apiService == null) - apiService = ApiService(Dio(), context: context, token: value.getString("token")); - BaseData baseData = await apiService.vipDetail({ - "id": widget.arguments["id"], + BaseData? baseData = await apiService?.vipDetail({ + "id": widget.arguments?["id"], "latitude": "$latitude", "longitude": "$longitude", }).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - vipCard = baseData.data; + if (baseData?.isSuccess ?? false) { + vipCard = baseData!.data; refreshController.loadComplete(); } else { refreshController.loadFailed(); @@ -97,7 +95,7 @@ class _VipDetailPage extends State { title: S.of(context).huiyuankaxiangqing, titleColor: Colors.white, background: Color(0xFF3A405A), - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, leadingColor: Colors.white, ), body: Column( @@ -117,7 +115,9 @@ class _VipDetailPage extends State { ], ), Padding( - padding: EdgeInsets.only(left: 16.w, top: 32.h, bottom: 8.h), + padding: EdgeInsets.only( + left: 16.w, top: 32.h, bottom: 8.h, + ), child: Row( children: [ Text( @@ -153,13 +153,11 @@ class _VipDetailPage extends State { itemBuilder: (context, position) { return GestureDetector( onTap: () {}, - child: shopItem(vipCard.storeList[position]), + child: shopItem(vipCard!.storeList![position]), ); }, padding: EdgeInsets.symmetric(vertical: 1), - itemCount: (vipCard != null && vipCard.storeList != null) - ? vipCard.storeList.length - : 0, + itemCount: vipCard?.storeList?.length ?? 0, ), ), ), @@ -201,9 +199,7 @@ class _VipDetailPage extends State { Row( children: [ MImage( - (vipCard?.storeList?.length ?? 0) > 0 - ? vipCard.storeList[0].logo - : "", + vipCard?.storeList?[0].logo ?? "", width: 40, height: 40, radius: BorderRadius.circular(4), @@ -227,7 +223,7 @@ class _VipDetailPage extends State { children: [ Expanded( child: Text( - vipCard != null ? vipCard.tenantName : "", + vipCard?.tenantName ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 14.sp, @@ -280,8 +276,7 @@ class _VipDetailPage extends State { TextSpan( children: [ TextSpan( - text: - "¥ ${vipCard != null ? vipCard.balance : ""}", + text: "¥ ${vipCard?.balance ?? ""}", style: TextStyle( fontSize: 24.sp, fontWeight: MyFontWeight.medium, @@ -295,7 +290,8 @@ class _VipDetailPage extends State { onTap: () { Navigator.of(context).pushNamed( '/router/vip_balance', - arguments: {"storeId": vipCard.id}); + arguments: {"storeId": vipCard?.id}, + ); }, child: Row( children: [ @@ -364,14 +360,16 @@ class _VipDetailPage extends State { Column( children: [ Padding( - padding: EdgeInsets.only(top: 5.h, bottom: 5.h), + padding: EdgeInsets.only( + top: 5.h, bottom: 5.h, + ), child: Text( vipCard != null - ? "${vipCard.id.substring(0, 4)} " - "${vipCard.id.substring(4, 8)} " - "${vipCard.id.substring(8, 12)} " - "${vipCard.id.substring(12, 16)} " - "${vipCard.id.substring(16, vipCard.id.length)}" + ? "${vipCard!.id?.substring(0, 4)} " + "${vipCard!.id?.substring(4, 8)} " + "${vipCard!.id?.substring(8, 12)} " + "${vipCard!.id?.substring(12, 16)} " + "${vipCard!.id?.substring(16, vipCard!.id?.length)}" : "", maxLines: 1, textAlign: TextAlign.center, @@ -381,17 +379,17 @@ class _VipDetailPage extends State { wordSpacing: vipCard == null ? 10 : (MediaQuery.of(context).size.width - 64.w) / - (((vipCard.id.length) * 4)), + (((vipCard?.id?.length ?? 0) * 4)), letterSpacing: vipCard == null ? 8 : (MediaQuery.of(context).size.width - 64.w) / - (((vipCard.id.length) * 4)), + (((vipCard?.id?.length ?? 0) * 4)), ), ), ), BarcodeWidget( barcode: Barcode.code128(), - data: vipCard == null ? "" : vipCard.id, + data: vipCard?.id ?? "", height: 30.h, color: Colors.black, drawText: false, @@ -406,9 +404,11 @@ class _VipDetailPage extends State { ); } - Widget shopItem(StoreListBean store) { + Widget shopItem(Store store) { return Container( - margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h), + margin: EdgeInsets.symmetric( + horizontal: 16.w, vertical: 8.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, @@ -419,7 +419,7 @@ class _VipDetailPage extends State { Expanded( flex: 1, child: Text( - (store != null) ? store.storeName : "", + store.storeName ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, @@ -431,7 +431,7 @@ class _VipDetailPage extends State { onTap: () { // Navigator.of(context).pushNamed('/router/union_detail_page', // arguments: {"id": store.id}); - if(store.posType.code == "NORMALSTORE") { + if(store.posType?.code == "NORMALSTORE") { Scan.toScan( context, store.id, @@ -480,7 +480,7 @@ class _VipDetailPage extends State { ), Expanded( child: Text( - store.address, + store.address ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 12.sp, @@ -505,7 +505,7 @@ class _VipDetailPage extends State { S.of(context).yingyeshijian((store.openStartTime == null && store.openEndTime == null) ? S.of(context).quantian - : "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))} - ${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}"), + : "${store.openStartTime!.substring(0, store.openStartTime!.lastIndexOf(":"))} - ${store.openEndTime!.substring(0, store.openEndTime!.lastIndexOf(":"))}"), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -535,60 +535,57 @@ class _VipDetailPage extends State { bool isRemake = true; - String totalPrice(orderInfo) { - if (orderInfo == null) return ""; - double totalPrice = (double.tryParse(orderInfo.orderSum) + - double.tryParse(orderInfo.postFee)); - if (orderInfo.orderDetail != null && - orderInfo.orderDetail.couponDTO != null) { - totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money); - } - return "$totalPrice"; - } - - List goodsItem(List products) { - if (products == null) return []; - if (products.length > 3) { - products = products.sublist(0, 3); - } - return products - .map( - (e) => Container( - margin: EdgeInsets.symmetric(horizontal: 2.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - MImage( - e.skuImg, - width: 75.w, - height: 75.h, - fit: BoxFit.contain, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ), - SizedBox( - height: 4.h, - ), - if (isRemake) - Container( - width: 75.w, - child: Text( - e.productName, - maxLines: 1, - textAlign: TextAlign.center, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF353535), - ), - ), - ), - ], - ), - ), - ) - .toList(); - } + // String totalPrice(orderInfo) { + // if (orderInfo == null) return ""; + // double totalPrice = ((double.tryParse(orderInfo.orderSum) ?? 0) + (double.tryParse(orderInfo.postFee) ?? 0)); + // if (orderInfo.orderDetail != null && + // orderInfo.orderDetail.couponDTO != null) { + // totalPrice -= (double.tryParse(orderInfo.orderDetail.couponDTO.money) ?? 0); + // } + // return "$totalPrice"; + // } + // List goodsItem(List products) { + // if (products.length > 3) { + // products = products.sublist(0, 3); + // } + // return products + // .map( + // (e) => Container( + // margin: EdgeInsets.symmetric(horizontal: 2.w), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // MImage( + // e.skuImg, + // width: 75.w, + // height: 75.h, + // fit: BoxFit.contain, + // errorSrc: "assets/image/default_1.webp", + // fadeSrc: "assets/image/default_1.webp", + // ), + // SizedBox( + // height: 4.h, + // ), + // if (isRemake) + // Container( + // width: 75.w, + // child: Text( + // e.productName, + // maxLines: 1, + // textAlign: TextAlign.center, + // overflow: TextOverflow.ellipsis, + // style: TextStyle( + // fontSize: 10.sp, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFF353535), + // ), + // ), + // ), + // ], + // ), + // ), + // ) + // .toList(); + // } } diff --git a/lib/mine/vip_pay_code.dart b/lib/mine/vip_pay_code.dart index 60305ceb..2c3e6c35 100644 --- a/lib/mine/vip_pay_code.dart +++ b/lib/mine/vip_pay_code.dart @@ -1,30 +1,19 @@ import 'dart:async'; import 'dart:convert'; -import 'package:barcode_widget/barcode_widget.dart'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_bmflocation/flutter_bmflocation.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/product.dart'; -import 'package:huixiang/retrofit/data/vip_card.dart'; +import 'package:flutter/services.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/utils/location.dart'; -import 'package:huixiang/utils/painter_bg.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:huixiang/view_widget/my_footer.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../retrofit/data/user_info.dart'; -import '../view_widget/classic_header.dart'; +import '../data/user_info.dart'; class VipPayCode extends StatefulWidget { @override @@ -34,7 +23,7 @@ class VipPayCode extends StatefulWidget { } class _VipPayCode extends State { - ApiService apiService; + ApiService? apiService; @override void dispose() { @@ -48,30 +37,23 @@ class _VipPayCode extends State { queryUser(); } - UserInfo userInfo; + UserInfo? userInfo; final RefreshController refreshController = RefreshController(); bool vipCodeText = false; - Timer _timer; + Timer? _timer; bool isDispose = false; ///查询用户信息 queryUser() async { try{ SharedPreferences value = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - BaseData baseData = - await apiService.queryInfo().catchError((onError) { + BaseData? baseData = await apiService?.queryInfo().catchError((onError) { refreshController.refreshFailed();}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; - SharedPreferences.getInstance().then((value) => { - value.setString('user', jsonEncode(baseData.data)), - }); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; + SharedPreferences.getInstance().then((value) => { + value.setString('user', jsonEncode(baseData.data)), + }); setState(() {}); refreshController.refreshCompleted(); }else{ @@ -83,13 +65,13 @@ class _VipPayCode extends State { } refreshCode(){ - if (_timer != null) return; - const oneSec = const Duration(minutes: 2); - var callback = ((timer) { - if (isDispose) return; - queryUser(); - }); - _timer = Timer.periodic(oneSec, callback); + return; + // const oneSec = const Duration(minutes: 2); + // var callback = ((timer) { + // if (isDispose) return; + // queryUser(); + // }); + // _timer = Timer.periodic(oneSec, callback); } @override @@ -99,7 +81,7 @@ class _VipPayCode extends State { title: "会员码", background: Color(0xFF32A060), titleColor: Colors.white, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, leadingColor: Colors.white, ), body: Container( @@ -143,10 +125,8 @@ class _VipPayCode extends State { ), ), SizedBox(height: 30.h,), - QrImage( - data: userInfo != null - ? (userInfo?.vipScanNo ?? "") - : "", + QrImageView( + data: userInfo?.vipScanNo ?? "", version: QrVersions.auto, size: 200.w, gapless: true, diff --git a/lib/order/bargain_group_order.dart b/lib/order/bargain_group_order.dart index 068167bf..a9f7789c 100644 --- a/lib/order/bargain_group_order.dart +++ b/lib/order/bargain_group_order.dart @@ -1,12 +1,11 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/activity_order_list.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/activity_order.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -22,7 +21,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:shared_preferences/shared_preferences.dart'; class BargainGroupOrder extends StatefulWidget { - final Map arguments; + final Map? arguments; BargainGroupOrder({this.arguments}); @override @@ -33,22 +32,20 @@ class BargainGroupOrder extends StatefulWidget { class _BargainGroupOrder extends State with SingleTickerProviderStateMixin { - List tabs; - List _pages; - TabController tabcontroller; + List tabs = []; + List _pages = []; + TabController? tabcontroller; int type = 0; @override void initState() { super.initState(); - type = widget.arguments["type"]; + type = widget.arguments?["type"] ?? 0; } @override void didChangeDependencies() { super.didChangeDependencies(); - if (tabcontroller == null) - tabcontroller = TabController(length: 4, vsync: this); tabs = [ MyTab( text: S.of(context).quanbu, @@ -126,21 +123,21 @@ class ExchangeHistoryList extends StatefulWidget { } class _ExchangeHistoryList extends State with AutomaticKeepAliveClientMixin{ - MinApiService minService; - List activityOrderList = []; + MinApiService? minService; + List activityOrderList = []; RefreshController _refreshController = RefreshController(initialRefresh: false); - ApiService apiService; - StoreInfo storeInfo; - List activitys; - String storeId; + ApiService? apiService; + StoreInfo? storeInfo; + List? activitys; + String? storeId; @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) { - String minToken = value.getString("minToken"); - String tenant = value.getString("tenant"); - String storeId = value.getString("storeId"); + String minToken = value.getString("minToken") ?? ""; + String tenant = value.getString("tenant") ?? ""; + String storeId = value.getString("storeId") ?? ""; minService = MinApiService( Dio(), context: context, @@ -155,20 +152,19 @@ class _ExchangeHistoryList extends State with AutomaticKeep ///查看我的拼团、砍价、列表 queryShowMyActList() async { - BaseData> baseData = - await minService.showMyActList({ + BaseData>? baseData = await minService?.showMyActList({ "state":widget.orderStatus, "type" :widget.type, }).catchError((error) { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { _refreshController.refreshCompleted(); setState(() { activityOrderList.clear(); - if(baseData.data.length > 0) - activityOrderList.addAll(baseData.data); + if(baseData!.data?.isNotEmpty ?? false) + activityOrderList.addAll(baseData.data!); queryStoreInfo(); }); } else { @@ -179,22 +175,12 @@ class _ExchangeHistoryList extends State with AutomaticKeep /// 查询店铺信息 queryStoreInfo() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = - await apiService.queryStoreInfo(activityOrderList[0].storeId).catchError((error) { + BaseData? baseData = await apiService?.queryStoreInfo(activityOrderList[0].storeId ?? "").catchError((error) { debugPrint(error.toString()); }); - if (baseData != null && baseData.isSuccess) { - storeInfo = StoreInfo.fromJson(baseData.data); - activitys = storeInfo.informationVOPageVO.list - .map((e) => Activity.fromJson(e)) + if (baseData?.isSuccess ?? false) { + storeInfo = StoreInfo.fromJson(baseData!.data); + activitys = storeInfo?.informationVOPageVO?.list?.map((e) => Activity.fromJson(e)) .toList(); if (mounted) { setState(() {}); @@ -215,7 +201,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep enablePullUp: false, header: MyHeader(), footer: CustomFooter( - builder: (BuildContext context, LoadStatus mode) { + builder: (BuildContext context, LoadStatus? mode) { return MyFooter(mode); }, ), @@ -223,16 +209,14 @@ class _ExchangeHistoryList extends State with AutomaticKeep physics: BouncingScrollPhysics(), // onLoading: _refresh, onRefresh: _refresh, - child: (activityOrderList != null && activityOrderList.length > 0) - ? - ListView.builder( - itemCount: activityOrderList?.length ?? 0, + child: (activityOrderList.length > 0) ? ListView.builder( + itemCount: activityOrderList.length ?? 0, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemBuilder: (context, position) { return bargainOrder(activityOrderList[position]); }, - ):NoDataView( + ) : NoDataView( src: "assets/image/ding_dan.webp", isShowBtn: false, text: "还没有订单,快去下一单吧~", @@ -244,7 +228,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep } - Widget bargainOrder(ActivityOrderList activityOrderList) { + Widget bargainOrder(ActivityOrder activityOrderList) { return Container( margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), decoration: BoxDecoration( @@ -292,7 +276,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep margin: EdgeInsets.only(left: 6.w, top: 12.h), alignment: Alignment.centerLeft, child: Text( - activityOrderList?.storeName ?? "", + activityOrderList.storeName ?? "", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 14.sp, @@ -305,8 +289,8 @@ class _ExchangeHistoryList extends State with AutomaticKeep Padding( padding: EdgeInsets.only(top: 12.h, right: 12.w), child:Text( - (widget.type == 1)?(widget.orderStatus == 4 ? "拼团失败" :(activityOrderList.howManyMore != 0 ? "还差${activityOrderList?.howManyMore ?? 0}人拼团成功" : "拼团成功")) - :(activityOrderList.actRecordState == 1 ? "待支付" :(widget.orderStatus == 4 ? "砍价失败" : (activityOrderList.howManyMoney != "0.00" ? "还差¥${activityOrderList?.howManyMoney ?? 0}砍价成功" : "砍价成功"))), + (widget.type == 1)?(widget.orderStatus == 4 ? "拼团失败" :(activityOrderList.howManyMore != 0 ? "还差${activityOrderList.howManyMore ?? 0}人拼团成功" : "拼团成功")) + :(activityOrderList.actRecordState == 1 ? "待支付" :(widget.orderStatus == 4 ? "砍价失败" : (activityOrderList.howManyMoney != "0.00" ? "还差¥${activityOrderList.howManyMoney ?? 0}砍价成功" : "砍价成功"))), style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.bold, @@ -323,7 +307,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - S.of(context).xiadanshijian_(activityOrderList?.joinTime ?? ""), + S.of(context).xiadanshijian_(activityOrderList.joinTime ?? ""), style: TextStyle( fontSize: 10.sp, color: Color(0xFF727272), @@ -340,7 +324,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - activityOrderList?.productImg ?? "", + activityOrderList.productImg ?? "", width: 81.w, height: 81.h, fit: BoxFit.cover, @@ -356,7 +340,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - activityOrderList?.storeName ?? "", + activityOrderList.storeName ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -366,7 +350,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep ), ), Text( - activityOrderList?.productSkuName ?? "", + activityOrderList.productSkuName ?? "", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.medium, @@ -398,7 +382,7 @@ class _ExchangeHistoryList extends State with AutomaticKeep ), ), TextSpan( - text:activityOrderList?.orderSum ?? "0", + text:activityOrderList.orderSum ?? "0", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, diff --git a/lib/order/edit_remarks_page.dart b/lib/order/edit_remarks_page.dart index 6de9b46a..9c1e385c 100644 --- a/lib/order/edit_remarks_page.dart +++ b/lib/order/edit_remarks_page.dart @@ -1,13 +1,13 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class EditRemarksPage extends StatefulWidget { - final Map arguments; + final Map? arguments; EditRemarksPage({this.arguments}); + @override State createState() { return _EditRemarksPage(); @@ -17,12 +17,12 @@ class EditRemarksPage extends StatefulWidget { class _EditRemarksPage extends State { TextEditingController commentTextController = TextEditingController(); - @override void initState() { super.initState(); - if((widget.arguments["remake"]??"") != "") - commentTextController.text = widget.arguments["remake"]; + if (widget.arguments?["remake"] != null && + widget.arguments?["remake"] != "") + commentTextController.text = widget.arguments?["remake"]; } @override @@ -38,101 +38,105 @@ class _EditRemarksPage extends State { onTap: () { FocusScope.of(context).requestFocus(FocusNode()); }, - child:Column( - children: [ - Expanded( - child: Container( - margin: EdgeInsets.only(left: 16.w, top: 20.h, right: 16.w), - width: MediaQuery.of(context).size.width, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "快捷输入", - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.bold, - color: Color(0xFF353535), - ), - ), - SizedBox( - height: 24.h, + child: Column( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only( + left: 16.w, + top: 20.h, + right: 16.w, ), - Wrap( - spacing: 12.w, - runSpacing: 10.h, - children: remarks(), - ), - SizedBox( - height: 32.h, - ), - Container( - height: 128.h, - padding: EdgeInsets.all(16.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - ), - child: TextField( - controller: commentTextController, - keyboardType: TextInputType.multiline, - maxLines: 10, - decoration: - InputDecoration( - isDense: true, - hintText: '请填写备注信息,例如:面包切一刀', - hintStyle: TextStyle( - color: Color(0xFF353535), + width: MediaQuery.of(context).size.width, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "快捷输入", + style: TextStyle( fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Color(0xFF353535), ), - border: InputBorder.none, - suffixIconConstraints: BoxConstraints( - minHeight: 128.h, - maxHeight: 128.h, + ), + SizedBox( + height: 24.h, + ), + Wrap( + spacing: 12.w, + runSpacing: 10.h, + children: remarks(), + ), + SizedBox( + height: 32.h, + ), + Container( + height: 128.h, + padding: EdgeInsets.all(16.w), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8.w), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + ), + child: TextField( + controller: commentTextController, + keyboardType: TextInputType.multiline, + maxLines: 10, + decoration: InputDecoration( + isDense: true, + hintText: '请填写备注信息,例如:面包切一刀', + hintStyle: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + ), + border: InputBorder.none, + suffixIconConstraints: BoxConstraints( + minHeight: 128.h, + maxHeight: 128.h, + ), + ), ), ), - ), + ], ), - ], + ), + flex: 1, ), - ), - flex: 1, - ), - GestureDetector( - onTap: (){ - String notes = commentTextController.text; - Navigator.pop(context,notes); - }, - child: Container( - padding: EdgeInsets.all(16.h), - width: MediaQuery.of(context).size.width, - alignment: Alignment.center, - color: Color(0xFF32A060), - child: Text( - S.of(context).tijiao, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 16.sp, + GestureDetector( + onTap: () { + String notes = commentTextController.text; + Navigator.pop(context, notes); + }, + child: Container( + padding: EdgeInsets.all(16.h), + width: MediaQuery.of(context).size.width, + alignment: Alignment.center, + color: Color(0xFF32A060), + child: Text( + S.of(context).tijiao, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 16.sp, + ), + ), ), ), - ), + ], ), - ], - )), + ), ); } - addRemarksCnt(cnt){ + addRemarksCnt(cnt) { setState(() { commentTextController.text = commentTextController.text + cnt; }); @@ -140,81 +144,101 @@ class _EditRemarksPage extends State { List remarks() { return [ - GestureDetector(child: - Container( - padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(4.w), - ), - child: Text( - "面包", - style: TextStyle( - color: Colors.white, - fontSize: 12.sp, + GestureDetector( + child: Container( + padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(4.w), ), - ), - ),onTap: (){addRemarksCnt("面包");},), - GestureDetector(child: - Container( - padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(4.w), - ), - child: Text( - "面包要切好", - style: TextStyle( - color: Colors.white, - fontSize: 12.sp, + child: Text( + "面包", + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, + ), ), ), - ),onTap: (){addRemarksCnt("面包要切好");},), - GestureDetector(child: - Container( - padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(4.w), - ), - child: Text( - "一点", - style: TextStyle( - color: Colors.white, - fontSize: 12.sp, + onTap: () { + addRemarksCnt("面包"); + }, + ), + GestureDetector( + child: Container( + padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(4.w), + ), + child: Text( + "面包要切好", + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, + ), ), ), - ),onTap: (){addRemarksCnt("一点");},), - GestureDetector(child: - Container( - padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(4.w), - ), - child: Text( - "点", - style: TextStyle( - color: Colors.white, - fontSize: 12.sp, + onTap: () { + addRemarksCnt("面包要切好"); + }, + ), + GestureDetector( + child: Container( + padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(4.w), + ), + child: Text( + "一点", + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, + ), ), ), - ),onTap: (){addRemarksCnt("点");},), - GestureDetector(child: - Container( - padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(4.w), + onTap: () { + addRemarksCnt("一点"); + }, + ), + GestureDetector( + child: Container( + padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(4.w), + ), + child: Text( + "点", + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, + ), + ), ), - child: Text( - "软一点", - style: TextStyle( - color: Colors.white, - fontSize: 12.sp, + onTap: () { + addRemarksCnt("点"); + }, + ), + GestureDetector( + child: Container( + padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(4.w), + ), + child: Text( + "软一点", + style: TextStyle( + color: Colors.white, + fontSize: 12.sp, + ), ), ), - ),onTap: (){addRemarksCnt("软一点");},), + onTap: () { + addRemarksCnt("软一点"); + }, + ), ]; } } diff --git a/lib/order/exchange_history_page.dart b/lib/order/exchange_history_page.dart index 7b5e5859..92099512 100644 --- a/lib/order/exchange_history_page.dart +++ b/lib/order/exchange_history_page.dart @@ -1,11 +1,10 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/exchange_order.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/exchange_order.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -30,9 +29,9 @@ class ExchangeHistoryPage extends StatefulWidget { class _ExchangeHistoryPage extends State with SingleTickerProviderStateMixin { - List tabs; - List _pages; - TabController tabcontroller; + List tabs = []; + List _pages = []; + TabController? tabcontroller; @override void initState() { @@ -42,8 +41,6 @@ class _ExchangeHistoryPage extends State @override void didChangeDependencies() { super.didChangeDependencies(); - if (tabcontroller == null) - tabcontroller = TabController(length: 3, vsync: this); tabs = [ MyTab( text: S.of(context).quanbuduihuan, @@ -98,7 +95,8 @@ class _ExchangeHistoryPage extends State labelStyle: TextStyle( color: Colors.black, fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold), + fontWeight: MyFontWeight.semi_bold, + ), labelColor: Colors.black, tabs: tabs, )), @@ -126,9 +124,8 @@ class ExchangeHistoryList extends StatefulWidget { class _ExchangeHistoryList extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; - RefreshController _refreshController = - RefreshController(initialRefresh: false); + ApiService? apiService; + RefreshController _refreshController = RefreshController(initialRefresh: false); int pageNum = 1; List orders = []; int networkStatus = 0; @@ -159,20 +156,22 @@ class _ExchangeHistoryList extends State if (widget.orderStatus != 0) { map["state"] = widget.orderStatus; } - BaseData> baseData = - await apiService.creditOrderList(map).catchError((error) { + BaseData>? baseData = await apiService?.creditOrderList(map).catchError((error) { networkStatus = -1; _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - orders.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData!.data!.list?.isNotEmpty ?? false) { + if (pageNum == 1) { + orders.clear(); + } + orders.addAll(baseData.data!.list!); } - orders.addAll(baseData.data.list); + _refreshController.loadComplete(); _refreshController.refreshCompleted(); - if (baseData.data.pages == baseData.data.pageNum) { + if (baseData.data?.pages == baseData.data?.pageNum) { _refreshController.loadNoData(); } else { pageNum += 1; @@ -200,7 +199,7 @@ class _ExchangeHistoryList extends State enablePullUp: true, header: MyHeader(), footer: CustomFooter( - builder: (BuildContext context, LoadStatus mode) { + builder: (BuildContext context, LoadStatus? mode) { return MyFooter(mode); }, ), @@ -218,16 +217,18 @@ class _ExchangeHistoryList extends State return buildOrderSm(); }, ) - : (orders == null || orders.length == 0 + : (orders.length == 0 ? NoDataView( src: "assets/image/ding_dan.webp", isShowBtn: false, text: "目前暂无记录,手上那么多积分要赶紧用掉哦~", fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h, left: 72, right: 72), + margin: EdgeInsets.only( + top: 120.h, left: 72, right: 72, + ), ) : ListView.builder( - itemCount: orders == null ? 0 : orders.length, + itemCount: orders.length ?? 0, itemBuilder: (context, position) { return buildOrder(orders[position]); }, @@ -253,7 +254,9 @@ class _ExchangeHistoryList extends State Widget buildOrder(ExchangeOrder exchangeOrder) { return Container( - margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), + margin: EdgeInsets.fromLTRB( + 16.w, 8.h, 16.w, 8.h, + ), padding: EdgeInsets.all(12), decoration: BoxDecoration( color: Colors.white, @@ -430,10 +433,7 @@ class _ExchangeHistoryList extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - (exchangeOrder != null && - exchangeOrder.creditOrderDetailList != null) - ? exchangeOrder.creditOrderDetailList[0].goodsMainImg - : "", + exchangeOrder.creditOrderDetailList?[0].goodsMainImg ?? "", errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", width: 66, @@ -451,12 +451,13 @@ class _ExchangeHistoryList extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - exchangeOrder.creditOrderDetailList[0].name, + exchangeOrder.creditOrderDetailList?[0].name ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF353535)), + color: Color(0xFF353535), + ), ), SizedBox( height: 5.h, @@ -464,8 +465,7 @@ class _ExchangeHistoryList extends State Text( exchangeOrder.useTyped == 3 ? S.of(context).feishiwuduihuanma - : exchangeOrder - .creditOrderDetailList[0].description, + : (exchangeOrder.creditOrderDetailList?[0].description ?? ""), maxLines: 2, style: TextStyle( fontSize: 10.sp, @@ -479,7 +479,7 @@ class _ExchangeHistoryList extends State flex: 1, ), Text( - "x${(exchangeOrder.creditOrderDetailList[0].goodsNumber).toString()}", + "x${exchangeOrder.creditOrderDetailList?[0].goodsNumber}", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -503,18 +503,13 @@ class _ExchangeHistoryList extends State // width: 4, // ), Text( - exchangeOrder?.amount == null || exchangeOrder.amount == "0" + exchangeOrder.amount == "0" ? "" : exchangeOrder.payType == 2 ? "实付印章 ${exchangeOrder.amount}印章" - : (S.of(context).shifujifen(exchangeOrder.amount) + - (exchangeOrder?.creditOrderDetailList[0]?.money == - null || - exchangeOrder - ?.creditOrderDetailList[0]?.money == - "0.00" - ? "" - : " + ${double.parse(exchangeOrder?.creditOrderDetailList[0]?.money.toString()) * exchangeOrder?.creditOrderDetailList[0].goodsNumber}元")), + : (S.of(context).shifujifen("${exchangeOrder.amount}") + + (exchangeOrder.creditOrderDetailList?[0].money == "0.00" ? "" + : " + ${double.parse("${exchangeOrder.creditOrderDetailList?[0].money}") * (exchangeOrder.creditOrderDetailList?[0].goodsNumber ?? 0)}元")), style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, @@ -565,14 +560,11 @@ class _ExchangeHistoryList extends State Navigator.of(context).pushNamed( '/router/logistics_information_page', arguments: { - "orderId": exchangeOrder - .creditOrderDetailList[0].orderId, + "orderId": exchangeOrder.creditOrderDetailList?[0].orderId, "logisticsNum": "", "logisticsName": "", - "productNum": exchangeOrder - .creditOrderDetailList[0].goodsNumber, - "skuImg": exchangeOrder - .creditOrderDetailList[0].goodsMainImg + "productNum": exchangeOrder.creditOrderDetailList?[0].goodsNumber, + "skuImg": exchangeOrder.creditOrderDetailList?[0].goodsMainImg }); }, child: buildBtnStatusTow(exchangeOrder.sendStatus), @@ -800,8 +792,8 @@ class _ExchangeHistoryList extends State } receive2Card(id) async { - BaseData baseData = await apiService.creditOrderReceive(id); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.creditOrderReceive(id); + if (baseData?.isSuccess ?? false) { _refresh(); } } diff --git a/lib/order/exchange_order_page.dart b/lib/order/exchange_order_page.dart index 1376c09b..90194916 100644 --- a/lib/order/exchange_order_page.dart +++ b/lib/order/exchange_order_page.dart @@ -1,24 +1,19 @@ -import 'dart:async'; import 'dart:convert'; -import 'dart:io'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:dio/dio.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:fluwx/fluwx.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; +import 'package:huixiang/data/wx_pay.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/receiving_method_dialog.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -26,7 +21,7 @@ class ExchangeOrderPage extends StatefulWidget { final Map arguments; ///兑换订单 - ExchangeOrderPage({this.arguments}); + ExchangeOrderPage({required this.arguments}); @override State createState() { @@ -35,28 +30,33 @@ class ExchangeOrderPage extends StatefulWidget { } class _ExchangeOrderPage extends State { - ApiService apiService; + ApiService? apiService; int buyNum = 1; var checkIndex = 3; - UserInfo userInfo; + UserInfo? userInfo; dynamic payListen; dynamic mBalance = 0; - String happyBean; - String points; + String? happyBean; + String? points; + + Fluwx fluwx = Fluwx(); @override void initState() { super.initState(); - SharedPreferences.getInstance().then((value) => { - apiService = ApiService(Dio(), - context: context, token: value.getString("token")), - points = UserInfo.fromJson(jsonDecode(value.getString('user'))).points, - happyBean = UserInfo.fromJson(jsonDecode(value.getString('user'))).happyBean, - queryUserBalance(), + SharedPreferences.getInstance().then((value) { + apiService = ApiService(Dio(), context: context, token: value.getString("token")); + String? user = value.getString('user'); + if (user?.isNotEmpty ?? false) { + UserInfo userInfo = UserInfo.fromJson(jsonDecode(user!)); + points = userInfo.points; + happyBean = userInfo.happyBean; + } + queryUserBalance(); }); - payListen = weChatResponseEventHandler.listen((event) async { + fluwx.addSubscriber((event) async { print("payCallback: ${event.errCode}"); if (event.errCode == 0) { String realPay = handleNeedPay(); @@ -87,11 +87,10 @@ class _ExchangeOrderPage extends State { } queryUserBalance() async { - BaseData baseData = - await apiService.queryInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; - mBalance = double.tryParse(userInfo.money); + BaseData? baseData = await apiService?.queryInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; + mBalance = double.tryParse("${userInfo?.money}") ?? 0; if (mounted) setState(() {}); } } @@ -115,7 +114,8 @@ class _ExchangeOrderPage extends State { // widget.arguments["useTyped"] == 1 ? Container( margin: EdgeInsets.only( - left: 16, right: 16, top: 26, bottom: 8), + left: 16, right: 16, top: 26, bottom: 8, + ), padding: EdgeInsets.all(20), decoration: BoxDecoration( color: Colors.white, @@ -127,7 +127,9 @@ class _ExchangeOrderPage extends State { spreadRadius: 0, ) ], - borderRadius: BorderRadius.all(Radius.circular(8)), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), ), child: Column( children: [ @@ -144,7 +146,8 @@ class _ExchangeOrderPage extends State { style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16, - color: Color(0xFF353535)), + color: Color(0xFF353535), + ), ), ], ), @@ -170,17 +173,18 @@ class _ExchangeOrderPage extends State { width: 12.w, ), Expanded( - child: Text( - widget.arguments["useTyped"] == 1 - ? S.of(context).ziti - : widget.arguments["useTyped"] == 2 - ? S.of(context).peisong - : S.of(context).xianshangfafang, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xFF353535), + child: Text( + widget.arguments["useTyped"] == 1 + ? S.of(context).ziti + : widget.arguments["useTyped"] == 2 + ? S.of(context).peisong + : S.of(context).xianshangfafang, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xFF353535), + ), ), - )), + ), // Icon( // Icons.keyboard_arrow_right, // size: 16, @@ -199,9 +203,7 @@ class _ExchangeOrderPage extends State { child: Row( children: [ Text( - widget.arguments[ - "useTyped"] == - 1?S.of(context).zitidizhi:"收货地址", + widget.arguments["useTyped"] == 1 ? S.of(context).zitidizhi : "收货地址", style: TextStyle( fontSize: 14.sp, color: Color(0xFF353535), @@ -223,20 +225,12 @@ class _ExchangeOrderPage extends State { children: [ Expanded( child: Text( - (address != null && address != "") - ? address - : widget.arguments[ - "useTyped"] == - 1 - ? S - .of(context) - .qingxuanzhemendian - : widget.arguments[ - "useTyped"] == - 2 - ? S - .of(context) - .qingxuanzeshouhuodizhi + (address?.isNotEmpty ?? false) + ? (address ?? "") + : widget.arguments["useTyped"] == 1 + ? S.of(context).qingxuanzhemendian + : widget.arguments["useTyped"] == 2 + ? S.of(context).qingxuanzeshouhuodizhi : S.of(context).xuni, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -268,10 +262,11 @@ class _ExchangeOrderPage extends State { Visibility( visible: widget.arguments["useTyped"] != 3, child: Text( - widget.arguments["useTyped"] == 1?S.of(context).zitishijian:"发货时间", + widget.arguments["useTyped"] == 1 ? S.of(context).zitishijian : "发货时间", style: TextStyle( fontSize: 14.sp, - color: Color(0xFF353535)), + color: Color(0xFF353535), + ), ), ), Visibility( @@ -290,7 +285,8 @@ class _ExchangeOrderPage extends State { fontSize: 14.sp, color: widget.arguments["useTyped"] == 3 ? Color(0xFF32A060) - : Color(0xFF353535)), + : Color(0xFF353535), + ), ), ], ), @@ -536,7 +532,8 @@ class _ExchangeOrderPage extends State { // ), Container( margin: EdgeInsets.only( - left: 16, right: 16, top: 8, bottom: 16), + left: 16, right: 16, top: 8, bottom: 16, + ), padding: EdgeInsets.all(20), decoration: BoxDecoration( color: Colors.white, @@ -548,7 +545,9 @@ class _ExchangeOrderPage extends State { spreadRadius: 0, ) ], - borderRadius: BorderRadius.all(Radius.circular(8)), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), ), child: Column( children: [ @@ -579,7 +578,7 @@ class _ExchangeOrderPage extends State { mainAxisSize: MainAxisSize.max, children: [ MImage( - widget?.arguments["image"] ?? "", + widget.arguments["image"] ?? "", width: 80, height: 80, fit: BoxFit.cover, @@ -595,13 +594,14 @@ class _ExchangeOrderPage extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - widget.arguments["name"], + widget.arguments["name"] ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.bold, - color: Color(0xFF353535)), + color: Color(0xFF353535), + ), ), // SizedBox( // height: 4.h, @@ -631,7 +631,8 @@ class _ExchangeOrderPage extends State { style: TextStyle( fontSize: 14, color: Color(0xFF353535), - fontWeight: MyFontWeight.regular), + fontWeight: MyFontWeight.regular, + ), ), SizedBox( width: 12, @@ -656,8 +657,7 @@ class _ExchangeOrderPage extends State { payableAmount(), style: TextStyle( fontSize: 12, - decoration: (widget.arguments["payType"] == - 4 && + decoration: (widget.arguments["payType"] == 4 && ((widget.arguments["price"] != "0" && widget.arguments["money"] != "0.00" || (widget.arguments["oneBean"] ?? "0") != "0" || widget.arguments["onePrice"] != "0"))) @@ -682,17 +682,18 @@ class _ExchangeOrderPage extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - payableAmount().contains("印章")? "现金抵扣印章":"现金抵扣积分", + payableAmount().contains("印章") ? "现金抵扣印章" : "现金抵扣积分", style: TextStyle( fontSize: 14, color: Color(0xFF353535), - fontWeight: MyFontWeight.regular), + fontWeight: MyFontWeight.regular, + ), ), SizedBox( width: 12, ), Text( - "${AppUtils.calculateDouble(double.parse(widget.arguments["oneMoney"]) * buyNum)}元", + "${AppUtils.calculateDouble(double.parse("${widget.arguments["oneMoney"]}") * buyNum)}元", style: TextStyle( fontSize: 12, fontFamily: 'JDZhengHT', @@ -1076,7 +1077,7 @@ class _ExchangeOrderPage extends State { } else if (widget.arguments["payType"] == 2) { return "${(double.parse(widget.arguments["onePrice"]) * buyNum).toInt()}积分"; } else if (widget.arguments["payType"] == 3) { - return "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分" + " + ${AppUtils.calculateDouble(double.tryParse(widget.arguments["money"]) * buyNum) ?? 0}元"; + return "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分" + " + ${AppUtils.calculateDouble((double.tryParse(widget.arguments["money"]) ?? 0) * buyNum) ?? 0}元"; } else if (widget.arguments["payType"] == 4) { if ((widget.arguments["oneBean"] ?? "0") != "0") { return "${AppUtils.calculateDouble(double.parse(widget.arguments["oneBean"] ?? "0") * buyNum)}印章"; @@ -1086,9 +1087,10 @@ class _ExchangeOrderPage extends State { if(widget.arguments["price"] == "0"){ return "${AppUtils.calculateDouble(double.parse(widget.arguments["oneMoney"]) * buyNum)}元"; } - return "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分" + " + ${AppUtils.calculateDouble(double.tryParse(widget.arguments["money"]) * buyNum) ?? 0}元"; + return "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分" + " + ${AppUtils.calculateDouble((double.tryParse(widget.arguments["money"]) ?? 0) * buyNum)}元"; } } + return ""; } ///总价支付价格 @@ -1101,17 +1103,14 @@ class _ExchangeOrderPage extends State { return S.of(context).jifen_( (double.parse(widget.arguments["onePrice"]) * buyNum).toInt()); } else if (widget.arguments["payType"] == 3) { - return (widget.arguments["price"] == null || - widget.arguments["price"] == "0" - ? "" - : "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分") + - (widget.arguments["money"] == null || - widget.arguments["money"] == "0.00" - ? "" - : " + ${AppUtils.calculateDouble(double.tryParse(widget.arguments["money"]) * buyNum) ?? 0}元"); + return (widget.arguments["price"] == null || widget.arguments["price"] == "0" + ? "" : "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分") + + (widget.arguments["money"] == null || widget.arguments["money"] == "0.00" + ? "" : " + ${AppUtils.calculateDouble((double.tryParse(widget.arguments["money"]) ?? 0) * buyNum)}元"); } else if (widget.arguments["payType"] == 4) { - return "${AppUtils.calculateDouble(double.tryParse(widget.arguments["oneMoney"]) * buyNum) ?? 0}元"; + return "${AppUtils.calculateDouble((double.tryParse(widget.arguments["oneMoney"]) ?? 0) * buyNum)}元"; } + return ""; } Widget checkPayView(var index) { @@ -1129,14 +1128,13 @@ class _ExchangeOrderPage extends State { } var storeIsSelected = true; - String storeId; - String address; - String userAddressId; + String? storeId; + String? address; + String? userAddressId; toAddressPicker() async { if (widget.arguments["useTyped"] == 1) { - dynamic result = - await Navigator.of(context).pushNamed('/router/store_selector_page',arguments: {"creditGoodsId":widget.arguments["goodsId"]}); + dynamic result = await Navigator.of(context).pushNamed('/router/store_selector_page',arguments: {"creditGoodsId":widget.arguments["goodsId"]}); if (result == null) return; storeId = result["id"]; address = result["address"]; @@ -1154,16 +1152,16 @@ class _ExchangeOrderPage extends State { ///创建积分订单 creditOrder() async { if (widget.arguments["useTyped"] == 1 && - (storeId == null || storeId == "")) { + (storeId == "")) { SmartDialog.showToast("请选择一个门店", alignment: Alignment.center); return; } if (widget.arguments["useTyped"] == 2 && - (userAddressId == null || userAddressId == "")) { + (userAddressId == "")) { SmartDialog.showToast("请选择一个收货地址", alignment: Alignment.center); return; } - BaseData baseDate = await apiService.creditOrder({ + BaseData? baseDate = await apiService?.creditOrder({ "goodsId": widget.arguments["goodsId"], "isOneSell": widget.arguments["payType"] != 3, @@ -1179,12 +1177,11 @@ class _ExchangeOrderPage extends State { if (widget.arguments["useTyped"] == 1) "storeId": storeId, if (widget.arguments["useTyped"] == 2) "userAddressId": userAddressId, }); - if (baseDate.isSuccess) { + if (baseDate?.isSuccess ?? false) { String realPay = handleNeedPay(); if ((widget.arguments["payType"] == 4 || (widget.arguments["payType"] == 3 && - widget.arguments["money"] != "0.00")) && - checkIndex == 3) { + widget.arguments["money"] != "0.00")) && checkIndex == 3) { // if(Platform.isAndroid){ // if (!(await Min.isInitialize())) { // // 小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, @@ -1193,42 +1190,49 @@ class _ExchangeOrderPage extends State { // await Min.initialize(); // } // } - WxPay wxPay = WxPay.fromJson(baseDate.data); - await registerWxApi( - appId: wxPay.appId, + WxPay? wxPay = WxPay.fromJson(baseDate!.data); + if (wxPay?.isAnyEmpty() ?? true) { + return; + } + await fluwx.registerApi( + appId: wxPay.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + ) ); return; } - await Navigator.of(context) - .pushNamed('/router/exchange_order_success_page', arguments: { - "price": realPay.contains(S.of(context).jifen) - ? realPay.substring(0, realPay.indexOf(S.of(context).jifen)) - : "0", - "happyBeanPrice":realPay.contains("印章") - ? realPay.substring(0, realPay.indexOf("印章")) - : "0", - "realPay": realPay, - "points": points, - "happyBean":happyBean, - "payChannel": widget.arguments["payChannel"], - "id": baseDate.data - }); - points = "${int.tryParse(points) - int.tryParse(widget.arguments["price"])}"; - happyBean = "${int.tryParse(happyBean) - int.tryParse(widget.arguments["price"])}"; + await Navigator.of(context).pushNamed( + '/router/exchange_order_success_page', + arguments: { + "price": realPay.contains(S.of(context).jifen) + ? realPay.substring(0, realPay.indexOf(S.of(context).jifen)) + : "0", + "happyBeanPrice": realPay.contains("印章") + ? realPay.substring(0, realPay.indexOf("印章")) + : "0", + "realPay": realPay, + "points": points, + "happyBean": happyBean, + "payChannel": widget.arguments["payChannel"], + "id": baseDate!.data + }, + ); + points = "${(int.tryParse("${points}") ?? 0) - (int.tryParse("${widget.arguments["price"]}") ?? 0)}"; + happyBean = "${(int.tryParse("${happyBean}") ?? 0) - (int.tryParse("${widget.arguments["price"]}") ?? 0)}"; Navigator.of(context).pop(); } else { - SmartDialog.showToast(baseDate.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseDate?.msg}", alignment: Alignment.center); } } } diff --git a/lib/order/exchange_order_success_page.dart b/lib/order/exchange_order_success_page.dart index a12be52e..444e1f45 100644 --- a/lib/order/exchange_order_success_page.dart +++ b/lib/order/exchange_order_success_page.dart @@ -3,8 +3,8 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; @@ -13,7 +13,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ExchangeOrderSuccessPage extends StatefulWidget { - final Map arguments; + final Map? arguments; ExchangeOrderSuccessPage({this.arguments}); @@ -25,24 +25,27 @@ class ExchangeOrderSuccessPage extends StatefulWidget { class _ExchangeOrderSuccessPage extends State { int price = 0; - ApiService apiService; + ApiService? apiService; int happyBeanPrice= 0; @override void initState() { super.initState(); - price = double.parse((widget.arguments["points"] ?? "0").toString()).toInt() - - double.parse((widget.arguments["price"] ?? "0").toString()).toInt(); - happyBeanPrice = double.parse((widget.arguments["happyBean"] ?? "0").toString()).toInt() - - double.parse((widget.arguments["happyBeanPrice"] ?? "0").toString()).toInt(); + price = double.parse((widget.arguments?["points"] ?? "0").toString()).toInt() - + double.parse((widget.arguments?["price"] ?? "0").toString()).toInt(); + happyBeanPrice = double.parse((widget.arguments?["happyBean"] ?? "0").toString()).toInt() - + double.parse((widget.arguments?["happyBeanPrice"] ?? "0").toString()).toInt(); UserInfo userInfo; SharedPreferences.getInstance().then((value){ apiService = ApiService(Dio(), context: context, token: value.getString("token")); - userInfo = UserInfo.fromJson(jsonDecode(value.getString('user'))); - userInfo.points = "$price"; - userInfo.happyBean = "$happyBeanPrice"; - value.setString('user', jsonEncode(userInfo.toJson())); - }); + String? user = value.getString('user'); + if (user?.isEmpty ?? true) { + userInfo = UserInfo.fromJson(jsonDecode(user!)); + userInfo.points = "$price"; + userInfo.happyBean = "$happyBeanPrice"; + value.setString('user', jsonEncode(userInfo.toJson())); + } + }); setState(() {}); } @@ -52,8 +55,8 @@ class _ExchangeOrderSuccessPage extends State { return Scaffold( appBar: MyAppBar( title: S.of(context).zhifuxiangqing, - titleColor: Colors.black, - titleSize: 18.sp, + titleColor: Colors.black, + titleSize: 18.sp, background: Color(0xFFFAFAFA), leadingColor: Colors.black, ), @@ -86,8 +89,8 @@ class _ExchangeOrderSuccessPage extends State { height:45.h, ), Text( - widget.arguments["realPay"].toString().contains("消费印章") ? - "消费印章": (widget.arguments["realPay"].toString().contains(S.of(context).jifen) ? S.of(context).xiaofeijifen : "消费金额"), + "${widget.arguments?["realPay"]}".contains("消费印章") ? + "消费印章" : ("${widget.arguments?["realPay"]}".contains(S.of(context).jifen) ? S.of(context).xiaofeijifen : "消费金额"), style: TextStyle( color: Color(0xFF727272), fontSize: 14.sp, @@ -97,11 +100,12 @@ class _ExchangeOrderSuccessPage extends State { height: 5.h, ), Text( - widget.arguments["realPay"], + widget.arguments?["realPay"] ?? "", style: TextStyle( color: Color(0xFF32A060), fontSize: 21.sp, - fontWeight: MyFontWeight.bold), + fontWeight: MyFontWeight.bold, + ), ), SizedBox( height: 34.h, @@ -126,7 +130,8 @@ class _ExchangeOrderSuccessPage extends State { style: TextStyle( color: Colors.black, fontSize: 21.sp, - fontWeight: MyFontWeight.regular), + fontWeight: MyFontWeight.regular, + ), ), ], ), @@ -225,8 +230,8 @@ class _ExchangeOrderSuccessPage extends State { } receiveToCard() async { - BaseData baseData = await apiService.receiveToCard(widget.arguments["id"]); - if(baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveToCard("${widget.arguments?["id"]}"); + if(baseData?.isSuccess ?? false) { await Navigator.of(context).pushNamed('/router/mine_card'); Navigator.of(context).pop(); } diff --git a/lib/order/exchange_write_off_page.dart b/lib/order/exchange_write_off_page.dart index 028f5be6..c357f0e4 100644 --- a/lib/order/exchange_write_off_page.dart +++ b/lib/order/exchange_write_off_page.dart @@ -1,7 +1,7 @@ import 'package:barcode_widget/barcode_widget.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/exchange_order.dart'; +import 'package:huixiang/data/exchange_order.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/separator.dart'; @@ -20,7 +20,7 @@ class ExchangeWriteOffPage extends StatefulWidget { } class _ExchangeWriteOffPage extends State { - ExchangeOrder exchangeOrder; + ExchangeOrder? exchangeOrder; @override void initState() { @@ -61,7 +61,7 @@ class _ExchangeWriteOffPage extends State { child: Column( children: [ Text( - exchangeOrder != null ? exchangeOrder.creditOrderDetailList[0].name : "", + exchangeOrder?.creditOrderDetailList?[0].name ?? "", style: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.bold, @@ -71,8 +71,8 @@ class _ExchangeWriteOffPage extends State { height: 8.h, ), Text( - (exchangeOrder.updateTime == null) ? "" : S.of(context).youxiaoqi( - "${exchangeOrder.updateTime}"), + (exchangeOrder?.updateTime == null) ? "" : S.of(context).youxiaoqi( + "${exchangeOrder?.updateTime}"), style: TextStyle( fontSize: 12.sp, color: Color(0xFF353535), @@ -103,24 +103,20 @@ class _ExchangeWriteOffPage extends State { children: [ Text( exchangeOrder != null - ? "${exchangeOrder.id.substring(0, 4)} " - "${exchangeOrder.id.substring(4, 8)} " - "${exchangeOrder.id.substring(8, 12)} " - "${exchangeOrder.id.substring(12, 16)} " - "${exchangeOrder.id.substring(16, exchangeOrder.id.length)}" + ? "${exchangeOrder?.id?.substring(0, 4)} " + "${exchangeOrder?.id?.substring(4, 8)} " + "${exchangeOrder?.id?.substring(8, 12)} " + "${exchangeOrder?.id?.substring(12, 16)} " + "${exchangeOrder?.id?.substring(16, exchangeOrder?.id?.length)}" : "", style: TextStyle( fontSize: 14.sp, - wordSpacing: exchangeOrder == null - ? 10 - : (MediaQuery.of(context).size.width - - 64.w) / - (((exchangeOrder.id.length) * 4)), - letterSpacing: exchangeOrder == null - ? 8 - : (MediaQuery.of(context).size.width - - 64.w) / - (((exchangeOrder.id.length) * 4)), + wordSpacing: exchangeOrder == null ? 10 + : (MediaQuery.of(context).size.width - 64.w) / + (((exchangeOrder?.id?.length ?? 0) * 4)), + letterSpacing: exchangeOrder == null ? 8 + : (MediaQuery.of(context).size.width - 64.w) / + (((exchangeOrder?.id?.length ?? 0) * 4)), fontWeight: MyFontWeight.semi_bold, color: Color(0xFF353535), ), @@ -130,7 +126,7 @@ class _ExchangeWriteOffPage extends State { ), BarcodeWidget( barcode: Barcode.code128(useCode128C: true), - data: exchangeOrder != null ? exchangeOrder.id : "", + data: exchangeOrder?.id ?? "", height: 72.h, color: Colors.black, drawText: false, @@ -138,12 +134,14 @@ class _ExchangeWriteOffPage extends State { SizedBox( height: 16.h, ), - Expanded(child: QrImage( - data: exchangeOrder != null ? exchangeOrder.id : "", - version: QrVersions.auto, - size: 200.w, - gapless: true, - ),), + Expanded( + child: QrImageView( + data: exchangeOrder?.id ?? "", + version: QrVersions.auto, + size: 200.w, + gapless: true, + ), + ), SizedBox( height: 35.h, ), @@ -159,11 +157,15 @@ class _ExchangeWriteOffPage extends State { height: 1.h, color: Color(0xFFA29E9E), ), - margin: EdgeInsets.only(left: 20.w, right: 20.w), + margin: EdgeInsets.only( + left: 20.w, right: 20.w, + ), ), Expanded( child: Container( - padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 24.h), + padding: EdgeInsets.fromLTRB( + 20.w, 15.h, 20.w, 24.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, @@ -175,8 +177,9 @@ class _ExchangeWriteOffPage extends State { Container( width: 3.w, height: 15.h, - margin: - EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h), + margin: EdgeInsets.fromLTRB( + 4.w, 7.h, 4.w, 7.h, + ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(3), color: Color(0xFF20662A), @@ -201,13 +204,12 @@ class _ExchangeWriteOffPage extends State { ), Expanded( child: Text( - S - .of(context) - .qianwanghuixiangmendianduihuanhexiao, + S.of(context).qianwanghuixiangmendianduihuanhexiao, style: TextStyle( textBaseline: TextBaseline.alphabetic, fontSize: 14.sp, - color: Color(0xFF353535)), + color: Color(0xFF353535), + ), ), flex: 1, ), @@ -231,7 +233,8 @@ class _ExchangeWriteOffPage extends State { style: TextStyle( fontWeight: FontWeight.bold, fontSize: 14.sp, - color: Color(0xFF353535)), + color: Color(0xFF353535), + ), ), ], ), diff --git a/lib/order/logistics_information_page.dart b/lib/order/logistics_information_page.dart index 9995cee2..9bb22153 100644 --- a/lib/order/logistics_information_page.dart +++ b/lib/order/logistics_information_page.dart @@ -1,9 +1,8 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/logistics.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/logistics.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -28,8 +27,8 @@ class LogisticsInformationPage extends StatefulWidget { } class _LogisticsInformationPage extends State { - ApiService apiService; - RefreshController _refreshController; + ApiService? apiService; + late RefreshController _refreshController; @override void initState() { @@ -39,33 +38,36 @@ class _LogisticsInformationPage extends State { SharedPreferences.getInstance().then((value) { apiService = ApiService(Dio(), context: context, token: value.getString("token")); - if((widget.arguments["shipperCode"]??"") != "" && - (widget.arguments["logisticsNum"]??"") != "") + if ((widget.arguments["shipperCode"] ?? "") != "" && + (widget.arguments["logisticsNum"] ?? "") != "") getShippingTrace(widget.arguments["shipperCode"] ?? "", - widget.arguments["logisticsNum"] ?? ""); + widget.arguments["logisticsNum"] ?? ""); else queryAppShippingTrace(widget.arguments["orderId"]); }); } - List logistics = []; + List logistics = []; String shipStatus = ""; getShippingTrace(String shipperCode, String logisticCode) async { - BaseData baseData = await apiService - .shippingTrace(shipperCode, logisticCode) + BaseData? baseData = await apiService + ?.shippingTrace(shipperCode, logisticCode) .catchError((error) { _refreshController.refreshFailed(); _refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { - Logistics lgs = baseData.data; + if (baseData?.isSuccess ?? false) { + Logistics? lgs = baseData!.data; logistics.clear(); //lgs.traces.reversed:列表倒叙 - logistics.addAll(lgs.traces); + logistics.addAll(lgs?.traces ?? []); setState(() { - shipStatus = logisticsStatus(lgs.state); - if (logistics.length > 0) logistics[0].acceptStation += shipStatus; + shipStatus = logisticsStatus(lgs?.state); + if (logistics.length > 0) { + String acceptStation = logistics[0].acceptStation ?? ""; + logistics[0].acceptStation = acceptStation + shipStatus; + } _refreshController.refreshCompleted(); _refreshController.loadComplete(); }); @@ -76,21 +78,24 @@ class _LogisticsInformationPage extends State { } queryAppShippingTrace(orderId) async { - BaseData baseData = - await apiService.getAppShippingTrace(orderId).catchError((error) { - _refreshController.refreshFailed(); - _refreshController.loadFailed(); + BaseData? baseData = + await apiService?.getAppShippingTrace(orderId).catchError((error) { + _refreshController.refreshFailed(); + _refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { - Logistics lgs = baseData.data; + if (baseData?.isSuccess ?? false) { + Logistics? lgs = baseData!.data; logistics.clear(); //lgs.traces.reversed:列表倒叙 - logistics.addAll(lgs.traces); + logistics.addAll(lgs?.traces ?? []); setState(() { - shipStatus = logisticsStatus(lgs.state); - widget.arguments["logisticsName"] = lgs.shipperCode; - widget.arguments["logisticsNum"] = lgs.logisticCode; - if (logistics.length > 0) logistics[0].acceptStation += shipStatus; + shipStatus = logisticsStatus(lgs?.state); + widget.arguments["logisticsName"] = lgs?.shipperCode; + widget.arguments["logisticsNum"] = lgs?.logisticCode; + if (logistics.length > 0) { + String acceptStation = logistics[0].acceptStation ?? ""; + logistics[0].acceptStation = acceptStation + shipStatus; + } _refreshController.refreshCompleted(); _refreshController.loadComplete(); }); @@ -100,13 +105,13 @@ class _LogisticsInformationPage extends State { } } - _onRefresh(){ - if((widget.arguments["shipperCode"]??"") != "" && - (widget.arguments["logisticsNum"]??"") != "") - getShippingTrace(widget.arguments["shipperCode"] ?? "", - widget.arguments["logisticsNum"] ?? ""); - else - queryAppShippingTrace(widget.arguments["orderId"]); + _onRefresh() { + if ((widget.arguments["shipperCode"] ?? "") != "" && + (widget.arguments["logisticsNum"] ?? "") != "") + getShippingTrace(widget.arguments["shipperCode"] ?? "", + widget.arguments["logisticsNum"] ?? ""); + else + queryAppShippingTrace(widget.arguments["orderId"]); } @override @@ -128,8 +133,7 @@ class _LogisticsInformationPage extends State { controller: _refreshController, enablePullDown: true, enablePullUp: false, - header: MyHeader( - ), + header: MyHeader(), footer: CustomFooter( builder: (context, mode) { return MyFooter(mode); @@ -170,38 +174,39 @@ class _LogisticsInformationPage extends State { ], ), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 32.h), - child: Text( - S.of(context).dingdangenzong, - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.bold, - color: Color(0xff353535)), - ), + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 32.h), + child: Text( + S.of(context).dingdangenzong, + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Color(0xff353535)), ), - Container( - child: (logistics != null && logistics.length > 0) - ? ListView.builder( - itemCount: - logistics != null ? logistics.length : 0, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return orderTrackItem(logistics[position], - position, logistics.length); - }) - : NoDataView( - src: "assets/image/ding_dan.webp", - isShowBtn: false, - text: "暂无物流信息~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120), - ), - ), - ]), + ), + Container( + child: (logistics.length > 0) + ? ListView.builder( + itemCount: logistics.length ?? 0, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return orderTrackItem(logistics[position], + position, logistics.length); + }, + ) + : NoDataView( + src: "assets/image/ding_dan.webp", + isShowBtn: false, + text: "暂无物流信息~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120), + ), + ), + ], + ), ), ], ), @@ -236,7 +241,9 @@ class _LogisticsInformationPage extends State { alignment: Alignment.bottomCenter, children: [ MImage( - widget.arguments["skuImg"] != null ? widget.arguments["skuImg"] : "", + widget.arguments["skuImg"] != null + ? widget.arguments["skuImg"] + : "", width: 95, height: 95, fit: BoxFit.cover, @@ -245,7 +252,11 @@ class _LogisticsInformationPage extends State { ), Container( padding: EdgeInsets.only( - left: 32.w, right: 32.w, top: 5.h, bottom: 5.h), + left: 32.w, + right: 32.w, + top: 5.h, + bottom: 5.h, + ), decoration: BoxDecoration( borderRadius: BorderRadius.only( topLeft: Radius.circular(0), @@ -371,7 +382,7 @@ class _LogisticsInformationPage extends State { ); } - Widget orderTrackItem(TracesBean logistics, var position, var size) { + Widget orderTrackItem(Traces logistics, var position, var size) { return IntrinsicHeight( child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -380,7 +391,7 @@ class _LogisticsInformationPage extends State { Column( children: [ Text( - logistics.acceptTime.split(" ")[0], + logistics.acceptTime?.split(" ")[0] ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.medium, @@ -390,7 +401,7 @@ class _LogisticsInformationPage extends State { height: 5.h, ), Text( - logistics.acceptTime.split(" ")[1], + logistics.acceptTime?.split(" ")[1] ?? "", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.medium, @@ -404,14 +415,16 @@ class _LogisticsInformationPage extends State { Column( children: [ Image.asset( - tripStatus(logistics.acceptStation), + tripStatus(logistics.acceptStation ?? ""), width: 24.w, height: 24.h, ), if (position != size - 1) Container( width: 1.w, - height: logistics.acceptStation.length > 100 ? 118.h :75.h, + height: (logistics.acceptStation?.length ?? 0) > 100 + ? 118.h + : 75.h, decoration: new BoxDecoration( color: Color(0xffE1E1E1), ), @@ -426,23 +439,25 @@ class _LogisticsInformationPage extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (logisticsTripStatus(logistics.acceptStation) != "") + if (logisticsTripStatus(logistics.acceptStation ?? "") != "") Text( - logisticsTripStatus(logistics.acceptStation), + logisticsTripStatus(logistics.acceptStation ?? ""), style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Colors.black), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + color: Colors.black, + ), ), SizedBox( height: 10.h, ), Text( - logistics.acceptStation, + logistics.acceptStation ?? "", style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xff353535)), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xff353535), + ), ), ], ), @@ -474,9 +489,9 @@ class _LogisticsInformationPage extends State { tripStatus = "assets/image/icon_sign.webp"; } else if (type.contains("派送中") || type.contains("派件")) { tripStatus = "assets/image/icon_delivery.webp"; - }else if (type.contains("揽收") || type.contains("揽收")) { + } else if (type.contains("揽收") || type.contains("揽收")) { tripStatus = "assets/image/icon_delivery.webp"; - } else if (type.contains("运输中") || type.contains("发往")) { + } else if (type.contains("运输中") || type.contains("发往")) { tripStatus = "assets/image/icon_transport.webp"; } else if (type.contains("已发货") || type.contains("分配")) { tripStatus = "assets/image/icon_deliver_goods.webp"; @@ -492,7 +507,7 @@ class _LogisticsInformationPage extends State { logisticsTripStatus = "已签收"; } else if (state.contains("揽收")) { logisticsTripStatus = "已揽件"; - }else if (state.contains("派送中") || state.contains("派件")) { + } else if (state.contains("派送中") || state.contains("派件")) { logisticsTripStatus = "派送中"; } else if (state.contains("运输中") || state.contains("发往")) { logisticsTripStatus = "运输中"; diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index 925720ff..e8370049 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -1,5 +1,6 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; @@ -8,8 +9,8 @@ import 'package:huixiang/order/order_view/order_commodity.dart'; import 'package:huixiang/order/order_view/order_info.dart'; import 'package:huixiang/order/order_view/order_pay_selected.dart'; import 'package:huixiang/order/order_view/order_status.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -19,7 +20,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../retrofit/data/user_info.dart'; +import '../data/user_info.dart'; import '../utils/flutter_utils.dart'; import '../view_widget/classic_header.dart'; import '../view_widget/my_footer.dart'; @@ -37,11 +38,11 @@ class OrderDetailPage extends StatefulWidget { } class _OrderDetailPage extends State { - ApiService apiService; - MinApiService minService; - int jumpState; + ApiService? apiService; + MinApiService? minService; + int? jumpState; final RefreshController refreshController = RefreshController(); - UserInfo userInfo; + UserInfo? userInfo; @override void initState() { @@ -58,14 +59,14 @@ class _OrderDetailPage extends State { /// 小程序登录 minLogin() async { - apiService.minLogin(orderInfo.storeId).catchError((onError) { + apiService?.minLogin(orderInfo?.storeId ?? "").catchError((onError) { debugPrint(onError); }).then((baseData) { - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { Map minStoreInfo = baseData.data; String minToken = minStoreInfo["token"]; - String tenant = orderInfo.tenantCode; - String storeId = orderInfo.storeId; + String tenant = orderInfo?.tenantCode ?? ""; + String storeId = orderInfo?.storeId ?? ""; SharedPreferences.getInstance().then( (value) => { value.setString('minToken', minToken), @@ -87,17 +88,16 @@ class _OrderDetailPage extends State { ///查询用户信息 queryUserBalance() async { - BaseData baseData = - await apiService.queryInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; + BaseData? baseData = await apiService?.queryInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; if (mounted) setState(() {}); }else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } - OrderInfo orderInfo; + OrderInfo? orderInfo; int payStatus = 0; int orderStatus = 0; int sendStatus = 0; @@ -105,28 +105,20 @@ class _OrderDetailPage extends State { int refundStatus = 0; queryDetails() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, - token: value.getString("token"), - showLoading: false); - } - BaseData baseData = await apiService - .orderDetail(widget.arguments["id"]) + BaseData? baseData = await apiService?.orderDetail(widget.arguments["id"]) .catchError((error) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center); refreshController.refreshFailed(); refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { - orderInfo = baseData.data; - payStatus = orderInfo.payStatus; - orderStatus = orderInfo.orderStatus; - sendStatus = orderInfo.sendStatus; - isTakeOut = orderInfo.isTakeOut; - refundStatus = orderInfo.refundStatus; + if (baseData?.isSuccess ?? false) { + orderInfo = baseData!.data; + payStatus = orderInfo?.payStatus ?? 0; + orderStatus = orderInfo?.orderStatus ?? 0; + sendStatus = orderInfo?.sendStatus ?? 0; + isTakeOut = orderInfo?.isTakeOut ?? 0; + refundStatus = orderInfo?.refundStatus ?? 0; // storeType = orderInfo.storeVO.posType.code; print("order refund_status: $refundStatus"); print("order payStatus: $payStatus"); @@ -144,7 +136,7 @@ class _OrderDetailPage extends State { refreshController.loadComplete(); } else { EasyLoading.dismiss(); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); refreshController.refreshFailed(); refreshController.loadFailed(); } @@ -179,7 +171,7 @@ class _OrderDetailPage extends State { titleColor: Colors.white, background: Colors.transparent, leadingColor: Colors.white, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, ), body: SmartRefresher( controller: refreshController, @@ -216,28 +208,25 @@ class _OrderDetailPage extends State { ///订单取货地址,或, 收货地址 - if(orderInfo != null && orderInfo.addressExt != null) - OrderAddress( - orderStatus, - isTakeOut, - sendStatus, - payStatus, - refundStatus, - title, - center, - paySelected, - _orderCancel, - orderInfo, - jumpState - ), + OrderAddress( + orderStatus, + isTakeOut, + sendStatus, + payStatus, + refundStatus, + title, + center, + paySelected, + _orderCancel, + orderInfo, + jumpState ?? 0 + ), ///订单商品 - if(orderInfo != null) - OrderCommodity(orderInfo), + OrderCommodity(orderInfo), ///显示订单信息 - if(orderInfo != null) - OrderInfoView(orderInfo, isTakeOut), + OrderInfoView(orderInfo, isTakeOut), Container( height: 42.h, @@ -256,11 +245,14 @@ class _OrderDetailPage extends State { String center = ""; paySelected() async { + if (userInfo == null) { + return; + } var payChannel = await showModalBottomSheet( context: context, backgroundColor: Colors.transparent, builder: (context) { - return OrderPaySelected(userInfo); + return OrderPaySelected(userInfo!); }, ); if (payChannel != null && payChannel > 0) { @@ -272,7 +264,7 @@ class _OrderDetailPage extends State { await queryDetails(); Future.delayed(Duration(milliseconds: 800), () { EasyLoading.dismiss(); - SmartDialog.showToast(baseData?.msg == "ok" ? "订单支付成功" : baseData?.msg, + SmartDialog.showToast(baseData.msg == "ok" ? "订单支付成功" : "${baseData.msg}", alignment: Alignment.center); }); } @@ -293,7 +285,7 @@ class _OrderDetailPage extends State { break; case 3: title = S.of(context).dengdaiyonghuqucan; - center = S.of(context).qudanhao(orderInfo.dayFlowCode); + center = S.of(context).qudanhao(orderInfo?.dayFlowCode ?? ""); break; case 4: title = S.of(context).dingdanyiwancheng; @@ -414,9 +406,7 @@ class _OrderDetailPage extends State { ), ), Text( - S - .of(context) - .yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"), + S.of(context).yuan_(orderInfo?.finalPayPrice ?? "0"), style: TextStyle( fontSize: 20.sp, color: Color(0xFF32A060), @@ -561,16 +551,15 @@ class _OrderDetailPage extends State { } _orderCancel() async { - BaseData baseData = await apiService - .orderCancel(widget.arguments["id"]) + BaseData? baseData = await apiService?.orderCancel(widget.arguments["id"]) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("订单取消成功"); // Future.delayed(Duration(milliseconds:450), () { queryDetails(); // }); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -587,11 +576,13 @@ class _OrderDetailPage extends State { Widget buildBottomSheetWidget(BuildContext context) { return Container( padding: EdgeInsets.only(top: 12), - decoration: new BoxDecoration( - color: Colors.white, - borderRadius: new BorderRadius.only( - topLeft: const Radius.circular(25.0), - topRight: const Radius.circular(25.0))), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: new BorderRadius.only( + topLeft: const Radius.circular(25.0), + topRight: const Radius.circular(25.0), + ), + ), child: Container( width: 299, height: 299, @@ -612,7 +603,8 @@ class _OrderDetailPage extends State { color: Color(0xFF000000), ), ), - )), + ), + ), GestureDetector( onTap: () { setState(() { @@ -706,14 +698,16 @@ class _OrderDetailPage extends State { ), ], ), - ) + ), ], ), Container( width: double.infinity, height: 36.h, alignment: Alignment.center, - margin: EdgeInsets.only(left: 14.w, right: 14.w, top: 50.h), + margin: EdgeInsets.only( + left: 14.w, right: 14.w, top: 50.h, + ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(6), color: Color(0xFF32A060), @@ -729,7 +723,8 @@ class _OrderDetailPage extends State { ), ], ), - )); + ), + ); } Widget orderInfoItem(leftText, rightText) { diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 452c9df0..68ed80c7 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -5,10 +5,10 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/order/order_utils.dart'; import 'package:huixiang/order/order_view/order_pay_selected.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; -import 'package:huixiang/retrofit/data/order_product_vo.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/order_info.dart'; +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/scan.dart'; @@ -25,10 +25,10 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:shimmer/shimmer.dart'; -import '../retrofit/data/user_info.dart'; +import '../data/user_info.dart'; class OrderHistoryPage extends StatefulWidget { - final Map arguments; + final Map? arguments; OrderHistoryPage({this.arguments}); @@ -40,15 +40,12 @@ class OrderHistoryPage extends StatefulWidget { class _OrderHistoryPage extends State with SingleTickerProviderStateMixin { - List _pages; - TabController tabController; + List _pages = []; + TabController? tabController; @override void didChangeDependencies() { super.didChangeDependencies(); - if (tabController == null) - tabController = TabController( - initialIndex: widget.arguments["status"], length: 4, vsync: this); _pages = [ OrderHistoryList(0), @@ -135,10 +132,10 @@ class _OrderHistoryList extends State with AutomaticKeepAliveClientMixin { final RefreshController refreshController = RefreshController(); bool isRemake = true; - ApiService apiService; + ApiService? apiService; int current = 1; List orderInfos = []; - UserInfo userInfo; + UserInfo? userInfo; int networkStatus = 0; @override @@ -163,7 +160,7 @@ class _OrderHistoryList extends State try{ if(isLoading) EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - BaseData> baseData = await apiService.orderList({ + BaseData>? baseData = await apiService?.orderList({ "current": current, "model": {"status": widget.orderStatus}, "order": "descending", @@ -175,18 +172,20 @@ class _OrderHistoryList extends State refreshController.loadFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (current == 1) { - orderInfos.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData!.data != null && (baseData.data!.records?.isNotEmpty ?? false)) { + if (current == 1) { + orderInfos.clear(); + } + orderInfos.addAll(baseData.data!.records!); } - orderInfos.addAll(baseData.data.records); // baseData.data.records.forEach((element) { // if(element.orderType==0||(element.orderType==1 && element.payStatus==1 && element.refundStatus == 0)||(element.orderType==2 && element.payStatus==1&& element.refundStatus == 0)||(element.orderType==3 && element.payStatus==1&& element.refundStatus == 0)) // orderInfos.add(element); // }); refreshController.refreshCompleted(); refreshController.loadComplete(); - if (current * 10 > int.tryParse(baseData.data.total)) { + if (current * 10 > (int.tryParse("${baseData.data?.total}") ?? 0)) { refreshController.loadNoData(); } else { current += 1; @@ -194,8 +193,8 @@ class _OrderHistoryList extends State setState(() {}); networkStatus = 1; } else { - if((baseData?.msg ?? "") != "") - SmartDialog.showToast(baseData.msg,alignment: Alignment.center); + if(baseData?.msg?.isNotEmpty ?? false) + SmartDialog.showToast("${baseData!.msg}",alignment: Alignment.center); refreshController.refreshFailed(); refreshController.loadFailed(); }}finally{ @@ -204,16 +203,15 @@ class _OrderHistoryList extends State } minLogin(OrderInfo orderInfo) { - apiService.minLogin(orderInfo.storeId).catchError((onError) { + apiService?.minLogin(orderInfo.storeId ?? "").catchError((onError) { debugPrint(onError); }).then((baseData) { - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { Map minStoreInfo = baseData.data; String minToken = minStoreInfo["token"]; - String tenant = orderInfo.tenantCode; - String storeId = orderInfo.storeId; - SharedPreferences.getInstance().then( - (value) => { + String tenant = orderInfo.tenantCode ?? ""; + String storeId = orderInfo.storeId ?? ""; + SharedPreferences.getInstance().then((value) => { value.setString('minToken', minToken), value.setString('tenant', tenant), value.setString('storeId', storeId), @@ -233,37 +231,33 @@ class _OrderHistoryList extends State } queryDetails(id) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: true); - } - BaseData baseData = - await apiService.orderDetail(id).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - return baseData.data; + BaseData? baseData = await apiService?.orderDetail(id).catchError((error) {}); + if (baseData?.isSuccess ?? false) { + return baseData!.data; } } queryUserBalance() async { - BaseData baseData = - await apiService.queryInfo().catchError((onError) { + BaseData? baseData = await apiService?.queryInfo().catchError((onError) { }); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; if (mounted) setState(() {}); }else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } paySelected(OrderInfo orderInfo, MinApiService minService) async { + if (userInfo == null) { + return; + } var payChannel = await showModalBottomSheet( context: context, backgroundColor: Colors.transparent, builder: (context) { - return OrderPaySelected(userInfo); + return OrderPaySelected(userInfo!); }, ); if (payChannel != null && payChannel > 0) { @@ -274,8 +268,9 @@ class _OrderHistoryList extends State orderInfo, (BaseData baseData) { SmartDialog.showToast( - baseData?.msg == "ok" ? "订单支付成功" : baseData?.msg, - alignment: Alignment.center); + baseData.msg == "ok" ? "订单支付成功" : "${baseData.msg}", + alignment: Alignment.center, + ); Future.delayed(Duration(seconds: 3), () { _onRefresh(); }); @@ -287,14 +282,12 @@ class _OrderHistoryList extends State payResult(BaseData baseData) {} orderCancel(String orderId) async { - BaseData baseData = - await apiService.orderCancel(orderId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.orderCancel(orderId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("订单取消成功"); _onRefresh(); }else{ - if(baseData.msg != null) - SmartDialog.showToast(baseData.msg,alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}",alignment: Alignment.center); } } @@ -308,20 +301,20 @@ class _OrderHistoryList extends State // ? (orderInfo.storeVO.id ?? "") // : ""; - if (orderInfo.storeVO.posType.code == "NORMALSTORE") { + if (orderInfo.storeVO?.posType?.code == "NORMALSTORE") { Scan.toScan( context, - orderInfo.storeVO.id, + orderInfo.storeVO?.id, orderInfo.tenantCode, - orderInfo.storeVO.storeName, + orderInfo.storeVO?.storeName, ); } else { Navigator.of(context).pushNamed( '/router/store_order', arguments: { - "id": orderInfo.storeVO.id, + "id": orderInfo.storeVO?.id, "tenant": orderInfo.tenantCode, - "storeName": orderInfo.storeVO.storeName + "storeName": orderInfo.storeVO?.storeName }, ); } @@ -352,9 +345,9 @@ class _OrderHistoryList extends State itemBuilder: (context, position) { return orderItemSm(); }, - ) : ((orderInfos != null && orderInfos.length > 0) + ) : ((orderInfos.length > 0) ? ListView.builder( - itemCount: orderInfos != null ? orderInfos.length : 0, + itemCount: orderInfos.length ?? 0, itemBuilder: (context, position) { return InkWell( onTap: () { @@ -376,17 +369,17 @@ class _OrderHistoryList extends State String orderAllGoods(OrderInfo orderInfo) { int count = 0; - if (orderInfo.productList != null) { - orderInfo.productList.forEach((element) { - count += element.buyNum; - }); - } + orderInfo.productList?.forEach((element) { + count += (element.buyNum ?? 0); + }); return count.toString(); } Widget orderItem(OrderInfo orderInfo) { return Container( - margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), + margin: EdgeInsets.fromLTRB( + 16.w, 8.h, 16.w, 8.h, + ), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(4), @@ -463,7 +456,7 @@ class _OrderHistoryList extends State margin: EdgeInsets.only(left:12.w, top: 12.h), alignment: Alignment.centerLeft, child: Text( - (orderInfo != null) ? orderInfo.storeName : "", + orderInfo.storeName ?? "", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 14.sp, @@ -476,9 +469,7 @@ class _OrderHistoryList extends State Padding( padding: EdgeInsets.only(top: 12.h, right: 12.w), child: Text( - (orderInfo != null && - orderInfo.storeVO != null && - orderInfo.storeVO.posType != null) + (orderInfo.storeVO != null) ? StatusUtils.statusText( context, orderInfo.refundStatus, @@ -492,12 +483,9 @@ class _OrderHistoryList extends State fontWeight: FontWeight.bold, color: (orderInfo == null) ? Color(0xFF32A060) - : (orderInfo.refundStatus == 1 || - orderInfo.orderStatus == -1 || orderInfo.orderStatus >= 5) + : (orderInfo.refundStatus == 1 || orderInfo.orderStatus == -1 || (orderInfo.orderStatus ?? 0) >= 5) ? Colors.grey - : (orderInfo.orderStatus == 4) - ? Color(0xFF32A060) - : Color(0xffFE951E), + : (orderInfo.orderStatus == 4) ? Color(0xFF32A060) : Color(0xffFE951E), ), ), ), @@ -510,8 +498,7 @@ class _OrderHistoryList extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - S.of(context).xiadanshijian_( - (orderInfo != null) ? orderInfo.createTime : ""), + S.of(context).xiadanshijian_(orderInfo.createTime ?? ""), style: TextStyle( fontSize: 10.sp, color: Color(0xFF727272), @@ -528,10 +515,7 @@ class _OrderHistoryList extends State child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, - children: goodsItem((orderInfo != null && - orderInfo.productList != null) - ? orderInfo.productList - : null), + children: goodsItem(orderInfo.productList), ), flex: 1, ), @@ -648,7 +632,7 @@ class _OrderHistoryList extends State text: "暂不支持此功能", )); } else if (type == 2) { - orderCancel(orderInfo.id); + orderCancel(orderInfo.id ?? ""); } else if (type == 3) { minLogin(orderInfo); } else if (type == 4) { @@ -658,11 +642,10 @@ class _OrderHistoryList extends State "logisticsNum": orderInfo.logisticsNum, "logisticsName": orderInfo.logisticsName, "shipperCode": orderInfo.shipperCode, - "productNum": orderInfo.productList.length, - "skuImg": orderInfo.productList.length > 0 - ? orderInfo.productList[0].skuImg - : "" - }); + "productNum": orderInfo.productList?.length ?? 0, + "skuImg": orderInfo.productList?[0].skuImg ?? "" + }, + ); } }) : [], @@ -676,24 +659,20 @@ class _OrderHistoryList extends State ); } - String totalPrice(orderInfo) { - if (orderInfo == null) return ""; - double totalPrice = (double.tryParse(orderInfo.orderSum) + - double.tryParse(orderInfo.postFee)); - if (orderInfo.orderDetail != null && - orderInfo.orderDetail.couponDTO != null) { - totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money); - } - return "$totalPrice"; - } - - List goodsItem(List products) { - if (products == null) return []; - if (products.length > 3) { - products = products.sublist(0, 3); + // String totalPrice(orderInfo) { + // if (orderInfo == null) return ""; + // double totalPrice = (double.tryParse(orderInfo.orderSum) + double.tryParse(orderInfo.postFee)); + // if (orderInfo.orderDetail != null && orderInfo.orderDetail.couponDTO != null) { + // totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money); + // } + // return "$totalPrice"; + // } + + List goodsItem(List? products) { + if ((products?.length ?? 0) > 3) { + products = products?.sublist(0, 3); } - return products - .map( + return products?.map( (e) => Container( margin: EdgeInsets.symmetric(horizontal: 2.w), child: Column( @@ -701,7 +680,7 @@ class _OrderHistoryList extends State crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - e.skuImg, + e.skuImg ?? "", width: 75.w, height: 75.w, fit: BoxFit.cover, @@ -715,7 +694,7 @@ class _OrderHistoryList extends State Container( width: 75.w, child: Text( - e.productName, + e.productName ?? "", maxLines: 1, textAlign: TextAlign.center, overflow: TextOverflow.ellipsis, @@ -728,8 +707,7 @@ class _OrderHistoryList extends State ], ), ), - ) - .toList(); + ).toList() ?? []; } Widget orderItemSm() { diff --git a/lib/order/order_utils.dart b/lib/order/order_utils.dart index 32589617..6dbf3b4b 100644 --- a/lib/order/order_utils.dart +++ b/lib/order/order_utils.dart @@ -1,40 +1,40 @@ import 'dart:io'; import 'package:fluwx/fluwx.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; -import 'package:huixiang/retrofit/data/placeOrderFirst.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/order_info.dart'; +import 'package:huixiang/data/place_order_first.dart'; +import 'package:huixiang/data/wx_pay.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/utils/min.dart'; class OrderUtils { - static carryOnPay(payChannel, MinApiService minService, OrderInfo orderInfo, Function queryDetails) async { + static carryOnPay(payChannel, MinApiService? minService, OrderInfo? orderInfo, Function queryDetails) async { PlaceOrderFirst placeOrderFirst = PlaceOrderFirst(); - placeOrderFirst.addressId = orderInfo.addressExt == null ? "" : orderInfo.addressExt.addressId; - placeOrderFirst.isSubscribe = orderInfo.isSubscribe; - placeOrderFirst.isTakeOut = orderInfo.isTakeOut; - placeOrderFirst.notes = orderInfo.notes; - placeOrderFirst.id = orderInfo.id; - placeOrderFirst.orderProductVOList = orderInfo.orderDetail?.orderProductList; + placeOrderFirst.addressId = orderInfo?.addressExt?.addressId ?? ""; + placeOrderFirst.isSubscribe = orderInfo?.isSubscribe; + placeOrderFirst.isTakeOut = orderInfo?.isTakeOut; + placeOrderFirst.notes = orderInfo?.notes; + placeOrderFirst.id = orderInfo?.id; + placeOrderFirst.orderProductVOList = orderInfo?.orderDetail?.orderProductList; placeOrderFirst.numberOfPeople = "0"; - placeOrderFirst.orderSource = orderInfo.orderSource; - placeOrderFirst.orderType = "${orderInfo.orderType}"; + placeOrderFirst.orderSource = orderInfo?.orderSource; + placeOrderFirst.orderType = "${orderInfo?.orderType}"; placeOrderFirst.orderTypeId = 0; - placeOrderFirst.parentCode = orderInfo.parentCode; // 火锅加菜 - placeOrderFirst.parentId = orderInfo.parentId; // 火锅加菜 + placeOrderFirst.parentCode = orderInfo?.parentCode; // 火锅加菜 + placeOrderFirst.parentId = orderInfo?.parentId; // 火锅加菜 placeOrderFirst.payChannel = payChannel; placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); - placeOrderFirst.promotionInfoDTO.promotionId = orderInfo.promotionId; - placeOrderFirst.promotionInfoDTO.couponId = orderInfo.couponId; + placeOrderFirst.promotionInfoDTO?.promotionId = orderInfo?.promotionId; + placeOrderFirst.promotionInfoDTO?.couponId = orderInfo?.couponId; placeOrderFirst.recMobile = ""; placeOrderFirst.shoppingCartSkuItemList = []; placeOrderFirst.skuItemDTOList = []; placeOrderFirst.source = 1; - placeOrderFirst.storeId = orderInfo.storeId; + placeOrderFirst.storeId = orderInfo?.storeId; placeOrderFirst.subcribeTime = null; - placeOrderFirst.tableId = orderInfo.tableId; + placeOrderFirst.tableId = orderInfo?.tableId; if (placeOrderFirst.payChannel == 1) { if(Platform.isAndroid){ @@ -45,33 +45,37 @@ class OrderUtils { await Min.initialize(); } } - BaseData baseData = await minService - .settlementWx(placeOrderFirst.toJson()) + BaseData? baseData = await minService?.settlementWx(placeOrderFirst.toJson()) .catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - WxPay wxPay = baseData.data; - await registerWxApi( - appId: wxPay.appId, + if (baseData?.isSuccess ?? false) { + WxPay? wxPay = baseData!.data; + if (wxPay?.isAnyEmpty() ?? true) { + return; + } + Fluwx fluwx = Fluwx(); + await fluwx.registerApi( + appId: wxPay!.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + ) ); - weChatResponseEventHandler.listen((event) async { + fluwx.addSubscriber((event) { print("payCallback: ${event.errCode}"); queryDetails(null); }); } } else { - BaseData baseData = await minService - .settlementApi(placeOrderFirst.toJson()) + BaseData? baseData = await minService?.settlementApi(placeOrderFirst.toJson()) .catchError((error) {}); queryDetails(baseData); } diff --git a/lib/order/order_view/order_address.dart b/lib/order/order_view/order_address.dart index 2fa6e570..8cdd1ffa 100644 --- a/lib/order/order_view/order_address.dart +++ b/lib/order/order_view/order_address.dart @@ -2,11 +2,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; +import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/border_text.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/separator.dart'; import 'package:huixiang/view_widget/text_image_dialog.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -21,7 +19,7 @@ class OrderAddress extends StatefulWidget { final String center; final Function orderCancel; final Function() carryOnPay; - final OrderInfo orderInfo; + final OrderInfo? orderInfo; final int jumpState; OrderAddress( @@ -64,7 +62,6 @@ class _OrderAddress extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if(widget?.orderInfo?.addressExt != null) Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, @@ -75,46 +72,39 @@ class _OrderAddress extends State { height: 24.h, ), Text( - (widget.orderInfo != null && - widget.orderInfo.addressExt != null) - ? ((widget.isTakeOut == 0 || widget.isTakeOut == 3 || widget.isTakeOut == 4 - ? widget.orderInfo.storeName - : widget.orderInfo.addressExt.recName) ?? + (widget.orderInfo?.addressExt != null) + ? ((widget.isTakeOut == 0 || + widget.isTakeOut == 3 || + widget.isTakeOut == 4 + ? widget.orderInfo?.storeName + : widget.orderInfo?.addressExt?.recName) ?? "") : "", overflow: TextOverflow.ellipsis, style: TextStyle( - fontSize: 15.sp, - color: Color(0xFF4C4C4C), - fontWeight: MyFontWeight.medium - ), + fontSize: 15.sp, + color: Color(0xFF4C4C4C), + fontWeight: MyFontWeight.medium), ), SizedBox( - width:7.w, + width: 7.w, ), Expanded( child: Text( - (widget.orderInfo != null && - widget.orderInfo.addressExt != null) - ? (widget.orderInfo.addressExt.recMobile ?? "") - : "", + widget.orderInfo?.addressExt?.recMobile ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( - fontSize: 15.sp, - color: Color(0xFF4C4C4C), - fontWeight: MyFontWeight.medium - ), + fontSize: 15.sp, + color: Color(0xFF4C4C4C), + fontWeight: MyFontWeight.medium), ), ), ], ), - if(widget?.orderInfo?.addressExt != null) Container( margin: EdgeInsets.only(left: 26.w), child: Text( - (widget.orderInfo != null && widget.orderInfo.addressExt != null) - ? (widget.orderInfo.addressExt.address ?? "") - : "", + widget.orderInfo?.addressExt?.address ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -124,7 +114,6 @@ class _OrderAddress extends State { ), ), ), - if(widget?.orderInfo?.addressExt != null) Visibility( visible: widget.orderStatus < 5 && widget.refundStatus == 0, child: Container( @@ -155,11 +144,8 @@ class _OrderAddress extends State { S.of(context).zhidianmendian, (open) { if (open) { - String mobile = (widget.orderInfo != null && - widget.orderInfo.storeVO != null) - ? (widget.orderInfo.storeVO.mobile ?? "") - : ""; - if (mobile != "") { + String? mobile = widget.orderInfo?.storeVO?.mobile; + if (mobile?.isNotEmpty ?? false) { callMobile(mobile); } } @@ -205,14 +191,8 @@ class _OrderAddress extends State { if (widget.payStatus == 0) { widget.carryOnPay(); } else { - String storeId = (widget.orderInfo != null && - widget.orderInfo.storeVO != null) - ? (widget.orderInfo.storeVO.id ?? "") - : ""; - String storeName = (widget.orderInfo != null && - widget.orderInfo.storeVO != null) - ? (widget.orderInfo.storeVO.storeName ?? "") - : ""; + String storeId = widget.orderInfo?.storeVO?.id ?? ""; + String storeName = widget.orderInfo?.storeVO?.storeName ?? ""; aginOrder(storeId, storeName); } }, @@ -253,9 +233,9 @@ class _OrderAddress extends State { } callMobile(mobile) async { - String url = "tel:$mobile"; - if (await canLaunch(url)) { - await launch(url); + Uri url = Uri.parse("tel:$mobile"); + if (await canLaunchUrl(url)) { + await launchUrl(url); } else { throw 'Could not launch $url'; } @@ -265,101 +245,100 @@ class _OrderAddress extends State { // Navigator.of(context).pushNamed('/router/union_detail_page', // arguments: {"id": storeId, "storeName": storeName}); - if(widget.orderInfo.storeVO.posType.code == "NORMALSTORE") { + if (widget.orderInfo?.storeVO?.posType?.code == "NORMALSTORE") { Scan.toScan( context, - widget.orderInfo.storeVO.id, - widget.orderInfo.tenantCode, - widget.orderInfo.storeVO.storeName, + widget.orderInfo?.storeVO?.id, + widget.orderInfo?.tenantCode, + widget.orderInfo?.storeVO?.storeName, ); } else { - if(widget.jumpState == 1){ + if (widget.jumpState == 1) { Navigator.of(context).pop(); - }else if(widget.jumpState == 2){ + } else if (widget.jumpState == 2) { Navigator.of(context).popAndPushNamed( '/router/store_order', arguments: { - "id": widget.orderInfo.storeVO.id, - "tenant": widget.orderInfo.tenantCode, - "storeName": widget.orderInfo.storeVO.storeName + "id": widget.orderInfo?.storeVO?.id, + "tenant": widget.orderInfo?.tenantCode, + "storeName": widget.orderInfo?.storeVO?.storeName }, ); } } - } - // carryOnPay() async { - // showDialog( - // context: context, - // builder: (context) { - // return AlertDialog( - // content: Container( - // width: MediaQuery.of(context).size.width - 84.w, - // height: 140.h, - // child: Column( - // mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.center, - // children: [ - // Text( - // "app暂不支持支付,\n请前往对应小程序处理", - // textAlign: TextAlign.center, - // style: TextStyle( - // fontSize: 16.sp, - // fontWeight: FontWeight.bold, - // color: Colors.black, - // ), - // ), - // SizedBox( - // height: 30.h, - // ), - // Row( - // children: [ - // Expanded( - // child: InkWell( - // child: BorderText( - // text: "取消", - // textColor: Color(0xFF32A060), - // fontSize: 16.sp, - // fontWeight: FontWeight.bold, - // borderColor: Color(0xFF32A060), - // radius: 4, - // padding: EdgeInsets.all(12), - // borderWidth: 1, - // ), - // onTap: () { - // Navigator.of(context).pop(); - // }, - // ), - // flex: 1, - // ), - // SizedBox( - // width: 16.w, - // ), - // Expanded( - // child: InkWell( - // child: RoundButton( - // text: "好的", - // textColor: Colors.white, - // radius: 4, - // padding: EdgeInsets.all(12), - // backgroup: Color(0xFF32A060), - // fontSize: 16.sp, - // fontWeight: FontWeight.bold, - // ), - // onTap: () { - // Navigator.of(context).pop(); - // }, - // ), - // flex: 1, - // ), - // ], - // ), - // ], - // ), - // ), - // ); - // }, - // ); - // } +// carryOnPay() async { +// showDialog( +// context: context, +// builder: (context) { +// return AlertDialog( +// content: Container( +// width: MediaQuery.of(context).size.width - 84.w, +// height: 140.h, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Text( +// "app暂不支持支付,\n请前往对应小程序处理", +// textAlign: TextAlign.center, +// style: TextStyle( +// fontSize: 16.sp, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// ), +// SizedBox( +// height: 30.h, +// ), +// Row( +// children: [ +// Expanded( +// child: InkWell( +// child: BorderText( +// text: "取消", +// textColor: Color(0xFF32A060), +// fontSize: 16.sp, +// fontWeight: FontWeight.bold, +// borderColor: Color(0xFF32A060), +// radius: 4, +// padding: EdgeInsets.all(12), +// borderWidth: 1, +// ), +// onTap: () { +// Navigator.of(context).pop(); +// }, +// ), +// flex: 1, +// ), +// SizedBox( +// width: 16.w, +// ), +// Expanded( +// child: InkWell( +// child: RoundButton( +// text: "好的", +// textColor: Colors.white, +// radius: 4, +// padding: EdgeInsets.all(12), +// backgroup: Color(0xFF32A060), +// fontSize: 16.sp, +// fontWeight: FontWeight.bold, +// ), +// onTap: () { +// Navigator.of(context).pop(); +// }, +// ), +// flex: 1, +// ), +// ], +// ), +// ], +// ), +// ), +// ); +// }, +// ); +// } } diff --git a/lib/order/order_view/order_commodity.dart b/lib/order/order_view/order_commodity.dart index beae0d51..e10fc7a7 100644 --- a/lib/order/order_view/order_commodity.dart +++ b/lib/order/order_view/order_commodity.dart @@ -1,19 +1,17 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/data/order_product_vo.dart'; +import 'package:huixiang/data/set_meal_data.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; -import 'package:huixiang/retrofit/data/order_product_vo.dart'; -import 'package:huixiang/retrofit/data/product.dart'; -import 'package:huixiang/retrofit/data/settlement_bean.dart'; +import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/separator.dart'; -import '../../retrofit/data/shoppingCart.dart'; import '../../utils/flutter_utils.dart'; class OrderCommodity extends StatefulWidget { - final OrderInfo orderInfo; + final OrderInfo? orderInfo; OrderCommodity(this.orderInfo); @@ -68,29 +66,25 @@ class _OrderCommodity extends State { } List commodityList() { - if (widget.orderInfo == null) return []; List widgets = []; - if (widget.orderInfo.productList != null) { - widgets.addAll( - widget.orderInfo.productList.map((e) => commodityItem(e)).toList()); - } + widgets.addAll(widget.orderInfo?.productList?.map((e) => commodityItem(e)).toList() ?? []); widgets.add(SizedBox(height: 20.h)); - if (widget.orderInfo.isTakeOut != 0 && widget.orderInfo.isTakeOut != 3 && widget.orderInfo.isTakeOut != 4) { + if (widget.orderInfo?.isTakeOut != 0 && widget.orderInfo?.isTakeOut != 3 && widget.orderInfo?.isTakeOut != 4) { // 配送费 widgets.add( discountItem( Color(0xFFFF7A1A), - widget.orderInfo.isTakeOut == 1 + widget.orderInfo?.isTakeOut == 1 ? S.of(context).peisongfei : S.of(context).yunfei, "", - "+${widget.orderInfo.postFee}", + "+${widget.orderInfo?.postFee}", ), ); } - if (widget.orderInfo.isTakeOut == 3) { + if (widget.orderInfo?.isTakeOut == 3) { //打包费 widgets.add( discountItem( @@ -102,62 +96,54 @@ class _OrderCommodity extends State { ); } - if (widget.orderInfo.benefitDiscountAmount != "0.00") { + if (widget.orderInfo?.benefitDiscountAmount != "0.00") { // 优惠券 widgets.add( vipItem( Color(0xFFFF7A1A), "会员优惠金额", - "- ${widget?.orderInfo?.benefitDiscountAmount ?? "0.00"}", + "- ${widget.orderInfo?.benefitDiscountAmount ?? "0.00"}", ), ); } - if (widget.orderInfo.orderDetail != null && - widget.orderInfo.orderDetail.couponDTO != null) { - // 优惠券 - widgets.add( - discountItem( - Color(0xFFFF7A1A), - S.of(context).youhuiquan, - widget.orderInfo.orderDetail.couponDTO.name, - widget.orderInfo.orderDetail.couponDTO.money, - ), - ); - } - - if (widget.orderInfo.orderDetail != null && - widget.orderInfo.orderDetail.activityPrice != null && - double.tryParse(widget.orderInfo.orderDetail.activityPrice ?? "0") > 0) { + // 优惠券 + widgets.add( + discountItem( + Color(0xFFFF7A1A), + S.of(context).youhuiquan, + widget.orderInfo?.orderDetail?.couponDTO.name, + widget.orderInfo?.orderDetail?.couponDTO.money, + ), + ); + + if ((double.tryParse("${widget.orderInfo?.orderDetail?.activityPrice}") ?? 0) > 0) { // 活动 widgets.add( discountItem( Color(0xFFFF7A1A), "活动", - widget.orderInfo.orderDetail.promotionName, - "- ${widget.orderInfo.orderDetail.activityPrice}", + widget.orderInfo?.orderDetail?.promotionName, + "- ${widget.orderInfo?.orderDetail?.activityPrice}", ), ); } - if (widget.orderInfo.orderDetail != null && - widget.orderInfo.vipDiscountPrice != null && - double.tryParse(widget.orderInfo.vipDiscountPrice ?? "0") > 0) { + if ((double.tryParse("${widget.orderInfo?.vipDiscountPrice}") ?? 0) > 0) { // vip价格 widgets.add( discountItem( Color(0xFFFF7A1A), "VIP优惠", "", - "- ${widget.orderInfo.vipDiscountPrice??""}", + "- ${widget.orderInfo?.vipDiscountPrice??""}", ), ); } - if (widget.orderInfo.storeVO != null && - widget.orderInfo.storeVO.couponVO != null) { + if (widget.orderInfo?.storeVO?.couponVO != null) { // widgets.add(discountItem(Color(0xFF32A060), // orderInfo.storeVO.couponVO.storeName, // S.of(context).huodongjianmianpeisongfei(orderInfo.storeVO.couponVO.discountAmount), @@ -180,7 +166,7 @@ class _OrderCommodity extends State { } - Widget commodityItem(OrderProductVOList productList) { + Widget commodityItem(OrderProductVO productList) { return Container( margin: EdgeInsets.only(top: 8.h, bottom: 8.h), child: Column( @@ -189,7 +175,7 @@ class _OrderCommodity extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - productList.skuImg, + productList.skuImg ?? "", width: 49, height: 49, fit: BoxFit.cover, @@ -209,7 +195,7 @@ class _OrderCommodity extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - productList.productName, + productList.productName ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -222,9 +208,7 @@ class _OrderCommodity extends State { height: 4.h, ), Text( - productList.skuNameStr != null - ? "${productList.skuNameStr ?? ""}" - : "", + "${productList.skuNameStr ?? ""}", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 10.sp, @@ -247,18 +231,18 @@ class _OrderCommodity extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - productList.buyNum > 1 - ? S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - AppUtils.stringAsFixedDouble2((double.tryParse(productList.discountAmount ?? "0") / productList.buyNum)))) - : S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - double.tryParse(productList.discountAmount ?? "0"))), + (productList.buyNum ?? 0) > 1 + ? S.of(context).yuan_(AppUtils.calculateDouble((double.tryParse("${productList.sellPrice}") ?? 0) - AppUtils.stringAsFixedDouble2(((double.tryParse("${productList.discountAmount}") ?? 0) / (productList.buyNum ?? 1))))) + : S.of(context).yuan_(AppUtils.calculateDouble((double.tryParse("${productList.sellPrice}") ?? 0) - (double.tryParse("${productList.discountAmount}") ?? 0))), style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14.sp, color: Color(0xFF4C4C4C), ), ), - if (productList.discountAmount != null && productList.discountAmount != "0") + if (productList.discountAmount != "0") Text( - S.of(context).yuan_(productList.sellPrice), + S.of(context).yuan_("${productList.sellPrice}"), style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 12.sp, @@ -271,15 +255,15 @@ class _OrderCommodity extends State { ), ], ), - if (productList.setMealDataList.length != 0) + if (productList.setMealDataList?.isNotEmpty ?? false) ListView.builder( - itemCount: productList.setMealDataList.length, + itemCount: productList.setMealDataList?.length ?? 0, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), shrinkWrap: true, padding: EdgeInsets.zero, itemBuilder: (context, index) { - return orderMealsItem(productList.setMealDataList[index]); + return orderMealsItem(productList.setMealDataList![index]); }, ), ], @@ -287,8 +271,8 @@ class _OrderCommodity extends State { ); } - Widget orderMealsItem(SetMealDataList setMealDataList) { - return Column(children: setMealDataList.productInfoList.map((e) { + Widget orderMealsItem(SetMealData setMealDataList) { + return Column(children: setMealDataList.productInfoList?.map((e) { return Container( margin: EdgeInsets.symmetric( vertical: 10.h, @@ -298,7 +282,7 @@ class _OrderCommodity extends State { Expanded( flex: 2, child: Text( - e.productName, + e.productName ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -334,7 +318,7 @@ class _OrderCommodity extends State { ], ), ); - }).toList(),); + }).toList() ?? [],); } Widget discountItem(Color color, textName, condition, amount) { @@ -499,12 +483,10 @@ class _OrderCommodity extends State { String buyNumAllGoods(){ int count = 0; - if(widget.orderInfo != null){ - widget.orderInfo.productList.forEach((element) { - count += element.buyNum; - }); - } - return count.toString(); + widget.orderInfo?.productList?.forEach((element) { + count += (element.buyNum ?? 0); + }); + return count.toString(); } Widget buildTotalPrice() { @@ -521,7 +503,8 @@ class _OrderCommodity extends State { style: TextStyle( fontSize: 10.sp, color: Color(0xFFA29E9E), - fontWeight: MyFontWeight.semi_bold), + fontWeight: MyFontWeight.semi_bold, + ), ), flex: 1, ), @@ -544,14 +527,15 @@ class _OrderCommodity extends State { style: TextStyle( fontSize: 12.sp, color: Color(0xFF353535), - fontWeight: MyFontWeight.semi_bold), + fontWeight: MyFontWeight.semi_bold, + ), ), ), SizedBox( width: 5.w, ), Text( - "${widget.orderInfo.orderDetail.paySumPrice}" + "${widget.orderInfo?.orderDetail?.paySumPrice}" /*totalPrice()*/, textAlign: TextAlign.end, style: TextStyle( @@ -565,15 +549,11 @@ class _OrderCommodity extends State { ); } - String totalPrice() { - if (widget.orderInfo == null) return ""; - double totalPrice = (double.tryParse(widget.orderInfo.orderSum) + - double.tryParse(widget.orderInfo.postFee)); - if (widget.orderInfo.orderDetail != null && - widget.orderInfo.orderDetail.couponDTO != null) { - totalPrice -= - double.tryParse(widget.orderInfo.orderDetail.couponDTO.money); - } - return "$totalPrice"; - } + // String totalPrice() { + // double totalPrice = (double.tryParse(widget.orderInfo.orderSum) + + // double.tryParse(widget.orderInfo.postFee)); + // totalPrice -= + // double.tryParse(widget.orderInfo.orderDetail.couponDTO.money); + // return "$totalPrice"; + // } } diff --git a/lib/order/order_view/order_info.dart b/lib/order/order_view/order_info.dart index b279e6a9..4c53b0a1 100644 --- a/lib/order/order_view/order_info.dart +++ b/lib/order/order_view/order_info.dart @@ -3,11 +3,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; +import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/utils/font_weight.dart'; class OrderInfoView extends StatefulWidget { - final OrderInfo orderInfo; + final OrderInfo? orderInfo; final int isTakeOut; OrderInfoView(this.orderInfo,this.isTakeOut); @@ -41,23 +41,20 @@ class _OrderInfoView extends State { ), child: Column( children: [ - orderInfoItem( - S.of(context).dingdanhao, widget.orderInfo != null ? widget.orderInfo.id : ""), + orderInfoItem(S.of(context).dingdanhao, widget.orderInfo?.id ?? ""), orderInfoItem(S.of(context).xiadanshijian, - widget.orderInfo != null ? widget.orderInfo.createTime : ""), + widget.orderInfo != null ? widget.orderInfo?.createTime : ""), orderInfoItem(S.of(context).peisongfangshi, widget.isTakeOut == 0 - ? S.of(context).ziqu : widget.isTakeOut == 3 ? "打包":widget.isTakeOut == 4?"堂食":((widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送")), + ? S.of(context).ziqu : widget.isTakeOut == 3 ? "打包":widget.isTakeOut == 4?"堂食":(widget.orderInfo?.logisticsName ?? "美团配送")), // orderInfoItem(S.of(context).peisongfangshi,"美团配送"), - if(widget.orderInfo != null && widget.orderInfo.logisticsNum != "" ) - orderInfoItem("物流单号", - widget.orderInfo != null ? widget.orderInfo.logisticsNum : ""), - if(widget?.orderInfo?.subcribeTime != null && widget?.orderInfo?.subcribeTime != "") - orderInfoItem("预约时间", - widget.orderInfo != null ? widget.orderInfo.subcribeTime : ""), + if(widget.orderInfo?.logisticsNum?.isNotEmpty ?? false) + orderInfoItem("物流单号", widget.orderInfo?.logisticsNum ?? ""), + if(widget.orderInfo?.subcribeTime?.isNotEmpty ?? false) + orderInfoItem("预约时间", widget.orderInfo?.subcribeTime ?? ""), orderInfoItem( S.of(context).beizhuxinxi, widget.orderInfo != null - ? widget.orderInfo.notes ?? S.of(context).qingshurubeizhuyaoqiu + ? (widget.orderInfo?.notes ?? S.of(context).qingshurubeizhuyaoqiu) : S.of(context).qingshurubeizhuyaoqiu), // orderInfoItem(S.of(context).zhifufangshi, // widget.orderInfo != null ? payChannel() : S.of(context).yue), @@ -68,7 +65,7 @@ class _OrderInfoView extends State { String payChannel() { - switch (widget.orderInfo.payChannel) { + switch (widget.orderInfo?.payChannel) { case 0: return "现金支付"; case 1: diff --git a/lib/order/order_view/order_pay_selected.dart b/lib/order/order_view/order_pay_selected.dart index 2d442531..2ac7b171 100644 --- a/lib/order/order_view/order_pay_selected.dart +++ b/lib/order/order_view/order_pay_selected.dart @@ -3,8 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; -import '../../retrofit/data/settleOrderInfo.dart'; -import '../../retrofit/data/user_info.dart'; +import '../../data/user_info.dart'; class OrderPaySelected extends StatefulWidget { final UserInfo userInfo; @@ -42,7 +41,8 @@ class _OrderPaySelected extends State { color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(8), - topRight: Radius.circular(8),), + topRight: Radius.circular(8), + ), ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -83,7 +83,8 @@ class _OrderPaySelected extends State { fontWeight: MyFontWeight.semi_bold, ), ), - ),), + ), + ), checkView(1), ], ), @@ -113,7 +114,8 @@ class _OrderPaySelected extends State { color: Color(0xff353535), fontWeight: MyFontWeight.semi_bold,), ), - ),), + ), + ), checkView(2), ], ), diff --git a/lib/order/order_view/order_status.dart b/lib/order/order_view/order_status.dart index 5f995898..b506db70 100644 --- a/lib/order/order_view/order_status.dart +++ b/lib/order/order_view/order_status.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; +import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; @@ -18,7 +18,7 @@ class OrderStatus extends StatefulWidget { final int refundStatus; final String title; final String center; - final OrderInfo orderInfo; + final OrderInfo? orderInfo; OrderStatus(this.orderStatus, this.isTakeOut, this.sendStatus, this.payStatus, this.refundStatus, this.title, this.center, this.orderInfo); @@ -30,8 +30,8 @@ class OrderStatus extends StatefulWidget { } class _OrderStatus extends State with SingleTickerProviderStateMixin{ - AnimationController _controller; - Animation _animation; + late AnimationController _controller; + late Animation _animation; @override void initState() { @@ -92,24 +92,23 @@ class _OrderStatus extends State with SingleTickerProviderStateMixi MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - if(widget.orderInfo !=null) RoundButton( - text: widget.isTakeOut == 0 - ? S.of(context).ziqu - : widget.isTakeOut == 4 ? "堂食" - :widget.isTakeOut == 3 ? "打包" - :(widget.isTakeOut == 1 - ? S.of(context).waimai - : "物流"), - width: 46.w * AppUtils.textScale(context), - height: 20.h * AppUtils.textScale(context), - textColor: Color(0xFF32A060), - fontSize: 14.sp, - padding: - EdgeInsets.symmetric(horizontal:8), - backgroup: Color(0xFFFFFFFF), - radius: 15.w, - ), + text: widget.isTakeOut == 0 + ? S.of(context).ziqu + : widget.isTakeOut == 4 ? "堂食" + :widget.isTakeOut == 3 ? "打包" + :(widget.isTakeOut == 1 + ? S.of(context).waimai + : "物流"), + width: 46.w * AppUtils.textScale(context), + height: 20.h * AppUtils.textScale(context), + textColor: Color(0xFF32A060), + fontSize: 14.sp, + padding: + EdgeInsets.symmetric(horizontal:8), + backgroup: Color(0xFFFFFFFF), + radius: 15.w, + ), Row( mainAxisAlignment:MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, @@ -143,7 +142,7 @@ class _OrderStatus extends State with SingleTickerProviderStateMixi borderRadius: BorderRadius.circular(15), ), child: Text( - S.of(context).qudanhao(": " + widget.orderInfo.dayFlowCode), + S.of(context).qudanhao(": ${widget.orderInfo?.dayFlowCode}"), style: TextStyle( color:Colors.white, fontFamily: 'JDZhengHT', @@ -158,7 +157,7 @@ class _OrderStatus extends State with SingleTickerProviderStateMixi (widget.title == "商家正在配餐" || widget.title == "订单待发货"|| widget.title == "商家已发货") ? AnimatedBuilder( animation: _animation, - builder: (BuildContext context, Widget child) { + builder: (BuildContext context, Widget? child) { return Transform.rotate( angle: _animation.value * 1 * 3.14159, child: Image.asset( @@ -210,12 +209,10 @@ class _OrderStatus extends State with SingleTickerProviderStateMixi List timeWidget() { - if (widget.orderInfo == null) return []; String hour = ""; String minute = ""; if (widget.payStatus == 0) { - String hourMinute = AppUtils.getHourMinuteAfter30mByString( - (widget.orderInfo != null) ? widget.orderInfo.createTime : ""); + String hourMinute = AppUtils.getHourMinuteAfter30mByString(widget.orderInfo?.createTime ?? ""); var hourMinutes = hourMinute.split(":"); hour = hourMinutes[0]; minute = hourMinutes[1]; @@ -224,8 +221,8 @@ class _OrderStatus extends State with SingleTickerProviderStateMixi } else if (widget.isTakeOut == 1) { if (widget.sendStatus == 2 || widget.sendStatus == 3) { String hourMinute = AppUtils.getHourMinuteByString( - (widget.orderInfo != null && widget.orderInfo.orderDetail != null) - ? widget.orderInfo.orderDetail.predictTime + (widget.orderInfo?.orderDetail != null) + ? widget.orderInfo!.orderDetail!.predictTime : ""); var hourMinutes = hourMinute.split(":"); hour = hourMinutes[0]; @@ -255,7 +252,7 @@ class _OrderStatus extends State with SingleTickerProviderStateMixi fontWeight: FontWeight.bold, borderColor: Colors.white, borderWidth: 1, - // padding: EdgeInsets.all(2), + padding: EdgeInsets.all(1), ), ), ), @@ -281,7 +278,7 @@ class _OrderStatus extends State with SingleTickerProviderStateMixi fontWeight: FontWeight.bold, borderColor: Colors.white, borderWidth: 1, - // padding: EdgeInsets.all(2), + padding: EdgeInsets.all(1), ), ), ]; diff --git a/lib/order/store_selector_page.dart b/lib/order/store_selector_page.dart index e97c7aa6..fd76cebf 100644 --- a/lib/order/store_selector_page.dart +++ b/lib/order/store_selector_page.dart @@ -1,30 +1,18 @@ -import 'dart:io'; -import 'package:android_intent_plus/android_intent.dart'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; -import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; -import 'package:flutter_bmflocation/flutter_bmflocation.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/store.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/icon_text.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:huixiang/view_widget/request_permission.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../view_widget/no_data_view.dart'; class StoreSelectorPage extends StatefulWidget { - final Map arguments; + final Map? arguments; ///兑换订单 StoreSelectorPage({this.arguments}); @@ -36,32 +24,22 @@ class StoreSelectorPage extends StatefulWidget { } class _StoreSelectorPage extends State { - ApiService apiService; - List exchangeStoreList; + ApiService? apiService; + List? exchangeStoreList; @override void initState() { super.initState(); - exchangeShop(widget.arguments["creditGoodsId"]); + exchangeShop(widget.arguments?["creditGoodsId"]); } ///兑换门店列表 exchangeShop(creditGoodsId) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - showLoading: true, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService - .storeListByCreditId(creditGoodsId) + BaseData>? baseData = await apiService?.storeListByCreditId(creditGoodsId) .catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState((){ - exchangeStoreList = baseData.data; + exchangeStoreList = baseData!.data; }); } } @@ -81,7 +59,7 @@ class _StoreSelectorPage extends State { child: Column( children: [ Expanded( - child: (exchangeStoreList == null || exchangeStoreList.length == 0) + child: (exchangeStoreList?.length == 0) ? NoDataView( src: "assets/image/xiao_fei.webp", isShowBtn: false, @@ -90,7 +68,7 @@ class _StoreSelectorPage extends State { margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), ) : ListView.builder( - itemCount: exchangeStoreList != null ? exchangeStoreList.length : 0, + itemCount: exchangeStoreList?.length ?? 0, physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return GestureDetector( @@ -99,21 +77,17 @@ class _StoreSelectorPage extends State { groupValue = position; }); }, - child: buildStoreItem(exchangeStoreList[position], position), + child: buildStoreItem(exchangeStoreList![position], position), ); - }), + }, + ), ), InkWell( onTap: () { - if (groupValue == null) { - SmartDialog.showToast(S.of(context).qingxuanzeyigemendian, - alignment: Alignment.center); - return; - } - Store store = exchangeStoreList[groupValue]; + Store? store = exchangeStoreList?[groupValue]; Navigator.of(context).pop({ - "id": store.id, - "address": store.address, + "id": store?.id, + "address": store?.address, }); }, child: Container( @@ -166,7 +140,7 @@ class _StoreSelectorPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - store.storeName, + store.storeName ?? "", style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.semi_bold, @@ -177,7 +151,7 @@ class _StoreSelectorPage extends State { height: 12.h, ), IconText( - store.address, + store.address ?? "", isMax: true, textAxisAlignment: CrossAxisAlignment.start, textStyle: TextStyle( @@ -206,13 +180,13 @@ class _StoreSelectorPage extends State { ], ), ), - Radio( + Radio( value: position, groupValue: groupValue, activeColor: Colors.green, onChanged: (value) { setState(() { - groupValue = value; + groupValue = value ?? position; }); }, ) diff --git a/lib/order/write_off_page.dart b/lib/order/write_off_page.dart index 98812535..f73b229c 100644 --- a/lib/order/write_off_page.dart +++ b/lib/order/write_off_page.dart @@ -1,22 +1,17 @@ -import 'dart:convert'; -import 'package:barcode_widget/barcode_widget.dart'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/coupon_detail.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/coupon_detail.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/separator.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:qr_flutter/qr_flutter.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import '../view_widget/classic_header.dart'; import '../view_widget/my_footer.dart'; @@ -33,9 +28,9 @@ class WriteOffPage extends StatefulWidget { } class _WriteOffPage extends State { - Coupon coupon; - ApiService apiService; - CouponDetail queryCoupon; + Coupon? coupon; + ApiService? apiService; + CouponDetail? queryCoupon; final RefreshController refreshController = RefreshController(); @override @@ -45,23 +40,15 @@ class _WriteOffPage extends State { coupon = widget.arguments["coupon"]; if (mounted) setState(() {}); - queryCouponDetail(coupon.memberCouponId); + queryCouponDetail(coupon?.memberCouponId); } ///查询核销券状态/查询优惠券详情 queryCouponDetail(memberCouponId) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.couponDetail(memberCouponId); - if (baseData != null && baseData.isSuccess) { - queryCoupon = baseData.data; - if(queryCoupon.status==2){ + BaseData? baseData = await apiService?.couponDetail(memberCouponId); + if (baseData?.isSuccess ?? false) { + queryCoupon = baseData!.data; + if(queryCoupon?.status==2){ Navigator.of(context).pop(true); } // else Future.delayed(Duration(seconds: 15), () { @@ -69,7 +56,7 @@ class _WriteOffPage extends State { // }); // setState(() {}); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -126,7 +113,7 @@ class _WriteOffPage extends State { child: Column( children: [ Text( - coupon != null ? coupon.couponName : "", + coupon?.couponName ?? "", style: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.bold, @@ -136,8 +123,8 @@ class _WriteOffPage extends State { height:11.h, ), Text( - (coupon.useStartTime == null || coupon.useEndTime == null) ? "" : S.of(context).youxiaoqi( - "${coupon.useStartTime.replaceAll("-", ".").split(" ")[0]}-${coupon.useEndTime.replaceAll("-", ".").split(" ")[0]}"), + (coupon?.useEndTime == null) ? "" : S.of(context).youxiaoqi( + "${coupon?.useStartTime?.replaceAll("-", ".").split(" ")[0]}-${coupon?.useEndTime?.replaceAll("-", ".").split(" ")[0]}"), style: TextStyle( fontSize: 12.sp, color: Color(0xFF353535), @@ -201,12 +188,14 @@ class _WriteOffPage extends State { SizedBox( height: 16.h, ), - Expanded(child: QrImage( - data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon.memberCouponId}\"}", - version: QrVersions.auto, - size: 250.w, - gapless: true, - ),), + Expanded( + child: QrImageView( + data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon?.memberCouponId}\"}", + version: QrVersions.auto, + size: 250.w, + gapless: true, + ), + ), SizedBox( height: 35.h, ), @@ -558,15 +547,7 @@ class _WriteOffPage extends State { ), Container( child: Html( - data: - coupon != null ? coupon.remark : "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, + data: coupon?.remark ?? "", ), ) ], diff --git a/lib/qr/invite_friends.dart b/lib/qr/invite_friends.dart index 025656a3..f26591bc 100644 --- a/lib/qr/invite_friends.dart +++ b/lib/qr/invite_friends.dart @@ -1,15 +1,12 @@ import 'dart:convert'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/invitation_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/invitation.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -31,20 +28,21 @@ class InviteFriends extends StatefulWidget { } class _InviteFriends extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); final ScrollController scrollController = ScrollController(); - List invitationList = []; - UserInfo userInfo; + List invitationList = []; + UserInfo? userInfo; int pageNum = 1; - String phone = ""; + String? phone = ""; @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) { - if (value.getString('user') != null && value.getString('user') != "") { - phone = UserInfo.fromJson(jsonDecode(value.getString('user'))).inviteCode; + String? user = value.getString('user'); + if (user?.isNotEmpty ?? false) { + phone = UserInfo.fromJson(jsonDecode(user!)).inviteCode; setState(() {}); } queryUserInfo(); @@ -54,27 +52,20 @@ class _InviteFriends extends State { ///邀请记录 queryInviteMember() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = - await apiService.inviteMemberList({ + BaseData>? baseData = await apiService?.inviteMemberList({ "searchKey": "", "pageNum": 1, "pageSize": 100, }).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - if (pageNum == 1) { - invitationList.clear(); + if (baseData?.isSuccess ?? false) { + if (baseData!.data != null && (baseData.data!.list?.isNotEmpty ?? false)) { + if (pageNum == 1) { + invitationList.clear(); + } + invitationList.addAll(baseData.data!.list!); } - invitationList.addAll(baseData.data.list); setState(() { refreshController.refreshCompleted(); }); @@ -85,25 +76,16 @@ class _InviteFriends extends State { ///查询用户信息 queryUserInfo() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseDate = - await apiService.queryInfo().catchError((onError) { + BaseData? baseDate = await apiService?.queryInfo().catchError((onError) { refreshController.refreshFailed(); }); - if (baseDate != null && baseDate.isSuccess) { + if (baseDate?.isSuccess ?? false) { setState(() { - userInfo = baseDate.data; + userInfo = baseDate!.data; }); SharedPreferences.getInstance().then( (value) => { - value.setString('user', jsonEncode(baseDate.data)), + value.setString('user', jsonEncode(baseDate!.data)), }, ); refreshController.refreshCompleted(); @@ -662,7 +644,7 @@ class _InviteFriends extends State { Expanded(child:Column( children: [ Text( - (userInfo?.todayInviteNumber ?? 0).toString(), + "${userInfo?.todayInviteNumber ?? 0}", style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 25.sp, @@ -683,7 +665,7 @@ class _InviteFriends extends State { Expanded(child:Column( children: [ Text( - (userInfo?.inviteNumber ?? 0).toString(), + "${userInfo?.inviteNumber ?? 0}", style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 25.sp, @@ -766,7 +748,7 @@ class _InviteFriends extends State { ), ],),), SizedBox(height:12.h,), - (invitationList.length == null || invitationList.length == 0) + (invitationList.length == 0) ? NoDataView( src: "assets/image/ding_dan.webp", isShowBtn: false, @@ -792,7 +774,7 @@ class _InviteFriends extends State { ); } - Widget mineInviteItem(InvitationList invitationList){ + Widget mineInviteItem(Invitation invitationList){ return Container( child:Column( children: [ @@ -801,7 +783,7 @@ class _InviteFriends extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - AppUtils.phoneEncode(invitationList?.phone ?? ""), + AppUtils.phoneEncode(invitationList.phone ?? ""), style: TextStyle( color: Color(0xFF000000), fontSize: 12.sp, @@ -809,7 +791,7 @@ class _InviteFriends extends State { ), ), Text( - invitationList?.createTime ?? "", + invitationList.createTime ?? "", style: TextStyle( color: Color(0xFF000000), fontSize: 12.sp, diff --git a/lib/qr/qr_code_scan.dart b/lib/qr/qr_code_scan.dart index fbee0778..86abe0da 100644 --- a/lib/qr/qr_code_scan.dart +++ b/lib/qr/qr_code_scan.dart @@ -39,7 +39,7 @@ class _QrCodeScanPage extends State { scanAreaScale: 0.7, scanLineColor: Colors.green.shade400, onCapture: (data) { - if (data != null && data != "") { + if (data != "") { Navigator.of(context).pop(data); } }, @@ -152,9 +152,9 @@ class _QrCodeScanPage extends State { enableCrop: false, ), ); - if (medias != null && medias.length > 0) { - String result = await Scan.parse(medias[0].path); - if (result != null && result != "") { + if (medias.length > 0) { + String? result = await Scan.parse("${medias[0].path}"); + if (result?.isNotEmpty ?? false) { Navigator.of(context).pop(result); } } @@ -162,9 +162,7 @@ class _QrCodeScanPage extends State { @override void dispose() { - if (this.controller != null) { - this.controller.pause(); - } - super.dispose(); + this.controller.pause(); + super.dispose(); } } diff --git a/lib/qr/qr_share.dart b/lib/qr/qr_share.dart index 8d5ea55f..fbd43ff1 100644 --- a/lib/qr/qr_share.dart +++ b/lib/qr/qr_share.dart @@ -1,16 +1,14 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/qr/qr_share_image.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:qr_flutter/qr_flutter.dart'; import 'package:shared_preferences/shared_preferences.dart'; class QrSharePage extends StatefulWidget { @@ -21,16 +19,16 @@ class QrSharePage extends StatefulWidget { } class _QrSharePage extends State { - String phone = ""; + String? phone = ""; @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) { - if (value.getString('user') != null && value.getString('user') != "") { - phone = - UserInfo.fromJson(jsonDecode(value.getString('user'))).inviteCode; + String? user = value.getString('user'); + if (user?.isNotEmpty ?? false) { + phone = UserInfo.fromJson(jsonDecode(user!)).inviteCode; setState(() {}); } }); @@ -46,7 +44,7 @@ class _QrSharePage extends State { @override Widget build(BuildContext context) { - if (height == null || height == 0) + if (height == 0) height = MediaQuery.of(context).size.height; return Scaffold( appBar: MyAppBar( @@ -59,9 +57,9 @@ class _QrSharePage extends State { margin: EdgeInsets.only(right: 16.w), child: InkWell( onTap: () { - if (phone == null || phone == "") return; + if (phone?.isEmpty ?? true) return; SmartDialog.show( - widget: QrShareImagePage(phone), + widget: QrShareImagePage(phone!), clickBgDismissTemp: true, isPenetrateTemp: false, ); @@ -119,7 +117,7 @@ class _QrSharePage extends State { child: GestureDetector( child: SelectableText( // S.of(context).baocunsaoma, - phone, + phone ?? "", textAlign: TextAlign.center, style: TextStyle( color: Color(0xFF2E3552), @@ -215,11 +213,10 @@ class _QrSharePage extends State { ); } - Image image; - double height; + double height = 0; buildImageInfo() async { - image = Image.asset("assets/image/qr_share_bg_yq.webp"); + Image image = Image.asset("assets/image/qr_share_bg_yq.webp"); image.image .resolve(ImageConfiguration()) .addListener(ImageStreamListener((ImageInfo info, bool _) { @@ -228,8 +225,10 @@ class _QrSharePage extends State { })); } - copy(String phone) { - print("..." + phone); - Clipboard.setData(ClipboardData(text: phone)); + copy(String? phone) { + if (phone?.isEmpty ?? true) { + return; + } + Clipboard.setData(ClipboardData(text: phone!)); } } diff --git a/lib/qr/qr_share_image.dart b/lib/qr/qr_share_image.dart index 861a56ac..b7bf6ef6 100644 --- a/lib/qr/qr_share_image.dart +++ b/lib/qr/qr_share_image.dart @@ -197,54 +197,53 @@ class _QrShareImagePage extends State { GlobalKey globalKey = GlobalKey(); widgetToImage() async { - BuildContext buildContext = globalKey.currentContext; - if (null != buildContext) { - RenderRepaintBoundary boundary = buildContext.findRenderObject(); - ui.Image image = await boundary.toImage(pixelRatio: 3); - ByteData byteData = - await image.toByteData(format: ui.ImageByteFormat.png); - - String filePath = ""; - if (Platform.isAndroid) { - filePath = (await getExternalStorageDirectory()).path; - } else { - filePath = (await getApplicationDocumentsDirectory()).path; - } - filePath = "$filePath/${DateTime.now().millisecondsSinceEpoch}.webp"; + BuildContext? buildContext = globalKey.currentContext; + RenderRepaintBoundary? boundary = buildContext?.findRenderObject() as RenderRepaintBoundary?; + ui.Image? image = await boundary?.toImage(pixelRatio: 3); + ByteData? byteData = await image?.toByteData(format: ui.ImageByteFormat.png); + if (byteData == null) { + return; + } + String filePath = ""; + if (Platform.isAndroid) { + filePath = (await getExternalStorageDirectory())?.path ?? ""; + } else { + filePath = (await getApplicationDocumentsDirectory()).path; + } + filePath = "$filePath/${DateTime.now().millisecondsSinceEpoch}.webp"; - File file = File(filePath); - if (!file.existsSync()) { - file.createSync(); - print("object: ${file.path}"); - } - file.writeAsBytesSync(byteData.buffer.asUint8List()); + File file = File(filePath); + if (!file.existsSync()) { + file.createSync(); + print("object: ${file.path}"); + } + file.writeAsBytesSync(byteData!.buffer.asUint8List()); - SSDKMap params = SSDKMap() - ..setGeneral( - "", - "", - [ - file.path, - ], - "", + SSDKMap params = SSDKMap() + ..setGeneral( + "", + "", + [ file.path, - "", - "", - "", - "", - "", - SSDKContentTypes.image, - ); + ], + "", + file.path, + "", + "", + "", + "", + "", + SSDKContentTypes.image, + ); - SharesdkPlugin.share(ShareSDKPlatforms.wechatSession, params, - (state, userData, contentEntity, error) { - print("share state !$state"); - print("share userData !$userData"); - print("share contentEntity !$contentEntity"); - print("share error !$error"); - }); + SharesdkPlugin.share(ShareSDKPlatforms.wechatSession, params, + (state, userData, contentEntity, error) { + print("share state !$state"); + print("share userData !$userData"); + print("share contentEntity !$contentEntity"); + print("share error !$error"); + }); } - } copy(String str) { print(str); diff --git a/lib/retrofit/business_api.dart b/lib/retrofit/business_api.dart deleted file mode 100644 index bd2b9a1a..00000000 --- a/lib/retrofit/business_api.dart +++ /dev/null @@ -1,452 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:dio/dio.dart'; -import 'package:dio_log/interceptor/dio_log_interceptor.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/day_count.dart'; -import 'package:huixiang/retrofit/data/order_trend.dart'; -import 'package:huixiang/retrofit/data/vip_counts_info.dart'; -import 'package:retrofit/retrofit.dart'; - -import '../login/captcha/click_word_captcha.dart'; -import 'data/add_vip_info.dart'; -import 'data/balance_change_list.dart'; -import 'data/balance_consumption_ranking_list.dart'; -import 'data/base_data.dart'; -import 'data/bus_recharge_list.dart'; -import 'data/business_goods.dart'; -import 'data/business_order_detail_info.dart'; -import 'data/business_order_list.dart'; -import 'data/business_store_list.dart'; -import 'data/business_vip_list.dart'; -import 'data/clerk_manage_list.dart'; -import 'data/day_flow_list.dart'; -import 'data/goods_category_list.dart'; -import 'data/goods_type_sales_list.dart'; -import 'data/order_user_detail.dart'; -import 'data/phone_query_member_info.dart'; -import 'data/popular_sales_list.dart'; -import 'data/product_group_list.dart'; -import 'data/recharge_flow_list.dart'; -import 'data/refund_reason_list.dart'; -import 'data/service_bug_list.dart'; -import 'data/single_sales_list.dart'; -import 'data/store_time_info_list.dart'; -import 'data/store_total_money_info.dart'; -import 'data/tenant_info.dart'; -import 'data/tenant_package_calculate_details.dart'; -import 'data/tenant_package_list.dart'; -import 'data/ticket_details.dart'; -import 'data/ticket_record.dart'; -import 'data/ticket_show.dart'; -import 'data/ticket_stats_list.dart'; -import 'data/trade_summary_list.dart'; -import 'data/upload_result.dart'; -import 'data/user_info_edit.dart'; -import 'data/vip_record_details_list.dart'; - -part 'business_api.g.dart'; - -///本地 -const localBaseUrl = "http://admin-api.test.yixinhuixiang.com/"; - -///测试 -// const localBaseUrl = "http://pos-test.admin.api.lotus-wallet.com/"; - -///线上 -const serviceBaseUrl = "http://pos.tenant.lotus-wallet.com/test-merchant/"; - -@RestApi(baseUrl: localBaseUrl) -abstract class BusinessApiService { - factory BusinessApiService( - Dio dio, { - String baseUrl, - BuildContext context, - String token, - bool showLoading = false, - String url, - String tenant, - String storeId, - bool showErrorToast = true, - bool pay = false, - }) { - Map headers = - (token == null || token == "") ? {} : {'token': "Bearer $token"}; - if (pay == true) { - headers["Environment"] = "app"; - } - if (tenant != null && tenant != "") { - headers["tenant"] = tenant; - } - if (storeId != null && storeId != "") { - headers["store-id"] = storeId; - } - if (kReleaseMode) baseUrl = serviceBaseUrl; - if (url != null) baseUrl = url; - dio.options = BaseOptions( - connectTimeout: 30000, - receiveTimeout: 30000, - headers: headers, - responseType: ResponseType.json, - baseUrl: baseUrl, - ); - dio.interceptors.add(DioLogInterceptor()); - dio.interceptors.add( - InterceptorsWrapper(onRequest: (RequestOptions options) { - debugPrint("\n======================= 请求数据 ======================="); - debugPrint("method = ${options.method.toString()}"); - debugPrint("url = ${options.uri.toString()}"); - debugPrint("headers = ${options.headers}"); - if (showLoading && !EasyLoading.isShow) { - //是否显示loading - EasyLoading.show(status: "正在加载..."); - } - if (options.data is FormData) { - debugPrint("params data = FormData"); - } else { - debugPrint("params data = ${jsonEncode(options.data)}"); - } - debugPrint("params queryParameters = ${options.queryParameters}"); - }, onResponse: (Response response) { - if (showLoading && EasyLoading.isShow) EasyLoading.dismiss(); - debugPrint("\n======================= 响应数据开始 ======================="); - debugPrint("code = ${response.statusCode}"); - p(jsonEncode(response.data)); - - // debugPrint(jsonEncode(response.data), wrapWidth: response.data.toString().length * 10); - - Map map = response.data; - // if (map["code"] != 0) { - // EasyLoading.dismiss(); - // } - // if (map["code"] == 40005 || map["code"] == 40001) { - // if (!LoginTipsDialog().isShow) { - // print("show: ${LoginTipsDialog().isShow}"); - // LoginTipsDialog().show(context); - // } - // } - if (showErrorToast && - map["code"] == 404 && - (map["msg"] ?? map["message"]) != null) { - SmartDialog.showToast(map["msg"] ?? map["message"], - alignment: Alignment.center); - } - debugPrint("======================= 响应数据结束 =======================\n"); - }, onError: (DioError e) { - if (EasyLoading.isShow) EasyLoading.dismiss(); - // SmartDialog.showToast("网络错误,请切换网络或稍后再试!", alignment: Alignment.center); - // SmartDialog.showToast(AppUtils.dioErrorTypeToString(e.type), - // alignment: Alignment.center); - debugPrint("\n======================= 错误响应数据 ======================="); - debugPrint("type = ${e.type}"); - debugPrint("message = ${e.message}"); - debugPrint("\n"); - }), - ); - return _BusinessApiService(dio, baseUrl: baseUrl); - } - - void dispose(); - - static void p(String msg) { - //因为String的length是字符数量不是字节数量所以为了防止中文字符过多, - // 把4*1024的MAX字节打印长度改为1000字符数 - int maxStrLength = 900; - //大于1000时 - while (msg.length > maxStrLength) { - debugPrint(msg.substring(0, maxStrLength), wrapWidth: maxStrLength); - msg = msg.substring(maxStrLength); - } - //剩余部分 - debugPrint(msg, wrapWidth: maxStrLength); - } - - /// 获取认证token/管理系统登录 - @POST("anno/token") - Future annoToken(@Body() Map param); - - ///加载验证码 - @POST("/captcha/get") - Future captchaGet(@Body() Map param); - - ///校验验证码 - @POST("/captcha/check") - Future captchaCheck(@Body() Map param); - - ///发送验证码 - @POST("auth/sendVerify") - Future> busSendVerify(@Body() Map param); - - ///注册 - @POST("auth/tenantAppLogin") - Future tenantAppLogin(@Body() Map param); - - ///找回密码 - @POST("auth/tenantUserChangePsd") - Future tenantUserChangePsd(@Body() Map param); - - /// 当日各种金额统计 - @POST("comprehensiveReport/getDayCounts") - Future> getDayCounts(@Body() Map param); - - ///商家概览/热销榜单,当天传0,昨天传1,最近7天传7,最近30天传30 - @GET("dashBoard/store/?offsetDay={offsetDay}") - Future> popularList( - @Path("offsetDay") String offsetDay); - - ///生意总览/订单量趋势 - @GET("trend/orderTrend") - Future>> orderTrend(); - - ///会员数量统计/用户概览 - @GET("largeScreenReport/getDayCounts?date={date}") - Future> vipCounts(@Path("date") String date); - - ///今日流水/isMonth=0(当月数据),isMonth=1(当日数据) - @GET("dashBoard/order?yearMonth={yearMonth}&isMonth={isMonth}") - Future>> dayFlow( - @Path("yearMonth") String yearMonth, @Path("isMonth") String isMonth); - - ///每日单品销量/单品销量报表 - @POST("audit/salesLeaderboard") - Future>> singleSales( - @Body() Map param); - - ///各类商品销售状况统计/商品种类销售数据 - @POST("audit/allKindsSalesStatistics") - Future>> goodsSalesList( - @Body() Map param); - - ///经营分析/查询范围 day week month custom - @POST("largeScreenReport/saleBusinessAnalysis") - Future> saleBusinessAnalysis( - @Body() Map param); - - ///订单列表 - @POST("order/findAdminOrderList") - Future> findAdminOrderList( - @Body() Map param); - - ///订单详情 - @POST("order/getAdminOrderDetail") - Future> getAdminOrderDetail( - @Body() Map param); - - ///退款原因列表 - @POST("reason/page") - Future> refundReason( - @Body() Map param); - - ///申请退款 - @POST("order/refundOrder") - Future refundOrder(@Body() Map param); - - ///商品分页列表查询/商品分组列表 - @POST("productGroup/page") - Future> productGroup( - @Body() Map param); - - ///后台查询商品列表/商品列表 - @POST("product/findAdminProductListNew") - Future> findAdminProductLis( - @Body() Map param); - - ///修改密码 - @PUT("user") - Future modifyPassword(@Body() Map param); - - ///商品上下架 - @POST("product/putStatus") - Future goodsUpdate(@Body() Map param); - - ///商品删除 - @POST("product/delProduct") - Future delProduct(@Body() Map param); - - ///新增或修改商品分组/商品分类-新增分类/编辑分类 - @POST("productGroup/saveProductGroup") - Future saveProductGroup(@Body() Map param); - - ///删除分组分类 - @POST("productGroup/delProductCategory") - Future delProductCategory(@Body() Map param); - - ///门店设置-列表 - @GET( - "store/getStoreList?tenantCode={tenantCode}&pageIndex={pageIndex}&pageSize={pageSize}") - Future> getStoreList( - @Path("tenantCode") String tenantCode, - @Path("pageIndex") String pageIndex, - @Path("pageSize") String pageSize); - - ///编辑门店信息 - @PUT("store") - Future saveStoreInfo(@Body() Map param); - - ///文件上传 - @POST("file/upload") - @MultiPart() - Future> upload( - @Part(name: "file") File data, @Part(name: "folderId") int folderId); - - ///批量核销 - @POST("ticket/wipedBatchs") - Future wipedBatchs(@Body() String param); - - ///商品排序/一键置顶 - @POST("product/productSortTop") - Future productSortTop(@Body() Map param); - - ///票券详情 - @GET("ticket/code/{code}") - Future> ticketCode(@Path("code") String code); - - ///票券列表 - @POST("ticket/showList") - Future> showList(@Body() Map param); - - ///票券核销记录 - @POST("ticket/wipedRecord") - Future> wipedRecord( - @Body() Map param); - - ///票券核销统计 - @POST("ticket/wipedStats") - Future>> wipedStats( - @Body() Map param); - - ///会员列表 - @POST("member/page") - Future> vipDataList( - @Body() Map param); - - ///会员充值流水 - @POST("audit/memberSourceRechargeDetial") - Future> rechargeFlow( - @Body() Map param); - - ///会员余额变动 - @POST("member/getTenantMemberBill") - Future> getTenantMemberBill( - @Body() Map param); - - ///预约设置/店铺信息开启关闭时间 - @GET("store/storeOpenTime/{storeId}") - Future> storeOpenTime( - @Path("storeId") String storeId); - - ///预约信息保存 - @POST("product/updateSubscribe") - Future updateSubscribe(@Body() Map param); - - ///确认扣款 - @POST("order/balancePay") - Future balancePay(@Body() Map param); - - ///订单列表获取用户金额详情 - @GET("order/getOrderUserDetail?orderId={orderId}") - Future> getOrderUserDetail( - @Path("orderId") String storeId); - - ///根据手机号查询会员信息 - @POST("member/queryMemberInfo") - Future> queryMemberInfo( - @Body() Map param); - - ///会员充值列表 - @POST("rechargePreferential/get") - Future> getRechargePreferential( - @Body() Map param); - - ///会员充值支付 - @POST("member/posMemberRecharge") - Future posMemberRecharge(@Body() Map param); - - ///充值订单手动查询 - @POST("member/manualQuery") - Future manualQuery(@Body() Map param); - - ///新增会员 - @GET("member/createMemberSourceByMobile?mobile={mobile}&nickName={nickName}") - Future> createMemberSourceByMobile( - @Path("mobile") String mobile, @Path("nickName") String nickName); - - ///店员列表 - @POST("user/userPage") - Future> clerkList( - @Body() Map param); - - ///添加新店员,店员信息编辑 - @POST("user") - Future> userEdit(@Body() Map param); - - ///删除会员 - @DELETE("user?ids[]={ids}") - Future delUser(@Path("ids") String ids); - - ///修改用户信息 - @PUT("user") - Future> userModify(@Body() Map param); - - ///会员余额统计/消费排名 - @POST("dashBoard/storeMoney") - Future> storeMoney( - @Body() Map param); - - ///会员余额统计(总会员数,总余额数)查询/消费排名(消费会员数量,销售金额)查询 - @POST("dashBoard/storeTotalMoney") - Future> storeTotalMoney( - @Body() Map param); - - ///收银台创建直付订单 - @POST("order/createOrder") - Future createOrder(@Body() Map param); - - ///收银台支付 - @POST("order/prePayOrder") - Future prePayOrder(@Body() Map param); - - ///收银台直付订单手动查询 - @GET("order/queryOrder/{orderId}?login={login}") - Future queryCashierOrder( - @Path("orderId") String orderId, @Path("login") bool login); - - ///会员详情-查询会员消费/充值记录 - @POST("member/getMemberSourceBillDetials") - Future> getMemberSourceBillDetails( - @Body() Map param); - - ///新建商品 - @POST("product/save") - Future productSave(@Body() Map param); - - ///分类查询 - @GET("productCategory/findCategoryListByDepth/1") - Future>> findCategoryListByDepth(); - - ///服务套餐列表 - @GET("tenantApply/tenantPackageList") - Future>> tenantPackage(); - - ///服务套餐包优惠计算 - @POST("tenantApply/tenantPackageCalculate") - Future> tenantPackageCalculate( - @Body() Map param); - - ///服务套餐支付 - @POST("tenantApply/tenantApplyPay") - Future tenantApplyPay(@Body() Map param); - - ///查询商户信息 - @GET("tenant/tenantInfo/{tenantId}") - Future> tenantInfo(@Path("tenantId") String tenantId); - - ///服务购买记录 - @POST("tenantPackage/packageBuyList") - Future> packageBuyList(@Body() Map param); -} diff --git a/lib/retrofit/business_api.g.dart b/lib/retrofit/business_api.g.dart deleted file mode 100644 index d245458f..00000000 --- a/lib/retrofit/business_api.g.dart +++ /dev/null @@ -1,1453 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'business_api.dart'; - -// ************************************************************************** -// RetrofitGenerator -// ************************************************************************** - -class _BusinessApiService implements BusinessApiService { - _BusinessApiService(this._dio, {this.baseUrl}) { - ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= kReleaseMode ? serviceBaseUrl : localBaseUrl; - } - - final Dio _dio; - - String baseUrl; - - @override - void dispose() { - _dio.close(force: true); - } - - @override - Future annoToken(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('anno/token', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future captchaGet(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/captcha/get', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = - (_result.data['repCode'] != '0000' || _result.data['repData'] == null) - ? null - : ClickWordCaptchaModel.fromMap(_result.data['repData']); - return value; - } - - @override - Future captchaCheck(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/captcha/check', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - return (_result.data['repCode'] != '0000' || _result.data['repData'] == null || !_result.data['repData']['result']); - } - - @override - Future> busSendVerify(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('auth/sendVerify', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null :json as dynamic, - ); - return value; - } - - @override - Future tenantAppLogin(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'auth/tenantAppLogin', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null : json, - ); - return value; - } - - @override - Future tenantUserChangePsd(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'auth/tenantUserChangePsd', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null : json, - ); - return value; - } - - @override - Future> getDayCounts(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'comprehensiveReport/getDayCounts', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : DayCount.fromJson(json), - ); - return value; - } - - @override - Future> popularList(offsetDay) async { - ArgumentError.checkNotNull(offsetDay, 'offsetDay'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'dashBoard/store/?offsetDay=$offsetDay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => PopularSalesList.fromJson(json), - ); - return value; - } - - @override - Future>> orderTrend() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('trend/orderTrend', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => OrderTrend.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> vipCounts(date) async { - ArgumentError.checkNotNull(date, 'date'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'largeScreenReport/getDayCounts?date=$date', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => VipCountsInfo.fromJson(json), - ); - return value; - } - - @override - Future>> dayFlow(yearMonth, isMonth) async { - ArgumentError.checkNotNull(yearMonth, 'yearMonth'); - ArgumentError.checkNotNull(isMonth, 'isMonth'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'dashBoard/order?yearMonth=$yearMonth&isMonth=$isMonth', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => DayFlowList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> singleSales(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'audit/salesLeaderboard', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => SingleSalesList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> goodsSalesList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'audit/allKindsSalesStatistics', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => GoodsTypeSalesList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> saleBusinessAnalysis(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'largeScreenReport/saleBusinessAnalysis', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : TradeSummaryList.fromJson(json), - ); - return value; - } - - @override - Future> findAdminOrderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/findAdminOrderList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : BusinessOrderList.fromJson(json), - ); - return value; - } - - @override - Future> getAdminOrderDetail(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/getAdminOrderDetail', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => - (json ?? "") == "" ? null : BusinessOrderDetailInfo.fromJson(json), - ); - return value; - } - - @override - Future> refundReason(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('reason/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : RefundReasonList.fromJson(json), - ); - return value; - } - - @override - Future refundOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/refundOrder', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> productGroup(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'productGroup/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : ProductGroupList.fromJson(json), - ); - return value; - } - - @override - Future> findAdminProductLis(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'product/findAdminProductListNew', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : BusinessGoods.fromJson(json), - ); - return value; - } - - @override - Future modifyPassword(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('user', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future goodsUpdate(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'product/putStatus', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future delProduct(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'product/delProduct', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future saveProductGroup(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'productGroup/saveProductGroup', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future delProductCategory(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'productGroup/delProductCategory', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> getStoreList( - tenantCode, pageIndex, pageSize) async { - ArgumentError.checkNotNull(tenantCode, 'tenantCode'); - ArgumentError.checkNotNull(pageIndex, 'pageIndex'); - ArgumentError.checkNotNull(pageSize, 'pageSize'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'store/getStoreList?tenantCode=$tenantCode&pageIndex=$pageIndex&pageSize=$pageSize', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => BusinessStoreList.fromJson(json), - ); - return value; - } - - @override - Future saveStoreInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('store', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> upload(data, folderId) async { - ArgumentError.checkNotNull(data, 'data'); - ArgumentError.checkNotNull(folderId, 'folderId'); - const _extra = {}; - final queryParameters = {}; - final _data = FormData(); - String fileName = data.path.split(Platform.pathSeparator).last; - _data.files.add(MapEntry( - 'file', MultipartFile.fromFileSync(data.path, filename: fileName))); - print("filename:$fileName"); - if (folderId != null) { - _data.fields.add(MapEntry('folderId', folderId.toString())); - } - final _result = await _dio.request>('/file/upload', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - connectTimeout: 60000, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => UploadResult.fromJson(json), - ); - return value; - } - - @override - Future wipedBatchs(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'ticket/wipedBatchs', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future productSortTop(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'product/productSortTop', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> ticketCode(code) async { - ArgumentError.checkNotNull(code, 'code'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'ticket/code/$code', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : TicketDetails.fromJson(json), - ); - return value; - } - - @override - Future> showList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'ticket/showList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : TicketShow.fromJson(json), - ); - return value; - } - - @override - Future> wipedRecord(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'ticket/wipedRecord', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : TicketRecord.fromJson(json), - ); - return value; - } - - @override - Future>> wipedStats(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'ticket/wipedStats', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => TicketStatsList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> vipDataList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'member/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : BusinessVipList.fromJson(json), - ); - return value; - } - - @override - Future> rechargeFlow(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'audit/memberSourceRechargeDetial', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : RechargeFlowList.fromJson(json), - ); - return value; - } - - @override - Future> getTenantMemberBill(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'member/getTenantMemberBill', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : BalanceChangeList.fromJson(json), - ); - return value; - } - - @override - Future> storeOpenTime(storeId) async { - ArgumentError.checkNotNull(storeId, 'storeId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'store/storeOpenTime/$storeId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : StoreTimeInfoList.fromJson(json), - ); - return value; - } - - @override - Future updateSubscribe(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'product/updateSubscribe', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future balancePay(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'order/balancePay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> getOrderUserDetail(orderId) async { - ArgumentError.checkNotNull(orderId, 'orderId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'order/getOrderUserDetail?orderId=$orderId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => OrderUserDetail.fromJson(json), - ); - return value; - } - - @override - Future> queryMemberInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'member/queryMemberInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : PhoneQueryMemberInfo.fromJson(json), - ); - return value; - } - - @override - Future> getRechargePreferential(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'rechargePreferential/get', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : BusRechargeList.fromJson(json), - ); - return value; - } - - @override - Future posMemberRecharge(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'member/posMemberRecharge', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future manualQuery(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'member/manualQuery', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> createMemberSourceByMobile(mobile,nickName) async { - ArgumentError.checkNotNull(mobile, 'mobile'); - ArgumentError.checkNotNull(nickName, 'nickName'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'member/createMemberSourceByMobile?mobile=$mobile&nickName=$nickName', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : AddVipInfo.fromJson(json), - ); - return value; - } - - @override - Future> clerkList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'user/userPage', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : ClerkManageList.fromJson(json), - ); - return value; - } - - @override - Future> userEdit(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'user', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : UserInfoEdit.fromJson(json), - ); - return value; - } - - @override - Future> delUser(ids) async { - ArgumentError.checkNotNull(ids, 'ids'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'user?ids[]=$ids', - queryParameters: queryParameters, - options: RequestOptions( - method: 'DELETE', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> userModify(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'user', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : UserInfoEdit.fromJson(json), - ); - return value; - } - - @override - Future> storeMoney(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'dashBoard/storeMoney', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : BalanceConsumptionRankingList.fromJson(json), - ); - return value; - } - - @override - Future> storeTotalMoney(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'dashBoard/storeTotalMoney', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : StoreTotalMoneyInfo.fromJson(json), - ); - return value; - } - - @override - Future createOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'order/createOrder', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future prePayOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'order/prePayOrder', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> queryCashierOrder(orderId,login) async { - ArgumentError.checkNotNull(orderId, 'orderId'); - ArgumentError.checkNotNull(login, 'login'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('order/queryOrder/$orderId?login=$login', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> getMemberSourceBillDetails(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'member/getMemberSourceBillDetials', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : VipRecordDetailsList.fromJson(json), - ); - return value; - } - - @override - Future productSave(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'product/save', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future>> findCategoryListByDepth() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'productCategory/findCategoryListByDepth/1', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => GoodsCategoryList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> tenantPackage() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'tenantApply/tenantPackageList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => TenantPackageList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> tenantPackageCalculate(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'tenantApply/tenantPackageCalculate', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : TenantPackageCalculateDetails.fromJson(json), - ); - return value; - } - - @override - Future tenantApplyPay(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _result = await _dio.request>( - 'tenantApply/tenantApplyPay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: param); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : json, - ); - return value; - } - - @override - Future> tenantInfo(tenantId) async { - ArgumentError.checkNotNull(tenantId, 'tenantId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'tenant/tenantInfo/$tenantId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : TenantInfo.fromJson(json), - ); - return value; - } - - @override - Future> packageBuyList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'tenantPackage/packageBuyList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => (json ?? "") == "" ? null : ServiceBugList.fromJson(json), - ); - return value; - } - -} diff --git a/lib/retrofit/data/achievement_detail_list.dart b/lib/retrofit/data/achievement_detail_list.dart deleted file mode 100644 index 5f4cbcff..00000000 --- a/lib/retrofit/data/achievement_detail_list.dart +++ /dev/null @@ -1,248 +0,0 @@ -/// id : "1460450874352317701" -/// createTime : "2021-11-12 11:42:08" -/// createUser : "123" -/// updateTime : "2021-11-19 13:59:36" -/// updateUser : "1" -/// categoryId : "1460904379451179008" -/// name : "青铜" -/// level : 0 -/// icon : "https://pos.upload.gznl.top/MDAwMA==/2021/11/dd1bd6f1-6079-46ab-8d0f-6a946048db9d.webp" -/// score : 1 -/// actived : true -/// sort : 0 -/// isDelete : 0 -/// lessScore : "1" -/// rewardList : [{"id":"1464064141143572480","createTime":"2021-11-26 10:51:07","createUser":"1","updateTime":"2021-11-26 10:51:07","updateUser":"1","categoryId":"1460904379451179008","achievementId":"1460450874352317701","rewardType":2,"refId":"10","isDelete":0,"achievementCategoryName":null,"achievementName":null,"couponName":null},{"id":"1464064181471805440","createTime":"2021-11-26 10:51:17","createUser":"1","updateTime":"2021-11-26 10:51:17","updateUser":"1","categoryId":"1460904379451179008","achievementId":"1460450874352317701","rewardType":2,"refId":"20","isDelete":0,"achievementCategoryName":null,"achievementName":null,"couponName":null},{"id":"1464136057103581184","createTime":"2021-11-26 15:36:53","createUser":"1","updateTime":"2021-11-26 15:36:53","updateUser":"1","categoryId":"1460904379451179008","achievementId":"1460450874352317701","rewardType":1,"refId":"888","isDelete":0,"achievementCategoryName":null,"achievementName":null,"couponName":null}] -/// max : false -/// get : false - -class AchievementDetailList { - AchievementDetailList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String categoryId, - String name, - int level, - String icon, - int score, - bool actived, - int sort, - int isDelete, - String lessScore, - List rewardList, - bool max, - bool get,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _categoryId = categoryId; - _name = name; - _level = level; - _icon = icon; - _score = score; - _actived = actived; - _sort = sort; - _isDelete = isDelete; - _lessScore = lessScore; - _rewardList = rewardList; - _max = max; - _get = get; -} - - AchievementDetailList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _categoryId = json['categoryId']; - _name = json['name']; - _level = json['level']; - _icon = json['icon']; - _score = json['score']; - _actived = json['actived']; - _sort = json['sort']; - _isDelete = json['isDelete']; - _lessScore = json['lessScore']; - if (json['rewardList'] != null) { - _rewardList = []; - json['rewardList'].forEach((v) { - _rewardList.add(RewardList.fromJson(v)); - }); - } - _max = json['max']; - _get = json['get']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _categoryId; - String _name; - int _level; - String _icon; - int _score; - bool _actived; - int _sort; - int _isDelete; - String _lessScore; - List _rewardList; - bool _max; - bool _get; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get categoryId => _categoryId; - String get name => _name; - int get level => _level; - String get icon => _icon; - int get score => _score; - bool get actived => _actived; - int get sort => _sort; - int get isDelete => _isDelete; - String get lessScore => _lessScore; - List get rewardList => _rewardList; - bool get max => _max; - bool get get => _get; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['categoryId'] = _categoryId; - map['name'] = _name; - map['level'] = _level; - map['icon'] = _icon; - map['score'] = _score; - map['actived'] = _actived; - map['sort'] = _sort; - map['isDelete'] = _isDelete; - map['lessScore'] = _lessScore; - if (_rewardList != null) { - map['rewardList'] = _rewardList.map((v) => v.toJson()).toList(); - } - map['max'] = _max; - map['get'] = _get; - return map; - } - -} - -/// id : "1464064141143572480" -/// createTime : "2021-11-26 10:51:07" -/// createUser : "1" -/// updateTime : "2021-11-26 10:51:07" -/// updateUser : "1" -/// categoryId : "1460904379451179008" -/// achievementId : "1460450874352317701" -/// rewardType : 2 -/// refId : "10" -/// isDelete : 0 -/// achievementCategoryName : null -/// achievementName : null -/// couponName : null - -class RewardList { - RewardList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String categoryId, - String achievementId, - int rewardType, - String refId, - int isDelete, - dynamic achievementCategoryName, - dynamic achievementName, - dynamic couponName,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _categoryId = categoryId; - _achievementId = achievementId; - _rewardType = rewardType; - _refId = refId; - _isDelete = isDelete; - _achievementCategoryName = achievementCategoryName; - _achievementName = achievementName; - _couponName = couponName; -} - - RewardList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _categoryId = json['categoryId']; - _achievementId = json['achievementId']; - _rewardType = json['rewardType']; - _refId = json['refId']; - _isDelete = json['isDelete']; - _achievementCategoryName = json['achievementCategoryName']; - _achievementName = json['achievementName']; - _couponName = json['couponName']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _categoryId; - String _achievementId; - int _rewardType; - String _refId; - int _isDelete; - dynamic _achievementCategoryName; - dynamic _achievementName; - dynamic _couponName; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get categoryId => _categoryId; - String get achievementId => _achievementId; - int get rewardType => _rewardType; - String get refId => _refId; - int get isDelete => _isDelete; - dynamic get achievementCategoryName => _achievementCategoryName; - dynamic get achievementName => _achievementName; - dynamic get couponName => _couponName; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['categoryId'] = _categoryId; - map['achievementId'] = _achievementId; - map['rewardType'] = _rewardType; - map['refId'] = _refId; - map['isDelete'] = _isDelete; - map['achievementCategoryName'] = _achievementCategoryName; - map['achievementName'] = _achievementName; - map['couponName'] = _couponName; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/activity.dart b/lib/retrofit/data/activity.dart deleted file mode 100644 index 4f718fa2..00000000 --- a/lib/retrofit/data/activity.dart +++ /dev/null @@ -1,67 +0,0 @@ -class Activity { - Activity(); - - String id; - String createTime; - dynamic createUser; - String updateTime; - dynamic updateUser; - String storeId; - String mainTitle; - String viceTitle; - String content; - String coverImg; - String startTime; - String endTime; - String categoryId; - int state; - int isDelete; - int likes; - bool liked; - int viewers; - String storeName; - - factory Activity.fromJson(Map json) => Activity() - ..id = json['id'] - ..createTime = json['createTime'] - ..createUser = json['createUser'] - ..updateTime = json['updateTime'] - ..updateUser = json['updateUser'] - ..storeId = json['storeId'] - ..mainTitle = json['mainTitle'] - ..viceTitle = json['viceTitle'] - ..content = json['content'] - ..coverImg = json['coverImg'] - ..startTime = json['startTime'] - ..endTime = json['endTime'] - ..categoryId = json['categoryId'] - ..state = json['state'] - ..isDelete = json['isDelete'] - ..likes = json["likes"] - ..liked = json["liked"] - ..viewers = json["viewers"] - ..storeName = json['storeName']; - - Map toJson() => { - 'id': this.id, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'storeId': this.storeId, - 'mainTitle': this.mainTitle, - 'viceTitle': this.viceTitle, - 'content': this.content, - 'coverImg': this.coverImg, - 'startTime': this.startTime, - 'endTime': this.endTime, - 'categoryId': this.categoryId, - 'state': this.state, - 'isDelete': this.isDelete, - 'likes': this.likes, - 'liked': this.liked, - 'viewers': this.viewers, - 'storeName': this.storeName - }; - -} diff --git a/lib/retrofit/data/activity_actRecord_details.dart b/lib/retrofit/data/activity_actRecord_details.dart deleted file mode 100644 index 27eea174..00000000 --- a/lib/retrofit/data/activity_actRecord_details.dart +++ /dev/null @@ -1,536 +0,0 @@ -/// actRecord : {"id":"1496692045555695616","createTime":"2022-02-24 11:42:46","createUser":"1496056013827080192","updateTime":"2022-02-24 11:42:46","updateUser":"1496056013827080192","storeId":"1460885296764682240","type":3,"actTemplateId":"1490572026815971328","actTimeId":"1490572027034075136","actProductId":"1494198261018263552","mid":"1496056013827080192","isDirectBuy":false,"joinNum":1,"startTime":"2022-02-24 11:42:46","endTime":"2022-02-24 13:42:46","state":4,"isDelete":0} -/// actRecordJoinList : [{"id":"1496692045677330432","createTime":"2022-02-24 11:42:46","createUser":"1496056013827080192","updateTime":"2022-02-24 11:42:46","updateUser":"1496056013827080192","storeId":"1460885296764682240","type":3,"actTemplateId":"1490572026815971328","actTimeId":"1490572027034075136","actRecordId":"1496692045555695616","mid":"1496056013827080192","orderId":null,"isLeader":true,"memberAvatar":"","memberNickname":"","productId":"1494198261018263552","actPrice":"54.45","state":true,"isDelete":0}] -/// actProduct : {"id":"1494198261018263552","createTime":"2022-02-17 14:33:21","createUser":"1364043181062094848","updateTime":"2022-02-17 14:33:21","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1490572026815971328","timeId":"1490572027034075136","productId":"1461246266586431488","productName":"野生羊肚菌","productImg":"https://pos.upload.gznl.top/1179/2021/11/298d1e1c-2a5f-4b9d-95a7-87b3f88a9cd1.jpg","productPrice":"150.00","promotionPrice":"11.00","productStock":200,"sellCount":0,"skuJson":[{"skuId":"1461246266661928960","skuPrice":11,"skuStock":100},{"skuId":"1461246266687094784","skuPrice":100,"skuStock":100}],"isDelete":0} -/// skuName : null -/// isBargain : true - -class ActivityActRecordDetails { - ActivityActRecordDetails({ - ActRecord actRecord, - List actRecordJoinList, - ActProduct actProduct, - dynamic skuName, - String skuId, - bool isBargain, - int successNumber}){ - _actRecord = actRecord; - _actRecordJoinList = actRecordJoinList; - _actProduct = actProduct; - _skuName = skuName; - _skuId = skuId; - _isBargain = isBargain; - _successNumber = successNumber; - -} - - ActivityActRecordDetails.fromJson(dynamic json) { - _actRecord = json['actRecord'] != null ? ActRecord.fromJson(json['actRecord']) : null; - if (json['actRecordJoinList'] != null) { - _actRecordJoinList = []; - json['actRecordJoinList'].forEach((v) { - _actRecordJoinList.add(ActRecordJoinList.fromJson(v)); - }); - } - _actProduct = json['actProduct'] != null ? ActProduct.fromJson(json['actProduct']) : null; - _skuName = json['skuName']; - _skuId = json['skuId']; - _isBargain = json['isBargain']; - _successNumber = json['successNumber']; - } - ActRecord _actRecord; - List _actRecordJoinList; - ActProduct _actProduct; - dynamic _skuName; - String _skuId; - bool _isBargain; - int _successNumber; - - ActRecord get actRecord => _actRecord; - List get actRecordJoinList => _actRecordJoinList; - ActProduct get actProduct => _actProduct; - dynamic get skuName => _skuName; - String get skuId => _skuId; - bool get isBargain => _isBargain; - int get successNumber => _successNumber; - - Map toJson() { - final map = {}; - if (_actRecord != null) { - map['actRecord'] = _actRecord.toJson(); - } - if (_actRecordJoinList != null) { - map['actRecordJoinList'] = _actRecordJoinList.map((v) => v.toJson()).toList(); - } - if (_actProduct != null) { - map['actProduct'] = _actProduct.toJson(); - } - map['skuId'] = _skuId; - map['isBargain'] = _isBargain; - map['successNumber'] = _successNumber; - return map; - } - -} - -/// id : "1494198261018263552" -/// createTime : "2022-02-17 14:33:21" -/// createUser : "1364043181062094848" -/// updateTime : "2022-02-17 14:33:21" -/// updateUser : "1364043181062094848" -/// storeId : "1460885296764682240" -/// templateId : "1490572026815971328" -/// timeId : "1490572027034075136" -/// productId : "1461246266586431488" -/// productName : "野生羊肚菌" -/// productImg : "https://pos.upload.gznl.top/1179/2021/11/298d1e1c-2a5f-4b9d-95a7-87b3f88a9cd1.jpg" -/// productPrice : "150.00" -/// promotionPrice : "11.00" -/// productStock : 200 -/// sellCount : 0 -/// skuJson : [{"skuId":"1461246266661928960","skuPrice":11,"skuStock":100},{"skuId":"1461246266687094784","skuPrice":100,"skuStock":100}] -/// isDelete : 0 - -class ActProduct { - ActProduct({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String templateId, - String timeId, - String productId, - String productName, - String productImg, - String productPrice, - String promotionPrice, - int productStock, - int sellCount, - List skuJson, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _templateId = templateId; - _timeId = timeId; - _productId = productId; - _productName = productName; - _productImg = productImg; - _productPrice = productPrice; - _promotionPrice = promotionPrice; - _productStock = productStock; - _sellCount = sellCount; - _skuJson = skuJson; - _isDelete = isDelete; -} - - ActProduct.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _templateId = json['templateId']; - _timeId = json['timeId']; - _productId = json['productId']; - _productName = json['productName']; - _productImg = json['productImg']; - _productPrice = json['productPrice']; - _promotionPrice = json['promotionPrice']; - _productStock = json['productStock']; - _sellCount = json['sellCount']; - if (json['skuJson'] != null) { - _skuJson = []; - json['skuJson'].forEach((v) { - _skuJson.add(SkuJson.fromJson(v)); - }); - } - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _templateId; - String _timeId; - String _productId; - String _productName; - String _productImg; - String _productPrice; - String _promotionPrice; - int _productStock; - int _sellCount; - List _skuJson; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get templateId => _templateId; - String get timeId => _timeId; - String get productId => _productId; - String get productName => _productName; - String get productImg => _productImg; - String get productPrice => _productPrice; - String get promotionPrice => _promotionPrice; - int get productStock => _productStock; - int get sellCount => _sellCount; - List get skuJson => _skuJson; - int get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['templateId'] = _templateId; - map['timeId'] = _timeId; - map['productId'] = _productId; - map['productName'] = _productName; - map['productImg'] = _productImg; - map['productPrice'] = _productPrice; - map['promotionPrice'] = _promotionPrice; - map['productStock'] = _productStock; - map['sellCount'] = _sellCount; - if (_skuJson != null) { - map['skuJson'] = _skuJson.map((v) => v.toJson()).toList(); - } - map['isDelete'] = _isDelete; - return map; - } - -} - -/// skuId : "1461246266661928960" -/// skuPrice : 11 -/// skuStock : 100 - -class SkuJson { - SkuJson({ - String skuId, - int skuPrice, - int skuStock,}){ - _skuId = skuId; - _skuPrice = skuPrice; - _skuStock = skuStock; -} - - SkuJson.fromJson(dynamic json) { - _skuId = json['skuId']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - } - String _skuId; - int _skuPrice; - int _skuStock; - - String get skuId => _skuId; - int get skuPrice => _skuPrice; - int get skuStock => _skuStock; - - Map toJson() { - final map = {}; - map['skuId'] = _skuId; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - return map; - } - -} - -/// id : "1496692045677330432" -/// createTime : "2022-02-24 11:42:46" -/// createUser : "1496056013827080192" -/// updateTime : "2022-02-24 11:42:46" -/// updateUser : "1496056013827080192" -/// storeId : "1460885296764682240" -/// type : 3 -/// actTemplateId : "1490572026815971328" -/// actTimeId : "1490572027034075136" -/// actRecordId : "1496692045555695616" -/// mid : "1496056013827080192" -/// orderId : null -/// isLeader : true -/// memberAvatar : "" -/// memberNickname : "" -/// productId : "1494198261018263552" -/// actPrice : "54.45" -/// state : true -/// isDelete : 0 - -class ActRecordJoinList { - ActRecordJoinList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - int type, - String actTemplateId, - String actTimeId, - String actRecordId, - String mid, - dynamic orderId, - bool isLeader, - String memberAvatar, - String memberNickname, - String productId, - String actPrice, - bool state, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _type = type; - _actTemplateId = actTemplateId; - _actTimeId = actTimeId; - _actRecordId = actRecordId; - _mid = mid; - _orderId = orderId; - _isLeader = isLeader; - _memberAvatar = memberAvatar; - _memberNickname = memberNickname; - _productId = productId; - _actPrice = actPrice; - _state = state; - _isDelete = isDelete; -} - - ActRecordJoinList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _type = json['type']; - _actTemplateId = json['actTemplateId']; - _actTimeId = json['actTimeId']; - _actRecordId = json['actRecordId']; - _mid = json['mid']; - _orderId = json['orderId']; - _isLeader = json['isLeader']; - _memberAvatar = json['memberAvatar']; - _memberNickname = json['memberNickname']; - _productId = json['productId']; - _actPrice = json['actPrice']; - _state = json['state']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - int _type; - String _actTemplateId; - String _actTimeId; - String _actRecordId; - String _mid; - dynamic _orderId; - bool _isLeader; - String _memberAvatar; - String _memberNickname; - String _productId; - String _actPrice; - bool _state; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - int get type => _type; - String get actTemplateId => _actTemplateId; - String get actTimeId => _actTimeId; - String get actRecordId => _actRecordId; - String get mid => _mid; - dynamic get orderId => _orderId; - bool get isLeader => _isLeader; - String get memberAvatar => _memberAvatar; - String get memberNickname => _memberNickname; - String get productId => _productId; - String get actPrice => _actPrice; - bool get state => _state; - int get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['type'] = _type; - map['actTemplateId'] = _actTemplateId; - map['actTimeId'] = _actTimeId; - map['actRecordId'] = _actRecordId; - map['mid'] = _mid; - map['orderId'] = _orderId; - map['isLeader'] = _isLeader; - map['memberAvatar'] = _memberAvatar; - map['memberNickname'] = _memberNickname; - map['productId'] = _productId; - map['actPrice'] = _actPrice; - map['state'] = _state; - map['isDelete'] = _isDelete; - return map; - } - -} - -/// id : "1496692045555695616" -/// createTime : "2022-02-24 11:42:46" -/// createUser : "1496056013827080192" -/// updateTime : "2022-02-24 11:42:46" -/// updateUser : "1496056013827080192" -/// storeId : "1460885296764682240" -/// type : 3 -/// actTemplateId : "1490572026815971328" -/// actTimeId : "1490572027034075136" -/// actProductId : "1494198261018263552" -/// mid : "1496056013827080192" -/// isDirectBuy : false -/// joinNum : 1 -/// startTime : "2022-02-24 11:42:46" -/// endTime : "2022-02-24 13:42:46" -/// state : 4 -/// isDelete : 0 - -class ActRecord { - ActRecord({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - int type, - String actTemplateId, - String actTimeId, - String actProductId, - String mid, - bool isDirectBuy, - int joinNum, - String startTime, - String endTime, - int state, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _type = type; - _actTemplateId = actTemplateId; - _actTimeId = actTimeId; - _actProductId = actProductId; - _mid = mid; - _isDirectBuy = isDirectBuy; - _joinNum = joinNum; - _startTime = startTime; - _endTime = endTime; - _state = state; - _isDelete = isDelete; -} - - ActRecord.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _type = json['type']; - _actTemplateId = json['actTemplateId']; - _actTimeId = json['actTimeId']; - _actProductId = json['actProductId']; - _mid = json['mid']; - _isDirectBuy = json['isDirectBuy']; - _joinNum = json['joinNum']; - _startTime = json['startTime']; - _endTime = json['endTime']; - _state = json['state']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - int _type; - String _actTemplateId; - String _actTimeId; - String _actProductId; - String _mid; - bool _isDirectBuy; - int _joinNum; - String _startTime; - String _endTime; - int _state; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - int get type => _type; - String get actTemplateId => _actTemplateId; - String get actTimeId => _actTimeId; - String get actProductId => _actProductId; - String get mid => _mid; - bool get isDirectBuy => _isDirectBuy; - int get joinNum => _joinNum; - String get startTime => _startTime; - String get endTime => _endTime; - int get state => _state; - int get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['type'] = _type; - map['actTemplateId'] = _actTemplateId; - map['actTimeId'] = _actTimeId; - map['actProductId'] = _actProductId; - map['mid'] = _mid; - map['isDirectBuy'] = _isDirectBuy; - map['joinNum'] = _joinNum; - map['startTime'] = _startTime; - map['endTime'] = _endTime; - map['state'] = _state; - map['isDelete'] = _isDelete; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/activity_area_list.dart b/lib/retrofit/data/activity_area_list.dart deleted file mode 100644 index 322f0bd6..00000000 --- a/lib/retrofit/data/activity_area_list.dart +++ /dev/null @@ -1,498 +0,0 @@ -/// actTemplate : {"id":"1478267568996220928","createTime":"2022-01-04 15:30:28","createUser":"1364043181062094848","updateTime":"2022-01-04 15:30:28","updateUser":"1364043181062094848","storeId":"1460885296764682240","actName":"砍价","actDesc":"","type":3,"limitTime":2,"limitNumber":5,"coverImg":"https://pos.upload.gznl.top/1179/2022/01/792bda39-3c2e-434f-8e57-02c62163add4.png","shareImg":"https://pos.upload.gznl.top/1179/2022/01/68f9b6d4-16a8-4bcf-aab6-09f95d1d2a9a.png","bannerImg":"https://pos.upload.gznl.top/1179/2022/01/5efd74a8-be45-4723-a878-0513d6bfd9f8.png","state":1,"allDay":true,"startTime":"2022-01-01 00:00:00","endTime":"2022-01-31 00:00:00","isDelete":0} -/// timeProductList : [{"actTime":{"id":"1478267569205936128","createTime":"2022-01-04 15:30:28","createUser":"1364043181062094848","updateTime":"2022-01-04 15:30:28","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","allDay":true,"startHour":null,"endHour":null,"isDelete":0},"productList":[{"id":"1478267723770232832","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460886580993458176","productName":"无花果礼盒","productImg":"https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png","productPrice":"88.00","promotionPrice":"88.00","productStock":0,"sellCount":0,"skuJson":[{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}],"isDelete":0},{"id":"1478267723787010048","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460896670593056768","productName":"甄果酥","productImg":"https://pos.upload.gznl.top/1179/2021/11/c4e6ea91-9cc1-4f5f-86e3-91e323ab2d53.jpg","productPrice":"78.00","promotionPrice":"78.00","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1460896670697914368","skuPrice":78,"skuStock":100}],"isDelete":0},{"id":"1478267723791204352","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460899864027070464","productName":"肺宝酵素","productImg":"https://pos.upload.gznl.top/1179/2021/11/ccf4293f-004c-4450-bcc7-c45e47444fe3.jpg","productPrice":"328.00","promotionPrice":"328.00","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1460899864102567936","skuPrice":328,"skuStock":100}],"isDelete":0},{"id":"1478267723795398656","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460901466356056064","productName":"纤盈酵素","productImg":"https://pos.upload.gznl.top/1179/2021/11/49931aa8-7eda-4df2-876f-a6fa19ac0682.jpg","productPrice":"328.00","promotionPrice":"328.00","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1460901466435747840","skuPrice":328,"skuStock":100}],"isDelete":0},{"id":"1478267723795398657","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461168275898499072","productName":"生态桂圆","productImg":"https://pos.upload.gznl.top/1179/2021/11/eeef5404-5533-46fc-b650-0901e0cf4580.jpg","productPrice":"60.00","promotionPrice":"60.00","productStock":200,"sellCount":0,"skuJson":[{"skuId":"1461168275957219328","skuPrice":60,"skuStock":100},{"skuId":"1461168275982385152","skuPrice":170,"skuStock":100}],"isDelete":0},{"id":"1478267723799592960","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461261296568631296","productName":"麦芽糖","productImg":"https://pos.upload.gznl.top/1179/2021/11/2dd21e14-f221-46b5-8d88-2812fbe9ab45.jpg","productPrice":"29.80","promotionPrice":"29.80","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1461261296623157248","skuPrice":29.8,"skuStock":100}],"isDelete":0},{"id":"1478267723803787264","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461263843052224512","productName":"心耕年糕400g/袋*6","productImg":"https://pos.upload.gznl.top/1179/2021/11/3f3fcf7a-c477-4a6b-a689-89b1ff4c3528.jpg","productPrice":"88.00","promotionPrice":"88.00","productStock":50,"sellCount":0,"skuJson":[{"skuId":"1461263843098361856","skuPrice":88,"skuStock":50}],"isDelete":0},{"id":"1478267723807981568","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461626570010525696","productName":"枣糕方芝麻丸 150g/罐","productImg":"https://pos.upload.gznl.top/1179/2021/11/dad36dd4-e859-4d19-8c75-7d3702d8a2b4.jpg","productPrice":"88.00","promotionPrice":"88.00","productStock":50,"sellCount":0,"skuJson":[{"skuId":"1461626570077634560","skuPrice":88,"skuStock":50}],"isDelete":0}]}] - -class ActivityAreaList { - ActivityAreaList({ - ActTemplate actTemplate, - List timeProductList,}){ - _actTemplate = actTemplate; - _timeProductList = timeProductList; -} - - ActivityAreaList.fromJson(dynamic json) { - _actTemplate = json['actTemplate'] != null ? ActTemplate.fromJson(json['actTemplate']) : null; - if (json['timeProductList'] != null) { - _timeProductList = []; - json['timeProductList'].forEach((v) { - _timeProductList.add(TimeProductList.fromJson(v)); - }); - } - } - ActTemplate _actTemplate; - List _timeProductList; - - ActTemplate get actTemplate => _actTemplate; - List get timeProductList => _timeProductList; - - Map toJson() { - final map = {}; - if (_actTemplate != null) { - map['actTemplate'] = _actTemplate.toJson(); - } - if (_timeProductList != null) { - map['timeProductList'] = _timeProductList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// actTime : {"id":"1478267569205936128","createTime":"2022-01-04 15:30:28","createUser":"1364043181062094848","updateTime":"2022-01-04 15:30:28","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","allDay":true,"startHour":null,"endHour":null,"isDelete":0} -/// productList : [{"id":"1478267723770232832","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460886580993458176","productName":"无花果礼盒","productImg":"https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png","productPrice":"88.00","promotionPrice":"88.00","productStock":0,"sellCount":0,"skuJson":[{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}],"isDelete":0},{"id":"1478267723787010048","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460896670593056768","productName":"甄果酥","productImg":"https://pos.upload.gznl.top/1179/2021/11/c4e6ea91-9cc1-4f5f-86e3-91e323ab2d53.jpg","productPrice":"78.00","promotionPrice":"78.00","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1460896670697914368","skuPrice":78,"skuStock":100}],"isDelete":0},{"id":"1478267723791204352","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460899864027070464","productName":"肺宝酵素","productImg":"https://pos.upload.gznl.top/1179/2021/11/ccf4293f-004c-4450-bcc7-c45e47444fe3.jpg","productPrice":"328.00","promotionPrice":"328.00","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1460899864102567936","skuPrice":328,"skuStock":100}],"isDelete":0},{"id":"1478267723795398656","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1460901466356056064","productName":"纤盈酵素","productImg":"https://pos.upload.gznl.top/1179/2021/11/49931aa8-7eda-4df2-876f-a6fa19ac0682.jpg","productPrice":"328.00","promotionPrice":"328.00","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1460901466435747840","skuPrice":328,"skuStock":100}],"isDelete":0},{"id":"1478267723795398657","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461168275898499072","productName":"生态桂圆","productImg":"https://pos.upload.gznl.top/1179/2021/11/eeef5404-5533-46fc-b650-0901e0cf4580.jpg","productPrice":"60.00","promotionPrice":"60.00","productStock":200,"sellCount":0,"skuJson":[{"skuId":"1461168275957219328","skuPrice":60,"skuStock":100},{"skuId":"1461168275982385152","skuPrice":170,"skuStock":100}],"isDelete":0},{"id":"1478267723799592960","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461261296568631296","productName":"麦芽糖","productImg":"https://pos.upload.gznl.top/1179/2021/11/2dd21e14-f221-46b5-8d88-2812fbe9ab45.jpg","productPrice":"29.80","promotionPrice":"29.80","productStock":100,"sellCount":0,"skuJson":[{"skuId":"1461261296623157248","skuPrice":29.8,"skuStock":100}],"isDelete":0},{"id":"1478267723803787264","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461263843052224512","productName":"心耕年糕400g/袋*6","productImg":"https://pos.upload.gznl.top/1179/2021/11/3f3fcf7a-c477-4a6b-a689-89b1ff4c3528.jpg","productPrice":"88.00","promotionPrice":"88.00","productStock":50,"sellCount":0,"skuJson":[{"skuId":"1461263843098361856","skuPrice":88,"skuStock":50}],"isDelete":0},{"id":"1478267723807981568","createTime":"2022-01-04 15:31:05","createUser":"1364043181062094848","updateTime":"2022-01-04 15:31:05","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1478267568996220928","timeId":"1478267569205936128","productId":"1461626570010525696","productName":"枣糕方芝麻丸 150g/罐","productImg":"https://pos.upload.gznl.top/1179/2021/11/dad36dd4-e859-4d19-8c75-7d3702d8a2b4.jpg","productPrice":"88.00","promotionPrice":"88.00","productStock":50,"sellCount":0,"skuJson":[{"skuId":"1461626570077634560","skuPrice":88,"skuStock":50}],"isDelete":0}] - -class TimeProductList { - TimeProductList({ - ActTime actTime, - List productList,}){ - _actTime = actTime; - _productList = productList; -} - - TimeProductList.fromJson(dynamic json) { - _actTime = json['actTime'] != null ? ActTime.fromJson(json['actTime']) : null; - if (json['productList'] != null) { - _productList = []; - json['productList'].forEach((v) { - _productList.add(ProductList.fromJson(v)); - }); - } - } - ActTime _actTime; - List _productList; - - ActTime get actTime => _actTime; - List get productList => _productList; - - Map toJson() { - final map = {}; - if (_actTime != null) { - map['actTime'] = _actTime.toJson(); - } - if (_productList != null) { - map['productList'] = _productList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1478267723770232832" -/// createTime : "2022-01-04 15:31:05" -/// createUser : "1364043181062094848" -/// updateTime : "2022-01-04 15:31:05" -/// updateUser : "1364043181062094848" -/// storeId : "1460885296764682240" -/// templateId : "1478267568996220928" -/// timeId : "1478267569205936128" -/// productId : "1460886580993458176" -/// productName : "无花果礼盒" -/// productImg : "https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png" -/// productPrice : "88.00" -/// promotionPrice : "88.00" -/// productStock : 0 -/// sellCount : 0 -/// skuJson : [{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}] -/// isDelete : 0 - -class ProductList { - ProductList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String templateId, - String timeId, - String productId, - String productName, - String productImg, - String productPrice, - String promotionPrice, - int productStock, - dynamic sellCount, - List skuJson, - dynamic isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _templateId = templateId; - _timeId = timeId; - _productId = productId; - _productName = productName; - _productImg = productImg; - _productPrice = productPrice; - _promotionPrice = promotionPrice; - _productStock = productStock; - _sellCount = sellCount; - _skuJson = skuJson; - _isDelete = isDelete; -} - - ProductList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _templateId = json['templateId']; - _timeId = json['timeId']; - _productId = json['productId']; - _productName = json['productName']; - _productImg = json['productImg']; - _productPrice = json['productPrice']; - _promotionPrice = json['promotionPrice']; - _productStock = json['productStock']; - _sellCount = json['sellCount']; - if (json['skuJson'] != null) { - _skuJson = []; - json['skuJson'].forEach((v) { - _skuJson.add(SkuJson.fromJson(v)); - }); - } - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _templateId; - String _timeId; - String _productId; - String _productName; - String _productImg; - String _productPrice; - String _promotionPrice; - int _productStock; - int _sellCount; - List _skuJson; - dynamic _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get templateId => _templateId; - String get timeId => _timeId; - String get productId => _productId; - String get productName => _productName; - String get productImg => _productImg; - String get productPrice => _productPrice; - String get promotionPrice => _promotionPrice; - int get productStock => _productStock; - int get sellCount => _sellCount; - List get skuJson => _skuJson; - dynamic get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['templateId'] = _templateId; - map['timeId'] = _timeId; - map['productId'] = _productId; - map['productName'] = _productName; - map['productImg'] = _productImg; - map['productPrice'] = _productPrice; - map['promotionPrice'] = _promotionPrice; - map['productStock'] = _productStock; - map['sellCount'] = _sellCount; - if (_skuJson != null) { - map['skuJson'] = _skuJson.map((v) => v.toJson()).toList(); - } - map['isDelete'] = _isDelete; - return map; - } - -} - -/// skuId : "1460886581089927168" -/// skuPrice : 88 -/// skuStock : 0 - -class SkuJson { - SkuJson({ - String skuId, - dynamic skuPrice, - dynamic skuStock,}){ - _skuId = skuId; - _skuPrice = skuPrice; - _skuStock = skuStock; -} - - SkuJson.fromJson(dynamic json) { - _skuId = json['skuId']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - } - String _skuId; - dynamic _skuPrice; - dynamic _skuStock; - - String get skuId => _skuId; - dynamic get skuPrice => _skuPrice; - dynamic get skuStock => _skuStock; - - Map toJson() { - final map = {}; - map['skuId'] = _skuId; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - return map; - } - -} - -/// id : "1478267569205936128" -/// createTime : "2022-01-04 15:30:28" -/// createUser : "1364043181062094848" -/// updateTime : "2022-01-04 15:30:28" -/// updateUser : "1364043181062094848" -/// storeId : "1460885296764682240" -/// templateId : "1478267568996220928" -/// allDay : true -/// startHour : null -/// endHour : null -/// isDelete : 0 - -class ActTime { - ActTime({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String templateId, - bool allDay, - dynamic startHour, - dynamic endHour, - dynamic isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _templateId = templateId; - _allDay = allDay; - _startHour = startHour; - _endHour = endHour; - _isDelete = isDelete; -} - - ActTime.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _templateId = json['templateId']; - _allDay = json['allDay']; - _startHour = json['startHour']; - _endHour = json['endHour']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _templateId; - bool _allDay; - dynamic _startHour; - dynamic _endHour; - dynamic _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get templateId => _templateId; - bool get allDay => _allDay; - dynamic get startHour => _startHour; - dynamic get endHour => _endHour; - dynamic get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['templateId'] = _templateId; - map['allDay'] = _allDay; - map['startHour'] = _startHour; - map['endHour'] = _endHour; - map['isDelete'] = _isDelete; - return map; - } - -} - -/// id : "1478267568996220928" -/// createTime : "2022-01-04 15:30:28" -/// createUser : "1364043181062094848" -/// updateTime : "2022-01-04 15:30:28" -/// updateUser : "1364043181062094848" -/// storeId : "1460885296764682240" -/// actName : "砍价" -/// actDesc : "" -/// type : 3 -/// limitTime : 2 -/// limitNumber : 5 -/// coverImg : "https://pos.upload.gznl.top/1179/2022/01/792bda39-3c2e-434f-8e57-02c62163add4.png" -/// shareImg : "https://pos.upload.gznl.top/1179/2022/01/68f9b6d4-16a8-4bcf-aab6-09f95d1d2a9a.png" -/// bannerImg : "https://pos.upload.gznl.top/1179/2022/01/5efd74a8-be45-4723-a878-0513d6bfd9f8.png" -/// state : 1 -/// allDay : true -/// startTime : "2022-01-01 00:00:00" -/// endTime : "2022-01-31 00:00:00" -/// isDelete : 0 - -class ActTemplate { - ActTemplate({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String actName, - String actDesc, - dynamic type, - dynamic limitTime, - dynamic limitNumber, - String coverImg, - String shareImg, - String bannerImg, - dynamic state, - bool allDay, - String startTime, - String endTime, - dynamic isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _actName = actName; - _actDesc = actDesc; - _type = type; - _limitTime = limitTime; - _limitNumber = limitNumber; - _coverImg = coverImg; - _shareImg = shareImg; - _bannerImg = bannerImg; - _state = state; - _allDay = allDay; - _startTime = startTime; - _endTime = endTime; - _isDelete = isDelete; -} - - ActTemplate.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _actName = json['actName']; - _actDesc = json['actDesc']; - _type = json['type']; - _limitTime = json['limitTime']; - _limitNumber = json['limitNumber']; - _coverImg = json['coverImg']; - _shareImg = json['shareImg']; - _bannerImg = json['bannerImg']; - _state = json['state']; - _allDay = json['allDay']; - _startTime = json['startTime']; - _endTime = json['endTime']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _actName; - String _actDesc; - dynamic _type; - dynamic _limitTime; - dynamic _limitNumber; - String _coverImg; - String _shareImg; - String _bannerImg; - dynamic _state; - bool _allDay; - String _startTime; - String _endTime; - dynamic _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get actName => _actName; - String get actDesc => _actDesc; - dynamic get type => _type; - dynamic get limitTime => _limitTime; - dynamic get limitNumber => _limitNumber; - String get coverImg => _coverImg; - String get shareImg => _shareImg; - String get bannerImg => _bannerImg; - dynamic get state => _state; - bool get allDay => _allDay; - String get startTime => _startTime; - String get endTime => _endTime; - dynamic get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['actName'] = _actName; - map['actDesc'] = _actDesc; - map['type'] = _type; - map['limitTime'] = _limitTime; - map['limitNumber'] = _limitNumber; - map['coverImg'] = _coverImg; - map['shareImg'] = _shareImg; - map['bannerImg'] = _bannerImg; - map['state'] = _state; - map['allDay'] = _allDay; - map['startTime'] = _startTime; - map['endTime'] = _endTime; - map['isDelete'] = _isDelete; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/activity_details.dart b/lib/retrofit/data/activity_details.dart deleted file mode 100644 index a3484ecf..00000000 --- a/lib/retrofit/data/activity_details.dart +++ /dev/null @@ -1,664 +0,0 @@ -/// actProduct : {"id":"1479377402042777600","createTime":"2022-01-07 17:00:33","createUser":"1364043181062094848","updateTime":"2022-01-07 17:00:33","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1479377328797646848","timeId":"1479377329099636736","productId":"1460886580993458176","productName":"无花果礼盒","productImg":"https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png","productPrice":"88.00","promotionPrice":"88.00","productStock":0,"sellCount":0,"skuJson":[{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}],"isDelete":0} -/// actRecordAndJoinlDTOList : [{"actRecord":{"id":"1479399513473941504","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1478548720785031168","joinNum":0,"startTime":"2022-01-07 18:28:25","endTime":"2022-01-08 16:28:25","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479399514073726976","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479399513473941504","mid":"1478548720785031168","orderId":"1479399514677706752","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]},{"actRecord":{"id":"1479401111025614848","createTime":"2022-01-07 18:34:45","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:45","updateUser":"1468903135782109184","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1468903135782109184","joinNum":0,"startTime":"2022-01-07 18:34:45","endTime":"2022-01-08 16:34:45","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479401111688314880","createTime":"2022-01-07 18:34:46","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:46","updateUser":"1468903135782109184","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479401111025614848","mid":"1468903135782109184","orderId":"1479401112292294656","isLeader":true,"memberAvatar":"https://pos.upload.gznl.top/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg","memberNickname":"哈哈哈","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]}] - -class ActivityDetails { - ActivityDetails({ - String endTime, - ActProduct actProduct, - List actRecordAndJoinlDTOList, - }) { - _endTime = endTime; - _actProduct = actProduct; - _actRecordAndJoinlDTOList = actRecordAndJoinlDTOList; - } - - ActivityDetails.fromJson(dynamic json) { - _endTime = json['endTime']; - _actProduct = json['actProduct'] != null - ? ActProduct.fromJson(json['actProduct']) - : null; - if (json['actRecordAndJoinlDTOList'] != null) { - _actRecordAndJoinlDTOList = []; - json['actRecordAndJoinlDTOList'].forEach((v) { - _actRecordAndJoinlDTOList.add(ActRecordAndJoinlDTOList.fromJson(v)); - }); - } - } - - String _endTime; - ActProduct _actProduct; - List _actRecordAndJoinlDTOList; - - String get endTime => _endTime; - - ActProduct get actProduct => _actProduct; - - List get actRecordAndJoinlDTOList => - _actRecordAndJoinlDTOList; - - Map toJson() { - final map = {}; - map['endTime'] = _endTime; - - if (_actProduct != null) { - map['actProduct'] = _actProduct.toJson(); - } - if (_actRecordAndJoinlDTOList != null) { - map['actRecordAndJoinlDTOList'] = - _actRecordAndJoinlDTOList.map((v) => v.toJson()).toList(); - } - return map; - } -} - -/// actRecord : {"id":"1479399513473941504","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1478548720785031168","joinNum":0,"startTime":"2022-01-07 18:28:25","endTime":"2022-01-08 16:28:25","state":2,"isDelete":0} -/// actRecordJoinList : [{"id":"1479399514073726976","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479399513473941504","mid":"1478548720785031168","orderId":"1479399514677706752","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}] - -class ActRecordAndJoinlDTOList { - ActRecordAndJoinlDTOList({ - ActRecord actRecord, - List actRecordJoinList, - }) { - _actRecord = actRecord; - _actRecordJoinList = actRecordJoinList; - } - - ActRecordAndJoinlDTOList.fromJson(dynamic json) { - _actRecord = json['actRecord'] != null - ? ActRecord.fromJson(json['actRecord']) - : null; - if (json['actRecordJoinList'] != null) { - _actRecordJoinList = []; - json['actRecordJoinList'].forEach((v) { - _actRecordJoinList.add(ActRecordJoinList.fromJson(v)); - }); - } - } - - ActRecord _actRecord; - List _actRecordJoinList; - - ActRecord get actRecord => _actRecord; - - List get actRecordJoinList => _actRecordJoinList; - - Map toJson() { - final map = {}; - if (_actRecord != null) { - map['actRecord'] = _actRecord.toJson(); - } - if (_actRecordJoinList != null) { - map['actRecordJoinList'] = - _actRecordJoinList.map((v) => v.toJson()).toList(); - } - return map; - } -} - -/// id : "1479399514073726976" -/// createTime : "2022-01-07 18:28:25" -/// createUser : "1478548720785031168" -/// updateTime : "2022-01-07 18:28:25" -/// updateUser : "1478548720785031168" -/// storeId : "1460885296764682240" -/// actTemplateId : "1479377328797646848" -/// actTimeId : "1479377329099636736" -/// actRecordId : "1479399513473941504" -/// mid : "1478548720785031168" -/// orderId : "1479399514677706752" -/// isLeader : true -/// memberAvatar : "" -/// memberNickname : "斯基" -/// productId : "1479377402042777600" -/// actPrice : "88.00" -/// state : false -/// isDelete : 0 - -class ActRecordJoinList { - ActRecordJoinList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String actTemplateId, - String actTimeId, - String actRecordId, - String mid, - String orderId, - bool isLeader, - String memberAvatar, - String memberNickname, - String productId, - String actPrice, - bool state, - int isDelete, - }) { - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _actTemplateId = actTemplateId; - _actTimeId = actTimeId; - _actRecordId = actRecordId; - _mid = mid; - _orderId = orderId; - _isLeader = isLeader; - _memberAvatar = memberAvatar; - _memberNickname = memberNickname; - _productId = productId; - _actPrice = actPrice; - _state = state; - _isDelete = isDelete; - } - - ActRecordJoinList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _actTemplateId = json['actTemplateId']; - _actTimeId = json['actTimeId']; - _actRecordId = json['actRecordId']; - _mid = json['mid']; - _orderId = json['orderId']; - _isLeader = json['isLeader']; - _memberAvatar = json['memberAvatar']; - _memberNickname = json['memberNickname']; - _productId = json['productId']; - _actPrice = json['actPrice']; - _state = json['state']; - _isDelete = json['isDelete']; - } - - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _actTemplateId; - String _actTimeId; - String _actRecordId; - String _mid; - String _orderId; - bool _isLeader; - String _memberAvatar; - String _memberNickname; - String _productId; - String _actPrice; - bool _state; - int _isDelete; - - String get id => _id; - - String get createTime => _createTime; - - String get createUser => _createUser; - - String get updateTime => _updateTime; - - String get updateUser => _updateUser; - - String get storeId => _storeId; - - String get actTemplateId => _actTemplateId; - - String get actTimeId => _actTimeId; - - String get actRecordId => _actRecordId; - - String get mid => _mid; - - String get orderId => _orderId; - - bool get isLeader => _isLeader; - - String get memberAvatar => _memberAvatar; - - String get memberNickname => _memberNickname; - - String get productId => _productId; - - String get actPrice => _actPrice; - - bool get state => _state; - - int get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['actTemplateId'] = _actTemplateId; - map['actTimeId'] = _actTimeId; - map['actRecordId'] = _actRecordId; - map['mid'] = _mid; - map['orderId'] = _orderId; - map['isLeader'] = _isLeader; - map['memberAvatar'] = _memberAvatar; - map['memberNickname'] = _memberNickname; - map['productId'] = _productId; - map['actPrice'] = _actPrice; - map['state'] = _state; - map['isDelete'] = _isDelete; - return map; - } -} - -/// id : "1479399513473941504" -/// createTime : "2022-01-07 18:28:25" -/// createUser : "1478548720785031168" -/// updateTime : "2022-01-07 18:28:25" -/// updateUser : "1478548720785031168" -/// storeId : "1460885296764682240" -/// type : 1 -/// actTemplateId : "1479377328797646848" -/// actTimeId : "1479377329099636736" -/// actProductId : "1479377402042777600" -/// mid : "1478548720785031168" -/// joinNum : 0 -/// startTime : "2022-01-07 18:28:25" -/// endTime : "2022-01-08 16:28:25" -/// state : 2 -/// isDelete : 0 - -class ActRecord { - ActRecord({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - int type, - String actTemplateId, - String actTimeId, - String actProductId, - String mid, - int joinNum, - String startTime, - String endTime, - int state, - int isDelete, - }) { - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _type = type; - _actTemplateId = actTemplateId; - _actTimeId = actTimeId; - _actProductId = actProductId; - _mid = mid; - _joinNum = joinNum; - _startTime = startTime; - _endTime = endTime; - _state = state; - _isDelete = isDelete; - } - - ActRecord.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _type = json['type']; - _actTemplateId = json['actTemplateId']; - _actTimeId = json['actTimeId']; - _actProductId = json['actProductId']; - _mid = json['mid']; - _joinNum = json['joinNum']; - _startTime = json['startTime']; - _endTime = json['endTime']; - _state = json['state']; - _isDelete = json['isDelete']; - } - - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - int _type; - String _actTemplateId; - String _actTimeId; - String _actProductId; - String _mid; - int _joinNum; - String _startTime; - String _endTime; - int _state; - int _isDelete; - int _tempDay; - int _tempHour; - int _tempM; - int _tempS; - - - int get tempDay => _tempDay; - - set tempDay(int value) { - _tempDay = value; - } - - String get id => _id; - - String get createTime => _createTime; - - String get createUser => _createUser; - - String get updateTime => _updateTime; - - String get updateUser => _updateUser; - - String get storeId => _storeId; - - int get type => _type; - - String get actTemplateId => _actTemplateId; - - String get actTimeId => _actTimeId; - - String get actProductId => _actProductId; - - String get mid => _mid; - - int get joinNum => _joinNum; - - String get startTime => _startTime; - - String get endTime => _endTime; - - int get state => _state; - - int get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['type'] = _type; - map['actTemplateId'] = _actTemplateId; - map['actTimeId'] = _actTimeId; - map['actProductId'] = _actProductId; - map['mid'] = _mid; - map['joinNum'] = _joinNum; - map['startTime'] = _startTime; - map['endTime'] = _endTime; - map['state'] = _state; - map['isDelete'] = _isDelete; - return map; - } - - int get tempHour => _tempHour; - - set tempHour(int value) { - _tempHour = value; - } - - int get tempM => _tempM; - - set tempM(int value) { - _tempM = value; - } - - int get tempS => _tempS; - - set tempS(int value) { - _tempS = value; - } - -} - -/// id : "1479377402042777600" -/// createTime : "2022-01-07 17:00:33" -/// createUser : "1364043181062094848" -/// updateTime : "2022-01-07 17:00:33" -/// updateUser : "1364043181062094848" -/// storeId : "1460885296764682240" -/// templateId : "1479377328797646848" -/// timeId : "1479377329099636736" -/// productId : "1460886580993458176" -/// productName : "无花果礼盒" -/// productImg : "https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png" -/// productPrice : "88.00" -/// promotionPrice : "88.00" -/// productStock : 0 -/// sellCount : 0 -/// skuJson : [{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}] -/// isDelete : 0 - -class ActProduct { - ActProduct({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String templateId, - String timeId, - String productId, - String productName, - String productImg, - String productPrice, - String promotionPrice, - int productStock, - int sellCount, - List skuJson, - int isDelete, - String shortName, - String supplierName, - String detail, - String details, - String rightImg, - }) { - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _templateId = templateId; - _timeId = timeId; - _productId = productId; - _productName = productName; - _productImg = productImg; - _productPrice = productPrice; - _promotionPrice = promotionPrice; - _productStock = productStock; - _sellCount = sellCount; - _skuJson = skuJson; - _isDelete = isDelete; - _shortName = shortName; - _supplierName =supplierName; - _detail = detail; - _details = details; - _rightImg = rightImg; - } - - ActProduct.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _templateId = json['templateId']; - _timeId = json['timeId']; - _productId = json['productId']; - _productName = json['productName']; - _productImg = json['productImg']; - _productPrice = json['productPrice']; - _promotionPrice = json['promotionPrice']; - _productStock = json['productStock']; - _sellCount = json['sellCount']; - if (json['skuJson'] != null) { - _skuJson = []; - json['skuJson'].forEach((v) { - _skuJson.add(SkuJson.fromJson(v)); - }); - } - _isDelete = json['isDelete']; - _shortName = json['shortName']; - _supplierName = json['supplierName']; - _detail = json['detail']; - _details = json['details']; - _rightImg = json['rightImg']; - } - - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _templateId; - String _timeId; - String _productId; - String _productName; - String _productImg; - String _productPrice; - String _promotionPrice; - int _productStock; - int _sellCount; - List _skuJson; - int _isDelete; - String _shortName; - String _supplierName; - String _detail; - String _details; - String _rightImg; - - String get id => _id; - - String get createTime => _createTime; - - String get createUser => _createUser; - - String get updateTime => _updateTime; - - String get updateUser => _updateUser; - - String get storeId => _storeId; - - String get templateId => _templateId; - - String get timeId => _timeId; - - String get productId => _productId; - - String get productName => _productName; - - String get productImg => _productImg; - - String get productPrice => _productPrice; - - String get promotionPrice => _promotionPrice; - - int get productStock => _productStock; - - int get sellCount => _sellCount; - - List get skuJson => _skuJson; - - int get isDelete => _isDelete; - - String get shortName => _shortName; - - String get supplierName => _supplierName; - - String get detail => _detail; - - String get details => _details; - - String get rightImg => _rightImg; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['templateId'] = _templateId; - map['timeId'] = _timeId; - map['productId'] = _productId; - map['productName'] = _productName; - map['productImg'] = _productImg; - map['productPrice'] = _productPrice; - map['promotionPrice'] = _promotionPrice; - map['productStock'] = _productStock; - map['sellCount'] = _sellCount; - if (_skuJson != null) { - map['skuJson'] = _skuJson.map((v) => v.toJson()).toList(); - } - map['isDelete'] = _isDelete; - map['shortName'] = _shortName; - map['supplierName'] = _supplierName; - map['detail'] = _detail; - map['details'] = _details; - map['rightImg'] = _rightImg; - return map; - } -} - -/// skuId : "1460886581089927168" -/// skuPrice : 88 -/// skuStock : 0 - -class SkuJson { - SkuJson({ - String skuId, - String skuPrice, - int skuStock, - }) { - _skuId = skuId; - _skuPrice = skuPrice; - _skuStock = skuStock; - } - - SkuJson.fromJson(dynamic json) { - _skuId = json['skuId']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - } - - String _skuId; - String _skuPrice; - int _skuStock; - - String get skuId => _skuId; - - String get skuPrice => _skuPrice; - - int get skuStock => _skuStock; - - Map toJson() { - final map = {}; - map['skuId'] = _skuId; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - return map; - } -} diff --git a/lib/retrofit/data/activity_order_list.dart b/lib/retrofit/data/activity_order_list.dart deleted file mode 100644 index c2b83f48..00000000 --- a/lib/retrofit/data/activity_order_list.dart +++ /dev/null @@ -1,111 +0,0 @@ -/// storeName : "海峡姐妹商城" -/// joinTime : "2022-01-07 18:28:25" -/// productImg : "https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png" -/// productName : "无花果礼盒" -/// productSkuName : "" -/// actRecordId : "1479399513473941504" -/// actRecordState : 4 -/// actRecordJoinState : false -/// howManyMore : 2 -/// orderSum : null -/// bargainMoney : null -/// howManyMoney : null - -class ActivityOrderList { - ActivityOrderList({ - String storeName, - String storeId, - String joinTime, - String productImg, - String productName, - String productSkuName, - String actRecordId, - int actRecordState, - bool actRecordJoinState, - int howManyMore, - int successNumber, - dynamic orderSum, - dynamic bargainMoney, - dynamic howManyMoney,}){ - _storeName = storeName; - _storeId = storeId; - _joinTime = joinTime; - _productImg = productImg; - _productName = productName; - _productSkuName = productSkuName; - _actRecordId = actRecordId; - _actRecordState = actRecordState; - _actRecordJoinState = actRecordJoinState; - _howManyMore = howManyMore; - _successNumber = successNumber; - _orderSum = orderSum; - _bargainMoney = bargainMoney; - _howManyMoney = howManyMoney; -} - - ActivityOrderList.fromJson(dynamic json) { - _storeName = json['storeName']; - _storeId = json['storeId']; - _joinTime = json['joinTime']; - _productImg = json['productImg']; - _productName = json['productName']; - _productSkuName = json['productSkuName']; - _actRecordId = json['actRecordId']; - _actRecordState = json['actRecordState']; - _actRecordJoinState = json['actRecordJoinState']; - _howManyMore = json['howManyMore']; - _successNumber = json['successNumber']; - _orderSum = json['orderSum']; - _bargainMoney = json['bargainMoney']; - _howManyMoney = json['howManyMoney']; - } - String _storeName; - String _storeId; - String _joinTime; - String _productImg; - String _productName; - String _productSkuName; - String _actRecordId; - int _actRecordState; - bool _actRecordJoinState; - int _howManyMore; - int _successNumber; - dynamic _orderSum; - dynamic _bargainMoney; - dynamic _howManyMoney; - - String get storeName => _storeName; - String get storeId => _storeId; - String get joinTime => _joinTime; - String get productImg => _productImg; - String get productName => _productName; - String get productSkuName => _productSkuName; - String get actRecordId => _actRecordId; - int get actRecordState => _actRecordState; - bool get actRecordJoinState => _actRecordJoinState; - int get howManyMore => _howManyMore; - int get successNumber => _successNumber; - dynamic get orderSum => _orderSum; - dynamic get bargainMoney => _bargainMoney; - dynamic get howManyMoney => _howManyMoney; - - Map toJson() { - final map = {}; - map['storeName'] = _storeName; - map['storeId'] = _storeId; - map['joinTime'] = _joinTime; - map['productImg'] = _productImg; - map['productName'] = _productName; - map['productSkuName'] = _productSkuName; - map['actRecordId'] = _actRecordId; - map['actRecordState'] = _actRecordState; - map['actRecordJoinState'] = _actRecordJoinState; - map['howManyMore'] = _howManyMore; - map ['successNumber'] = _successNumber; - map['orderSum'] = _orderSum; - map['bargainMoney'] = _bargainMoney; - map['howManyMoney'] = _howManyMoney; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/activity_pos.dart b/lib/retrofit/data/activity_pos.dart deleted file mode 100644 index 2578591b..00000000 --- a/lib/retrofit/data/activity_pos.dart +++ /dev/null @@ -1,50 +0,0 @@ -/// enabled : true -/// code : "1111" -/// showImage : "https://pos.upload.gznl.top/0000/2022/03/4ca95160-aa19-46e5-ad07-8a16ca11c697.jpg" -/// jumpType : 1 -/// jumpUrl : "1417675188681572352" - -class ActivityPos { - ActivityPos({ - bool enabled, - String code, - String showImage, - int jumpType, - String jumpUrl,}){ - _enabled = enabled; - _code = code; - _showImage = showImage; - _jumpType = jumpType; - _jumpUrl = jumpUrl; -} - - ActivityPos.fromJson(dynamic json) { - _enabled = json['enabled']; - _code = json['code']; - _showImage = json['showImage']; - _jumpType = json['jumpType']; - _jumpUrl = json['jumpUrl']; - } - bool _enabled; - String _code; - String _showImage; - int _jumpType; - String _jumpUrl; - - bool get enabled => _enabled; - String get code => _code; - String get showImage => _showImage; - int get jumpType => _jumpType; - String get jumpUrl => _jumpUrl; - - Map toJson() { - final map = {}; - map['enabled'] = _enabled; - map['code'] = _code; - map['showImage'] = _showImage; - map['jumpType'] = _jumpType; - map['jumpUrl'] = _jumpUrl; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/add_vip_info.dart b/lib/retrofit/data/add_vip_info.dart deleted file mode 100644 index c0f48683..00000000 --- a/lib/retrofit/data/add_vip_info.dart +++ /dev/null @@ -1,303 +0,0 @@ -/// id : "1737361620364951552" -/// createTime : "2023-12-20 14:37:43" -/// createUser : "1640233401329909760" -/// updateTime : "2023-12-20 14:37:43" -/// updateUser : "1640233401329909760" -/// mid : "1737361616430694400" -/// masterId : null -/// openid : "" -/// aliOpenid : null -/// douyinOpenid : null -/// nickname : null -/// headimg : null -/// rankId : null -/// rankExpireTime : null -/// balance : null -/// realRecharge : null -/// sex : null -/// status : null -/// onCredit : null -/// loginTime : "2023-12-20 14:37:43" -/// loginNum : null -/// tenantCode : null -/// source : null -/// expendAmount : null -/// buyTimes : null -/// lastBuyTime : null -/// vip_no : "001119613052919191" -/// expireTime : "2033-12-20 14:37:43" -/// integral : null -/// level : null -/// vipRegStore : null -/// certification : null - -class AddVipInfo { - AddVipInfo({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - dynamic masterId, - String openid, - dynamic aliOpenid, - dynamic douyinOpenid, - dynamic nickname, - dynamic headimg, - dynamic rankId, - dynamic rankExpireTime, - dynamic balance, - dynamic realRecharge, - dynamic sex, - dynamic status, - dynamic onCredit, - String loginTime, - dynamic loginNum, - dynamic tenantCode, - dynamic source, - dynamic expendAmount, - dynamic buyTimes, - dynamic lastBuyTime, - String vipNo, - String expireTime, - dynamic integral, - dynamic level, - dynamic vipRegStore, - dynamic certification,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _masterId = masterId; - _openid = openid; - _aliOpenid = aliOpenid; - _douyinOpenid = douyinOpenid; - _nickname = nickname; - _headimg = headimg; - _rankId = rankId; - _rankExpireTime = rankExpireTime; - _balance = balance; - _realRecharge = realRecharge; - _sex = sex; - _status = status; - _onCredit = onCredit; - _loginTime = loginTime; - _loginNum = loginNum; - _tenantCode = tenantCode; - _source = source; - _expendAmount = expendAmount; - _buyTimes = buyTimes; - _lastBuyTime = lastBuyTime; - _vipNo = vipNo; - _expireTime = expireTime; - _integral = integral; - _level = level; - _vipRegStore = vipRegStore; - _certification = certification; -} - - AddVipInfo.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _masterId = json['masterId']; - _openid = json['openid']; - _aliOpenid = json['aliOpenid']; - _douyinOpenid = json['douyinOpenid']; - _nickname = json['nickname']; - _headimg = json['headimg']; - _rankId = json['rankId']; - _rankExpireTime = json['rankExpireTime']; - _balance = json['balance']; - _realRecharge = json['realRecharge']; - _sex = json['sex']; - _status = json['status']; - _onCredit = json['onCredit']; - _loginTime = json['loginTime']; - _loginNum = json['loginNum']; - _tenantCode = json['tenantCode']; - _source = json['source']; - _expendAmount = json['expendAmount']; - _buyTimes = json['buyTimes']; - _lastBuyTime = json['lastBuyTime']; - _vipNo = json['vip_no']; - _expireTime = json['expireTime']; - _integral = json['integral']; - _level = json['level']; - _vipRegStore = json['vipRegStore']; - _certification = json['certification']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - dynamic _masterId; - String _openid; - dynamic _aliOpenid; - dynamic _douyinOpenid; - dynamic _nickname; - dynamic _headimg; - dynamic _rankId; - dynamic _rankExpireTime; - dynamic _balance; - dynamic _realRecharge; - dynamic _sex; - dynamic _status; - dynamic _onCredit; - String _loginTime; - dynamic _loginNum; - dynamic _tenantCode; - dynamic _source; - dynamic _expendAmount; - dynamic _buyTimes; - dynamic _lastBuyTime; - String _vipNo; - String _expireTime; - dynamic _integral; - dynamic _level; - dynamic _vipRegStore; - dynamic _certification; -AddVipInfo copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - dynamic masterId, - String openid, - dynamic aliOpenid, - dynamic douyinOpenid, - dynamic nickname, - dynamic headimg, - dynamic rankId, - dynamic rankExpireTime, - dynamic balance, - dynamic realRecharge, - dynamic sex, - dynamic status, - dynamic onCredit, - String loginTime, - dynamic loginNum, - dynamic tenantCode, - dynamic source, - dynamic expendAmount, - dynamic buyTimes, - dynamic lastBuyTime, - String vipNo, - String expireTime, - dynamic integral, - dynamic level, - dynamic vipRegStore, - dynamic certification, -}) => AddVipInfo( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - masterId: masterId ?? _masterId, - openid: openid ?? _openid, - aliOpenid: aliOpenid ?? _aliOpenid, - douyinOpenid: douyinOpenid ?? _douyinOpenid, - nickname: nickname ?? _nickname, - headimg: headimg ?? _headimg, - rankId: rankId ?? _rankId, - rankExpireTime: rankExpireTime ?? _rankExpireTime, - balance: balance ?? _balance, - realRecharge: realRecharge ?? _realRecharge, - sex: sex ?? _sex, - status: status ?? _status, - onCredit: onCredit ?? _onCredit, - loginTime: loginTime ?? _loginTime, - loginNum: loginNum ?? _loginNum, - tenantCode: tenantCode ?? _tenantCode, - source: source ?? _source, - expendAmount: expendAmount ?? _expendAmount, - buyTimes: buyTimes ?? _buyTimes, - lastBuyTime: lastBuyTime ?? _lastBuyTime, - vipNo: vipNo ?? _vipNo, - expireTime: expireTime ?? _expireTime, - integral: integral ?? _integral, - level: level ?? _level, - vipRegStore: vipRegStore ?? _vipRegStore, - certification: certification ?? _certification, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - dynamic get masterId => _masterId; - String get openid => _openid; - dynamic get aliOpenid => _aliOpenid; - dynamic get douyinOpenid => _douyinOpenid; - dynamic get nickname => _nickname; - dynamic get headimg => _headimg; - dynamic get rankId => _rankId; - dynamic get rankExpireTime => _rankExpireTime; - dynamic get balance => _balance; - dynamic get realRecharge => _realRecharge; - dynamic get sex => _sex; - dynamic get status => _status; - dynamic get onCredit => _onCredit; - String get loginTime => _loginTime; - dynamic get loginNum => _loginNum; - dynamic get tenantCode => _tenantCode; - dynamic get source => _source; - dynamic get expendAmount => _expendAmount; - dynamic get buyTimes => _buyTimes; - dynamic get lastBuyTime => _lastBuyTime; - String get vipNo => _vipNo; - String get expireTime => _expireTime; - dynamic get integral => _integral; - dynamic get level => _level; - dynamic get vipRegStore => _vipRegStore; - dynamic get certification => _certification; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['masterId'] = _masterId; - map['openid'] = _openid; - map['aliOpenid'] = _aliOpenid; - map['douyinOpenid'] = _douyinOpenid; - map['nickname'] = _nickname; - map['headimg'] = _headimg; - map['rankId'] = _rankId; - map['rankExpireTime'] = _rankExpireTime; - map['balance'] = _balance; - map['realRecharge'] = _realRecharge; - map['sex'] = _sex; - map['status'] = _status; - map['onCredit'] = _onCredit; - map['loginTime'] = _loginTime; - map['loginNum'] = _loginNum; - map['tenantCode'] = _tenantCode; - map['source'] = _source; - map['expendAmount'] = _expendAmount; - map['buyTimes'] = _buyTimes; - map['lastBuyTime'] = _lastBuyTime; - map['vip_no'] = _vipNo; - map['expireTime'] = _expireTime; - map['integral'] = _integral; - map['level'] = _level; - map['vipRegStore'] = _vipRegStore; - map['certification'] = _certification; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/address.dart b/lib/retrofit/data/address.dart deleted file mode 100644 index acd8494c..00000000 --- a/lib/retrofit/data/address.dart +++ /dev/null @@ -1,50 +0,0 @@ - - -class Address { - Address(); - - String address; - String area; - String city; - String cityInfo; - String id; - bool isDefault; - String latitude; - String longitude; - String mid; - String phone; - String province; - String tag; - String username; - - factory Address.fromJson(Map json) => Address() - ..address = json['address'] as String - ..area = json['area'] as String - ..city = json['city'] as String - ..cityInfo = json['cityInfo'] as String - ..id = json['id'] as String - ..isDefault = json['isDefault'] as bool - ..latitude = json['latitude'] as String - ..longitude = json['longitude'] as String - ..mid = json['mid'] as String - ..phone = json['phone'] as String - ..province = json['province'] as String - ..tag = json['tag'] as String - ..username = json['username'] as String; - - Map toJson() => { - 'address': this.address, - 'area': this.area, - 'city': this.city, - 'cityInfo': this.cityInfo, - 'id': this.id, - 'isDefault': this.isDefault, - 'latitude': this.latitude, - 'longitude': this.longitude, - 'mid': this.mid, - 'phone': this.phone, - 'province': this.province, - 'tag': this.tag, - 'username': this.username, - }; -} diff --git a/lib/retrofit/data/app_update.dart b/lib/retrofit/data/app_update.dart deleted file mode 100644 index 2185a187..00000000 --- a/lib/retrofit/data/app_update.dart +++ /dev/null @@ -1,58 +0,0 @@ -/// appLastVersion : "1.0.0" -/// appLastVersionUrl : "" -/// appLastVersionUp : "1.0.0" -/// appLastVersionExplain : "优化更新" - -class AppUpdate { - AppUpdate({ - String appLastVersion, - String appLastVersionUrl, - String appLastVersionUp, - String appLastVersionExplain,}){ - _appLastVersion = appLastVersion; - _appLastVersionUrl = appLastVersionUrl; - _appLastVersionUp = appLastVersionUp; - _appLastVersionExplain = appLastVersionExplain; -} - - AppUpdate.fromJson(dynamic json) { - _appLastVersion = json['appLastVersion']; - _appLastVersionUrl = json['appLastVersionUrl']; - _appLastVersionUp = json['appLastVersionUp']; - _appLastVersionExplain = json['appLastVersionExplain']; - } - String _appLastVersion; - String _appLastVersionUrl; - String _appLastVersionUp; - String _appLastVersionExplain; - - String get appLastVersion => _appLastVersion; - String get appLastVersionUrl => _appLastVersionUrl; - String get appLastVersionUp => _appLastVersionUp; - String get appLastVersionExplain => _appLastVersionExplain; - - set appLastVersion(String value) { - _appLastVersion = value; - } - - Map toJson() { - final map = {}; - map['appLastVersion'] = _appLastVersion; - map['appLastVersionUrl'] = _appLastVersionUrl; - map['appLastVersionUp'] = _appLastVersionUp; - map['appLastVersionExplain'] = _appLastVersionExplain; - return map; - } - - set appLastVersionUrl(String value) { - _appLastVersionUrl = value; - } - - set appLastVersionUp(String value) { - _appLastVersionUp = value; - } - - set appLastVersionExplain(String value) { - _appLastVersionExplain = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/article.dart b/lib/retrofit/data/article.dart deleted file mode 100644 index e1a3be86..00000000 --- a/lib/retrofit/data/article.dart +++ /dev/null @@ -1,359 +0,0 @@ -import 'dart:convert'; - -import 'author.dart'; - -/// id : "1498607093517647872" -/// createTime : "2022-03-01 18:32:29" -/// createUser : "1495959790726152192" -/// updateTime : "2022-03-01 18:45:04" -/// updateUser : "1495959790726152192" -/// storeId : "0" -/// categoryId : "0" -/// mainTitle : "哈哈哈哈" -/// viceTitle : null -/// content : "{\"images\":[],\"video\":\"\",\"type\":\"text\"}" -/// coverImg : "" -/// author : "1495959790726152192" -/// type : 3 -/// likes : 0 -/// viewers : 2 -/// startTime : "2022-03-01 18:32:28" -/// endTime : "2121-03-01 18:32:28" -/// isHot : false -/// state : 1 -/// location : "" -/// longitude : "0.000000" -/// latitude : "0.000000" -/// remark : "" -/// isDelete : 0 -/// tenantCode : "" -/// storeName : null -/// liked : false -/// followed : false -/// comments : null -/// authorName : "小帽子" -/// authorHeadImg : "https://pos.upload.gznl.top/admin/2022/02/5877a3fe-0d25-405b-a86b-7bac293ab048.jpeg" - -class Article { - Article({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String categoryId, - String mainTitle, - dynamic viceTitle, - String content, - String coverImg, - dynamic author, - int type, - int likes, - int viewers, - String startTime, - String endTime, - bool isHot, - int state, - String location, - String longitude, - String latitude, - String remark, - int isDelete, - String tenantCode, - dynamic storeName, - bool liked, - bool followed, - dynamic comments, - String authorName, - String authorHeadImg,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _categoryId = categoryId; - _mainTitle = mainTitle; - _viceTitle = viceTitle; - _content = content; - _coverImg = coverImg; - _author = author; - _type = type; - _likes = likes; - _viewers = viewers; - _startTime = startTime; - _endTime = endTime; - _isHot = isHot; - _state = state; - _location = location; - _longitude = longitude; - _latitude = latitude; - _remark = remark; - _isDelete = isDelete; - _tenantCode = tenantCode; - _storeName = storeName; - _liked = liked; - _followed = followed; - _comments = comments; - _authorName = authorName; - _authorHeadImg = authorHeadImg; - } - - Article.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _categoryId = json['categoryId']; - _mainTitle = json['mainTitle']; - _viceTitle = json['viceTitle']; - _content = json['content']; - _coverImg = json['coverImg']; - _author = json["author"] == null ? author : json["author"].toString().startsWith("{") ? Author.fromJson(jsonDecode(json["author"])):json["author"]; - _type = json['type']; - _likes = json['likes']; - _viewers = json['viewers']; - _startTime = json['startTime']; - _endTime = json['endTime']; - _isHot = json['isHot']; - _state = json['state']; - _location = json['location']; - _longitude = json['longitude']; - _latitude = json['latitude']; - _remark = json['remark']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - _storeName = json['storeName']; - _liked = json['liked']; - _followed = json['followed']; - _comments = json['comments']; - _authorName = json['authorName']; - _authorHeadImg = json['authorHeadImg']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _categoryId; - String _mainTitle; - dynamic _viceTitle; - String _content; - String _coverImg; - dynamic _author; - int _type; - int _likes; - int _viewers; - String _startTime; - String _endTime; - bool _isHot; - int _state; - String _location; - String _longitude; - String _latitude; - String _remark; - int _isDelete; - String _tenantCode; - dynamic _storeName; - bool _liked; - bool _followed; - dynamic _comments; - String _authorName; - String _authorHeadImg; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get categoryId => _categoryId; - String get mainTitle => _mainTitle; - dynamic get viceTitle => _viceTitle; - String get content => _content; - String get coverImg => _coverImg; - dynamic get author => _author; - int get type => _type; - int get likes => _likes; - int get viewers => _viewers; - String get startTime => _startTime; - String get endTime => _endTime; - bool get isHot => _isHot; - int get state => _state; - String get location => _location; - String get longitude => _longitude; - String get latitude => _latitude; - String get remark => _remark; - int get isDelete => _isDelete; - String get tenantCode => _tenantCode; - dynamic get storeName => _storeName; - bool get liked => _liked; - bool get followed => _followed; - dynamic get comments => _comments; - String get authorName => _authorName; - String get authorHeadImg => _authorHeadImg; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['categoryId'] = _categoryId; - map['mainTitle'] = _mainTitle; - map['viceTitle'] = _viceTitle; - map['content'] = _content; - map['coverImg'] = _coverImg; - map["author"] = _author.toJson() ?? _author; - map['type'] = _type; - map['likes'] = _likes; - map['viewers'] = _viewers; - map['startTime'] = _startTime; - map['endTime'] = _endTime; - map['isHot'] = _isHot; - map['state'] = _state; - map['location'] = _location; - map['longitude'] = _longitude; - map['latitude'] = _latitude; - map['remark'] = _remark; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - map['storeName'] = _storeName; - map['liked'] = _liked; - map['followed'] = _followed; - map['comments'] = _comments; - map['authorName'] = _authorName; - map['authorHeadImg'] = _authorHeadImg; - return map; - } - - set authorHeadImg(String value) { - _authorHeadImg = value; - } - - set authorName(String value) { - _authorName = value; - } - - set comments(dynamic value) { - _comments = value; - } - - set followed(bool value) { - _followed = value; - } - - set liked(bool value) { - _liked = value; - } - - set storeName(dynamic value) { - _storeName = value; - } - - set tenantCode(String value) { - _tenantCode = value; - } - - set isDelete(int value) { - _isDelete = value; - } - - set remark(String value) { - _remark = value; - } - - set latitude(String value) { - _latitude = value; - } - - set longitude(String value) { - _longitude = value; - } - - set location(String value) { - _location = value; - } - - set state(int value) { - _state = value; - } - - set isHot(bool value) { - _isHot = value; - } - - set endTime(String value) { - _endTime = value; - } - - set startTime(String value) { - _startTime = value; - } - - set viewers(int value) { - _viewers = value; - } - - set likes(int value) { - _likes = value; - } - - set type(int value) { - _type = value; - } - - set author(dynamic value) { - _author = value; - } - - set coverImg(String value) { - _coverImg = value; - } - - set content(String value) { - _content = value; - } - - set viceTitle(dynamic value) { - _viceTitle = value; - } - - set mainTitle(String value) { - _mainTitle = value; - } - - set categoryId(String value) { - _categoryId = value; - } - - set storeId(String value) { - _storeId = value; - } - - set updateUser(String value) { - _updateUser = value; - } - - set updateTime(String value) { - _updateTime = value; - } - - set createUser(String value) { - _createUser = value; - } - - set createTime(String value) { - _createTime = value; - } - - set id(String value) { - _id = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/author.dart b/lib/retrofit/data/author.dart deleted file mode 100644 index dda84c64..00000000 --- a/lib/retrofit/data/author.dart +++ /dev/null @@ -1,30 +0,0 @@ -/// name : "百花谷" -/// avatar : "https://pos.upload.gznl.top/MDAwMA==/2021/06/6a3586dc-a340-470f-b645-1e3155d5f558.jpg" - -class Author { - String _name; - String _avatar; - - String get name => _name; - String get avatar => _avatar; - - Author({ - String name, - String avatar}){ - _name = name; - _avatar = avatar; -} - - Author.fromJson(dynamic json) { - _name = json["name"]; - _avatar = json["avatar"]; - } - - Map toJson() { - var map = {}; - map["name"] = _name; - map["avatar"] = _avatar; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/balance_change_list.dart b/lib/retrofit/data/balance_change_list.dart deleted file mode 100644 index 38e81813..00000000 --- a/lib/retrofit/data/balance_change_list.dart +++ /dev/null @@ -1,367 +0,0 @@ -/// records : [{"id":"1726925231030796288","createTime":"2023-11-21 19:27:14","createUser":"1699083374745878528","updateTime":"2023-11-21 19:27:14","updateUser":"1699083374745878528","mid":"1699083374745878528","linkId":"202311211927130002","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"58.00","realNumber":"0.00","balance":"32.00","mark":"","status":true,"isDeleted":false,"storeName":"海峡姐妹茶(洛神)","nickname":"","phone":"13938248263","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726916049208606720","createTime":"2023-11-21 18:50:45","createUser":"1699075203830644736","updateTime":"2023-11-21 18:50:45","updateUser":"1699075203830644736","mid":"1699075203830644736","linkId":"202311211850440002","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"22.50","realNumber":"0.00","balance":"50.50","mark":"","status":true,"isDeleted":false,"storeName":"台南湾蚵仔煎","nickname":"","phone":"13803841444","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726913953642053632","createTime":"2023-11-21 18:42:26","createUser":"1699075203830644736","updateTime":"2023-11-21 18:42:26","updateUser":"1699075203830644736","mid":"1699075203830644736","linkId":"202311211842250002","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"25.00","realNumber":"0.00","balance":"73.00","mark":"","status":true,"isDeleted":false,"storeName":"前进麦味","nickname":"","phone":"13803841444","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726908739681779712","createTime":"2023-11-21 18:21:43","createUser":"1693622184796225536","updateTime":"2023-11-21 18:21:43","updateUser":"1693622184796225536","mid":"1693622184796225536","linkId":"202311211821410002","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"15.00","realNumber":"0.00","balance":"38.00","mark":"","status":true,"isDeleted":false,"storeName":"嘉义鸡肉饭","nickname":"张心旷","phone":"18162517594","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726812435815333888","createTime":"2023-11-21 11:59:02","createUser":"1699272927989465088","updateTime":"2023-11-21 11:59:02","updateUser":"1699272927989465088","mid":"1699272927989465088","linkId":"202311211159010002","pm":0,"title":"商户余额操作","category":"用户消费","type":"特殊活动赠送金额支付","number":"26.00","realNumber":"0.00","balance":"74.00","mark":"","status":true,"isDeleted":false,"storeName":"台南锅烧意面","nickname":"","phone":"15515981657","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726812193049018368","createTime":"2023-11-21 11:58:04","createUser":"1699272910234976256","updateTime":"2023-11-21 11:58:04","updateUser":"1699272910234976256","mid":"1699272910234976256","linkId":"202311211158030001","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"23.40","realNumber":"0.00","balance":"26.60","mark":"","status":true,"isDeleted":false,"storeName":"台南锅烧意面","nickname":"","phone":"13592548807","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726564858045923328","createTime":"2023-11-20 19:35:15","createUser":"1700858271767724032","updateTime":"2023-11-20 19:35:15","updateUser":"1700858271767724032","mid":"1700858271767724032","linkId":"202311201935140002","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"10.00","realNumber":"0.00","balance":"90.00","mark":"","status":true,"isDeleted":false,"storeName":"前进麦味","nickname":"","phone":"15890630566","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726564858037534720","createTime":"2023-11-20 19:35:15","createUser":"1700858271767724032","updateTime":"2023-11-20 19:35:15","updateUser":"1700858271767724032","mid":"1700858271767724032","linkId":"202311201935140002","pm":0,"title":"商户余额操作","category":"用户消费","type":"特殊活动赠送金额支付","number":"14.00","realNumber":"0.00","balance":"0.00","mark":"","status":true,"isDeleted":false,"storeName":"前进麦味","nickname":"","phone":"15890630566","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726561831784284160","createTime":"2023-11-20 19:23:13","createUser":"1700356595696795648","updateTime":"2023-11-20 19:23:13","updateUser":"1700356595696795648","mid":"1700356595696795648","linkId":"202311201923120001","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"17.00","realNumber":"0.00","balance":"119.60","mark":"","status":true,"isDeleted":false,"storeName":"海峡姐妹茶(奶茶)","nickname":"","phone":"13938290600","startTime":null,"endTime":null,"tenantCode":null,"storeId":null},{"id":"1726561243927412736","createTime":"2023-11-20 19:20:53","createUser":"1700356595696795648","updateTime":"2023-11-20 19:20:53","updateUser":"1700356595696795648","mid":"1700356595696795648","linkId":"202311201920520001","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"29.00","realNumber":"0.00","balance":"136.60","mark":"","status":true,"isDeleted":false,"storeName":"前进麦味","nickname":"","phone":"13938290600","startTime":null,"endTime":null,"tenantCode":null,"storeId":null}] -/// total : "5617" -/// size : "10" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "562" - -class BalanceChangeList { - BalanceChangeList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - BalanceChangeList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -BalanceChangeList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => BalanceChangeList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1726925231030796288" -/// createTime : "2023-11-21 19:27:14" -/// createUser : "1699083374745878528" -/// updateTime : "2023-11-21 19:27:14" -/// updateUser : "1699083374745878528" -/// mid : "1699083374745878528" -/// linkId : "202311211927130002" -/// pm : 0 -/// title : "商户余额操作" -/// category : "用户消费" -/// type : "商户会员余额支付" -/// number : "58.00" -/// realNumber : "0.00" -/// balance : "32.00" -/// mark : "" -/// status : true -/// isDeleted : false -/// storeName : "海峡姐妹茶(洛神)" -/// nickname : "" -/// phone : "13938248263" -/// startTime : null -/// endTime : null -/// tenantCode : null -/// storeId : null - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String linkId, - num pm, - String title, - String category, - String type, - String number, - String realNumber, - String balance, - String mark, - bool status, - bool isDeleted, - String storeName, - String nickname, - String phone, - dynamic startTime, - dynamic endTime, - dynamic tenantCode, - dynamic storeId,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _linkId = linkId; - _pm = pm; - _title = title; - _category = category; - _type = type; - _number = number; - _realNumber = realNumber; - _balance = balance; - _mark = mark; - _status = status; - _isDeleted = isDeleted; - _storeName = storeName; - _nickname = nickname; - _phone = phone; - _startTime = startTime; - _endTime = endTime; - _tenantCode = tenantCode; - _storeId = storeId; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _linkId = json['linkId']; - _pm = json['pm']; - _title = json['title']; - _category = json['category']; - _type = json['type']; - _number = json['number']; - _realNumber = json['realNumber']; - _balance = json['balance']; - _mark = json['mark']; - _status = json['status']; - _isDeleted = json['isDeleted']; - _storeName = json['storeName']; - _nickname = json['nickname']; - _phone = json['phone']; - _startTime = json['startTime']; - _endTime = json['endTime']; - _tenantCode = json['tenantCode']; - _storeId = json['storeId']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _linkId; - num _pm; - String _title; - String _category; - String _type; - String _number; - String _realNumber; - String _balance; - String _mark; - bool _status; - bool _isDeleted; - String _storeName; - String _nickname; - String _phone; - dynamic _startTime; - dynamic _endTime; - dynamic _tenantCode; - dynamic _storeId; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String linkId, - num pm, - String title, - String category, - String type, - String number, - String realNumber, - String balance, - String mark, - bool status, - bool isDeleted, - String storeName, - String nickname, - String phone, - dynamic startTime, - dynamic endTime, - dynamic tenantCode, - dynamic storeId, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - linkId: linkId ?? _linkId, - pm: pm ?? _pm, - title: title ?? _title, - category: category ?? _category, - type: type ?? _type, - number: number ?? _number, - realNumber: realNumber ?? _realNumber, - balance: balance ?? _balance, - mark: mark ?? _mark, - status: status ?? _status, - isDeleted: isDeleted ?? _isDeleted, - storeName: storeName ?? _storeName, - nickname: nickname ?? _nickname, - phone: phone ?? _phone, - startTime: startTime ?? _startTime, - endTime: endTime ?? _endTime, - tenantCode: tenantCode ?? _tenantCode, - storeId: storeId ?? _storeId, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get linkId => _linkId; - num get pm => _pm; - String get title => _title; - String get category => _category; - String get type => _type; - String get number => _number; - String get realNumber => _realNumber; - String get balance => _balance; - String get mark => _mark; - bool get status => _status; - bool get isDeleted => _isDeleted; - String get storeName => _storeName; - String get nickname => _nickname; - String get phone => _phone; - dynamic get startTime => _startTime; - dynamic get endTime => _endTime; - dynamic get tenantCode => _tenantCode; - dynamic get storeId => _storeId; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['linkId'] = _linkId; - map['pm'] = _pm; - map['title'] = _title; - map['category'] = _category; - map['type'] = _type; - map['number'] = _number; - map['realNumber'] = _realNumber; - map['balance'] = _balance; - map['mark'] = _mark; - map['status'] = _status; - map['isDeleted'] = _isDeleted; - map['storeName'] = _storeName; - map['nickname'] = _nickname; - map['phone'] = _phone; - map['startTime'] = _startTime; - map['endTime'] = _endTime; - map['tenantCode'] = _tenantCode; - map['storeId'] = _storeId; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/balance_consumption_ranking_list.dart b/lib/retrofit/data/balance_consumption_ranking_list.dart deleted file mode 100644 index 4fed435e..00000000 --- a/lib/retrofit/data/balance_consumption_ranking_list.dart +++ /dev/null @@ -1,187 +0,0 @@ -/// records : [{"id":"1706504181134655488","name":"","phone":"13052919193","money":"4000.40"},{"id":"1699803728942465024","name":"","phone":"18638550294","money":"1502.00"},{"id":"1699032834800353280","name":"","phone":"13339999709","money":"1387.00"},{"id":"1700069353317203968","name":"","phone":"18530077112","money":"1185.00"},{"id":"1723679701001568256","name":"","phone":"13253333210","money":"1000.00"},{"id":"1700896910958657536","name":"","phone":"15093345036","money":"800.00"},{"id":"1695700464139501568","name":"","phone":"15838033785","money":"780.00"},{"id":"1697426943734972416","name":"昵称","phone":"15827991714","money":"710.11"},{"id":"1692483888078651392","name":"","phone":"15538288982","money":"647.60"},{"id":"1698868848263954432","name":"","phone":"13073719376","money":"628.10"}] -/// total : "1970" -/// size : "10" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "197" - -class BalanceConsumptionRankingList { - BalanceConsumptionRankingList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - BalanceConsumptionRankingList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -BalanceConsumptionRankingList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => BalanceConsumptionRankingList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1706504181134655488" -/// name : "" -/// phone : "13052919193" -/// money : "4000.40" - -class Records { - Records({ - String id, - String name, - String phone, - String money,}){ - _id = id; - _name = name; - _phone = phone; - _money = money; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _name = json['name']; - _phone = json['phone']; - _money = json['money']; - } - String _id; - String _name; - String _phone; - String _money; -Records copyWith({ String id, - String name, - String phone, - String money, -}) => Records( id: id ?? _id, - name: name ?? _name, - phone: phone ?? _phone, - money: money ?? _money, -); - String get id => _id; - String get name => _name; - String get phone => _phone; - String get money => _money; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['name'] = _name; - map['phone'] = _phone; - map['money'] = _money; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/banner.dart b/lib/retrofit/data/banner.dart deleted file mode 100644 index 676724e3..00000000 --- a/lib/retrofit/data/banner.dart +++ /dev/null @@ -1,48 +0,0 @@ - -class BannerData { - String content; - String createTime; - int contentType; - String createUser; - String id; - String imgUrl; - bool isDelete; - String storeId; - String tenantCode; - String type; - String updateTime; - String updateUser; - - BannerData({this.content, this.createTime, this.contentType, this.createUser, this.id, this.imgUrl, this.isDelete, this.storeId, this.tenantCode, this.type, this.updateTime, this.updateUser}); - - factory BannerData.fromJson(Map json) => BannerData( - content: json['content'] as String, - createTime: json['createTime'] as String, - contentType: json['contentType'], - createUser: json['createUser'] as String, - id: json['id'] as String, - imgUrl: json['imgUrl'] as String, - isDelete: json['isDelete'] as bool, - storeId: json['storeId'] as String, - tenantCode: json['tenantCode'] as String, - type: json['type'] as String, - updateTime: json['updateTime'] as String, - updateUser: json['updateUser'] as String, - ); - - Map toJson() => { - 'content': this.content, - 'createTime': this.createTime, - 'contentType': this.contentType, - 'createUser': this.createUser, - 'id': this.id, - 'imgUrl': this.imgUrl, - 'isDelete': this.isDelete, - 'storeId': this.storeId, - 'tenantCode': this.tenantCode, - 'type': this.type, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - }; -} - diff --git a/lib/retrofit/data/base_data.dart b/lib/retrofit/data/base_data.dart deleted file mode 100644 index 30954bd1..00000000 --- a/lib/retrofit/data/base_data.dart +++ /dev/null @@ -1,25 +0,0 @@ - - - -import 'package:json_annotation/json_annotation.dart'; - -part 'base_data.g.dart'; - -@JsonSerializable(genericArgumentFactories: true) -class BaseData { - BaseData(); - - int code; - T data; - dynamic extra; - bool isError; - bool isSuccess; - String msg; - String path; - String timestamp; - - factory BaseData.fromJson(Map json, T Function(dynamic json) fromJsonT) => _$BaseDataFromJson(json, fromJsonT); - - Map toJson(Object Function(T value) toJsonT) => _$BaseDataToJson(this, toJsonT); - -} diff --git a/lib/retrofit/data/base_data.g.dart b/lib/retrofit/data/base_data.g.dart deleted file mode 100644 index 3a4ba372..00000000 --- a/lib/retrofit/data/base_data.g.dart +++ /dev/null @@ -1,37 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'base_data.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -BaseData _$BaseDataFromJson( - Map json, - T Function(Object json) fromJsonT, -) { - return BaseData() - ..code = json['code'] as int - ..data = fromJsonT(json['data']) - ..extra = json['extra'] - ..isError = json['isError'] as bool - ..isSuccess = json['isSuccess'] as bool - ..msg = json['msg'] as String - ..path = json['path'] as String - ..timestamp = json['timestamp'] as String; -} - -Map _$BaseDataToJson( - BaseData instance, - Object Function(T value) toJsonT, -) => - { - 'code': instance.code, - 'data': toJsonT(instance.data), - 'extra': instance.extra, - 'isError': instance.isError, - 'isSuccess': instance.isSuccess, - 'msg': instance.msg, - 'path': instance.path, - 'timestamp': instance.timestamp, - }; diff --git a/lib/retrofit/data/brand.dart b/lib/retrofit/data/brand.dart deleted file mode 100644 index 7e70910e..00000000 --- a/lib/retrofit/data/brand.dart +++ /dev/null @@ -1,69 +0,0 @@ -/// name : "asdasdsad" -/// image : "https://pos.upload.gznl.top/MDAwMA==/2021/07/1741cb53-d035-4f3e-9ca1-b6f1a7fb13eb.webp" -/// video : "asdasdad" -/// desc : "asdasdas" -/// content : "hshs" -/// sort : 0 -/// storeId : "0" - -class Brand { - String _name; - String _image; - String _video; - String _desc; - String _content; - String _icon; - int _sort; - String _storeId; - - String get name => _name; - String get image => _image; - String get video => _video; - String get desc => _desc; - String get content => _content; - String get icon => _icon; - int get sort => _sort; - String get storeId => _storeId; - - Brand({ - String name, - String image, - String video, - String desc, - String content, - int sort, - String storeId}){ - _name = name; - _image = image; - _video = video; - _desc = desc; - _content = content; - _icon = icon; - _sort = sort; - _storeId = storeId; -} - - Brand.fromJson(dynamic json) { - _name = json["name"]; - _image = json["image"]; - _video = json["video"]; - _desc = json["desc"]; - _content = json["content"]; - _icon = json["icon"]; - _sort = json["sort"]; - _storeId = json["storeId"]; - } - - Map toJson() { - var map = {}; - map["name"] = _name; - map["image"] = _image; - map["video"] = _video; - map["desc"] = _desc; - map["content"] = _content; - map["sort"] = _sort; - map["storeId"] = _storeId; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/brand_data.dart b/lib/retrofit/data/brand_data.dart deleted file mode 100644 index 8c83d645..00000000 --- a/lib/retrofit/data/brand_data.dart +++ /dev/null @@ -1,45 +0,0 @@ - -import 'package:huixiang/retrofit/data/banner.dart'; - -class BrandData { - - BrandData(); - - List bannerList; - String company; - String companyDesc; - String originAvatar; - String originDesc; - String originator; - bool inviteNewShow; - - dynamic contents; - dynamic ideals; - - - factory BrandData.fromJson(Map json) => BrandData() - ..bannerList = (json['bannerList'] as List)?.map((e) => - e == null ? null : BannerData.fromJson(e as Map))?.toList() - ..company = json['company'] as String - ..companyDesc = json['companyDesc'] as String - ..originAvatar = json['originAvatar'] as String - ..originDesc = json['originDesc'] as String - ..originator = json['originator'] as String - ..inviteNewShow = json['inviteNewShow'] as bool - ..contents = json['contents'] - ..ideals = json['ideals']; - - Map toJson() => { - 'bannerList': this.bannerList.map((e) => e.toJson()).toList(), - 'company': this.company, - 'companyDesc': this.companyDesc, - 'originAvatar': this.originAvatar, - 'originDesc': this.originDesc, - 'originator': this.originator, - 'inviteNewShow': this.inviteNewShow, - 'contents': this.contents, - 'ideals': this.ideals, - }; - - -} \ No newline at end of file diff --git a/lib/retrofit/data/bus_recharge_list.dart b/lib/retrofit/data/bus_recharge_list.dart deleted file mode 100644 index 47bb7ae4..00000000 --- a/lib/retrofit/data/bus_recharge_list.dart +++ /dev/null @@ -1,304 +0,0 @@ -/// records : [{"id":"1693482520970002431","rechargeMoney":"50.00","giftdMoney":"20.00","limitNum":0,"gitfdCouponId":null,"startDate":null,"endDate":null,"startTime":null,"endTime":null,"tenantCode":"1195","createTime":"2023-10-25 17:18:40","isDeleted":0,"rechargeType":0,"remark":"充值50.00 赠送20.00","sortValue":0,"useNum":0,"mid":null}] -/// total : "0" -/// size : "999" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "0" - -class BusRechargeList { - BusRechargeList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - BusRechargeList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -BusRechargeList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => BusRechargeList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1693482520970002431" -/// rechargeMoney : "50.00" -/// giftdMoney : "20.00" -/// limitNum : 0 -/// gitfdCouponId : null -/// startDate : null -/// endDate : null -/// startTime : null -/// endTime : null -/// tenantCode : "1195" -/// createTime : "2023-10-25 17:18:40" -/// isDeleted : 0 -/// rechargeType : 0 -/// remark : "充值50.00 赠送20.00" -/// sortValue : 0 -/// useNum : 0 -/// mid : null - -class Records { - Records({ - String id, - String rechargeMoney, - String giftdMoney, - num limitNum, - dynamic gitfdCouponId, - dynamic startDate, - dynamic endDate, - dynamic startTime, - dynamic endTime, - String tenantCode, - String createTime, - num isDeleted, - num rechargeType, - String remark, - num sortValue, - num useNum, - dynamic mid,}){ - _id = id; - _rechargeMoney = rechargeMoney; - _giftdMoney = giftdMoney; - _limitNum = limitNum; - _gitfdCouponId = gitfdCouponId; - _startDate = startDate; - _endDate = endDate; - _startTime = startTime; - _endTime = endTime; - _tenantCode = tenantCode; - _createTime = createTime; - _isDeleted = isDeleted; - _rechargeType = rechargeType; - _remark = remark; - _sortValue = sortValue; - _useNum = useNum; - _mid = mid; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _rechargeMoney = json['rechargeMoney']; - _giftdMoney = json['giftdMoney']; - _limitNum = json['limitNum']; - _gitfdCouponId = json['gitfdCouponId']; - _startDate = json['startDate']; - _endDate = json['endDate']; - _startTime = json['startTime']; - _endTime = json['endTime']; - _tenantCode = json['tenantCode']; - _createTime = json['createTime']; - _isDeleted = json['isDeleted']; - _rechargeType = json['rechargeType']; - _remark = json['remark']; - _sortValue = json['sortValue']; - _useNum = json['useNum']; - _mid = json['mid']; - } - String _id; - String _rechargeMoney; - String _giftdMoney; - num _limitNum; - dynamic _gitfdCouponId; - dynamic _startDate; - dynamic _endDate; - dynamic _startTime; - dynamic _endTime; - String _tenantCode; - String _createTime; - num _isDeleted; - num _rechargeType; - String _remark; - num _sortValue; - num _useNum; - dynamic _mid; -Records copyWith({ String id, - String rechargeMoney, - String giftdMoney, - num limitNum, - dynamic gitfdCouponId, - dynamic startDate, - dynamic endDate, - dynamic startTime, - dynamic endTime, - String tenantCode, - String createTime, - num isDeleted, - num rechargeType, - String remark, - num sortValue, - num useNum, - dynamic mid, -}) => Records( id: id ?? _id, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - giftdMoney: giftdMoney ?? _giftdMoney, - limitNum: limitNum ?? _limitNum, - gitfdCouponId: gitfdCouponId ?? _gitfdCouponId, - startDate: startDate ?? _startDate, - endDate: endDate ?? _endDate, - startTime: startTime ?? _startTime, - endTime: endTime ?? _endTime, - tenantCode: tenantCode ?? _tenantCode, - createTime: createTime ?? _createTime, - isDeleted: isDeleted ?? _isDeleted, - rechargeType: rechargeType ?? _rechargeType, - remark: remark ?? _remark, - sortValue: sortValue ?? _sortValue, - useNum: useNum ?? _useNum, - mid: mid ?? _mid, -); - String get id => _id; - String get rechargeMoney => _rechargeMoney; - String get giftdMoney => _giftdMoney; - num get limitNum => _limitNum; - dynamic get gitfdCouponId => _gitfdCouponId; - dynamic get startDate => _startDate; - dynamic get endDate => _endDate; - dynamic get startTime => _startTime; - dynamic get endTime => _endTime; - String get tenantCode => _tenantCode; - String get createTime => _createTime; - num get isDeleted => _isDeleted; - num get rechargeType => _rechargeType; - String get remark => _remark; - num get sortValue => _sortValue; - num get useNum => _useNum; - dynamic get mid => _mid; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['rechargeMoney'] = _rechargeMoney; - map['giftdMoney'] = _giftdMoney; - map['limitNum'] = _limitNum; - map['gitfdCouponId'] = _gitfdCouponId; - map['startDate'] = _startDate; - map['endDate'] = _endDate; - map['startTime'] = _startTime; - map['endTime'] = _endTime; - map['tenantCode'] = _tenantCode; - map['createTime'] = _createTime; - map['isDeleted'] = _isDeleted; - map['rechargeType'] = _rechargeType; - map['remark'] = _remark; - map['sortValue'] = _sortValue; - map['useNum'] = _useNum; - map['mid'] = _mid; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/business_goods.dart b/lib/retrofit/data/business_goods.dart deleted file mode 100644 index 7b3c3c29..00000000 --- a/lib/retrofit/data/business_goods.dart +++ /dev/null @@ -1,957 +0,0 @@ -/// adminProductVOList : [{"id":"1730509840771448832","groupId":"1730470330532626432","groupName":"托尼老师","productName":"快剪60","productImg":"https://pos.upload.lotus-wallet.com/1196/2023/11/0d49eac6-a13d-4b60-b2eb-539b7636798c.jpg","price":"60.00","applyPrice":"100.00","stock":999,"sellCount":1,"status":1,"posShow":true,"deliveries":null,"ticketType":null,"ticketDays":null,"attrList":null,"productSkuVOList":[{"id":"1730509841664835584","createTime":"2023-12-01 16:51:12","createUser":"1729806749562568704","updateTime":"2023-12-01 16:51:12","updateUser":"1729806749562568704","storeId":"1729806749612900352","skuCode":"P202312011651122","skuNameStr":"","productId":"1730509840771448832","skuPrice":"60.00","applyPrice":"100.00","vipPrice":"0.00","packagingFee":"0.00","skuImg":null,"skuStock":999,"autoRenewSkuStock":0,"deliveries":0,"ticketType":"","ticketWipedTimeTemplateId":null,"takeType":null,"ticketDays":"0","ticketExpireTime":"23:59:59","sort":50,"setMeal":"","productSetMeals":[],"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":0,"skuTickets":[],"ticketStyle":"","skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1730509841702584320","createTime":"2023-12-01 16:51:12","createUser":"1729806749562568704","updateTime":"2023-12-01 16:51:12","updateUser":"1729806749562568704","skuId":"1730509841664835584","attrId":"1730509841144741888","attrValueId":"1730509841383817216","sortOrder":null,"isDelete":0}],"setMealDTOList":null,"discountPrice":""}],"skuId":null,"details":"

阿萨斯

","thumbnailImg":"","info":"AA","tenantCode":"1196","sort":1,"subscribeParam":{"isEnableSubscribe":false,"isEnableSubscribePay":false,"timePeriod":122,"subscribeTimes":["09:00-09:12","09:12-09:24","09:24-09:36","09:36-09:48","09:48-10:00","10:00-10:12","10:12-10:24","10:24-10:36","10:36-10:48","10:48-11:00","11:00-11:12","11:12-11:24","11:24-11:36","11:36-11:48","11:48-12:00","12:00-12:12","12:12-12:24","12:24-12:36","12:36-12:48","12:48-13:00","13:00-13:12","13:12-13:24","13:24-13:36","13:36-13:48","13:48-14:00","14:00-14:12","14:12-14:24","14:24-14:36","14:36-14:48","14:48-15:00","15:00-15:12","15:12-15:24","15:24-15:36","15:36-15:48","15:48-16:00","16:00-16:12","16:12-16:24","16:24-16:36","16:36-16:48","16:48-17:00","17:00-17:12","17:12-17:24","17:24-17:36","17:36-17:48","17:48-18:00","18:00-18:12","18:12-18:24","18:24-18:36","18:36-18:48","18:48-19:00","19:00-19:12","19:12-19:24","19:24-19:36","19:36-19:48","19:48-20:00","20:00-20:12","20:12-20:24","20:24-20:30"],"dayOrDate":0,"startAfterDays":null,"daysValidate":null,"subscribeStartTime":"","subscribeEndTime":"","stores":[]},"storeId":"1729806749612900352","salesRules":{"useCoupon":true,"usePromotion":true,"useBalance":true,"useCash":true,"useVip":true,"userBuyLimit":0}},{"id":"1730470585370148864","groupId":"1730470330532626432","groupName":"托尼老师","productName":"预约测试理发","productImg":"https://pos.upload.lotus-wallet.com/1196/2023/11/828cc656-e60f-4f72-8694-293ec18a95c9.jpg","price":"45.00","applyPrice":"50.00","stock":9997,"sellCount":2,"status":1,"posShow":true,"deliveries":null,"ticketType":null,"ticketDays":null,"attrList":null,"productSkuVOList":[{"id":"1730470585613418496","createTime":"2023-12-01 14:15:13","createUser":"1729806749562568704","updateTime":"2023-12-01 14:15:13","updateUser":"1729806749562568704","storeId":"1729806749612900352","skuCode":"P202312011415122","skuNameStr":"","productId":"1730470585370148864","skuPrice":"45.00","applyPrice":"50.00","vipPrice":"0.00","packagingFee":"0.00","skuImg":null,"skuStock":9997,"autoRenewSkuStock":0,"deliveries":0,"ticketType":"","ticketWipedTimeTemplateId":null,"takeType":null,"ticketDays":"0","ticketExpireTime":"23:59:59","sort":50,"setMeal":"","productSetMeals":[],"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":0,"skuTickets":[],"ticketStyle":"","skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1730470585663750144","createTime":"2023-12-01 14:15:13","createUser":"1729806749562568704","updateTime":"2023-12-01 14:15:13","updateUser":"1729806749562568704","skuId":"1730470585613418496","attrId":"1730470585470812160","attrValueId":"1730470585508560896","sortOrder":null,"isDelete":0}],"setMealDTOList":null,"discountPrice":""}],"skuId":null,"details":"

啊啊啊

","thumbnailImg":"","info":"啊啊啊","tenantCode":"1196","sort":0,"subscribeParam":{"isEnableSubscribe":true,"isEnableSubscribePay":true,"timePeriod":30,"subscribeTimes":["09:00-09:30","09:30-10:00","10:00-10:30","10:30-11:00","11:00-11:30","11:30-12:00","12:00-12:30","12:30-13:00","13:00-13:30","13:30-14:00","14:00-14:30","14:30-15:00","15:00-15:30","15:30-16:00","16:00-16:30","16:30-17:00","17:00-17:30","17:30-18:00","18:00-18:30","18:30-19:00","19:00-19:30","19:30-20:00","20:00-20:30"],"dayOrDate":1,"startAfterDays":null,"daysValidate":null,"subscribeStartTime":"","subscribeEndTime":"","stores":[]},"storeId":"1729806749612900352","salesRules":{"useCoupon":true,"usePromotion":true,"useBalance":true,"useCash":true,"useVip":true,"userBuyLimit":0}},{"id":"1731927791605121024","groupId":"1730470330532626432","groupName":"托尼老师","productName":"洗剪吹","productImg":"https://pos.upload.lotus-wallet.com/1196/2023/11/0d49eac6-a13d-4b60-b2eb-539b7636798c.jpg","price":"0.00","applyPrice":"0.00","stock":0,"sellCount":0,"status":1,"posShow":true,"deliveries":null,"ticketType":null,"ticketDays":null,"attrList":null,"productSkuVOList":[{"id":"1731927791819030528","createTime":"2023-12-05 14:45:38","createUser":"1729806749562568704","updateTime":"2023-12-05 14:45:38","updateUser":"1729806749562568704","storeId":"1729806749612900352","skuCode":"P202312051445372","skuNameStr":"","productId":"1731927791605121024","skuPrice":"0.00","applyPrice":"0.00","vipPrice":"0.00","packagingFee":"0.00","skuImg":null,"skuStock":0,"autoRenewSkuStock":0,"deliveries":0,"ticketType":"","ticketWipedTimeTemplateId":null,"takeType":null,"ticketDays":"0","ticketExpireTime":"23:59:59","sort":50,"setMeal":"","productSetMeals":[],"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":0,"skuTickets":[],"ticketStyle":"","skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1731927791865167872","createTime":"2023-12-05 14:45:38","createUser":"1729806749562568704","updateTime":"2023-12-05 14:45:38","updateUser":"1729806749562568704","skuId":"1731927791819030528","attrId":"1731927791718367232","attrValueId":"1731927791756115968","sortOrder":null,"isDelete":0}],"setMealDTOList":null,"discountPrice":""}],"skuId":null,"details":"","thumbnailImg":"","info":"","tenantCode":"1196","sort":0,"subscribeParam":null,"storeId":"1729806749612900352","salesRules":{"useCoupon":true,"usePromotion":true,"useBalance":true,"useCash":true,"useVip":true,"userBuyLimit":0}}] -/// total : 3 - -class BusinessGoods { - BusinessGoods({ - List adminProductVOList, - num total,}){ - _adminProductVOList = adminProductVOList; - _total = total; -} - - BusinessGoods.fromJson(dynamic json) { - if (json['adminProductVOList'] != null) { - _adminProductVOList = []; - json['adminProductVOList'].forEach((v) { - _adminProductVOList.add(AdminProductVoList.fromJson(v)); - }); - } - _total = json['total']; - } - List _adminProductVOList; - num _total; -BusinessGoods copyWith({ List adminProductVOList, - num total, -}) => BusinessGoods( adminProductVOList: adminProductVOList ?? _adminProductVOList, - total: total ?? _total, -); - List get adminProductVOList => _adminProductVOList; - num get total => _total; - - Map toJson() { - final map = {}; - if (_adminProductVOList != null) { - map['adminProductVOList'] = _adminProductVOList.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - return map; - } - -} - -/// id : "1730509840771448832" -/// groupId : "1730470330532626432" -/// groupName : "托尼老师" -/// productName : "快剪60" -/// productImg : "https://pos.upload.lotus-wallet.com/1196/2023/11/0d49eac6-a13d-4b60-b2eb-539b7636798c.jpg" -/// price : "60.00" -/// applyPrice : "100.00" -/// stock : 999 -/// sellCount : 1 -/// status : 1 -/// posShow : true -/// deliveries : null -/// ticketType : null -/// ticketDays : null -/// attrList : null -/// productSkuVOList : [{"id":"1730509841664835584","createTime":"2023-12-01 16:51:12","createUser":"1729806749562568704","updateTime":"2023-12-01 16:51:12","updateUser":"1729806749562568704","storeId":"1729806749612900352","skuCode":"P202312011651122","skuNameStr":"","productId":"1730509840771448832","skuPrice":"60.00","applyPrice":"100.00","vipPrice":"0.00","packagingFee":"0.00","skuImg":null,"skuStock":999,"autoRenewSkuStock":0,"deliveries":0,"ticketType":"","ticketWipedTimeTemplateId":null,"takeType":null,"ticketDays":"0","ticketExpireTime":"23:59:59","sort":50,"setMeal":"","productSetMeals":[],"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":0,"skuTickets":[],"ticketStyle":"","skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1730509841702584320","createTime":"2023-12-01 16:51:12","createUser":"1729806749562568704","updateTime":"2023-12-01 16:51:12","updateUser":"1729806749562568704","skuId":"1730509841664835584","attrId":"1730509841144741888","attrValueId":"1730509841383817216","sortOrder":null,"isDelete":0}],"setMealDTOList":null,"discountPrice":""}] -/// skuId : null -/// details : "

阿萨斯

" -/// thumbnailImg : "" -/// info : "AA" -/// tenantCode : "1196" -/// sort : 1 -/// subscribeParam : {"isEnableSubscribe":false,"isEnableSubscribePay":false,"timePeriod":122,"subscribeTimes":["09:00-09:12","09:12-09:24","09:24-09:36","09:36-09:48","09:48-10:00","10:00-10:12","10:12-10:24","10:24-10:36","10:36-10:48","10:48-11:00","11:00-11:12","11:12-11:24","11:24-11:36","11:36-11:48","11:48-12:00","12:00-12:12","12:12-12:24","12:24-12:36","12:36-12:48","12:48-13:00","13:00-13:12","13:12-13:24","13:24-13:36","13:36-13:48","13:48-14:00","14:00-14:12","14:12-14:24","14:24-14:36","14:36-14:48","14:48-15:00","15:00-15:12","15:12-15:24","15:24-15:36","15:36-15:48","15:48-16:00","16:00-16:12","16:12-16:24","16:24-16:36","16:36-16:48","16:48-17:00","17:00-17:12","17:12-17:24","17:24-17:36","17:36-17:48","17:48-18:00","18:00-18:12","18:12-18:24","18:24-18:36","18:36-18:48","18:48-19:00","19:00-19:12","19:12-19:24","19:24-19:36","19:36-19:48","19:48-20:00","20:00-20:12","20:12-20:24","20:24-20:30"],"dayOrDate":0,"startAfterDays":null,"daysValidate":null,"subscribeStartTime":"","subscribeEndTime":"","stores":[]} -/// storeId : "1729806749612900352" -/// salesRules : {"useCoupon":true,"usePromotion":true,"useBalance":true,"useCash":true,"useVip":true,"userBuyLimit":0} - -class AdminProductVoList { - AdminProductVoList({ - String id, - String groupId, - String groupName, - String productName, - String productImg, - String price, - String applyPrice, - num stock, - num sellCount, - num status, - bool posShow, - dynamic deliveries, - dynamic ticketType, - dynamic ticketDays, - dynamic attrList, - List productSkuVOList, - dynamic skuId, - String details, - String thumbnailImg, - String info, - String tenantCode, - num sort, - SubscribeParam subscribeParam, - String storeId, - SalesRules salesRules,}){ - _id = id; - _groupId = groupId; - _groupName = groupName; - _productName = productName; - _productImg = productImg; - _price = price; - _applyPrice = applyPrice; - _stock = stock; - _sellCount = sellCount; - _status = status; - _posShow = posShow; - _deliveries = deliveries; - _ticketType = ticketType; - _ticketDays = ticketDays; - _attrList = attrList; - _productSkuVOList = productSkuVOList; - _skuId = skuId; - _details = details; - _thumbnailImg = thumbnailImg; - _info = info; - _tenantCode = tenantCode; - _sort = sort; - _subscribeParam = subscribeParam; - _storeId = storeId; - _salesRules = salesRules; -} - - AdminProductVoList.fromJson(dynamic json) { - _id = json['id']; - _groupId = json['groupId']; - _groupName = json['groupName']; - _productName = json['productName']; - _productImg = json['productImg']; - _price = json['price']; - _applyPrice = json['applyPrice']; - _stock = json['stock']; - _sellCount = json['sellCount']; - _status = json['status']; - _posShow = json['posShow']; - _deliveries = json['deliveries']; - _ticketType = json['ticketType']; - _ticketDays = json['ticketDays']; - _attrList = json['attrList']; - if (json['productSkuVOList'] != null) { - _productSkuVOList = []; - json['productSkuVOList'].forEach((v) { - _productSkuVOList.add(ProductSkuVoList.fromJson(v)); - }); - } - _skuId = json['skuId']; - _details = json['details']; - _thumbnailImg = json['thumbnailImg']; - _info = json['info']; - _tenantCode = json['tenantCode']; - _sort = json['sort']; - _subscribeParam = json['subscribeParam'] != null ? SubscribeParam.fromJson(json['subscribeParam']) : null; - _storeId = json['storeId']; - _salesRules = json['salesRules'] != null ? SalesRules.fromJson(json['salesRules']) : null; - } - String _id; - String _groupId; - String _groupName; - String _productName; - String _productImg; - String _price; - String _applyPrice; - num _stock; - num _sellCount; - num _status; - bool _posShow; - dynamic _deliveries; - dynamic _ticketType; - dynamic _ticketDays; - dynamic _attrList; - List _productSkuVOList; - dynamic _skuId; - String _details; - String _thumbnailImg; - String _info; - String _tenantCode; - num _sort; - SubscribeParam _subscribeParam; - String _storeId; - SalesRules _salesRules; -AdminProductVoList copyWith({ String id, - String groupId, - String groupName, - String productName, - String productImg, - String price, - String applyPrice, - num stock, - num sellCount, - num status, - bool posShow, - dynamic deliveries, - dynamic ticketType, - dynamic ticketDays, - dynamic attrList, - List productSkuVOList, - dynamic skuId, - String details, - String thumbnailImg, - String info, - String tenantCode, - num sort, - SubscribeParam subscribeParam, - String storeId, - SalesRules salesRules, -}) => AdminProductVoList( id: id ?? _id, - groupId: groupId ?? _groupId, - groupName: groupName ?? _groupName, - productName: productName ?? _productName, - productImg: productImg ?? _productImg, - price: price ?? _price, - applyPrice: applyPrice ?? _applyPrice, - stock: stock ?? _stock, - sellCount: sellCount ?? _sellCount, - status: status ?? _status, - posShow: posShow ?? _posShow, - deliveries: deliveries ?? _deliveries, - ticketType: ticketType ?? _ticketType, - ticketDays: ticketDays ?? _ticketDays, - attrList: attrList ?? _attrList, - productSkuVOList: productSkuVOList ?? _productSkuVOList, - skuId: skuId ?? _skuId, - details: details ?? _details, - thumbnailImg: thumbnailImg ?? _thumbnailImg, - info: info ?? _info, - tenantCode: tenantCode ?? _tenantCode, - sort: sort ?? _sort, - subscribeParam: subscribeParam ?? _subscribeParam, - storeId: storeId ?? _storeId, - salesRules: salesRules ?? _salesRules, -); - String get id => _id; - String get groupId => _groupId; - String get groupName => _groupName; - String get productName => _productName; - String get productImg => _productImg; - String get price => _price; - String get applyPrice => _applyPrice; - num get stock => _stock; - num get sellCount => _sellCount; - num get status => _status; - bool get posShow => _posShow; - dynamic get deliveries => _deliveries; - dynamic get ticketType => _ticketType; - dynamic get ticketDays => _ticketDays; - dynamic get attrList => _attrList; - List get productSkuVOList => _productSkuVOList; - dynamic get skuId => _skuId; - String get details => _details; - String get thumbnailImg => _thumbnailImg; - String get info => _info; - String get tenantCode => _tenantCode; - num get sort => _sort; - SubscribeParam get subscribeParam => _subscribeParam; - String get storeId => _storeId; - SalesRules get salesRules => _salesRules; - bool _isSelect = false; - num _goodsNumber = 1; - - bool get isSelect => _isSelect; - - set isSelect(bool value) { - _isSelect = value; - } - - - num get goodsNumber => _goodsNumber; - - set goodsNumber(num value) { - _goodsNumber = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['groupId'] = _groupId; - map['groupName'] = _groupName; - map['productName'] = _productName; - map['productImg'] = _productImg; - map['price'] = _price; - map['applyPrice'] = _applyPrice; - map['stock'] = _stock; - map['sellCount'] = _sellCount; - map['status'] = _status; - map['posShow'] = _posShow; - map['deliveries'] = _deliveries; - map['ticketType'] = _ticketType; - map['ticketDays'] = _ticketDays; - map['attrList'] = _attrList; - if (_productSkuVOList != null) { - map['productSkuVOList'] = _productSkuVOList.map((v) => v.toJson()).toList(); - } - map['skuId'] = _skuId; - map['details'] = _details; - map['thumbnailImg'] = _thumbnailImg; - map['info'] = _info; - map['tenantCode'] = _tenantCode; - map['sort'] = _sort; - if (_subscribeParam != null) { - map['subscribeParam'] = _subscribeParam.toJson(); - } - map['storeId'] = _storeId; - if (_salesRules != null) { - map['salesRules'] = _salesRules.toJson(); - } - return map; - } - -} - -/// useCoupon : true -/// usePromotion : true -/// useBalance : true -/// useCash : true -/// useVip : true -/// userBuyLimit : 0 - -class SalesRules { - SalesRules({ - bool useCoupon, - bool usePromotion, - bool useBalance, - bool useCash, - bool useVip, - num userBuyLimit,}){ - _useCoupon = useCoupon; - _usePromotion = usePromotion; - _useBalance = useBalance; - _useCash = useCash; - _useVip = useVip; - _userBuyLimit = userBuyLimit; -} - - SalesRules.fromJson(dynamic json) { - _useCoupon = json['useCoupon']; - _usePromotion = json['usePromotion']; - _useBalance = json['useBalance']; - _useCash = json['useCash']; - _useVip = json['useVip']; - _userBuyLimit = json['userBuyLimit']; - } - bool _useCoupon; - bool _usePromotion; - bool _useBalance; - bool _useCash; - bool _useVip; - num _userBuyLimit; -SalesRules copyWith({ bool useCoupon, - bool usePromotion, - bool useBalance, - bool useCash, - bool useVip, - num userBuyLimit, -}) => SalesRules( useCoupon: useCoupon ?? _useCoupon, - usePromotion: usePromotion ?? _usePromotion, - useBalance: useBalance ?? _useBalance, - useCash: useCash ?? _useCash, - useVip: useVip ?? _useVip, - userBuyLimit: userBuyLimit ?? _userBuyLimit, -); - bool get useCoupon => _useCoupon; - bool get usePromotion => _usePromotion; - bool get useBalance => _useBalance; - bool get useCash => _useCash; - bool get useVip => _useVip; - num get userBuyLimit => _userBuyLimit; - - Map toJson() { - final map = {}; - map['useCoupon'] = _useCoupon; - map['usePromotion'] = _usePromotion; - map['useBalance'] = _useBalance; - map['useCash'] = _useCash; - map['useVip'] = _useVip; - map['userBuyLimit'] = _userBuyLimit; - return map; - } - -} - -/// isEnableSubscribe : false -/// isEnableSubscribePay : false -/// timePeriod : 122 -/// subscribeTimes : ["09:00-09:12","09:12-09:24","09:24-09:36","09:36-09:48","09:48-10:00","10:00-10:12","10:12-10:24","10:24-10:36","10:36-10:48","10:48-11:00","11:00-11:12","11:12-11:24","11:24-11:36","11:36-11:48","11:48-12:00","12:00-12:12","12:12-12:24","12:24-12:36","12:36-12:48","12:48-13:00","13:00-13:12","13:12-13:24","13:24-13:36","13:36-13:48","13:48-14:00","14:00-14:12","14:12-14:24","14:24-14:36","14:36-14:48","14:48-15:00","15:00-15:12","15:12-15:24","15:24-15:36","15:36-15:48","15:48-16:00","16:00-16:12","16:12-16:24","16:24-16:36","16:36-16:48","16:48-17:00","17:00-17:12","17:12-17:24","17:24-17:36","17:36-17:48","17:48-18:00","18:00-18:12","18:12-18:24","18:24-18:36","18:36-18:48","18:48-19:00","19:00-19:12","19:12-19:24","19:24-19:36","19:36-19:48","19:48-20:00","20:00-20:12","20:12-20:24","20:24-20:30"] -/// dayOrDate : 0 -/// startAfterDays : null -/// daysValidate : null -/// subscribeStartTime : "" -/// subscribeEndTime : "" -/// stores : [] - -class SubscribeParam { - SubscribeParam({ - bool isEnableSubscribe, - bool isEnableSubscribePay, - num timePeriod, - List subscribeTimes, - num dayOrDate, - dynamic startAfterDays, - dynamic daysValidate, - String subscribeStartTime, - String subscribeEndTime, - List stores,}){ - _isEnableSubscribe = isEnableSubscribe; - _isEnableSubscribePay = isEnableSubscribePay; - _timePeriod = timePeriod; - _subscribeTimes = subscribeTimes; - _dayOrDate = dayOrDate; - _startAfterDays = startAfterDays; - _daysValidate = daysValidate; - _subscribeStartTime = subscribeStartTime; - _subscribeEndTime = subscribeEndTime; - _stores = stores; -} - - SubscribeParam.fromJson(dynamic json) { - _isEnableSubscribe = json['isEnableSubscribe']; - _isEnableSubscribePay = json['isEnableSubscribePay']; - _timePeriod = json['timePeriod']; - _subscribeTimes = json['subscribeTimes'] != null ? json['subscribeTimes'].cast() : []; - _dayOrDate = json['dayOrDate']; - _startAfterDays = json['startAfterDays']; - _daysValidate = json['daysValidate']; - _subscribeStartTime = json['subscribeStartTime']; - _subscribeEndTime = json['subscribeEndTime']; - // if (json['stores'] != null) { - // _stores = []; - // json['stores'].forEach((v) { - // _stores.add(Dynamic.fromJson(v)); - // }); - // } - } - bool _isEnableSubscribe; - bool _isEnableSubscribePay; - num _timePeriod; - List _subscribeTimes; - num _dayOrDate; - dynamic _startAfterDays; - dynamic _daysValidate; - String _subscribeStartTime; - String _subscribeEndTime; - List _stores; -SubscribeParam copyWith({ bool isEnableSubscribe, - bool isEnableSubscribePay, - num timePeriod, - List subscribeTimes, - num dayOrDate, - dynamic startAfterDays, - dynamic daysValidate, - String subscribeStartTime, - String subscribeEndTime, - List stores, -}) => SubscribeParam( isEnableSubscribe: isEnableSubscribe ?? _isEnableSubscribe, - isEnableSubscribePay: isEnableSubscribePay ?? _isEnableSubscribePay, - timePeriod: timePeriod ?? _timePeriod, - subscribeTimes: subscribeTimes ?? _subscribeTimes, - dayOrDate: dayOrDate ?? _dayOrDate, - startAfterDays: startAfterDays ?? _startAfterDays, - daysValidate: daysValidate ?? _daysValidate, - subscribeStartTime: subscribeStartTime ?? _subscribeStartTime, - subscribeEndTime: subscribeEndTime ?? _subscribeEndTime, - stores: stores ?? _stores, -); - bool get isEnableSubscribe => _isEnableSubscribe; - bool get isEnableSubscribePay => _isEnableSubscribePay; - num get timePeriod => _timePeriod; - List get subscribeTimes => _subscribeTimes; - num get dayOrDate => _dayOrDate; - dynamic get startAfterDays => _startAfterDays; - dynamic get daysValidate => _daysValidate; - String get subscribeStartTime => _subscribeStartTime; - String get subscribeEndTime => _subscribeEndTime; - List get stores => _stores; - - Map toJson() { - final map = {}; - map['isEnableSubscribe'] = _isEnableSubscribe; - map['isEnableSubscribePay'] = _isEnableSubscribePay; - map['timePeriod'] = _timePeriod; - map['subscribeTimes'] = _subscribeTimes; - map['dayOrDate'] = _dayOrDate; - map['startAfterDays'] = _startAfterDays; - map['daysValidate'] = _daysValidate; - map['subscribeStartTime'] = _subscribeStartTime; - map['subscribeEndTime'] = _subscribeEndTime; - if (_stores != null) { - map['stores'] = _stores.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1730509841664835584" -/// createTime : "2023-12-01 16:51:12" -/// createUser : "1729806749562568704" -/// updateTime : "2023-12-01 16:51:12" -/// updateUser : "1729806749562568704" -/// storeId : "1729806749612900352" -/// skuCode : "P202312011651122" -/// skuNameStr : "" -/// productId : "1730509840771448832" -/// skuPrice : "60.00" -/// applyPrice : "100.00" -/// vipPrice : "0.00" -/// packagingFee : "0.00" -/// skuImg : null -/// skuStock : 999 -/// autoRenewSkuStock : 0 -/// deliveries : 0 -/// ticketType : "" -/// ticketWipedTimeTemplateId : null -/// takeType : null -/// ticketDays : "0" -/// ticketExpireTime : "23:59:59" -/// sort : 50 -/// setMeal : "" -/// productSetMeals : [] -/// weight : 0.0 -/// volume : 0.0 -/// isDelete : 0 -/// material : null -/// version : 0 -/// skuTickets : [] -/// ticketStyle : "" -/// skuAttrCodeDTOList : null -/// skuAttrList : [{"id":"1730509841702584320","createTime":"2023-12-01 16:51:12","createUser":"1729806749562568704","updateTime":"2023-12-01 16:51:12","updateUser":"1729806749562568704","skuId":"1730509841664835584","attrId":"1730509841144741888","attrValueId":"1730509841383817216","sortOrder":null,"isDelete":0}] -/// setMealDTOList : null -/// discountPrice : "" - -class ProductSkuVoList { - ProductSkuVoList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String skuCode, - String skuNameStr, - String productId, - String skuPrice, - String applyPrice, - String vipPrice, - String packagingFee, - dynamic skuImg, - num skuStock, - num autoRenewSkuStock, - num deliveries, - String ticketType, - dynamic ticketWipedTimeTemplateId, - dynamic takeType, - String ticketDays, - String ticketExpireTime, - num sort, - String setMeal, - List productSetMeals, - num weight, - num volume, - num isDelete, - dynamic material, - num version, - List skuTickets, - String ticketStyle, - dynamic skuAttrCodeDTOList, - List skuAttrList, - dynamic setMealDTOList, - String discountPrice,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _skuCode = skuCode; - _skuNameStr = skuNameStr; - _productId = productId; - _skuPrice = skuPrice; - _applyPrice = applyPrice; - _vipPrice = vipPrice; - _packagingFee = packagingFee; - _skuImg = skuImg; - _skuStock = skuStock; - _autoRenewSkuStock = autoRenewSkuStock; - _deliveries = deliveries; - _ticketType = ticketType; - _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; - _takeType = takeType; - _ticketDays = ticketDays; - _ticketExpireTime = ticketExpireTime; - _sort = sort; - _setMeal = setMeal; - _productSetMeals = productSetMeals; - _weight = weight; - _volume = volume; - _isDelete = isDelete; - _material = material; - _version = version; - _skuTickets = skuTickets; - _ticketStyle = ticketStyle; - _skuAttrCodeDTOList = skuAttrCodeDTOList; - _skuAttrList = skuAttrList; - _setMealDTOList = setMealDTOList; - _discountPrice = discountPrice; -} - - ProductSkuVoList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _skuCode = json['skuCode']; - _skuNameStr = json['skuNameStr']; - _productId = json['productId']; - _skuPrice = json['skuPrice']; - _applyPrice = json['applyPrice']; - _vipPrice = json['vipPrice']; - _packagingFee = json['packagingFee']; - _skuImg = json['skuImg']; - _skuStock = json['skuStock']; - _autoRenewSkuStock = json['autoRenewSkuStock']; - _deliveries = json['deliveries']; - _ticketType = json['ticketType']; - _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; - _takeType = json['takeType']; - _ticketDays = json['ticketDays']; - _ticketExpireTime = json['ticketExpireTime']; - _sort = json['sort']; - _setMeal = json['setMeal']; - // if (json['productSetMeals'] != null) { - // _productSetMeals = []; - // json['productSetMeals'].forEach((v) { - // _productSetMeals.add(Dynamic.fromJson(v)); - // }); - // } - _weight = json['weight']; - _volume = json['volume']; - _isDelete = json['isDelete']; - _material = json['material']; - _version = json['version']; - // if (json['skuTickets'] != null) { - // _skuTickets = []; - // json['skuTickets'].forEach((v) { - // _skuTickets.add(Dynamic.fromJson(v)); - // }); - // } - _ticketStyle = json['ticketStyle']; - _skuAttrCodeDTOList = json['skuAttrCodeDTOList']; - if (json['skuAttrList'] != null) { - _skuAttrList = []; - json['skuAttrList'].forEach((v) { - _skuAttrList.add(SkuAttrList.fromJson(v)); - }); - } - _setMealDTOList = json['setMealDTOList']; - _discountPrice = json['discountPrice']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _skuCode; - String _skuNameStr; - String _productId; - String _skuPrice; - String _applyPrice; - String _vipPrice; - String _packagingFee; - dynamic _skuImg; - num _skuStock; - num _autoRenewSkuStock; - num _deliveries; - String _ticketType; - dynamic _ticketWipedTimeTemplateId; - dynamic _takeType; - String _ticketDays; - String _ticketExpireTime; - num _sort; - String _setMeal; - List _productSetMeals; - num _weight; - num _volume; - num _isDelete; - dynamic _material; - num _version; - List _skuTickets; - String _ticketStyle; - dynamic _skuAttrCodeDTOList; - List _skuAttrList; - dynamic _setMealDTOList; - String _discountPrice; -ProductSkuVoList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String skuCode, - String skuNameStr, - String productId, - String skuPrice, - String applyPrice, - String vipPrice, - String packagingFee, - dynamic skuImg, - num skuStock, - num autoRenewSkuStock, - num deliveries, - String ticketType, - dynamic ticketWipedTimeTemplateId, - dynamic takeType, - String ticketDays, - String ticketExpireTime, - num sort, - String setMeal, - List productSetMeals, - num weight, - num volume, - num isDelete, - dynamic material, - num version, - List skuTickets, - String ticketStyle, - dynamic skuAttrCodeDTOList, - List skuAttrList, - dynamic setMealDTOList, - String discountPrice, -}) => ProductSkuVoList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - storeId: storeId ?? _storeId, - skuCode: skuCode ?? _skuCode, - skuNameStr: skuNameStr ?? _skuNameStr, - productId: productId ?? _productId, - skuPrice: skuPrice ?? _skuPrice, - applyPrice: applyPrice ?? _applyPrice, - vipPrice: vipPrice ?? _vipPrice, - packagingFee: packagingFee ?? _packagingFee, - skuImg: skuImg ?? _skuImg, - skuStock: skuStock ?? _skuStock, - autoRenewSkuStock: autoRenewSkuStock ?? _autoRenewSkuStock, - deliveries: deliveries ?? _deliveries, - ticketType: ticketType ?? _ticketType, - ticketWipedTimeTemplateId: ticketWipedTimeTemplateId ?? _ticketWipedTimeTemplateId, - takeType: takeType ?? _takeType, - ticketDays: ticketDays ?? _ticketDays, - ticketExpireTime: ticketExpireTime ?? _ticketExpireTime, - sort: sort ?? _sort, - setMeal: setMeal ?? _setMeal, - productSetMeals: productSetMeals ?? _productSetMeals, - weight: weight ?? _weight, - volume: volume ?? _volume, - isDelete: isDelete ?? _isDelete, - material: material ?? _material, - version: version ?? _version, - skuTickets: skuTickets ?? _skuTickets, - ticketStyle: ticketStyle ?? _ticketStyle, - skuAttrCodeDTOList: skuAttrCodeDTOList ?? _skuAttrCodeDTOList, - skuAttrList: skuAttrList ?? _skuAttrList, - setMealDTOList: setMealDTOList ?? _setMealDTOList, - discountPrice: discountPrice ?? _discountPrice, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get skuCode => _skuCode; - String get skuNameStr => _skuNameStr; - String get productId => _productId; - String get skuPrice => _skuPrice; - String get applyPrice => _applyPrice; - String get vipPrice => _vipPrice; - String get packagingFee => _packagingFee; - dynamic get skuImg => _skuImg; - num get skuStock => _skuStock; - num get autoRenewSkuStock => _autoRenewSkuStock; - num get deliveries => _deliveries; - String get ticketType => _ticketType; - dynamic get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; - dynamic get takeType => _takeType; - String get ticketDays => _ticketDays; - String get ticketExpireTime => _ticketExpireTime; - num get sort => _sort; - String get setMeal => _setMeal; - List get productSetMeals => _productSetMeals; - num get weight => _weight; - num get volume => _volume; - num get isDelete => _isDelete; - dynamic get material => _material; - num get version => _version; - List get skuTickets => _skuTickets; - String get ticketStyle => _ticketStyle; - dynamic get skuAttrCodeDTOList => _skuAttrCodeDTOList; - List get skuAttrList => _skuAttrList; - dynamic get setMealDTOList => _setMealDTOList; - String get discountPrice => _discountPrice; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['skuCode'] = _skuCode; - map['skuNameStr'] = _skuNameStr; - map['productId'] = _productId; - map['skuPrice'] = _skuPrice; - map['applyPrice'] = _applyPrice; - map['vipPrice'] = _vipPrice; - map['packagingFee'] = _packagingFee; - map['skuImg'] = _skuImg; - map['skuStock'] = _skuStock; - map['autoRenewSkuStock'] = _autoRenewSkuStock; - map['deliveries'] = _deliveries; - map['ticketType'] = _ticketType; - map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; - map['takeType'] = _takeType; - map['ticketDays'] = _ticketDays; - map['ticketExpireTime'] = _ticketExpireTime; - map['sort'] = _sort; - map['setMeal'] = _setMeal; - if (_productSetMeals != null) { - map['productSetMeals'] = _productSetMeals.map((v) => v.toJson()).toList(); - } - map['weight'] = _weight; - map['volume'] = _volume; - map['isDelete'] = _isDelete; - map['material'] = _material; - map['version'] = _version; - if (_skuTickets != null) { - map['skuTickets'] = _skuTickets.map((v) => v.toJson()).toList(); - } - map['ticketStyle'] = _ticketStyle; - map['skuAttrCodeDTOList'] = _skuAttrCodeDTOList; - if (_skuAttrList != null) { - map['skuAttrList'] = _skuAttrList.map((v) => v.toJson()).toList(); - } - map['setMealDTOList'] = _setMealDTOList; - map['discountPrice'] = _discountPrice; - return map; - } - -} - -/// id : "1730509841702584320" -/// createTime : "2023-12-01 16:51:12" -/// createUser : "1729806749562568704" -/// updateTime : "2023-12-01 16:51:12" -/// updateUser : "1729806749562568704" -/// skuId : "1730509841664835584" -/// attrId : "1730509841144741888" -/// attrValueId : "1730509841383817216" -/// sortOrder : null -/// isDelete : 0 - -class SkuAttrList { - SkuAttrList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String skuId, - String attrId, - String attrValueId, - dynamic sortOrder, - num isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _skuId = skuId; - _attrId = attrId; - _attrValueId = attrValueId; - _sortOrder = sortOrder; - _isDelete = isDelete; -} - - SkuAttrList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _skuId = json['skuId']; - _attrId = json['attrId']; - _attrValueId = json['attrValueId']; - _sortOrder = json['sortOrder']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _skuId; - String _attrId; - String _attrValueId; - dynamic _sortOrder; - num _isDelete; -SkuAttrList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String skuId, - String attrId, - String attrValueId, - dynamic sortOrder, - num isDelete, -}) => SkuAttrList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - skuId: skuId ?? _skuId, - attrId: attrId ?? _attrId, - attrValueId: attrValueId ?? _attrValueId, - sortOrder: sortOrder ?? _sortOrder, - isDelete: isDelete ?? _isDelete, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get skuId => _skuId; - String get attrId => _attrId; - String get attrValueId => _attrValueId; - dynamic get sortOrder => _sortOrder; - num get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['skuId'] = _skuId; - map['attrId'] = _attrId; - map['attrValueId'] = _attrValueId; - map['sortOrder'] = _sortOrder; - map['isDelete'] = _isDelete; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/business_login_info.dart b/lib/retrofit/data/business_login_info.dart deleted file mode 100644 index a7e9f94a..00000000 --- a/lib/retrofit/data/business_login_info.dart +++ /dev/null @@ -1,335 +0,0 @@ -/// token : "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3R5cGUiOiJCVVNJTkVTUyIsIm5hbWUiOiLpg5Hlt57lsI_lkIPooZciLCJ0b2tlbl90eXBlIjoidG9rZW4iLCJ1c2VyaWQiOiIxNjQwMjMzNDAxMzI5OTA5NzYwIiwiYWNjb3VudCI6IjE1ODI3OTkxNzE0IiwiZXhwIjoxNzA3Mzc3Nzc4LCJuYmYiOjE3MDQ3ODU3Nzh9.ZXBnkiDGSsL5K_PUKXH4I0qq5x6CctkHPeuE9gqdrKQ" -/// tokenType : "token" -/// type : 1 -/// refreshToken : "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJpZCI6IjE2NDAyMzM0MDEzMjk5MDk3NjAiLCJleHAiOjE3MDk5Njk3NzgsIm5iZiI6MTcwNDc4NTc3OH0.zoCQ5bJKJlDb9NL13NXs1WGNxCxt6OimnJqOpdhkdCw" -/// name : "郑州小吃街" -/// account : "15827991714" -/// avatar : "" -/// workDescribe : "" -/// userId : "1640233401329909760" -/// userType : "BUSINESS" -/// expire : "2592000" -/// expiration : "2024-02-08 15:36:18" -/// mobile : "13910001000" -/// userList : null -/// tenantCode : "1195" -/// expirationTime : null -/// status : {"desc":"正常","code":"NORMAL"} -/// isAdmin : true -/// storeList : [{"id":"1645316356192600064","name":"士林鲜果&牛奶","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645317547899224064","name":"深坑卤水臭豆腐","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645317671987707904","name":"彰化烤玉米","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645317921456521216","name":"桃园铁板麻辣豆腐","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645318098540036096","name":"台南古早味粽","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645318285786349568","name":"庙口阿嫲炸菇菇","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645318425783828480","name":"屏东剉冰店(烧冷冰)","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645318527105630208","name":"台南锅烧意面","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645318745612091392","name":"冈山羊肉炉","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645318946187902976","name":"九号飞船西餐厅","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645319131278344192","name":"台北牛肉面","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645319215739043840","name":"淡水阿给","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645319318184919040","name":"丰原排骨酥焿","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645321493476802560","name":"高雄鱿鱼羹/筒仔米糕/担仔面","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645321921190952960","name":"前进麦味","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645324215450075136","name":"永康街芒果冰","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645325613776502784","name":"虎咬猪","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645326136193843200","name":"台南湾蚵仔煎","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645326338908749824","name":"台式披萨","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645326403631054848","name":"台北米粉汤","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645689802072260608","name":"台式小火锅","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645690919204159488","name":"农场煮意","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645691756009750528","name":"海峡姐妹茶(奶茶)","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645691900562243584","name":"杉菜爸爸贡丸","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645692068967743488","name":"海峡姐妹茶(洛神)","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645692262354518016","name":"嘉义鸡肉饭","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645694248827224064","name":"手工汤圆","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645695120688807936","name":"杏仁油条","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645695186774261760","name":"豆花妈妈","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645695531587993600","name":"古早味红茶冰","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645695622973489152","name":"蒸食记","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645698130097733632","name":"烤鹌鹑蛋","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645698860804210688","name":"QQ地瓜球","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645698953653518336","name":"鸡蛋糕","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645701214400151552","name":"炸元宝","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645701282909913088","name":"南投红薯饼","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645701372395388928","name":"润饼卷","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645701459838238720","name":"大肠包小肠","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645701540310155264","name":"台式夯肉","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645701593900777472","name":"菇菇盐酥鸡","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1645701646107279360","name":"炸蚵嗲/元宝","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1692382652344041472","name":"彰化肉丸","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1698928683340791808","name":"文创市集","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1699018850630107136","name":"饱岛盲盒","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}},{"id":"1707273867153637376","name":"活动权益","posType":"FASTSTORE","useErp":false,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false}}] - -class BusinessLoginInfo { - BusinessLoginInfo({ - String token, - String tokenType, - num type, - String refreshToken, - String name, - String account, - String avatar, - String workDescribe, - String userId, - String userType, - String expire, - String expiration, - String mobile, - dynamic userList, - String tenantCode, - dynamic expirationTime, - Status status, - bool isAdmin, - List storeList,}){ - _token = token; - _tokenType = tokenType; - _type = type; - _refreshToken = refreshToken; - _name = name; - _account = account; - _avatar = avatar; - _workDescribe = workDescribe; - _userId = userId; - _userType = userType; - _expire = expire; - _expiration = expiration; - _mobile = mobile; - _userList = userList; - _tenantCode = tenantCode; - _expirationTime = expirationTime; - _status = status; - _isAdmin = isAdmin; - _storeList = storeList; -} - - BusinessLoginInfo.fromJson(dynamic json) { - _token = json['token']; - _tokenType = json['tokenType']; - _type = json['type']; - _refreshToken = json['refreshToken']; - _name = json['name']; - _account = json['account']; - _avatar = json['avatar']; - _workDescribe = json['workDescribe']; - _userId = json['userId']; - _userType = json['userType']; - _expire = json['expire']; - _expiration = json['expiration']; - _mobile = json['mobile']; - _userList = json['userList']; - _tenantCode = json['tenantCode']; - _expirationTime = json['expirationTime']; - _status = json['status'] != null ? Status.fromJson(json['status']) : null; - _isAdmin = json['isAdmin']; - if (json['storeList'] != null) { - _storeList = []; - json['storeList'].forEach((v) { - _storeList.add(StoreList.fromJson(v)); - }); - } - } - String _token; - String _tokenType; - num _type; - String _refreshToken; - String _name; - String _account; - String _avatar; - String _workDescribe; - String _userId; - String _userType; - String _expire; - String _expiration; - String _mobile; - dynamic _userList; - String _tenantCode; - dynamic _expirationTime; - Status _status; - bool _isAdmin; - List _storeList; -BusinessLoginInfo copyWith({ String token, - String tokenType, - num type, - String refreshToken, - String name, - String account, - String avatar, - String workDescribe, - String userId, - String userType, - String expire, - String expiration, - String mobile, - dynamic userList, - String tenantCode, - dynamic expirationTime, - Status status, - bool isAdmin, - List storeList, -}) => BusinessLoginInfo( token: token ?? _token, - tokenType: tokenType ?? _tokenType, - type: type ?? _type, - refreshToken: refreshToken ?? _refreshToken, - name: name ?? _name, - account: account ?? _account, - avatar: avatar ?? _avatar, - workDescribe: workDescribe ?? _workDescribe, - userId: userId ?? _userId, - userType: userType ?? _userType, - expire: expire ?? _expire, - expiration: expiration ?? _expiration, - mobile: mobile ?? _mobile, - userList: userList ?? _userList, - tenantCode: tenantCode ?? _tenantCode, - expirationTime: expirationTime ?? _expirationTime, - status: status ?? _status, - isAdmin: isAdmin ?? _isAdmin, - storeList: storeList ?? _storeList, -); - String get token => _token; - String get tokenType => _tokenType; - num get type => _type; - String get refreshToken => _refreshToken; - String get name => _name; - String get account => _account; - String get avatar => _avatar; - String get workDescribe => _workDescribe; - String get userId => _userId; - String get userType => _userType; - String get expire => _expire; - String get expiration => _expiration; - String get mobile => _mobile; - dynamic get userList => _userList; - String get tenantCode => _tenantCode; - dynamic get expirationTime => _expirationTime; - Status get status => _status; - bool get isAdmin => _isAdmin; - List get storeList => _storeList; - - Map toJson() { - final map = {}; - map['token'] = _token; - map['tokenType'] = _tokenType; - map['type'] = _type; - map['refreshToken'] = _refreshToken; - map['name'] = _name; - map['account'] = _account; - map['avatar'] = _avatar; - map['workDescribe'] = _workDescribe; - map['userId'] = _userId; - map['userType'] = _userType; - map['expire'] = _expire; - map['expiration'] = _expiration; - map['mobile'] = _mobile; - map['userList'] = _userList; - map['tenantCode'] = _tenantCode; - map['expirationTime'] = _expirationTime; - if (_status != null) { - map['status'] = _status.toJson(); - } - map['isAdmin'] = _isAdmin; - if (_storeList != null) { - map['storeList'] = _storeList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1645316356192600064" -/// name : "士林鲜果&牛奶" -/// posType : "FASTSTORE" -/// useErp : false -/// pickupType : {"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false} - -class StoreList { - StoreList({ - String id, - String name, - String posType, - bool useErp, - PickupType pickupType,}){ - _id = id; - _name = name; - _posType = posType; - _useErp = useErp; - _pickupType = pickupType; -} - - StoreList.fromJson(dynamic json) { - _id = json['id']; - _name = json['name']; - _posType = json['posType']; - _useErp = json['useErp']; - _pickupType = json['pickupType'] != null ? PickupType.fromJson(json['pickupType']) : null; - } - String _id; - String _name; - String _posType; - bool _useErp; - PickupType _pickupType; -StoreList copyWith({ String id, - String name, - String posType, - bool useErp, - PickupType pickupType, -}) => StoreList( id: id ?? _id, - name: name ?? _name, - posType: posType ?? _posType, - useErp: useErp ?? _useErp, - pickupType: pickupType ?? _pickupType, -); - String get id => _id; - String get name => _name; - String get posType => _posType; - bool get useErp => _useErp; - PickupType get pickupType => _pickupType; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['name'] = _name; - map['posType'] = _posType; - map['useErp'] = _useErp; - if (_pickupType != null) { - map['pickupType'] = _pickupType.toJson(); - } - return map; - } - -} - -/// dineInTakeStatus : false -/// takeawayStatus : false -/// expressDeliveryStatus : false - -class PickupType { - PickupType({ - bool dineInTakeStatus, - bool takeawayStatus, - bool expressDeliveryStatus,}){ - _dineInTakeStatus = dineInTakeStatus; - _takeawayStatus = takeawayStatus; - _expressDeliveryStatus = expressDeliveryStatus; -} - - PickupType.fromJson(dynamic json) { - _dineInTakeStatus = json['dineInTakeStatus']; - _takeawayStatus = json['takeawayStatus']; - _expressDeliveryStatus = json['expressDeliveryStatus']; - } - bool _dineInTakeStatus; - bool _takeawayStatus; - bool _expressDeliveryStatus; -PickupType copyWith({ bool dineInTakeStatus, - bool takeawayStatus, - bool expressDeliveryStatus, -}) => PickupType( dineInTakeStatus: dineInTakeStatus ?? _dineInTakeStatus, - takeawayStatus: takeawayStatus ?? _takeawayStatus, - expressDeliveryStatus: expressDeliveryStatus ?? _expressDeliveryStatus, -); - bool get dineInTakeStatus => _dineInTakeStatus; - bool get takeawayStatus => _takeawayStatus; - bool get expressDeliveryStatus => _expressDeliveryStatus; - - Map toJson() { - final map = {}; - map['dineInTakeStatus'] = _dineInTakeStatus; - map['takeawayStatus'] = _takeawayStatus; - map['expressDeliveryStatus'] = _expressDeliveryStatus; - return map; - } - -} - -/// desc : "正常" -/// code : "NORMAL" - -class Status { - Status({ - String desc, - String code,}){ - _desc = desc; - _code = code; -} - - Status.fromJson(dynamic json) { - _desc = json['desc']; - _code = json['code']; - } - String _desc; - String _code; -Status copyWith({ String desc, - String code, -}) => Status( desc: desc ?? _desc, - code: code ?? _code, -); - String get desc => _desc; - String get code => _code; - - Map toJson() { - final map = {}; - map['desc'] = _desc; - map['code'] = _code; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/business_order_detail_info.dart b/lib/retrofit/data/business_order_detail_info.dart deleted file mode 100644 index 4328bbf9..00000000 --- a/lib/retrofit/data/business_order_detail_info.dart +++ /dev/null @@ -1,1083 +0,0 @@ -/// id : "1705059878256508928" -/// orderCode : "202309221122080002" -/// storeName : "海峡姐妹茶(奶茶)" -/// orderStatus : 2 -/// payStatus : 1 -/// orderSum : "9.00" -/// paySum : "8.28" -/// discountAmount : null -/// payChannel : 4 -/// createTime : "2023-09-22 11:22:08" -/// notes : "" -/// payNum : "" -/// returnType : null -/// logisticsCase : null -/// payTime : "2023-09-22 11:22:09" -/// memberAccount : "" -/// orderCount : 1 -/// recName : null -/// recMobile : null -/// province : null -/// city : null -/// area : null -/// address : "湖北省武汉市江汉区万松街道青年路招银大厦" -/// shipperCode : "" -/// logisticsNum : "" -/// logisticsName : "" -/// orderSource : 2 -/// orderProductDTOList : [{"id":"1705059878650773504","createTime":"2023-09-22 11:22:08","createUser":"1695008923246919680","updateTime":"2023-09-22 11:22:08","updateUser":"1695008923246919680","tenantCode":"1195","storeId":"1645691756009750528","orderId":"1705059878256508928","actInfo":null,"productId":"1685953238345449472","productName":"台18茗茶","skuId":"1689482412884492288","skuNameStr":"700ml 温热 七分糖","skuImg":"https://pos.upload.lotus-wallet.com/1195/2023/08/e08f6297-06dd-4128-b21d-20930018df03.jpg","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"9.00","sellPrice":"9.00","postPay":"0.00","isDelete":0,"discountAmount":"0.72","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}] -/// moneyReturnList : null -/// goodsReturnList : null -/// moneyReturnActionHistoryList : null -/// goodsReturnActionHistoryList : null -/// sonOrderList : null -/// refundStatus : 2 -/// reason : "测试退款" -/// isSubscribe : false -/// subcribeTime : null -/// addressExt : {"addressId":null,"country":null,"countryId":null,"province":"湖北省","provinceId":null,"city":"武汉市","cityId":null,"district":"汉口区","districtId":null,"cityInfo":null,"address":"湖北省武汉市江汉区万松街道青年路招银大厦","recName":null,"recMobile":null,"longitude":"114.263242","latitude":"30.593863"} -/// contactsExtList : null -/// memberInfo : {"mid":"1695008923246919680","name":"哈哈哈","phone":"13052919193","mark":null} -/// payRecordList : [{"id":"1705059881448374272","createTime":"2023-09-22 11:22:09","createUser":"1695008923246919680","updateTime":"2023-09-22 11:22:09","updateUser":"1695008923246919680","orderId":"1705059878256508928","type":4,"amount":"8.28","refundAmount":"0.00","state":1,"refId":"1705059881398042624","isDelete":false,"tenantCode":null}] - -class BusinessOrderDetailInfo { - BusinessOrderDetailInfo({ - String id, - String orderCode, - String storeName, - num orderStatus, - num payStatus, - String orderSum, - String paySum, - dynamic discountAmount, - num payChannel, - String createTime, - String notes, - String payNum, - dynamic returnType, - dynamic logisticsCase, - String payTime, - String memberAccount, - num orderCount, - dynamic recName, - dynamic recMobile, - dynamic province, - dynamic city, - dynamic area, - String address, - String shipperCode, - String logisticsNum, - String logisticsName, - num orderSource, - List orderProductDTOList, - dynamic moneyReturnList, - dynamic goodsReturnList, - dynamic moneyReturnActionHistoryList, - dynamic goodsReturnActionHistoryList, - dynamic sonOrderList, - num refundStatus, - String reason, - bool isSubscribe, - dynamic subcribeTime, - AddressExt addressExt, - dynamic contactsExtList, - MemberInfo memberInfo, - List payRecordList,}){ - _id = id; - _orderCode = orderCode; - _storeName = storeName; - _orderStatus = orderStatus; - _payStatus = payStatus; - _orderSum = orderSum; - _paySum = paySum; - _discountAmount = discountAmount; - _payChannel = payChannel; - _createTime = createTime; - _notes = notes; - _payNum = payNum; - _returnType = returnType; - _logisticsCase = logisticsCase; - _payTime = payTime; - _memberAccount = memberAccount; - _orderCount = orderCount; - _recName = recName; - _recMobile = recMobile; - _province = province; - _city = city; - _area = area; - _address = address; - _shipperCode = shipperCode; - _logisticsNum = logisticsNum; - _logisticsName = logisticsName; - _orderSource = orderSource; - _orderProductDTOList = orderProductDTOList; - _moneyReturnList = moneyReturnList; - _goodsReturnList = goodsReturnList; - _moneyReturnActionHistoryList = moneyReturnActionHistoryList; - _goodsReturnActionHistoryList = goodsReturnActionHistoryList; - _sonOrderList = sonOrderList; - _refundStatus = refundStatus; - _reason = reason; - _isSubscribe = isSubscribe; - _subcribeTime = subcribeTime; - _addressExt = addressExt; - _contactsExtList = contactsExtList; - _memberInfo = memberInfo; - _payRecordList = payRecordList; -} - - BusinessOrderDetailInfo.fromJson(dynamic json) { - _id = json['id']; - _orderCode = json['orderCode']; - _storeName = json['storeName']; - _orderStatus = json['orderStatus']; - _payStatus = json['payStatus']; - _orderSum = json['orderSum']; - _paySum = json['paySum']; - _discountAmount = json['discountAmount']; - _payChannel = json['payChannel']; - _createTime = json['createTime']; - _notes = json['notes']; - _payNum = json['payNum']; - _returnType = json['returnType']; - _logisticsCase = json['logisticsCase']; - _payTime = json['payTime']; - _memberAccount = json['memberAccount']; - _orderCount = json['orderCount']; - _recName = json['recName']; - _recMobile = json['recMobile']; - _province = json['province']; - _city = json['city']; - _area = json['area']; - _address = json['address']; - _shipperCode = json['shipperCode']; - _logisticsNum = json['logisticsNum']; - _logisticsName = json['logisticsName']; - _orderSource = json['orderSource']; - if (json['orderProductDTOList'] != null) { - _orderProductDTOList = []; - json['orderProductDTOList'].forEach((v) { - _orderProductDTOList.add(OrderProductDtoList.fromJson(v)); - }); - } - _moneyReturnList = json['moneyReturnList']; - _goodsReturnList = json['goodsReturnList']; - _moneyReturnActionHistoryList = json['moneyReturnActionHistoryList']; - _goodsReturnActionHistoryList = json['goodsReturnActionHistoryList']; - _sonOrderList = json['sonOrderList']; - _refundStatus = json['refundStatus']; - _reason = json['reason']; - _isSubscribe = json['isSubscribe']; - _subcribeTime = json['subcribeTime']; - _addressExt = json['addressExt'] != null ? AddressExt.fromJson(json['addressExt']) : null; - _contactsExtList = json['contactsExtList']; - _memberInfo = json['memberInfo'] != null ? MemberInfo.fromJson(json['memberInfo']) : null; - if (json['payRecordList'] != null) { - _payRecordList = []; - json['payRecordList'].forEach((v) { - _payRecordList.add(PayRecordList.fromJson(v)); - }); - } - } - String _id; - String _orderCode; - String _storeName; - num _orderStatus; - num _payStatus; - String _orderSum; - String _paySum; - dynamic _discountAmount; - num _payChannel; - String _createTime; - String _notes; - String _payNum; - dynamic _returnType; - dynamic _logisticsCase; - String _payTime; - String _memberAccount; - num _orderCount; - dynamic _recName; - dynamic _recMobile; - dynamic _province; - dynamic _city; - dynamic _area; - String _address; - String _shipperCode; - String _logisticsNum; - String _logisticsName; - num _orderSource; - List _orderProductDTOList; - dynamic _moneyReturnList; - dynamic _goodsReturnList; - dynamic _moneyReturnActionHistoryList; - dynamic _goodsReturnActionHistoryList; - dynamic _sonOrderList; - num _refundStatus; - String _reason; - bool _isSubscribe; - dynamic _subcribeTime; - AddressExt _addressExt; - dynamic _contactsExtList; - MemberInfo _memberInfo; - List _payRecordList; -BusinessOrderDetailInfo copyWith({ String id, - String orderCode, - String storeName, - num orderStatus, - num payStatus, - String orderSum, - String paySum, - dynamic discountAmount, - num payChannel, - String createTime, - String notes, - String payNum, - dynamic returnType, - dynamic logisticsCase, - String payTime, - String memberAccount, - num orderCount, - dynamic recName, - dynamic recMobile, - dynamic province, - dynamic city, - dynamic area, - String address, - String shipperCode, - String logisticsNum, - String logisticsName, - num orderSource, - List orderProductDTOList, - dynamic moneyReturnList, - dynamic goodsReturnList, - dynamic moneyReturnActionHistoryList, - dynamic goodsReturnActionHistoryList, - dynamic sonOrderList, - num refundStatus, - String reason, - bool isSubscribe, - dynamic subcribeTime, - AddressExt addressExt, - dynamic contactsExtList, - MemberInfo memberInfo, - List payRecordList, -}) => BusinessOrderDetailInfo( id: id ?? _id, - orderCode: orderCode ?? _orderCode, - storeName: storeName ?? _storeName, - orderStatus: orderStatus ?? _orderStatus, - payStatus: payStatus ?? _payStatus, - orderSum: orderSum ?? _orderSum, - paySum: paySum ?? _paySum, - discountAmount: discountAmount ?? _discountAmount, - payChannel: payChannel ?? _payChannel, - createTime: createTime ?? _createTime, - notes: notes ?? _notes, - payNum: payNum ?? _payNum, - returnType: returnType ?? _returnType, - logisticsCase: logisticsCase ?? _logisticsCase, - payTime: payTime ?? _payTime, - memberAccount: memberAccount ?? _memberAccount, - orderCount: orderCount ?? _orderCount, - recName: recName ?? _recName, - recMobile: recMobile ?? _recMobile, - province: province ?? _province, - city: city ?? _city, - area: area ?? _area, - address: address ?? _address, - shipperCode: shipperCode ?? _shipperCode, - logisticsNum: logisticsNum ?? _logisticsNum, - logisticsName: logisticsName ?? _logisticsName, - orderSource: orderSource ?? _orderSource, - orderProductDTOList: orderProductDTOList ?? _orderProductDTOList, - moneyReturnList: moneyReturnList ?? _moneyReturnList, - goodsReturnList: goodsReturnList ?? _goodsReturnList, - moneyReturnActionHistoryList: moneyReturnActionHistoryList ?? _moneyReturnActionHistoryList, - goodsReturnActionHistoryList: goodsReturnActionHistoryList ?? _goodsReturnActionHistoryList, - sonOrderList: sonOrderList ?? _sonOrderList, - refundStatus: refundStatus ?? _refundStatus, - reason: reason ?? _reason, - isSubscribe: isSubscribe ?? _isSubscribe, - subcribeTime: subcribeTime ?? _subcribeTime, - addressExt: addressExt ?? _addressExt, - contactsExtList: contactsExtList ?? _contactsExtList, - memberInfo: memberInfo ?? _memberInfo, - payRecordList: payRecordList ?? _payRecordList, -); - String get id => _id; - String get orderCode => _orderCode; - String get storeName => _storeName; - num get orderStatus => _orderStatus; - num get payStatus => _payStatus; - String get orderSum => _orderSum; - String get paySum => _paySum; - dynamic get discountAmount => _discountAmount; - num get payChannel => _payChannel; - String get createTime => _createTime; - String get notes => _notes; - String get payNum => _payNum; - dynamic get returnType => _returnType; - dynamic get logisticsCase => _logisticsCase; - String get payTime => _payTime; - String get memberAccount => _memberAccount; - num get orderCount => _orderCount; - dynamic get recName => _recName; - dynamic get recMobile => _recMobile; - dynamic get province => _province; - dynamic get city => _city; - dynamic get area => _area; - String get address => _address; - String get shipperCode => _shipperCode; - String get logisticsNum => _logisticsNum; - String get logisticsName => _logisticsName; - num get orderSource => _orderSource; - List get orderProductDTOList => _orderProductDTOList; - dynamic get moneyReturnList => _moneyReturnList; - dynamic get goodsReturnList => _goodsReturnList; - dynamic get moneyReturnActionHistoryList => _moneyReturnActionHistoryList; - dynamic get goodsReturnActionHistoryList => _goodsReturnActionHistoryList; - dynamic get sonOrderList => _sonOrderList; - num get refundStatus => _refundStatus; - String get reason => _reason; - bool get isSubscribe => _isSubscribe; - dynamic get subcribeTime => _subcribeTime; - AddressExt get addressExt => _addressExt; - dynamic get contactsExtList => _contactsExtList; - MemberInfo get memberInfo => _memberInfo; - List get payRecordList => _payRecordList; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['orderCode'] = _orderCode; - map['storeName'] = _storeName; - map['orderStatus'] = _orderStatus; - map['payStatus'] = _payStatus; - map['orderSum'] = _orderSum; - map['paySum'] = _paySum; - map['discountAmount'] = _discountAmount; - map['payChannel'] = _payChannel; - map['createTime'] = _createTime; - map['notes'] = _notes; - map['payNum'] = _payNum; - map['returnType'] = _returnType; - map['logisticsCase'] = _logisticsCase; - map['payTime'] = _payTime; - map['memberAccount'] = _memberAccount; - map['orderCount'] = _orderCount; - map['recName'] = _recName; - map['recMobile'] = _recMobile; - map['province'] = _province; - map['city'] = _city; - map['area'] = _area; - map['address'] = _address; - map['shipperCode'] = _shipperCode; - map['logisticsNum'] = _logisticsNum; - map['logisticsName'] = _logisticsName; - map['orderSource'] = _orderSource; - if (_orderProductDTOList != null) { - map['orderProductDTOList'] = _orderProductDTOList.map((v) => v.toJson()).toList(); - } - map['moneyReturnList'] = _moneyReturnList; - map['goodsReturnList'] = _goodsReturnList; - map['moneyReturnActionHistoryList'] = _moneyReturnActionHistoryList; - map['goodsReturnActionHistoryList'] = _goodsReturnActionHistoryList; - map['sonOrderList'] = _sonOrderList; - map['refundStatus'] = _refundStatus; - map['reason'] = _reason; - map['isSubscribe'] = _isSubscribe; - map['subcribeTime'] = _subcribeTime; - if (_addressExt != null) { - map['addressExt'] = _addressExt.toJson(); - } - map['contactsExtList'] = _contactsExtList; - if (_memberInfo != null) { - map['memberInfo'] = _memberInfo.toJson(); - } - if (_payRecordList != null) { - map['payRecordList'] = _payRecordList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1705059881448374272" -/// createTime : "2023-09-22 11:22:09" -/// createUser : "1695008923246919680" -/// updateTime : "2023-09-22 11:22:09" -/// updateUser : "1695008923246919680" -/// orderId : "1705059878256508928" -/// type : 4 -/// amount : "8.28" -/// refundAmount : "0.00" -/// state : 1 -/// refId : "1705059881398042624" -/// isDelete : false -/// tenantCode : null - -class PayRecordList { - PayRecordList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String orderId, - num type, - String amount, - String refundAmount, - num state, - String refId, - bool isDelete, - dynamic tenantCode,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _orderId = orderId; - _type = type; - _amount = amount; - _refundAmount = refundAmount; - _state = state; - _refId = refId; - _isDelete = isDelete; - _tenantCode = tenantCode; -} - - PayRecordList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _orderId = json['orderId']; - _type = json['type']; - _amount = json['amount']; - _refundAmount = json['refundAmount']; - _state = json['state']; - _refId = json['refId']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _orderId; - num _type; - String _amount; - String _refundAmount; - num _state; - String _refId; - bool _isDelete; - dynamic _tenantCode; -PayRecordList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String orderId, - num type, - String amount, - String refundAmount, - num state, - String refId, - bool isDelete, - dynamic tenantCode, -}) => PayRecordList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - orderId: orderId ?? _orderId, - type: type ?? _type, - amount: amount ?? _amount, - refundAmount: refundAmount ?? _refundAmount, - state: state ?? _state, - refId: refId ?? _refId, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get orderId => _orderId; - num get type => _type; - String get amount => _amount; - String get refundAmount => _refundAmount; - num get state => _state; - String get refId => _refId; - bool get isDelete => _isDelete; - dynamic get tenantCode => _tenantCode; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['orderId'] = _orderId; - map['type'] = _type; - map['amount'] = _amount; - map['refundAmount'] = _refundAmount; - map['state'] = _state; - map['refId'] = _refId; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - return map; - } - -} - -/// mid : "1695008923246919680" -/// name : "哈哈哈" -/// phone : "13052919193" -/// mark : null - -class MemberInfo { - MemberInfo({ - String mid, - String name, - String phone, - dynamic mark,}){ - _mid = mid; - _name = name; - _phone = phone; - _mark = mark; -} - - MemberInfo.fromJson(dynamic json) { - _mid = json['mid']; - _name = json['name']; - _phone = json['phone']; - _mark = json['mark']; - } - String _mid; - String _name; - String _phone; - dynamic _mark; -MemberInfo copyWith({ String mid, - String name, - String phone, - dynamic mark, -}) => MemberInfo( mid: mid ?? _mid, - name: name ?? _name, - phone: phone ?? _phone, - mark: mark ?? _mark, -); - String get mid => _mid; - String get name => _name; - String get phone => _phone; - dynamic get mark => _mark; - - Map toJson() { - final map = {}; - map['mid'] = _mid; - map['name'] = _name; - map['phone'] = _phone; - map['mark'] = _mark; - return map; - } - -} - -/// addressId : null -/// country : null -/// countryId : null -/// province : "湖北省" -/// provinceId : null -/// city : "武汉市" -/// cityId : null -/// district : "汉口区" -/// districtId : null -/// cityInfo : null -/// address : "湖北省武汉市江汉区万松街道青年路招银大厦" -/// recName : null -/// recMobile : null -/// longitude : "114.263242" -/// latitude : "30.593863" - -class AddressExt { - AddressExt({ - dynamic addressId, - dynamic country, - dynamic countryId, - String province, - dynamic provinceId, - String city, - dynamic cityId, - String district, - dynamic districtId, - dynamic cityInfo, - String address, - dynamic recName, - dynamic recMobile, - String longitude, - String latitude,}){ - _addressId = addressId; - _country = country; - _countryId = countryId; - _province = province; - _provinceId = provinceId; - _city = city; - _cityId = cityId; - _district = district; - _districtId = districtId; - _cityInfo = cityInfo; - _address = address; - _recName = recName; - _recMobile = recMobile; - _longitude = longitude; - _latitude = latitude; -} - - AddressExt.fromJson(dynamic json) { - _addressId = json['addressId']; - _country = json['country']; - _countryId = json['countryId']; - _province = json['province']; - _provinceId = json['provinceId']; - _city = json['city']; - _cityId = json['cityId']; - _district = json['district']; - _districtId = json['districtId']; - _cityInfo = json['cityInfo']; - _address = json['address']; - _recName = json['recName']; - _recMobile = json['recMobile']; - _longitude = json['longitude']; - _latitude = json['latitude']; - } - dynamic _addressId; - dynamic _country; - dynamic _countryId; - String _province; - dynamic _provinceId; - String _city; - dynamic _cityId; - String _district; - dynamic _districtId; - dynamic _cityInfo; - String _address; - dynamic _recName; - dynamic _recMobile; - String _longitude; - String _latitude; -AddressExt copyWith({ dynamic addressId, - dynamic country, - dynamic countryId, - String province, - dynamic provinceId, - String city, - dynamic cityId, - String district, - dynamic districtId, - dynamic cityInfo, - String address, - dynamic recName, - dynamic recMobile, - String longitude, - String latitude, -}) => AddressExt( addressId: addressId ?? _addressId, - country: country ?? _country, - countryId: countryId ?? _countryId, - province: province ?? _province, - provinceId: provinceId ?? _provinceId, - city: city ?? _city, - cityId: cityId ?? _cityId, - district: district ?? _district, - districtId: districtId ?? _districtId, - cityInfo: cityInfo ?? _cityInfo, - address: address ?? _address, - recName: recName ?? _recName, - recMobile: recMobile ?? _recMobile, - longitude: longitude ?? _longitude, - latitude: latitude ?? _latitude, -); - dynamic get addressId => _addressId; - dynamic get country => _country; - dynamic get countryId => _countryId; - String get province => _province; - dynamic get provinceId => _provinceId; - String get city => _city; - dynamic get cityId => _cityId; - String get district => _district; - dynamic get districtId => _districtId; - dynamic get cityInfo => _cityInfo; - String get address => _address; - dynamic get recName => _recName; - dynamic get recMobile => _recMobile; - String get longitude => _longitude; - String get latitude => _latitude; - - Map toJson() { - final map = {}; - map['addressId'] = _addressId; - map['country'] = _country; - map['countryId'] = _countryId; - map['province'] = _province; - map['provinceId'] = _provinceId; - map['city'] = _city; - map['cityId'] = _cityId; - map['district'] = _district; - map['districtId'] = _districtId; - map['cityInfo'] = _cityInfo; - map['address'] = _address; - map['recName'] = _recName; - map['recMobile'] = _recMobile; - map['longitude'] = _longitude; - map['latitude'] = _latitude; - return map; - } - -} - -/// id : "1705059878650773504" -/// createTime : "2023-09-22 11:22:08" -/// createUser : "1695008923246919680" -/// updateTime : "2023-09-22 11:22:08" -/// updateUser : "1695008923246919680" -/// tenantCode : "1195" -/// storeId : "1645691756009750528" -/// orderId : "1705059878256508928" -/// actInfo : null -/// productId : "1685953238345449472" -/// productName : "台18茗茶" -/// skuId : "1689482412884492288" -/// skuNameStr : "700ml 温热 七分糖" -/// skuImg : "https://pos.upload.lotus-wallet.com/1195/2023/08/e08f6297-06dd-4128-b21d-20930018df03.jpg" -/// buyNum : 1 -/// refundNum : 0 -/// type : 0 -/// reason : null -/// weight : 0.0 -/// applyPrice : "9.00" -/// sellPrice : "9.00" -/// postPay : "0.00" -/// isDelete : 0 -/// discountAmount : "0.72" -/// discountPercent : 92 -/// status : true -/// batch : 1 -/// deliveries : 0 -/// ticketType : "" -/// ticketDays : "0" -/// takeType : null -/// skuTickets : [] -/// ticketStyle : "" -/// setMealDataList : [] -/// packagingFee : "0.00" - -class OrderProductDtoList { - OrderProductDtoList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - String storeId, - String orderId, - dynamic actInfo, - String productId, - String productName, - String skuId, - String skuNameStr, - String skuImg, - num buyNum, - num refundNum, - num type, - dynamic reason, - num weight, - String applyPrice, - String sellPrice, - String postPay, - num isDelete, - String discountAmount, - num discountPercent, - bool status, - num batch, - num deliveries, - String ticketType, - String ticketDays, - dynamic takeType, - List skuTickets, - String ticketStyle, - List setMealDataList, - String packagingFee,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _tenantCode = tenantCode; - _storeId = storeId; - _orderId = orderId; - _actInfo = actInfo; - _productId = productId; - _productName = productName; - _skuId = skuId; - _skuNameStr = skuNameStr; - _skuImg = skuImg; - _buyNum = buyNum; - _refundNum = refundNum; - _type = type; - _reason = reason; - _weight = weight; - _applyPrice = applyPrice; - _sellPrice = sellPrice; - _postPay = postPay; - _isDelete = isDelete; - _discountAmount = discountAmount; - _discountPercent = discountPercent; - _status = status; - _batch = batch; - _deliveries = deliveries; - _ticketType = ticketType; - _ticketDays = ticketDays; - _takeType = takeType; - _skuTickets = skuTickets; - _ticketStyle = ticketStyle; - _setMealDataList = setMealDataList; - _packagingFee = packagingFee; -} - - OrderProductDtoList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _tenantCode = json['tenantCode']; - _storeId = json['storeId']; - _orderId = json['orderId']; - _actInfo = json['actInfo']; - _productId = json['productId']; - _productName = json['productName']; - _skuId = json['skuId']; - _skuNameStr = json['skuNameStr']; - _skuImg = json['skuImg']; - _buyNum = json['buyNum']; - _refundNum = json['refundNum']; - _type = json['type']; - _reason = json['reason']; - _weight = json['weight']; - _applyPrice = json['applyPrice']; - _sellPrice = json['sellPrice']; - _postPay = json['postPay']; - _isDelete = json['isDelete']; - _discountAmount = json['discountAmount']; - _discountPercent = json['discountPercent']; - _status = json['status']; - _batch = json['batch']; - _deliveries = json['deliveries']; - _ticketType = json['ticketType']; - _ticketDays = json['ticketDays']; - _takeType = json['takeType']; - // if (json['skuTickets'] != null) { - // _skuTickets = []; - // json['skuTickets'].forEach((v) { - // _skuTickets.add(Dynamic.fromJson(v)); - // }); - // } - _ticketStyle = json['ticketStyle']; - // if (json['setMealDataList'] != null) { - // _setMealDataList = []; - // json['setMealDataList'].forEach((v) { - // _setMealDataList.add(Dynamic.fromJson(v)); - // }); - // } - _packagingFee = json['packagingFee']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _tenantCode; - String _storeId; - String _orderId; - dynamic _actInfo; - String _productId; - String _productName; - String _skuId; - String _skuNameStr; - String _skuImg; - num _buyNum; - num _refundNum; - num _type; - dynamic _reason; - num _weight; - String _applyPrice; - String _sellPrice; - String _postPay; - num _isDelete; - String _discountAmount; - num _discountPercent; - bool _status; - num _batch; - num _deliveries; - String _ticketType; - String _ticketDays; - dynamic _takeType; - List _skuTickets; - String _ticketStyle; - List _setMealDataList; - String _packagingFee; -OrderProductDtoList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - String storeId, - String orderId, - dynamic actInfo, - String productId, - String productName, - String skuId, - String skuNameStr, - String skuImg, - num buyNum, - num refundNum, - num type, - dynamic reason, - num weight, - String applyPrice, - String sellPrice, - String postPay, - num isDelete, - String discountAmount, - num discountPercent, - bool status, - num batch, - num deliveries, - String ticketType, - String ticketDays, - dynamic takeType, - List skuTickets, - String ticketStyle, - List setMealDataList, - String packagingFee, -}) => OrderProductDtoList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - tenantCode: tenantCode ?? _tenantCode, - storeId: storeId ?? _storeId, - orderId: orderId ?? _orderId, - actInfo: actInfo ?? _actInfo, - productId: productId ?? _productId, - productName: productName ?? _productName, - skuId: skuId ?? _skuId, - skuNameStr: skuNameStr ?? _skuNameStr, - skuImg: skuImg ?? _skuImg, - buyNum: buyNum ?? _buyNum, - refundNum: refundNum ?? _refundNum, - type: type ?? _type, - reason: reason ?? _reason, - weight: weight ?? _weight, - applyPrice: applyPrice ?? _applyPrice, - sellPrice: sellPrice ?? _sellPrice, - postPay: postPay ?? _postPay, - isDelete: isDelete ?? _isDelete, - discountAmount: discountAmount ?? _discountAmount, - discountPercent: discountPercent ?? _discountPercent, - status: status ?? _status, - batch: batch ?? _batch, - deliveries: deliveries ?? _deliveries, - ticketType: ticketType ?? _ticketType, - ticketDays: ticketDays ?? _ticketDays, - takeType: takeType ?? _takeType, - skuTickets: skuTickets ?? _skuTickets, - ticketStyle: ticketStyle ?? _ticketStyle, - setMealDataList: setMealDataList ?? _setMealDataList, - packagingFee: packagingFee ?? _packagingFee, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get tenantCode => _tenantCode; - String get storeId => _storeId; - String get orderId => _orderId; - dynamic get actInfo => _actInfo; - String get productId => _productId; - String get productName => _productName; - String get skuId => _skuId; - String get skuNameStr => _skuNameStr; - String get skuImg => _skuImg; - num get buyNum => _buyNum; - num get refundNum => _refundNum; - num get type => _type; - dynamic get reason => _reason; - num get weight => _weight; - String get applyPrice => _applyPrice; - String get sellPrice => _sellPrice; - String get postPay => _postPay; - num get isDelete => _isDelete; - String get discountAmount => _discountAmount; - num get discountPercent => _discountPercent; - bool get status => _status; - num get batch => _batch; - num get deliveries => _deliveries; - String get ticketType => _ticketType; - String get ticketDays => _ticketDays; - dynamic get takeType => _takeType; - List get skuTickets => _skuTickets; - String get ticketStyle => _ticketStyle; - List get setMealDataList => _setMealDataList; - String get packagingFee => _packagingFee; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['tenantCode'] = _tenantCode; - map['storeId'] = _storeId; - map['orderId'] = _orderId; - map['actInfo'] = _actInfo; - map['productId'] = _productId; - map['productName'] = _productName; - map['skuId'] = _skuId; - map['skuNameStr'] = _skuNameStr; - map['skuImg'] = _skuImg; - map['buyNum'] = _buyNum; - map['refundNum'] = _refundNum; - map['type'] = _type; - map['reason'] = _reason; - map['weight'] = _weight; - map['applyPrice'] = _applyPrice; - map['sellPrice'] = _sellPrice; - map['postPay'] = _postPay; - map['isDelete'] = _isDelete; - map['discountAmount'] = _discountAmount; - map['discountPercent'] = _discountPercent; - map['status'] = _status; - map['batch'] = _batch; - map['deliveries'] = _deliveries; - map['ticketType'] = _ticketType; - map['ticketDays'] = _ticketDays; - map['takeType'] = _takeType; - if (_skuTickets != null) { - map['skuTickets'] = _skuTickets.map((v) => v.toJson()).toList(); - } - map['ticketStyle'] = _ticketStyle; - if (_setMealDataList != null) { - map['setMealDataList'] = _setMealDataList.map((v) => v.toJson()).toList(); - } - map['packagingFee'] = _packagingFee; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/business_order_list.dart b/lib/retrofit/data/business_order_list.dart deleted file mode 100644 index bc571a33..00000000 --- a/lib/retrofit/data/business_order_list.dart +++ /dev/null @@ -1,1229 +0,0 @@ -/// total : 54 -/// adminOrderDTOList : [{"id":"1717487051122671616","orderCode":"202310261823170001","storeName":"台南古早味粽","productCount":3,"orderStatus":2,"orderSum":"20.01","paySum":"18.41","createTime":"2023-10-26 18:23:17","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"1.60","orderSource":3,"dayFlowCode":"512","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":null,"memberInfo":null,"orderProductList":[{"id":"1717487051202363392","createTime":"2023-10-26 18:23:17","createUser":"1640233401329909760","updateTime":"2023-10-26 18:23:17","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717487051122671616","actInfo":null,"productId":"1645981572022665216","productName":"台湾粽","skuId":"1645981572102356992","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目11","测试票券项目22","测试票券项目33"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717487051227529216","createTime":"2023-10-26 18:23:17","createUser":"1640233401329909760","updateTime":"2023-10-26 18:23:17","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717487051122671616","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717487051231723520","createTime":"2023-10-26 18:23:17","createUser":"1640233401329909760","updateTime":"2023-10-26 18:23:17","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318285786349568","orderId":"1717487051122671616","actInfo":null,"productId":"1645983425179418624","productName":"炸杏鲍菇","skuId":"1645983425246527488","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目333","测试票券项目555","测试票券项目777"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717488903532838912","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717487051122671616","orderProductId":"1717487051202363392","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261830384001410001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:30:39","finishTime":"2023-10-27 09:59:49","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717488903650279424","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"},{"id":"1717488903671250944","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"},{"id":"1717488903675445248","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"}]},{"id":"1717488903574781952","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717487051122671616","orderProductId":"1717487051227529216","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261830389458330002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:30:39","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717488903679639552","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903574781952","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717488903679639553","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903574781952","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":9,"finishTime":"2023-10-27 10:04:11","isDelete":0,"tenantCode":"1195"}]},{"id":"1717488903620919296","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717487051122671616","orderProductId":"1717487051231723520","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261830382377470003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:30:39","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717488903683833856","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903620919296","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":9,"finishTime":"2023-10-27 11:26:33","isDelete":0,"tenantCode":"1195"},{"id":"1717488903688028160","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903620919296","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717488903692222464","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903620919296","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717486581926854656","orderCode":"202310261821250001","storeName":"台南古早味粽","productCount":3,"orderStatus":2,"orderSum":"20.01","paySum":"18.41","createTime":"2023-10-26 18:21:25","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"1.60","orderSource":3,"dayFlowCode":"511","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 18:22:34","memberInfo":null,"orderProductList":[{"id":"1717486582128181248","createTime":"2023-10-26 18:21:25","createUser":"1640233401329909760","updateTime":"2023-10-26 18:21:25","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318285786349568","orderId":"1717486581926854656","actInfo":null,"productId":"1645983425179418624","productName":"炸杏鲍菇","skuId":"1645983425246527488","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目333","测试票券项目555","测试票券项目777"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717486582203678720","createTime":"2023-10-26 18:21:25","createUser":"1640233401329909760","updateTime":"2023-10-26 18:21:25","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717486581926854656","actInfo":null,"productId":"1645981572022665216","productName":"台湾粽","skuId":"1645981572102356992","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目11","测试票券项目22","测试票券项目33"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717486582216261632","createTime":"2023-10-26 18:21:25","createUser":"1640233401329909760","updateTime":"2023-10-26 18:21:25","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717486581926854656","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717486870864068608","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717486581926854656","orderProductId":"1717486582128181248","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261822349584800001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:22:34","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717486871128309760","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486870864068608","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486871182835712","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486870864068608","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486871187030016","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486870864068608","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717486870964731904","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717486581926854656","orderProductId":"1717486582203678720","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261822340428310002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:22:34","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717486871195418624","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486870964731904","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486871203807232","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486870964731904","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486871212195840","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486870964731904","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717486871065395200","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717486581926854656","orderProductId":"1717486582216261632","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261822341456680003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:22:34","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717486871220584448","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486871065395200","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486871228973056","createTime":"2023-10-26 18:22:34","createUser":"0","updateTime":"2023-10-26 18:22:34","updateUser":"0","ticketId":"1717486871065395200","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717479052169707520","orderCode":"202310261751290001","storeName":"台南古早味粽","productCount":3,"orderStatus":3,"orderSum":"20.01","paySum":"0","createTime":"2023-10-26 17:51:30","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":0,"couponSubPrice":"0.00","totalDiscountPrice":"1.60","orderSource":3,"dayFlowCode":"510","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":null,"reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 18:14:34","memberInfo":null,"orderProductList":[{"id":"1717479052446531584","createTime":"2023-10-26 17:51:30","createUser":"1640233401329909760","updateTime":"2023-10-26 17:51:30","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717479052169707520","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717479052517834752","createTime":"2023-10-26 17:51:30","createUser":"1640233401329909760","updateTime":"2023-10-26 17:51:30","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318285786349568","orderId":"1717479052169707520","actInfo":null,"productId":"1645983425179418624","productName":"炸杏鲍菇","skuId":"1645983425246527488","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目333","测试票券项目555","测试票券项目777"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717479052530417664","createTime":"2023-10-26 17:51:30","createUser":"1640233401329909760","updateTime":"2023-10-26 17:51:30","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717479052169707520","actInfo":null,"productId":"1645981572022665216","productName":"台湾粽","skuId":"1645981572102356992","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目11","测试票券项目22","测试票券项目33"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717484859393310720","createTime":"2023-10-26 18:14:34","createUser":"0","updateTime":"2023-10-26 18:14:34","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052446531584","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261814348678120001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:14:34","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717484859758215168","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859393310720","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484859816935424","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859393310720","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717484859577860096","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052517834752","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261814341833600002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:14:34","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717484859833712640","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859577860096","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484859842101248","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859577860096","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484859850489856","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859577860096","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717484859691106304","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052530417664","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261814349388630003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:14:34","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717484859858878464","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859691106304","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484859867267072","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859691106304","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484859875655680","createTime":"2023-10-26 18:14:35","createUser":"0","updateTime":"2023-10-26 18:14:35","updateUser":"0","ticketId":"1717484859691106304","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717484910836449280","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052446531584","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261814465122930004","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:14:47","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717484911125856256","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484910836449280","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484911184576512","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484910836449280","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717484910949695488","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052517834752","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261814462124730005","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:14:47","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717484911188770816","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484910949695488","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484911197159424","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484910949695488","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484911205548032","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484910949695488","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717484911062941696","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052530417664","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261814463912940006","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:14:47","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717484911213936640","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484911062941696","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484911222325248","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484911062941696","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717484911230713856","createTime":"2023-10-26 18:14:47","createUser":"0","updateTime":"2023-10-26 18:14:47","updateUser":"0","ticketId":"1717484911062941696","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485165778829312","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052446531584","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261815478910050001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:15:47","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485166051459072","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165778829312","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485166110179328","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165778829312","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485165883686912","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052517834752","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261815479709490002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:15:47","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485166118567936","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165883686912","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485166126956544","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165883686912","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485166135345152","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165883686912","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485165988544512","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052530417664","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261815471401640003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:15:47","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485166139539456","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165988544512","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485166147928064","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165988544512","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485166156316672","createTime":"2023-10-26 18:15:48","createUser":"0","updateTime":"2023-10-26 18:15:48","updateUser":"0","ticketId":"1717485165988544512","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485462983016448","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052446531584","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261816581852080001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:16:58","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485463259840512","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485462983016448","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485463314366464","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485462983016448","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485463096262656","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052517834752","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261816585655540002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:16:58","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485463322755072","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485463096262656","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485463331143680","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485463096262656","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485463339532288","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485463096262656","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485463205314560","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052530417664","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261816581971080003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:16:58","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485463347920896","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485463205314560","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485463352115200","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485463205314560","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485463360503808","createTime":"2023-10-26 18:16:58","createUser":"0","updateTime":"2023-10-26 18:16:58","updateUser":"0","ticketId":"1717485463205314560","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485943826415616","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052446531584","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261818533592460001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:18:53","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485943943856128","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943826415616","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485943964827648","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943826415616","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485943872552960","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052517834752","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261818533496840002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:18:53","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485943964827649","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943872552960","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485943969021952","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943872552960","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485943973216256","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943872552960","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717485943918690304","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052530417664","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261818534527380003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:18:53","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717485943973216257","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943918690304","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485943977410560","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943918690304","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717485943981604864","createTime":"2023-10-26 18:18:53","createUser":"0","updateTime":"2023-10-26 18:18:53","updateUser":"0","ticketId":"1717485943918690304","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717486346798366720","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052446531584","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261820290879620001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:20:29","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717486347050024960","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346798366720","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486347096162304","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346798366720","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717486346899030016","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052517834752","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261820294693180002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:20:29","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717486347104550912","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346899030016","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486347112939520","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346899030016","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486347117133824","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346899030016","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717486346991304704","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717479052169707520","orderProductId":"1717479052530417664","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261820298392020003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:20:29","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717486347125522432","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346991304704","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486347133911040","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346991304704","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717486347142299648","createTime":"2023-10-26 18:20:29","createUser":"0","updateTime":"2023-10-26 18:20:29","updateUser":"0","ticketId":"1717486346991304704","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717460763003584512","orderCode":"202310261638490003","storeName":"台南古早味粽","productCount":3,"orderStatus":2,"orderSum":"30.00","paySum":"30.00","createTime":"2023-10-26 16:38:49","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"0.00","orderSource":3,"dayFlowCode":"509","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 16:40:00","memberInfo":null,"orderProductList":[{"id":"1717460763070693376","createTime":"2023-10-26 16:38:49","createUser":"1640233401329909760","updateTime":"2023-10-26 16:38:49","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717460763003584512","actInfo":null,"productId":"1645981572022665216","productName":"台湾粽","skuId":"1645981572102356992","skuNameStr":"","skuImg":"","buyNum":3,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目11","测试票券项目22","测试票券项目33"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717461059163389952","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717460763003584512","orderProductId":"1717460763070693376","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202310261640006657780001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:40:00","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717461059326967808","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059163389952","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461059343745024","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059163389952","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461059347939328","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059163389952","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717461059259858944","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717460763003584512","orderProductId":"1717460763070693376","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202310261640002007230002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:40:00","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717461059352133632","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059259858944","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461059352133633","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059259858944","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461059356327936","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059259858944","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717461059305996288","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717460763003584512","orderProductId":"1717460763070693376","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202310261640002893200003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:40:00","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717461059360522240","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059305996288","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461059360522241","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059305996288","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461059364716544","createTime":"2023-10-26 16:40:00","createUser":"0","updateTime":"2023-10-26 16:40:00","updateUser":"0","ticketId":"1717461059305996288","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717460074139484160","orderCode":"202310261636050001","storeName":"台南古早味粽","productCount":3,"orderStatus":2,"orderSum":"20.01","paySum":"20.01","createTime":"2023-10-26 16:36:05","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"0.00","orderSource":3,"dayFlowCode":"508","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 16:40:15","memberInfo":null,"orderProductList":[{"id":"1717460074466639872","createTime":"2023-10-26 16:36:05","createUser":"1640233401329909760","updateTime":"2023-10-26 16:36:05","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717460074139484160","actInfo":null,"productId":"1645981572022665216","productName":"台湾粽","skuId":"1645981572102356992","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目11","测试票券项目22","测试票券项目33"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717460074504388608","createTime":"2023-10-26 16:36:05","createUser":"1640233401329909760","updateTime":"2023-10-26 16:36:05","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318285786349568","orderId":"1717460074139484160","actInfo":null,"productId":"1645983425179418624","productName":"炸杏鲍菇","skuId":"1645983425246527488","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目333","测试票券项目555","测试票券项目777"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717460074508582912","createTime":"2023-10-26 16:36:05","createUser":"1640233401329909760","updateTime":"2023-10-26 16:36:05","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717460074139484160","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717461121729822720","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717460074139484160","orderProductId":"1717460074466639872","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202310261640148859720004","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:40:15","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717461121826291712","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121729822720","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461121843068928","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121729822720","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461121847263232","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121729822720","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717461121763377152","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717460074139484160","orderProductId":"1717460074504388608","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"炸杏鲍菇 ","code":"T202310261640140707970005","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:40:15","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717461121851457536","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121763377152","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461121855651840","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121763377152","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461121855651841","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121763377152","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717461121801125888","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717460074139484160","orderProductId":"1717460074508582912","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261640149501670006","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:40:15","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717461121859846144","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121801125888","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717461121864040448","createTime":"2023-10-26 16:40:15","createUser":"0","updateTime":"2023-10-26 16:40:15","updateUser":"0","ticketId":"1717461121801125888","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717458977177993216","orderCode":"202310261631430003","storeName":"台南古早味粽","productCount":1,"orderStatus":2,"orderSum":"0.01","paySum":"0.01","createTime":"2023-10-26 16:31:44","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"0.00","orderSource":3,"dayFlowCode":"507","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 16:32:35","memberInfo":null,"orderProductList":[{"id":"1717458977454817280","createTime":"2023-10-26 16:31:44","createUser":"1640233401329909760","updateTime":"2023-10-26 16:31:44","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717458977177993216","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717459193440501760","createTime":"2023-10-26 16:32:35","createUser":"0","updateTime":"2023-10-26 16:32:35","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717458977177993216","orderProductId":"1717458977454817280","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261632358501170001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:32:35","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717459193906069504","createTime":"2023-10-26 16:32:35","createUser":"0","updateTime":"2023-10-26 16:32:35","updateUser":"0","ticketId":"1717459193440501760","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717459193922846720","createTime":"2023-10-26 16:32:35","createUser":"0","updateTime":"2023-10-26 16:32:35","updateUser":"0","ticketId":"1717459193440501760","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717458795753373696","orderCode":"202310261631000002","storeName":"台南古早味粽","productCount":1,"orderStatus":2,"orderSum":"0.01","paySum":"0.01","createTime":"2023-10-26 16:31:00","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"0.00","orderSource":3,"dayFlowCode":"506","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 16:31:15","memberInfo":null,"orderProductList":[{"id":"1717458795824676864","createTime":"2023-10-26 16:31:00","createUser":"1640233401329909760","updateTime":"2023-10-26 16:31:00","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717458795753373696","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717458856772108288","createTime":"2023-10-26 16:31:15","createUser":"0","updateTime":"2023-10-26 16:31:15","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717458795753373696","orderProductId":"1717458795824676864","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261631145040890004","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:31:15","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717458856797274112","createTime":"2023-10-26 16:31:15","createUser":"0","updateTime":"2023-10-26 16:31:15","updateUser":"0","ticketId":"1717458856772108288","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717458856814051328","createTime":"2023-10-26 16:31:15","createUser":"0","updateTime":"2023-10-26 16:31:15","updateUser":"0","ticketId":"1717458856772108288","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717458627284959232","orderCode":"202310261630200001","storeName":"庙口阿嫲炸菇菇","productCount":1,"orderStatus":2,"orderSum":"10.00","paySum":"10.00","createTime":"2023-10-26 16:30:20","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"0.00","orderSource":3,"dayFlowCode":"505","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 16:30:36","memberInfo":null,"orderProductList":[{"id":"1717458627352068096","createTime":"2023-10-26 16:30:20","createUser":"1640233401329909760","updateTime":"2023-10-26 16:30:20","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318285786349568","orderId":"1717458627284959232","actInfo":null,"productId":"1645983425179418624","productName":"炸杏鲍菇","skuId":"1645983425246527488","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目333","测试票券项目555","测试票券项目777"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717458694620315648","createTime":"2023-10-26 16:30:36","createUser":"0","updateTime":"2023-10-26 16:30:36","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717458627284959232","orderProductId":"1717458627352068096","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"炸杏鲍菇 ","code":"T202310261630362582420003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:30:36","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717458694645481472","createTime":"2023-10-26 16:30:36","createUser":"0","updateTime":"2023-10-26 16:30:36","updateUser":"0","ticketId":"1717458694620315648","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717458694670647296","createTime":"2023-10-26 16:30:36","createUser":"0","updateTime":"2023-10-26 16:30:36","updateUser":"0","ticketId":"1717458694620315648","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717458694674841600","createTime":"2023-10-26 16:30:36","createUser":"0","updateTime":"2023-10-26 16:30:36","updateUser":"0","ticketId":"1717458694620315648","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717458374246793216","orderCode":"202310261629190002","storeName":"台南古早味粽","productCount":2,"orderStatus":2,"orderSum":"20.00","paySum":"20.00","createTime":"2023-10-26 16:29:20","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"0.00","orderSource":3,"dayFlowCode":"503","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":"2023-11-24 16:29:40","memberInfo":null,"orderProductList":[{"id":"1717458374330679296","createTime":"2023-10-26 16:29:20","createUser":"1640233401329909760","updateTime":"2023-10-26 16:29:20","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318285786349568","orderId":"1717458374246793216","actInfo":null,"productId":"1645983425179418624","productName":"炸杏鲍菇","skuId":"1645983425246527488","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目333","测试票券项目555","测试票券项目777"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717458374355845120","createTime":"2023-10-26 16:29:20","createUser":"1640233401329909760","updateTime":"2023-10-26 16:29:20","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717458374246793216","actInfo":null,"productId":"1645981572022665216","productName":"台湾粽","skuId":"1645981572102356992","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目11","测试票券项目22","测试票券项目33"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":true,"tickets":[{"id":"1717458457218514944","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717458374246793216","orderProductId":"1717458374330679296","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"炸杏鲍菇 ","code":"T202310261629394311470001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:29:40","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717458457403064320","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","ticketId":"1717458457218514944","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717458457424035840","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","ticketId":"1717458457218514944","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717458457424035841","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","ticketId":"1717458457218514944","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]},{"id":"1717458457268846592","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717458374246793216","orderProductId":"1717458374355845120","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202310261629396300800002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 16:29:40","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717458457428230144","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","ticketId":"1717458457268846592","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717458457432424448","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","ticketId":"1717458457268846592","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717458457440813056","createTime":"2023-10-26 16:29:40","createUser":"0","updateTime":"2023-10-26 16:29:40","updateUser":"0","ticketId":"1717458457268846592","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}]},{"id":"1717458304692649984","orderCode":"202310261629030001","storeName":"台南古早味粽","productCount":1,"orderStatus":2,"orderSum":"0.01","paySum":"0.01","createTime":"2023-10-26 16:29:03","returnType":0,"orderType":0,"returnCode":null,"returnStatus":null,"applyTime":null,"applySum":null,"memberAccount":"郑州小吃街","name":null,"payStatus":1,"couponSubPrice":"0.00","totalDiscountPrice":"0.00","orderSource":3,"dayFlowCode":"502","tableId":"0","tableName":null,"realPeople":null,"refundStatus":0,"notes":"","payNum":"","reason":null,"isSubscribe":false,"subcribeTime":null,"endRefundTime":null,"memberInfo":null,"orderProductList":[{"id":"1717458304768147456","createTime":"2023-10-26 16:29:03","createUser":"1640233401329909760","updateTime":"2023-10-26 16:29:03","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717458304692649984","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}],"mid":"1640233401329909760","isTakeOut":0,"logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"postFee":"0.00","finalPayPrice":"0.00","ticketStatus":null,"tickets":null}] - -class BusinessOrderList { - BusinessOrderList({ - num total, - List adminOrderDTOList,}){ - _total = total; - _adminOrderDTOList = adminOrderDTOList; -} - - BusinessOrderList.fromJson(dynamic json) { - _total = json['total']; - if (json['adminOrderDTOList'] != null) { - _adminOrderDTOList = []; - json['adminOrderDTOList'].forEach((v) { - _adminOrderDTOList.add(AdminOrderDtoList.fromJson(v)); - }); - } - } - num _total; - List _adminOrderDTOList; -BusinessOrderList copyWith({ num total, - List adminOrderDTOList, -}) => BusinessOrderList( total: total ?? _total, - adminOrderDTOList: adminOrderDTOList ?? _adminOrderDTOList, -); - num get total => _total; - List get adminOrderDTOList => _adminOrderDTOList; - - Map toJson() { - final map = {}; - map['total'] = _total; - if (_adminOrderDTOList != null) { - map['adminOrderDTOList'] = _adminOrderDTOList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1717487051122671616" -/// orderCode : "202310261823170001" -/// storeName : "台南古早味粽" -/// productCount : 3 -/// orderStatus : 2 -/// orderSum : "20.01" -/// paySum : "18.41" -/// createTime : "2023-10-26 18:23:17" -/// returnType : 0 -/// orderType : 0 -/// returnCode : null -/// returnStatus : null -/// applyTime : null -/// applySum : null -/// memberAccount : "郑州小吃街" -/// name : null -/// payStatus : 1 -/// couponSubPrice : "0.00" -/// totalDiscountPrice : "1.60" -/// orderSource : 3 -/// dayFlowCode : "512" -/// tableId : "0" -/// tableName : null -/// realPeople : null -/// refundStatus : 0 -/// notes : "" -/// payNum : "" -/// reason : null -/// isSubscribe : false -/// subcribeTime : null -/// endRefundTime : null -/// memberInfo : null -/// orderProductList : [{"id":"1717487051202363392","createTime":"2023-10-26 18:23:17","createUser":"1640233401329909760","updateTime":"2023-10-26 18:23:17","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717487051122671616","actInfo":null,"productId":"1645981572022665216","productName":"台湾粽","skuId":"1645981572102356992","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目11","测试票券项目22","测试票券项目33"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717487051227529216","createTime":"2023-10-26 18:23:17","createUser":"1640233401329909760","updateTime":"2023-10-26 18:23:17","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318098540036096","orderId":"1717487051122671616","actInfo":null,"productId":"1645714128276291584","productName":"四神汤","skuId":"1645714128343400448","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试规格","测试规格222"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"},{"id":"1717487051231723520","createTime":"2023-10-26 18:23:17","createUser":"1640233401329909760","updateTime":"2023-10-26 18:23:17","updateUser":"1640233401329909760","tenantCode":"1195","storeId":"1645318285786349568","orderId":"1717487051122671616","actInfo":null,"productId":"1645983425179418624","productName":"炸杏鲍菇","skuId":"1645983425246527488","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"10.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"0.80","discountPercent":92,"status":true,"batch":1,"deliveries":0,"ticketType":"NORMAL","ticketDays":"0","takeType":null,"skuTickets":["测试票券项目333","测试票券项目555","测试票券项目777"],"ticketStyle":"","setMealDataList":null,"packagingFee":"0.00"}] -/// mid : "1640233401329909760" -/// isTakeOut : 0 -/// logisticsId : "0" -/// shipperCode : "" -/// logisticsName : "" -/// logisticsNum : "" -/// logisticsCase : null -/// postFee : "0.00" -/// finalPayPrice : "0.00" -/// ticketStatus : true -/// tickets : [{"id":"1717488903532838912","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717487051122671616","orderProductId":"1717487051202363392","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"台湾粽 ","code":"T202310261830384001410001","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:30:39","finishTime":"2023-10-27 09:59:49","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717488903650279424","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"},{"id":"1717488903671250944","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"},{"id":"1717488903675445248","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"}]},{"id":"1717488903574781952","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717487051122671616","orderProductId":"1717487051227529216","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202310261830389458330002","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:30:39","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717488903679639552","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903574781952","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717488903679639553","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903574781952","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":9,"finishTime":"2023-10-27 10:04:11","isDelete":0,"tenantCode":"1195"}]},{"id":"1717488903620919296","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","mid":"1640233401329909760","storeId":"0","orderId":"1717487051122671616","orderProductId":"1717487051231723520","productId":"1645983425179418624","productSkuId":"1645983425246527488","ticketWipedTimeTemplateId":null,"amount":"9.20","name":"炸杏鲍菇 ","code":"T202310261830382377470003","useStartTime":"2023-10-26 00:00:00","useEndTime":"2023-11-24 18:30:39","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","ticketItemList":[{"id":"1717488903683833856","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903620919296","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目333","showImage":"","state":9,"finishTime":"2023-10-27 11:26:33","isDelete":0,"tenantCode":"1195"},{"id":"1717488903688028160","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903620919296","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目555","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"},{"id":"1717488903692222464","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903620919296","relationType":"PRODUCT","relationId":"1645983425246527488","name":"测试票券项目777","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195"}]}] - -class AdminOrderDtoList { - AdminOrderDtoList({ - String id, - String orderCode, - String storeName, - bool enableRefundApprover, - num productCount, - num orderStatus, - String orderSum, - String paySum, - String createTime, - num returnType, - num orderType, - dynamic returnCode, - dynamic returnStatus, - dynamic applyTime, - dynamic applySum, - String memberAccount, - dynamic name, - num payStatus, - String couponSubPrice, - String totalDiscountPrice, - num orderSource, - String dayFlowCode, - String tableId, - dynamic tableName, - dynamic realPeople, - num refundStatus, - String notes, - String payNum, - dynamic reason, - bool isSubscribe, - dynamic subcribeTime, - dynamic endRefundTime, - dynamic memberInfo, - List orderProductList, - String mid, - num isTakeOut, - String logisticsId, - String shipperCode, - String logisticsName, - String logisticsNum, - dynamic logisticsCase, - String postFee, - String finalPayPrice, - bool ticketStatus, - List tickets,}){ - _id = id; - _orderCode = orderCode; - _storeName = storeName; - _enableRefundApprover = enableRefundApprover; - _productCount = productCount; - _orderStatus = orderStatus; - _orderSum = orderSum; - _paySum = paySum; - _createTime = createTime; - _returnType = returnType; - _orderType = orderType; - _returnCode = returnCode; - _returnStatus = returnStatus; - _applyTime = applyTime; - _applySum = applySum; - _memberAccount = memberAccount; - _name = name; - _payStatus = payStatus; - _couponSubPrice = couponSubPrice; - _totalDiscountPrice = totalDiscountPrice; - _orderSource = orderSource; - _dayFlowCode = dayFlowCode; - _tableId = tableId; - _tableName = tableName; - _realPeople = realPeople; - _refundStatus = refundStatus; - _notes = notes; - _payNum = payNum; - _reason = reason; - _isSubscribe = isSubscribe; - _subcribeTime = subcribeTime; - _endRefundTime = endRefundTime; - _memberInfo = memberInfo; - _orderProductList = orderProductList; - _mid = mid; - _isTakeOut = isTakeOut; - _logisticsId = logisticsId; - _shipperCode = shipperCode; - _logisticsName = logisticsName; - _logisticsNum = logisticsNum; - _logisticsCase = logisticsCase; - _postFee = postFee; - _finalPayPrice = finalPayPrice; - _ticketStatus = ticketStatus; - _tickets = tickets; -} - - AdminOrderDtoList.fromJson(dynamic json) { - _id = json['id']; - _orderCode = json['orderCode']; - _storeName = json['storeName']; - _enableRefundApprover = json['enableRefundApprover']; - _productCount = json['productCount']; - _orderStatus = json['orderStatus']; - _orderSum = json['orderSum']; - _paySum = json['paySum']; - _createTime = json['createTime']; - _returnType = json['returnType']; - _orderType = json['orderType']; - _returnCode = json['returnCode']; - _returnStatus = json['returnStatus']; - _applyTime = json['applyTime']; - _applySum = json['applySum']; - _memberAccount = json['memberAccount']; - _name = json['name']; - _payStatus = json['payStatus']; - _couponSubPrice = json['couponSubPrice']; - _totalDiscountPrice = json['totalDiscountPrice']; - _orderSource = json['orderSource']; - _dayFlowCode = json['dayFlowCode']; - _tableId = json['tableId']; - _tableName = json['tableName']; - _realPeople = json['realPeople']; - _refundStatus = json['refundStatus']; - _notes = json['notes']; - _payNum = json['payNum']; - _reason = json['reason']; - _isSubscribe = json['isSubscribe']; - _subcribeTime = json['subcribeTime']; - _endRefundTime = json['endRefundTime']; - _memberInfo = json['memberInfo']; - if (json['orderProductList'] != null) { - _orderProductList = []; - json['orderProductList'].forEach((v) { - _orderProductList.add(OrderProductList.fromJson(v)); - }); - } - _mid = json['mid']; - _isTakeOut = json['isTakeOut']; - _logisticsId = json['logisticsId']; - _shipperCode = json['shipperCode']; - _logisticsName = json['logisticsName']; - _logisticsNum = json['logisticsNum']; - _logisticsCase = json['logisticsCase']; - _postFee = json['postFee']; - _finalPayPrice = json['finalPayPrice']; - _ticketStatus = json['ticketStatus']; - if (json['tickets'] != null) { - _tickets = []; - json['tickets'].forEach((v) { - _tickets.add(Tickets.fromJson(v)); - }); - } - } - String _id; - String _orderCode; - String _storeName; - bool _enableRefundApprover; - num _productCount; - num _orderStatus; - String _orderSum; - String _paySum; - String _createTime; - num _returnType; - num _orderType; - dynamic _returnCode; - dynamic _returnStatus; - dynamic _applyTime; - dynamic _applySum; - String _memberAccount; - dynamic _name; - num _payStatus; - String _couponSubPrice; - String _totalDiscountPrice; - num _orderSource; - String _dayFlowCode; - String _tableId; - dynamic _tableName; - dynamic _realPeople; - num _refundStatus; - String _notes; - String _payNum; - dynamic _reason; - bool _isSubscribe; - dynamic _subcribeTime; - dynamic _endRefundTime; - dynamic _memberInfo; - List _orderProductList; - String _mid; - num _isTakeOut; - String _logisticsId; - String _shipperCode; - String _logisticsName; - String _logisticsNum; - dynamic _logisticsCase; - String _postFee; - String _finalPayPrice; - bool _ticketStatus; - List _tickets; -AdminOrderDtoList copyWith({ String id, - String orderCode, - String storeName, - bool enableRefundApprover, - num productCount, - num orderStatus, - String orderSum, - String paySum, - String createTime, - num returnType, - num orderType, - dynamic returnCode, - dynamic returnStatus, - dynamic applyTime, - dynamic applySum, - String memberAccount, - dynamic name, - num payStatus, - String couponSubPrice, - String totalDiscountPrice, - num orderSource, - String dayFlowCode, - String tableId, - dynamic tableName, - dynamic realPeople, - num refundStatus, - String notes, - String payNum, - dynamic reason, - bool isSubscribe, - dynamic subcribeTime, - dynamic endRefundTime, - dynamic memberInfo, - List orderProductList, - String mid, - num isTakeOut, - String logisticsId, - String shipperCode, - String logisticsName, - String logisticsNum, - dynamic logisticsCase, - String postFee, - String finalPayPrice, - bool ticketStatus, - List tickets, -}) => AdminOrderDtoList( id: id ?? _id, - orderCode: orderCode ?? _orderCode, - storeName: storeName ?? _storeName, - enableRefundApprover: enableRefundApprover ?? _enableRefundApprover, - productCount: productCount ?? _productCount, - orderStatus: orderStatus ?? _orderStatus, - orderSum: orderSum ?? _orderSum, - paySum: paySum ?? _paySum, - createTime: createTime ?? _createTime, - returnType: returnType ?? _returnType, - orderType: orderType ?? _orderType, - returnCode: returnCode ?? _returnCode, - returnStatus: returnStatus ?? _returnStatus, - applyTime: applyTime ?? _applyTime, - applySum: applySum ?? _applySum, - memberAccount: memberAccount ?? _memberAccount, - name: name ?? _name, - payStatus: payStatus ?? _payStatus, - couponSubPrice: couponSubPrice ?? _couponSubPrice, - totalDiscountPrice: totalDiscountPrice ?? _totalDiscountPrice, - orderSource: orderSource ?? _orderSource, - dayFlowCode: dayFlowCode ?? _dayFlowCode, - tableId: tableId ?? _tableId, - tableName: tableName ?? _tableName, - realPeople: realPeople ?? _realPeople, - refundStatus: refundStatus ?? _refundStatus, - notes: notes ?? _notes, - payNum: payNum ?? _payNum, - reason: reason ?? _reason, - isSubscribe: isSubscribe ?? _isSubscribe, - subcribeTime: subcribeTime ?? _subcribeTime, - endRefundTime: endRefundTime ?? _endRefundTime, - memberInfo: memberInfo ?? _memberInfo, - orderProductList: orderProductList ?? _orderProductList, - mid: mid ?? _mid, - isTakeOut: isTakeOut ?? _isTakeOut, - logisticsId: logisticsId ?? _logisticsId, - shipperCode: shipperCode ?? _shipperCode, - logisticsName: logisticsName ?? _logisticsName, - logisticsNum: logisticsNum ?? _logisticsNum, - logisticsCase: logisticsCase ?? _logisticsCase, - postFee: postFee ?? _postFee, - finalPayPrice: finalPayPrice ?? _finalPayPrice, - ticketStatus: ticketStatus ?? _ticketStatus, - tickets: tickets ?? _tickets, -); - String get id => _id; - String get orderCode => _orderCode; - String get storeName => _storeName; - bool get enableRefundApprover => _enableRefundApprover; - num get productCount => _productCount; - num get orderStatus => _orderStatus; - String get orderSum => _orderSum; - String get paySum => _paySum; - String get createTime => _createTime; - num get returnType => _returnType; - num get orderType => _orderType; - dynamic get returnCode => _returnCode; - dynamic get returnStatus => _returnStatus; - dynamic get applyTime => _applyTime; - dynamic get applySum => _applySum; - String get memberAccount => _memberAccount; - dynamic get name => _name; - num get payStatus => _payStatus; - String get couponSubPrice => _couponSubPrice; - String get totalDiscountPrice => _totalDiscountPrice; - num get orderSource => _orderSource; - String get dayFlowCode => _dayFlowCode; - String get tableId => _tableId; - dynamic get tableName => _tableName; - dynamic get realPeople => _realPeople; - num get refundStatus => _refundStatus; - String get notes => _notes; - String get payNum => _payNum; - dynamic get reason => _reason; - bool get isSubscribe => _isSubscribe; - dynamic get subcribeTime => _subcribeTime; - dynamic get endRefundTime => _endRefundTime; - dynamic get memberInfo => _memberInfo; - List get orderProductList => _orderProductList; - String get mid => _mid; - num get isTakeOut => _isTakeOut; - String get logisticsId => _logisticsId; - String get shipperCode => _shipperCode; - String get logisticsName => _logisticsName; - String get logisticsNum => _logisticsNum; - dynamic get logisticsCase => _logisticsCase; - String get postFee => _postFee; - String get finalPayPrice => _finalPayPrice; - bool get ticketStatus => _ticketStatus; - List get tickets => _tickets; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['orderCode'] = _orderCode; - map['storeName'] = _storeName; - map['enableRefundApprover'] = _enableRefundApprover; - map['productCount'] = _productCount; - map['orderStatus'] = _orderStatus; - map['orderSum'] = _orderSum; - map['paySum'] = _paySum; - map['createTime'] = _createTime; - map['returnType'] = _returnType; - map['orderType'] = _orderType; - map['returnCode'] = _returnCode; - map['returnStatus'] = _returnStatus; - map['applyTime'] = _applyTime; - map['applySum'] = _applySum; - map['memberAccount'] = _memberAccount; - map['name'] = _name; - map['payStatus'] = _payStatus; - map['couponSubPrice'] = _couponSubPrice; - map['totalDiscountPrice'] = _totalDiscountPrice; - map['orderSource'] = _orderSource; - map['dayFlowCode'] = _dayFlowCode; - map['tableId'] = _tableId; - map['tableName'] = _tableName; - map['realPeople'] = _realPeople; - map['refundStatus'] = _refundStatus; - map['notes'] = _notes; - map['payNum'] = _payNum; - map['reason'] = _reason; - map['isSubscribe'] = _isSubscribe; - map['subcribeTime'] = _subcribeTime; - map['endRefundTime'] = _endRefundTime; - map['memberInfo'] = _memberInfo; - if (_orderProductList != null) { - map['orderProductList'] = _orderProductList.map((v) => v.toJson()).toList(); - } - map['mid'] = _mid; - map['isTakeOut'] = _isTakeOut; - map['logisticsId'] = _logisticsId; - map['shipperCode'] = _shipperCode; - map['logisticsName'] = _logisticsName; - map['logisticsNum'] = _logisticsNum; - map['logisticsCase'] = _logisticsCase; - map['postFee'] = _postFee; - map['finalPayPrice'] = _finalPayPrice; - map['ticketStatus'] = _ticketStatus; - if (_tickets != null) { - map['tickets'] = _tickets.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1717488903532838912" -/// createTime : "2023-10-26 18:30:39" -/// createUser : "0" -/// updateTime : "2023-10-26 18:30:39" -/// updateUser : "0" -/// mid : "1640233401329909760" -/// storeId : "0" -/// orderId : "1717487051122671616" -/// orderProductId : "1717487051202363392" -/// productId : "1645981572022665216" -/// productSkuId : "1645981572102356992" -/// ticketWipedTimeTemplateId : null -/// amount : "9.20" -/// name : "台湾粽 " -/// code : "T202310261830384001410001" -/// useStartTime : "2023-10-26 00:00:00" -/// useEndTime : "2023-11-24 18:30:39" -/// finishTime : "2023-10-27 09:59:49" -/// type : "NORMAL" -/// source : null -/// takeType : null -/// style : "" -/// state : 9 -/// canSettlement : true -/// canSubscribe : true -/// isDelete : 0 -/// tenantCode : "1195" -/// ticketItemList : [{"id":"1717488903650279424","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"},{"id":"1717488903671250944","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"},{"id":"1717488903675445248","createTime":"2023-10-26 18:30:39","createUser":"0","updateTime":"2023-10-26 18:30:39","updateUser":"0","ticketId":"1717488903532838912","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":9,"finishTime":"2023-10-27 09:59:49","isDelete":0,"tenantCode":"1195"}] - -class Tickets { - Tickets({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - dynamic ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - String finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode, - List ticketItemList,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _storeId = storeId; - _orderId = orderId; - _orderProductId = orderProductId; - _productId = productId; - _productSkuId = productSkuId; - _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; - _amount = amount; - _name = name; - _code = code; - _useStartTime = useStartTime; - _useEndTime = useEndTime; - _finishTime = finishTime; - _type = type; - _source = source; - _takeType = takeType; - _style = style; - _state = state; - _canSettlement = canSettlement; - _canSubscribe = canSubscribe; - _isDelete = isDelete; - _tenantCode = tenantCode; - _ticketItemList = ticketItemList; -} - - Tickets.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _storeId = json['storeId']; - _orderId = json['orderId']; - _orderProductId = json['orderProductId']; - _productId = json['productId']; - _productSkuId = json['productSkuId']; - _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; - _amount = json['amount']; - _name = json['name']; - _code = json['code']; - _useStartTime = json['useStartTime']; - _useEndTime = json['useEndTime']; - _finishTime = json['finishTime']; - _type = json['type']; - _source = json['source']; - _takeType = json['takeType']; - _style = json['style']; - _state = json['state']; - _canSettlement = json['canSettlement']; - _canSubscribe = json['canSubscribe']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - if (json['ticketItemList'] != null) { - _ticketItemList = []; - json['ticketItemList'].forEach((v) { - _ticketItemList.add(TicketItemList.fromJson(v)); - }); - } - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _storeId; - String _orderId; - String _orderProductId; - String _productId; - String _productSkuId; - dynamic _ticketWipedTimeTemplateId; - String _amount; - String _name; - String _code; - String _useStartTime; - String _useEndTime; - String _finishTime; - String _type; - dynamic _source; - dynamic _takeType; - String _style; - num _state; - bool _canSettlement; - bool _canSubscribe; - num _isDelete; - String _tenantCode; - List _ticketItemList; -Tickets copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - dynamic ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - String finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode, - List ticketItemList, -}) => Tickets( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - storeId: storeId ?? _storeId, - orderId: orderId ?? _orderId, - orderProductId: orderProductId ?? _orderProductId, - productId: productId ?? _productId, - productSkuId: productSkuId ?? _productSkuId, - ticketWipedTimeTemplateId: ticketWipedTimeTemplateId ?? _ticketWipedTimeTemplateId, - amount: amount ?? _amount, - name: name ?? _name, - code: code ?? _code, - useStartTime: useStartTime ?? _useStartTime, - useEndTime: useEndTime ?? _useEndTime, - finishTime: finishTime ?? _finishTime, - type: type ?? _type, - source: source ?? _source, - takeType: takeType ?? _takeType, - style: style ?? _style, - state: state ?? _state, - canSettlement: canSettlement ?? _canSettlement, - canSubscribe: canSubscribe ?? _canSubscribe, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, - ticketItemList: ticketItemList ?? _ticketItemList, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get storeId => _storeId; - String get orderId => _orderId; - String get orderProductId => _orderProductId; - String get productId => _productId; - String get productSkuId => _productSkuId; - dynamic get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; - String get amount => _amount; - String get name => _name; - String get code => _code; - String get useStartTime => _useStartTime; - String get useEndTime => _useEndTime; - String get finishTime => _finishTime; - String get type => _type; - dynamic get source => _source; - dynamic get takeType => _takeType; - String get style => _style; - num get state => _state; - bool get canSettlement => _canSettlement; - bool get canSubscribe => _canSubscribe; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - List get ticketItemList => _ticketItemList; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['storeId'] = _storeId; - map['orderId'] = _orderId; - map['orderProductId'] = _orderProductId; - map['productId'] = _productId; - map['productSkuId'] = _productSkuId; - map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; - map['amount'] = _amount; - map['name'] = _name; - map['code'] = _code; - map['useStartTime'] = _useStartTime; - map['useEndTime'] = _useEndTime; - map['finishTime'] = _finishTime; - map['type'] = _type; - map['source'] = _source; - map['takeType'] = _takeType; - map['style'] = _style; - map['state'] = _state; - map['canSettlement'] = _canSettlement; - map['canSubscribe'] = _canSubscribe; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - if (_ticketItemList != null) { - map['ticketItemList'] = _ticketItemList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1717488903650279424" -/// createTime : "2023-10-26 18:30:39" -/// createUser : "0" -/// updateTime : "2023-10-26 18:30:39" -/// updateUser : "0" -/// ticketId : "1717488903532838912" -/// relationType : "PRODUCT" -/// relationId : "1645981572102356992" -/// name : "测试票券项目11" -/// showImage : "" -/// state : 9 -/// finishTime : "2023-10-27 09:59:49" -/// isDelete : 0 -/// tenantCode : "1195" - -class TicketItemList { - TicketItemList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String relationType, - String relationId, - String name, - String showImage, - num state, - String finishTime, - num isDelete, - String tenantCode,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _ticketId = ticketId; - _relationType = relationType; - _relationId = relationId; - _name = name; - _showImage = showImage; - _state = state; - _finishTime = finishTime; - _isDelete = isDelete; - _tenantCode = tenantCode; -} - - TicketItemList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _ticketId = json['ticketId']; - _relationType = json['relationType']; - _relationId = json['relationId']; - _name = json['name']; - _showImage = json['showImage']; - _state = json['state']; - _finishTime = json['finishTime']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _ticketId; - String _relationType; - String _relationId; - String _name; - String _showImage; - num _state; - String _finishTime; - num _isDelete; - String _tenantCode; -TicketItemList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String relationType, - String relationId, - String name, - String showImage, - num state, - String finishTime, - num isDelete, - String tenantCode, -}) => TicketItemList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - ticketId: ticketId ?? _ticketId, - relationType: relationType ?? _relationType, - relationId: relationId ?? _relationId, - name: name ?? _name, - showImage: showImage ?? _showImage, - state: state ?? _state, - finishTime: finishTime ?? _finishTime, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get ticketId => _ticketId; - String get relationType => _relationType; - String get relationId => _relationId; - String get name => _name; - String get showImage => _showImage; - num get state => _state; - String get finishTime => _finishTime; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - bool _isSelect = false; - - bool get isSelect => _isSelect; - - set isSelect(bool value) { - _isSelect = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['ticketId'] = _ticketId; - map['relationType'] = _relationType; - map['relationId'] = _relationId; - map['name'] = _name; - map['showImage'] = _showImage; - map['state'] = _state; - map['finishTime'] = _finishTime; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - return map; - } - -} - -/// id : "1717487051202363392" -/// createTime : "2023-10-26 18:23:17" -/// createUser : "1640233401329909760" -/// updateTime : "2023-10-26 18:23:17" -/// updateUser : "1640233401329909760" -/// tenantCode : "1195" -/// storeId : "1645318098540036096" -/// orderId : "1717487051122671616" -/// actInfo : null -/// productId : "1645981572022665216" -/// productName : "台湾粽" -/// skuId : "1645981572102356992" -/// skuNameStr : "" -/// skuImg : "" -/// buyNum : 1 -/// refundNum : 0 -/// type : 0 -/// reason : null -/// weight : 0.0 -/// applyPrice : "10.00" -/// sellPrice : "10.00" -/// postPay : "0.00" -/// isDelete : 0 -/// discountAmount : "0.80" -/// discountPercent : 92 -/// status : true -/// batch : 1 -/// deliveries : 0 -/// ticketType : "NORMAL" -/// ticketDays : "0" -/// takeType : null -/// skuTickets : ["测试票券项目11","测试票券项目22","测试票券项目33"] -/// ticketStyle : "" -/// setMealDataList : null -/// packagingFee : "0.00" - -class OrderProductList { - OrderProductList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - String storeId, - String orderId, - dynamic actInfo, - String productId, - String productName, - String skuId, - String skuNameStr, - String skuImg, - num buyNum, - num refundNum, - num type, - dynamic reason, - num weight, - String applyPrice, - String sellPrice, - String postPay, - num isDelete, - String discountAmount, - num discountPercent, - bool status, - num batch, - num deliveries, - String ticketType, - String ticketDays, - dynamic takeType, - List skuTickets, - String ticketStyle, - dynamic setMealDataList, - String packagingFee,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _tenantCode = tenantCode; - _storeId = storeId; - _orderId = orderId; - _actInfo = actInfo; - _productId = productId; - _productName = productName; - _skuId = skuId; - _skuNameStr = skuNameStr; - _skuImg = skuImg; - _buyNum = buyNum; - _refundNum = refundNum; - _type = type; - _reason = reason; - _weight = weight; - _applyPrice = applyPrice; - _sellPrice = sellPrice; - _postPay = postPay; - _isDelete = isDelete; - _discountAmount = discountAmount; - _discountPercent = discountPercent; - _status = status; - _batch = batch; - _deliveries = deliveries; - _ticketType = ticketType; - _ticketDays = ticketDays; - _takeType = takeType; - _skuTickets = skuTickets; - _ticketStyle = ticketStyle; - _setMealDataList = setMealDataList; - _packagingFee = packagingFee; -} - - OrderProductList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _tenantCode = json['tenantCode']; - _storeId = json['storeId']; - _orderId = json['orderId']; - _actInfo = json['actInfo']; - _productId = json['productId']; - _productName = json['productName']; - _skuId = json['skuId']; - _skuNameStr = json['skuNameStr']; - _skuImg = json['skuImg']; - _buyNum = json['buyNum']; - _refundNum = json['refundNum']; - _type = json['type']; - _reason = json['reason']; - _weight = json['weight']; - _applyPrice = json['applyPrice']; - _sellPrice = json['sellPrice']; - _postPay = json['postPay']; - _isDelete = json['isDelete']; - _discountAmount = json['discountAmount']; - _discountPercent = json['discountPercent']; - _status = json['status']; - _batch = json['batch']; - _deliveries = json['deliveries']; - _ticketType = json['ticketType']; - _ticketDays = json['ticketDays']; - _takeType = json['takeType']; - _skuTickets = json['skuTickets'] != null ? json['skuTickets'].cast() : []; - _ticketStyle = json['ticketStyle']; - _setMealDataList = json['setMealDataList']; - _packagingFee = json['packagingFee']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _tenantCode; - String _storeId; - String _orderId; - dynamic _actInfo; - String _productId; - String _productName; - String _skuId; - String _skuNameStr; - String _skuImg; - num _buyNum; - num _refundNum; - num _type; - dynamic _reason; - num _weight; - String _applyPrice; - String _sellPrice; - String _postPay; - num _isDelete; - String _discountAmount; - num _discountPercent; - bool _status; - num _batch; - num _deliveries; - String _ticketType; - String _ticketDays; - dynamic _takeType; - List _skuTickets; - String _ticketStyle; - dynamic _setMealDataList; - String _packagingFee; -OrderProductList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - String storeId, - String orderId, - dynamic actInfo, - String productId, - String productName, - String skuId, - String skuNameStr, - String skuImg, - num buyNum, - num refundNum, - num type, - dynamic reason, - num weight, - String applyPrice, - String sellPrice, - String postPay, - num isDelete, - String discountAmount, - num discountPercent, - bool status, - num batch, - num deliveries, - String ticketType, - String ticketDays, - dynamic takeType, - List skuTickets, - String ticketStyle, - dynamic setMealDataList, - String packagingFee, -}) => OrderProductList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - tenantCode: tenantCode ?? _tenantCode, - storeId: storeId ?? _storeId, - orderId: orderId ?? _orderId, - actInfo: actInfo ?? _actInfo, - productId: productId ?? _productId, - productName: productName ?? _productName, - skuId: skuId ?? _skuId, - skuNameStr: skuNameStr ?? _skuNameStr, - skuImg: skuImg ?? _skuImg, - buyNum: buyNum ?? _buyNum, - refundNum: refundNum ?? _refundNum, - type: type ?? _type, - reason: reason ?? _reason, - weight: weight ?? _weight, - applyPrice: applyPrice ?? _applyPrice, - sellPrice: sellPrice ?? _sellPrice, - postPay: postPay ?? _postPay, - isDelete: isDelete ?? _isDelete, - discountAmount: discountAmount ?? _discountAmount, - discountPercent: discountPercent ?? _discountPercent, - status: status ?? _status, - batch: batch ?? _batch, - deliveries: deliveries ?? _deliveries, - ticketType: ticketType ?? _ticketType, - ticketDays: ticketDays ?? _ticketDays, - takeType: takeType ?? _takeType, - skuTickets: skuTickets ?? _skuTickets, - ticketStyle: ticketStyle ?? _ticketStyle, - setMealDataList: setMealDataList ?? _setMealDataList, - packagingFee: packagingFee ?? _packagingFee, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get tenantCode => _tenantCode; - String get storeId => _storeId; - String get orderId => _orderId; - dynamic get actInfo => _actInfo; - String get productId => _productId; - String get productName => _productName; - String get skuId => _skuId; - String get skuNameStr => _skuNameStr; - String get skuImg => _skuImg; - num get buyNum => _buyNum; - num get refundNum => _refundNum; - num get type => _type; - dynamic get reason => _reason; - num get weight => _weight; - String get applyPrice => _applyPrice; - String get sellPrice => _sellPrice; - String get postPay => _postPay; - num get isDelete => _isDelete; - String get discountAmount => _discountAmount; - num get discountPercent => _discountPercent; - bool get status => _status; - num get batch => _batch; - num get deliveries => _deliveries; - String get ticketType => _ticketType; - String get ticketDays => _ticketDays; - dynamic get takeType => _takeType; - List get skuTickets => _skuTickets; - String get ticketStyle => _ticketStyle; - dynamic get setMealDataList => _setMealDataList; - String get packagingFee => _packagingFee; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['tenantCode'] = _tenantCode; - map['storeId'] = _storeId; - map['orderId'] = _orderId; - map['actInfo'] = _actInfo; - map['productId'] = _productId; - map['productName'] = _productName; - map['skuId'] = _skuId; - map['skuNameStr'] = _skuNameStr; - map['skuImg'] = _skuImg; - map['buyNum'] = _buyNum; - map['refundNum'] = _refundNum; - map['type'] = _type; - map['reason'] = _reason; - map['weight'] = _weight; - map['applyPrice'] = _applyPrice; - map['sellPrice'] = _sellPrice; - map['postPay'] = _postPay; - map['isDelete'] = _isDelete; - map['discountAmount'] = _discountAmount; - map['discountPercent'] = _discountPercent; - map['status'] = _status; - map['batch'] = _batch; - map['deliveries'] = _deliveries; - map['ticketType'] = _ticketType; - map['ticketDays'] = _ticketDays; - map['takeType'] = _takeType; - map['skuTickets'] = _skuTickets; - map['ticketStyle'] = _ticketStyle; - map['setMealDataList'] = _setMealDataList; - map['packagingFee'] = _packagingFee; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/business_store_list.dart b/lib/retrofit/data/business_store_list.dart deleted file mode 100644 index c5c35814..00000000 --- a/lib/retrofit/data/business_store_list.dart +++ /dev/null @@ -1,943 +0,0 @@ -/// records : [{"id":"1645701646107279360","createTime":"2023-04-11 16:13:43","createUser":"1640233401329909760","updateTime":"2023-04-11 16:13:43","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"炸蚵嗲","nickName":"","logo":"","facade":"","shipAddress":"","remark":"","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"湖北省武汉市江汉区万松街道王家墩社区","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":64,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":{"use_auto_open":false,"use_finish_order":false,"use_flow_auto_open":true,"use_flow_finish_order":true},"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645701593900777472","createTime":"2023-04-11 16:13:30","createUser":"1640233401329909760","updateTime":"2023-04-11 16:13:30","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"盐酥鸡","nickName":"","logo":"","facade":"","shipAddress":"","remark":"","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"44","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":65,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645701540310155264","createTime":"2023-04-11 16:13:18","createUser":"1640233401329909760","updateTime":"2023-04-11 16:13:18","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"台式夯肉","nickName":"","logo":"","facade":"https://pos.upload.lotus-wallet.com/1195/2023/04/47626481-87fc-4b24-901f-132f9367af5d.png","shipAddress":"","remark":"

","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"33","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":56,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645701459838238720","createTime":"2023-04-11 16:12:58","createUser":"1640233401329909760","updateTime":"2023-04-11 16:12:58","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"大肠包小肠","nickName":"","logo":"","facade":"","shipAddress":"","remark":"

","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":67,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645701372395388928","createTime":"2023-04-11 16:12:37","createUser":"1640233401329909760","updateTime":"2023-04-11 16:12:37","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"润饼卷","nickName":"","logo":"","facade":"","shipAddress":"","remark":"","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":66,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645701282909913088","createTime":"2023-04-11 16:12:16","createUser":"1640233401329909760","updateTime":"2023-04-11 16:12:16","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"南投红薯饼","nickName":"","logo":"","facade":"","shipAddress":"","remark":"

","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"12","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":68,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645701214400151552","createTime":"2023-04-11 16:12:00","createUser":"1640233401329909760","updateTime":"2023-04-11 16:12:00","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"炸元宝","nickName":"","logo":"","facade":"","shipAddress":"","remark":"","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":69,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645698953653518336","createTime":"2023-04-11 16:03:01","createUser":"1640233401329909760","updateTime":"2023-04-11 16:03:01","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"鸡蛋糕","nickName":"","logo":"","facade":"","shipAddress":"","remark":"","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"5","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":70,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645698860804210688","createTime":"2023-04-11 16:02:39","createUser":"1640233401329909760","updateTime":"2023-04-11 16:02:39","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"QQ地瓜球","nickName":"","logo":"","facade":"","shipAddress":"","remark":"","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":{"mini_program_app_id":"","mini_program_secret":"","mini_mch_id":"","mini_sub_mch_id":"","is_sub_app":false,"sub_app_id":"","mini_mch_key":"","mini_key_path":"","mini_key_sn_no":"","mini_key_cert_path":"","mini_key_key_path":""},"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"3","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":79,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":{"use_auto_open":false,"use_finish_order":false,"use_flow_auto_open":true,"use_flow_finish_order":true},"posType":{"desc":"快消餐饮","code":"FASTSTORE"}},{"id":"1645698130097733632","createTime":"2023-04-11 15:59:44","createUser":"1640233401329909760","updateTime":"2023-04-11 15:59:44","updateUser":"1640233401329909760","tenantCode":"1195","useErp":false,"openStartTime":"08:00:00","openEndTime":"23:30:00","storeName":"烤鹌鹑蛋","nickName":"","logo":"","facade":"","shipAddress":"","remark":"","mobile":"","longitude":null,"latitude":null,"refundAddress":"","refundTel":"","refundContact":"","isAutoSendRefundAddress":1,"province":"","city":"","district":"","address":"郑州360广场189号摊位左转1米","headName":"","headMobile":"","tel":"","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":null,"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"},"setting":{"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"tableFee":{"merchant_table_price":"","per_capita_consumption":"","pay_set":["0","1","2","3","4"]},"money":"0.00","platformShow":false,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":57,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":null,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}}] -/// total : "43" -/// size : "10" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "5" - -class BusinessStoreList { - BusinessStoreList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - BusinessStoreList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -BusinessStoreList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => BusinessStoreList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1645701646107279360" -/// createTime : "2023-04-11 16:13:43" -/// createUser : "1640233401329909760" -/// updateTime : "2023-04-11 16:13:43" -/// updateUser : "1640233401329909760" -/// tenantCode : "1195" -/// useErp : false -/// openStartTime : "08:00:00" -/// openEndTime : "23:30:00" -/// storeName : "炸蚵嗲" -/// nickName : "" -/// logo : "" -/// facade : "" -/// shipAddress : "" -/// remark : "" -/// mobile : "" -/// longitude : null -/// latitude : null -/// refundAddress : "" -/// refundTel : "" -/// refundContact : "" -/// isAutoSendRefundAddress : 1 -/// province : "" -/// city : "" -/// district : "" -/// address : "湖北省武汉市江汉区万松街道王家墩社区" -/// headName : "" -/// headMobile : "" -/// tel : "" -/// businessService : "" -/// businessType : "" -/// deliveryInfo : null -/// pickupType : {"dineInTakeStatus":false,"takeawayStatus":false,"expressDeliveryStatus":false} -/// miniParam : null -/// alipayParam : {"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2021004109611523","appAuthToken":"202304BB5ef5b1805ea3434289259ee8790fdX69"} -/// setting : {"speakerKey":"","speakerSn":"","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null} -/// tableFee : {"merchant_table_price":"","per_capita_consumption":"","pay_set":["0","1","2","3","4"]} -/// money : "0.00" -/// platformShow : false -/// subMchId : "" -/// serviceType : "EATSTORE" -/// isEnable : true -/// is_delete : 0 -/// sort : 64 -/// profitSharing : {"type":"manual","mchName":"","mchCode":"","ratio":0} -/// autoSetting : {"use_auto_open":false,"use_finish_order":false,"use_flow_auto_open":true,"use_flow_finish_order":true} -/// posType : {"desc":"快消餐饮","code":"FASTSTORE"} - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - bool useErp, - String openStartTime, - String openEndTime, - String storeName, - String nickName, - String logo, - String facade, - String shipAddress, - String remark, - String mobile, - dynamic longitude, - dynamic latitude, - String refundAddress, - String refundTel, - String refundContact, - num isAutoSendRefundAddress, - String province, - String city, - String district, - String address, - String headName, - String headMobile, - String tel, - String businessService, - String businessType, - dynamic deliveryInfo, - PickupType pickupType, - dynamic miniParam, - AlipayParam alipayParam, - Setting setting, - TableFee tableFee, - String money, - bool platformShow, - String subMchId, - String serviceType, - bool isEnable, - num isDelete, - num sort, - ProfitSharing profitSharing, - AutoSetting autoSetting, - PosType posType,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _tenantCode = tenantCode; - _useErp = useErp; - _openStartTime = openStartTime; - _openEndTime = openEndTime; - _storeName = storeName; - _nickName = nickName; - _logo = logo; - _facade = facade; - _shipAddress = shipAddress; - _remark = remark; - _mobile = mobile; - _longitude = longitude; - _latitude = latitude; - _refundAddress = refundAddress; - _refundTel = refundTel; - _refundContact = refundContact; - _isAutoSendRefundAddress = isAutoSendRefundAddress; - _province = province; - _city = city; - _district = district; - _address = address; - _headName = headName; - _headMobile = headMobile; - _tel = tel; - _businessService = businessService; - _businessType = businessType; - _deliveryInfo = deliveryInfo; - _pickupType = pickupType; - _miniParam = miniParam; - _alipayParam = alipayParam; - _setting = setting; - _tableFee = tableFee; - _money = money; - _platformShow = platformShow; - _subMchId = subMchId; - _serviceType = serviceType; - _isEnable = isEnable; - _isDelete = isDelete; - _sort = sort; - _profitSharing = profitSharing; - _autoSetting = autoSetting; - _posType = posType; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _tenantCode = json['tenantCode']; - _useErp = json['useErp']; - _openStartTime = json['openStartTime']; - _openEndTime = json['openEndTime']; - _storeName = json['storeName']; - _nickName = json['nickName']; - _logo = json['logo']; - _facade = json['facade']; - _shipAddress = json['shipAddress']; - _remark = json['remark']; - _mobile = json['mobile']; - _longitude = json['longitude']; - _latitude = json['latitude']; - _refundAddress = json['refundAddress']; - _refundTel = json['refundTel']; - _refundContact = json['refundContact']; - _isAutoSendRefundAddress = json['isAutoSendRefundAddress']; - _province = json['province']; - _city = json['city']; - _district = json['district']; - _address = json['address']; - _headName = json['headName']; - _headMobile = json['headMobile']; - _tel = json['tel']; - _businessService = json['businessService']; - _businessType = json['businessType']; - _deliveryInfo = json['deliveryInfo']; - _pickupType = json['pickupType'] != null ? PickupType.fromJson(json['pickupType']) : null; - _miniParam = json['miniParam']; - _alipayParam = json['alipayParam'] != null ? AlipayParam.fromJson(json['alipayParam']) : null; - _setting = json['setting'] != null ? Setting.fromJson(json['setting']) : null; - _tableFee = json['tableFee'] != null ? TableFee.fromJson(json['tableFee']) : null; - _money = json['money']; - _platformShow = json['platformShow']; - _subMchId = json['subMchId']; - _serviceType = json['serviceType']; - _isEnable = json['isEnable']; - _isDelete = json['is_delete']; - _sort = json['sort']; - _profitSharing = json['profitSharing'] != null ? ProfitSharing.fromJson(json['profitSharing']) : null; - _autoSetting = json['autoSetting'] != null ? AutoSetting.fromJson(json['autoSetting']) : null; - _posType = json['posType'] != null ? PosType.fromJson(json['posType']) : null; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _tenantCode; - bool _useErp; - String _openStartTime; - String _openEndTime; - String _storeName; - String _nickName; - String _logo; - String _facade; - String _shipAddress; - String _remark; - String _mobile; - dynamic _longitude; - dynamic _latitude; - String _refundAddress; - String _refundTel; - String _refundContact; - num _isAutoSendRefundAddress; - String _province; - String _city; - String _district; - String _address; - String _headName; - String _headMobile; - String _tel; - String _businessService; - String _businessType; - dynamic _deliveryInfo; - PickupType _pickupType; - dynamic _miniParam; - AlipayParam _alipayParam; - Setting _setting; - TableFee _tableFee; - String _money; - bool _platformShow; - String _subMchId; - String _serviceType; - bool _isEnable; - num _isDelete; - num _sort; - ProfitSharing _profitSharing; - AutoSetting _autoSetting; - PosType _posType; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - bool useErp, - String openStartTime, - String openEndTime, - String storeName, - String nickName, - String logo, - String facade, - String shipAddress, - String remark, - String mobile, - dynamic longitude, - dynamic latitude, - String refundAddress, - String refundTel, - String refundContact, - num isAutoSendRefundAddress, - String province, - String city, - String district, - String address, - String headName, - String headMobile, - String tel, - String businessService, - String businessType, - dynamic deliveryInfo, - PickupType pickupType, - dynamic miniParam, - AlipayParam alipayParam, - Setting setting, - TableFee tableFee, - String money, - bool platformShow, - String subMchId, - String serviceType, - bool isEnable, - num isDelete, - num sort, - ProfitSharing profitSharing, - AutoSetting autoSetting, - PosType posType, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - tenantCode: tenantCode ?? _tenantCode, - useErp: useErp ?? _useErp, - openStartTime: openStartTime ?? _openStartTime, - openEndTime: openEndTime ?? _openEndTime, - storeName: storeName ?? _storeName, - nickName: nickName ?? _nickName, - logo: logo ?? _logo, - facade: facade ?? _facade, - shipAddress: shipAddress ?? _shipAddress, - remark: remark ?? _remark, - mobile: mobile ?? _mobile, - longitude: longitude ?? _longitude, - latitude: latitude ?? _latitude, - refundAddress: refundAddress ?? _refundAddress, - refundTel: refundTel ?? _refundTel, - refundContact: refundContact ?? _refundContact, - isAutoSendRefundAddress: isAutoSendRefundAddress ?? _isAutoSendRefundAddress, - province: province ?? _province, - city: city ?? _city, - district: district ?? _district, - address: address ?? _address, - headName: headName ?? _headName, - headMobile: headMobile ?? _headMobile, - tel: tel ?? _tel, - businessService: businessService ?? _businessService, - businessType: businessType ?? _businessType, - deliveryInfo: deliveryInfo ?? _deliveryInfo, - pickupType: pickupType ?? _pickupType, - miniParam: miniParam ?? _miniParam, - alipayParam: alipayParam ?? _alipayParam, - setting: setting ?? _setting, - tableFee: tableFee ?? _tableFee, - money: money ?? _money, - platformShow: platformShow ?? _platformShow, - subMchId: subMchId ?? _subMchId, - serviceType: serviceType ?? _serviceType, - isEnable: isEnable ?? _isEnable, - isDelete: isDelete ?? _isDelete, - sort: sort ?? _sort, - profitSharing: profitSharing ?? _profitSharing, - autoSetting: autoSetting ?? _autoSetting, - posType: posType ?? _posType, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get tenantCode => _tenantCode; - bool get useErp => _useErp; - String get openStartTime => _openStartTime; - String get openEndTime => _openEndTime; - String get storeName => _storeName; - String get nickName => _nickName; - String get logo => _logo; - String get facade => _facade; - String get shipAddress => _shipAddress; - String get remark => _remark; - String get mobile => _mobile; - dynamic get longitude => _longitude; - dynamic get latitude => _latitude; - String get refundAddress => _refundAddress; - String get refundTel => _refundTel; - String get refundContact => _refundContact; - num get isAutoSendRefundAddress => _isAutoSendRefundAddress; - String get province => _province; - String get city => _city; - String get district => _district; - String get address => _address; - String get headName => _headName; - String get headMobile => _headMobile; - String get tel => _tel; - String get businessService => _businessService; - String get businessType => _businessType; - dynamic get deliveryInfo => _deliveryInfo; - PickupType get pickupType => _pickupType; - dynamic get miniParam => _miniParam; - AlipayParam get alipayParam => _alipayParam; - Setting get setting => _setting; - TableFee get tableFee => _tableFee; - String get money => _money; - bool get platformShow => _platformShow; - String get subMchId => _subMchId; - String get serviceType => _serviceType; - bool get isEnable => _isEnable; - num get isDelete => _isDelete; - num get sort => _sort; - ProfitSharing get profitSharing => _profitSharing; - AutoSetting get autoSetting => _autoSetting; - PosType get posType => _posType; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['tenantCode'] = _tenantCode; - map['useErp'] = _useErp; - map['openStartTime'] = _openStartTime; - map['openEndTime'] = _openEndTime; - map['storeName'] = _storeName; - map['nickName'] = _nickName; - map['logo'] = _logo; - map['facade'] = _facade; - map['shipAddress'] = _shipAddress; - map['remark'] = _remark; - map['mobile'] = _mobile; - map['longitude'] = _longitude; - map['latitude'] = _latitude; - map['refundAddress'] = _refundAddress; - map['refundTel'] = _refundTel; - map['refundContact'] = _refundContact; - map['isAutoSendRefundAddress'] = _isAutoSendRefundAddress; - map['province'] = _province; - map['city'] = _city; - map['district'] = _district; - map['address'] = _address; - map['headName'] = _headName; - map['headMobile'] = _headMobile; - map['tel'] = _tel; - map['businessService'] = _businessService; - map['businessType'] = _businessType; - map['deliveryInfo'] = _deliveryInfo; - if (_pickupType != null) { - map['pickupType'] = _pickupType.toJson(); - } - map['miniParam'] = _miniParam; - if (_alipayParam != null) { - map['alipayParam'] = _alipayParam.toJson(); - } - if (_setting != null) { - map['setting'] = _setting.toJson(); - } - if (_tableFee != null) { - map['tableFee'] = _tableFee.toJson(); - } - map['money'] = _money; - map['platformShow'] = _platformShow; - map['subMchId'] = _subMchId; - map['serviceType'] = _serviceType; - map['isEnable'] = _isEnable; - map['is_delete'] = _isDelete; - map['sort'] = _sort; - if (_profitSharing != null) { - map['profitSharing'] = _profitSharing.toJson(); - } - if (_autoSetting != null) { - map['autoSetting'] = _autoSetting.toJson(); - } - if (_posType != null) { - map['posType'] = _posType.toJson(); - } - return map; - } - -} - -/// desc : "快消餐饮" -/// code : "FASTSTORE" - -class PosType { - PosType({ - String desc, - String code,}){ - _desc = desc; - _code = code; -} - - PosType.fromJson(dynamic json) { - _desc = json['desc']; - _code = json['code']; - } - String _desc; - String _code; -PosType copyWith({ String desc, - String code, -}) => PosType( desc: desc ?? _desc, - code: code ?? _code, -); - String get desc => _desc; - String get code => _code; - - Map toJson() { - final map = {}; - map['desc'] = _desc; - map['code'] = _code; - return map; - } - -} - -/// use_auto_open : false -/// use_finish_order : false -/// use_flow_auto_open : true -/// use_flow_finish_order : true - -class AutoSetting { - AutoSetting({ - bool useAutoOpen, - bool useFinishOrder, - bool useFlowAutoOpen, - bool useFlowFinishOrder,}){ - _useAutoOpen = useAutoOpen; - _useFinishOrder = useFinishOrder; - _useFlowAutoOpen = useFlowAutoOpen; - _useFlowFinishOrder = useFlowFinishOrder; -} - - AutoSetting.fromJson(dynamic json) { - _useAutoOpen = json['use_auto_open']; - _useFinishOrder = json['use_finish_order']; - _useFlowAutoOpen = json['use_flow_auto_open']; - _useFlowFinishOrder = json['use_flow_finish_order']; - } - bool _useAutoOpen; - bool _useFinishOrder; - bool _useFlowAutoOpen; - bool _useFlowFinishOrder; -AutoSetting copyWith({ bool useAutoOpen, - bool useFinishOrder, - bool useFlowAutoOpen, - bool useFlowFinishOrder, -}) => AutoSetting( useAutoOpen: useAutoOpen ?? _useAutoOpen, - useFinishOrder: useFinishOrder ?? _useFinishOrder, - useFlowAutoOpen: useFlowAutoOpen ?? _useFlowAutoOpen, - useFlowFinishOrder: useFlowFinishOrder ?? _useFlowFinishOrder, -); - bool get useAutoOpen => _useAutoOpen; - bool get useFinishOrder => _useFinishOrder; - bool get useFlowAutoOpen => _useFlowAutoOpen; - bool get useFlowFinishOrder => _useFlowFinishOrder; - - Map toJson() { - final map = {}; - map['use_auto_open'] = _useAutoOpen; - map['use_finish_order'] = _useFinishOrder; - map['use_flow_auto_open'] = _useFlowAutoOpen; - map['use_flow_finish_order'] = _useFlowFinishOrder; - return map; - } - -} - -/// type : "manual" -/// mchName : "" -/// mchCode : "" -/// ratio : 0 - -class ProfitSharing { - ProfitSharing({ - String type, - String mchName, - String mchCode, - num ratio,}){ - _type = type; - _mchName = mchName; - _mchCode = mchCode; - _ratio = ratio; -} - - ProfitSharing.fromJson(dynamic json) { - _type = json['type']; - _mchName = json['mchName']; - _mchCode = json['mchCode']; - _ratio = json['ratio']; - } - String _type; - String _mchName; - String _mchCode; - num _ratio; -ProfitSharing copyWith({ String type, - String mchName, - String mchCode, - num ratio, -}) => ProfitSharing( type: type ?? _type, - mchName: mchName ?? _mchName, - mchCode: mchCode ?? _mchCode, - ratio: ratio ?? _ratio, -); - String get type => _type; - String get mchName => _mchName; - String get mchCode => _mchCode; - num get ratio => _ratio; - - Map toJson() { - final map = {}; - map['type'] = _type; - map['mchName'] = _mchName; - map['mchCode'] = _mchCode; - map['ratio'] = _ratio; - return map; - } - -} - -/// merchant_table_price : "" -/// per_capita_consumption : "" -/// pay_set : ["0","1","2","3","4"] - -class TableFee { - TableFee({ - String merchantTablePrice, - String perCapitaConsumption, - List paySet,}){ - _merchantTablePrice = merchantTablePrice; - _perCapitaConsumption = perCapitaConsumption; - _paySet = paySet; -} - - TableFee.fromJson(dynamic json) { - _merchantTablePrice = json['merchant_table_price']; - _perCapitaConsumption = json['per_capita_consumption']; - _paySet = json['pay_set'] != null ? json['pay_set'].cast() : []; - } - String _merchantTablePrice; - String _perCapitaConsumption; - List _paySet; -TableFee copyWith({ String merchantTablePrice, - String perCapitaConsumption, - List paySet, -}) => TableFee( merchantTablePrice: merchantTablePrice ?? _merchantTablePrice, - perCapitaConsumption: perCapitaConsumption ?? _perCapitaConsumption, - paySet: paySet ?? _paySet, -); - String get merchantTablePrice => _merchantTablePrice; - String get perCapitaConsumption => _perCapitaConsumption; - List get paySet => _paySet; - - Map toJson() { - final map = {}; - map['merchant_table_price'] = _merchantTablePrice; - map['per_capita_consumption'] = _perCapitaConsumption; - map['pay_set'] = _paySet; - return map; - } - -} - -/// speakerKey : "" -/// speakerSn : "" -/// printUsername : "" -/// printUserPwd : "" -/// tagWidth : null -/// tagHeight : null - -class Setting { - Setting({ - String speakerKey, - String speakerSn, - String printUsername, - String printUserPwd, - dynamic tagWidth, - dynamic tagHeight,}){ - _speakerKey = speakerKey; - _speakerSn = speakerSn; - _printUsername = printUsername; - _printUserPwd = printUserPwd; - _tagWidth = tagWidth; - _tagHeight = tagHeight; -} - - Setting.fromJson(dynamic json) { - _speakerKey = json['speakerKey']; - _speakerSn = json['speakerSn']; - _printUsername = json['printUsername']; - _printUserPwd = json['printUserPwd']; - _tagWidth = json['tagWidth']; - _tagHeight = json['tagHeight']; - } - String _speakerKey; - String _speakerSn; - String _printUsername; - String _printUserPwd; - dynamic _tagWidth; - dynamic _tagHeight; -Setting copyWith({ String speakerKey, - String speakerSn, - String printUsername, - String printUserPwd, - dynamic tagWidth, - dynamic tagHeight, -}) => Setting( speakerKey: speakerKey ?? _speakerKey, - speakerSn: speakerSn ?? _speakerSn, - printUsername: printUsername ?? _printUsername, - printUserPwd: printUserPwd ?? _printUserPwd, - tagWidth: tagWidth ?? _tagWidth, - tagHeight: tagHeight ?? _tagHeight, -); - String get speakerKey => _speakerKey; - String get speakerSn => _speakerSn; - String get printUsername => _printUsername; - String get printUserPwd => _printUserPwd; - dynamic get tagWidth => _tagWidth; - dynamic get tagHeight => _tagHeight; - - Map toJson() { - final map = {}; - map['speakerKey'] = _speakerKey; - map['speakerSn'] = _speakerSn; - map['printUsername'] = _printUsername; - map['printUserPwd'] = _printUserPwd; - map['tagWidth'] = _tagWidth; - map['tagHeight'] = _tagHeight; - return map; - } - -} - -/// appid : "" -/// privateKey : "" -/// alipayPublicKey : "" -/// alipayPid : "2021004109611523" -/// appAuthToken : "202304BB5ef5b1805ea3434289259ee8790fdX69" - -class AlipayParam { - AlipayParam({ - String appid, - String privateKey, - String alipayPublicKey, - String alipayPid, - String appAuthToken,}){ - _appid = appid; - _privateKey = privateKey; - _alipayPublicKey = alipayPublicKey; - _alipayPid = alipayPid; - _appAuthToken = appAuthToken; -} - - AlipayParam.fromJson(dynamic json) { - _appid = json['appid']; - _privateKey = json['privateKey']; - _alipayPublicKey = json['alipayPublicKey']; - _alipayPid = json['alipayPid']; - _appAuthToken = json['appAuthToken']; - } - String _appid; - String _privateKey; - String _alipayPublicKey; - String _alipayPid; - String _appAuthToken; -AlipayParam copyWith({ String appid, - String privateKey, - String alipayPublicKey, - String alipayPid, - String appAuthToken, -}) => AlipayParam( appid: appid ?? _appid, - privateKey: privateKey ?? _privateKey, - alipayPublicKey: alipayPublicKey ?? _alipayPublicKey, - alipayPid: alipayPid ?? _alipayPid, - appAuthToken: appAuthToken ?? _appAuthToken, -); - String get appid => _appid; - String get privateKey => _privateKey; - String get alipayPublicKey => _alipayPublicKey; - String get alipayPid => _alipayPid; - String get appAuthToken => _appAuthToken; - - Map toJson() { - final map = {}; - map['appid'] = _appid; - map['privateKey'] = _privateKey; - map['alipayPublicKey'] = _alipayPublicKey; - map['alipayPid'] = _alipayPid; - map['appAuthToken'] = _appAuthToken; - return map; - } - -} - -/// dineInTakeStatus : false -/// takeawayStatus : false -/// expressDeliveryStatus : false - -class PickupType { - PickupType({ - bool dineInTakeStatus, - bool takeawayStatus, - bool expressDeliveryStatus,}){ - _dineInTakeStatus = dineInTakeStatus; - _takeawayStatus = takeawayStatus; - _expressDeliveryStatus = expressDeliveryStatus; -} - - PickupType.fromJson(dynamic json) { - _dineInTakeStatus = json['dineInTakeStatus']; - _takeawayStatus = json['takeawayStatus']; - _expressDeliveryStatus = json['expressDeliveryStatus']; - } - bool _dineInTakeStatus; - bool _takeawayStatus; - bool _expressDeliveryStatus; -PickupType copyWith({ bool dineInTakeStatus, - bool takeawayStatus, - bool expressDeliveryStatus, -}) => PickupType( dineInTakeStatus: dineInTakeStatus ?? _dineInTakeStatus, - takeawayStatus: takeawayStatus ?? _takeawayStatus, - expressDeliveryStatus: expressDeliveryStatus ?? _expressDeliveryStatus, -); - bool get dineInTakeStatus => _dineInTakeStatus; - bool get takeawayStatus => _takeawayStatus; - bool get expressDeliveryStatus => _expressDeliveryStatus; - - Map toJson() { - final map = {}; - map['dineInTakeStatus'] = _dineInTakeStatus; - map['takeawayStatus'] = _takeawayStatus; - map['expressDeliveryStatus'] = _expressDeliveryStatus; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/business_vip_list.dart b/lib/retrofit/data/business_vip_list.dart deleted file mode 100644 index 9542ff65..00000000 --- a/lib/retrofit/data/business_vip_list.dart +++ /dev/null @@ -1,374 +0,0 @@ -/// records : [{"id":"1730229003043733504","createTime":"2023-11-30 22:15:15","createUser":"0","updateTime":"2023-11-30 22:15:15","updateUser":"0","mid":null,"openid":"otrgp5C7qpd-V2AHosRZOnN4NoEM","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-30 22:15:15","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1729813919708479488","createTime":"2023-11-29 18:45:52","createUser":"0","updateTime":"2023-11-29 18:45:52","updateUser":"0","mid":null,"openid":"otrgp5Brxv8c7fdZbIjmbUEaLBVM","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-29 18:45:52","loginNum":2,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1729685559346987008","createTime":"2023-11-29 10:15:48","createUser":"0","updateTime":"2023-11-29 10:15:48","updateUser":"0","mid":null,"openid":"otrgp5M6pxBus4Ykh1XdeHHLiFBA","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-29 10:15:48","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1729685558696869888","createTime":"2023-11-29 10:15:48","createUser":"0","updateTime":"2023-11-29 10:15:48","updateUser":"0","mid":null,"openid":"otrgp5M6pxBus4Ykh1XdeHHLiFBA","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-29 10:15:48","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1729062974783488000","createTime":"2023-11-27 17:01:52","createUser":"0","updateTime":"2023-11-27 17:01:52","updateUser":"0","mid":null,"openid":null,"nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-27 17:01:52","loginNum":0,"tenantCode":"1195","phone":"","source":1,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1728984020596817920","createTime":"2023-11-27 11:48:08","createUser":"0","updateTime":"2023-11-27 11:48:08","updateUser":"0","mid":null,"openid":"otrgp5GG69LQo1_xaPpxNnpnds7A","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-27 11:48:08","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1728980774142607360","createTime":"2023-11-27 11:35:14","createUser":"0","updateTime":"2023-11-27 11:35:14","updateUser":"0","mid":null,"openid":"otrgp5NcFDlLRPi7RPpFolajayLQ","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-27 11:35:14","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1728297227396317184","createTime":"2023-11-25 14:19:04","createUser":"0","updateTime":"2023-11-25 14:19:04","updateUser":"0","mid":null,"openid":"otrgp5Obp61VrN7tyvXdT1MNsAL0","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-25 14:19:04","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1728274418079105024","createTime":"2023-11-25 12:48:26","createUser":"0","updateTime":"2023-11-25 12:48:26","updateUser":"0","mid":null,"openid":"otrgp5L0bMvf8DXFf_kdRCzPqpEM","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-25 12:48:26","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false},{"id":"1727662634473357312","createTime":"2023-11-23 20:17:25","createUser":"0","updateTime":"2023-11-23 20:17:25","updateUser":"0","mid":null,"openid":"otrgp5Jxyl5zQOgIwZaYK3aHuF9g","nickname":"","headimg":"","balance":"0.00","money":"0","realRecharge":"0.00","giftRecharge":"0.00","sex":"0","status":true,"loginTime":"2023-11-23 20:17:25","loginNum":1,"tenantCode":"1195","phone":"","source":0,"expendAmount":"0.00","buyTimes":0,"lastBuyTime":null,"onCredit":false}] -/// total : "9378" -/// size : "10" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "938" - -class BusinessVipList { - BusinessVipList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - BusinessVipList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -BusinessVipList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => BusinessVipList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1730229003043733504" -/// createTime : "2023-11-30 22:15:15" -/// createUser : "0" -/// updateTime : "2023-11-30 22:15:15" -/// updateUser : "0" -/// mid : null -/// openid : "otrgp5C7qpd-V2AHosRZOnN4NoEM" -/// nickname : "" -/// headimg : "" -/// balance : "0.00" -/// money : "0" -/// realRecharge : "0.00" -/// giftRecharge : "0.00" -/// sex : "0" -/// status : true -/// loginTime : "2023-11-30 22:15:15" -/// loginNum : 1 -/// tenantCode : "1195" -/// phone : "" -/// source : 0 -/// expendAmount : "0.00" -/// buyTimes : 0 -/// lastBuyTime : null -/// onCredit : false - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - dynamic mid, - String openid, - String nickname, - String headimg, - String balance, - String money, - String realRecharge, - String giftRecharge, - String sex, - bool status, - String loginTime, - num loginNum, - String tenantCode, - String phone, - num source, - String expendAmount, - num buyTimes, - dynamic lastBuyTime, - bool onCredit,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _openid = openid; - _nickname = nickname; - _headimg = headimg; - _balance = balance; - _money = money; - _realRecharge = realRecharge; - _giftRecharge = giftRecharge; - _sex = sex; - _status = status; - _loginTime = loginTime; - _loginNum = loginNum; - _tenantCode = tenantCode; - _phone = phone; - _source = source; - _expendAmount = expendAmount; - _buyTimes = buyTimes; - _lastBuyTime = lastBuyTime; - _onCredit = onCredit; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _openid = json['openid']; - _nickname = json['nickname']; - _headimg = json['headimg']; - _balance = json['balance']; - _money = json['money']; - _realRecharge = json['realRecharge']; - _giftRecharge = json['giftRecharge']; - _sex = json['sex']; - _status = json['status']; - _loginTime = json['loginTime']; - _loginNum = json['loginNum']; - _tenantCode = json['tenantCode']; - _phone = json['phone']; - _source = json['source']; - _expendAmount = json['expendAmount']; - _buyTimes = json['buyTimes']; - _lastBuyTime = json['lastBuyTime']; - _onCredit = json['onCredit']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - dynamic _mid; - String _openid; - String _nickname; - String _headimg; - String _balance; - String _money; - String _realRecharge; - String _giftRecharge; - String _sex; - bool _status; - String _loginTime; - num _loginNum; - String _tenantCode; - String _phone; - num _source; - String _expendAmount; - num _buyTimes; - dynamic _lastBuyTime; - bool _onCredit; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - dynamic mid, - String openid, - String nickname, - String headimg, - String balance, - String money, - String realRecharge, - String giftRecharge, - String sex, - bool status, - String loginTime, - num loginNum, - String tenantCode, - String phone, - num source, - String expendAmount, - num buyTimes, - dynamic lastBuyTime, - bool onCredit, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - openid: openid ?? _openid, - nickname: nickname ?? _nickname, - headimg: headimg ?? _headimg, - balance: balance ?? _balance, - money: money ?? _money, - realRecharge: realRecharge ?? _realRecharge, - giftRecharge: giftRecharge ?? _giftRecharge, - sex: sex ?? _sex, - status: status ?? _status, - loginTime: loginTime ?? _loginTime, - loginNum: loginNum ?? _loginNum, - tenantCode: tenantCode ?? _tenantCode, - phone: phone ?? _phone, - source: source ?? _source, - expendAmount: expendAmount ?? _expendAmount, - buyTimes: buyTimes ?? _buyTimes, - lastBuyTime: lastBuyTime ?? _lastBuyTime, - onCredit: onCredit ?? _onCredit, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - dynamic get mid => _mid; - String get openid => _openid; - String get nickname => _nickname; - String get headimg => _headimg; - String get balance => _balance; - String get money => _money; - String get realRecharge => _realRecharge; - String get giftRecharge => _giftRecharge; - String get sex => _sex; - bool get status => _status; - String get loginTime => _loginTime; - num get loginNum => _loginNum; - String get tenantCode => _tenantCode; - String get phone => _phone; - num get source => _source; - String get expendAmount => _expendAmount; - num get buyTimes => _buyTimes; - dynamic get lastBuyTime => _lastBuyTime; - bool get onCredit => _onCredit; - bool _isShow = false; - - bool get isShow => _isShow; - - set isShow(bool value) { - _isShow = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['openid'] = _openid; - map['nickname'] = _nickname; - map['headimg'] = _headimg; - map['balance'] = _balance; - map['money'] = _money; - map['realRecharge'] = _realRecharge; - map['giftRecharge'] = _giftRecharge; - map['sex'] = _sex; - map['status'] = _status; - map['loginTime'] = _loginTime; - map['loginNum'] = _loginNum; - map['tenantCode'] = _tenantCode; - map['phone'] = _phone; - map['source'] = _source; - map['expendAmount'] = _expendAmount; - map['buyTimes'] = _buyTimes; - map['lastBuyTime'] = _lastBuyTime; - map['onCredit'] = _onCredit; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/category_select_list.dart b/lib/retrofit/data/category_select_list.dart deleted file mode 100644 index d6309a6e..00000000 --- a/lib/retrofit/data/category_select_list.dart +++ /dev/null @@ -1,114 +0,0 @@ -/// id : "1452472226421932032" -/// createTime : "2021-10-25 11:08:59" -/// createUser : "1" -/// updateTime : "2021-10-25 11:08:59" -/// updateUser : "1" -/// name : "4444" -/// isTop : true -/// sort : 0 -/// isDelete : 0 - -class CategorySelectList { - CategorySelectList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - bool isTop, - int sort, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _name = name; - _isTop = isTop; - _sort = sort; - _isDelete = isDelete; -} - - CategorySelectList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _name = json['name']; - _isTop = json['isTop']; - _sort = json['sort']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _name; - bool _isTop; - int _sort; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get name => _name; - bool get isTop => _isTop; - int get sort => _sort; - int get isDelete => _isDelete; - - - set id(String value) { - _id = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['name'] = _name; - map['isTop'] = _isTop; - map['sort'] = _sort; - map['isDelete'] = _isDelete; - return map; - } - - set createTime(String value) { - _createTime = value; - } - - set createUser(String value) { - _createUser = value; - } - - set updateTime(String value) { - _updateTime = value; - } - - set updateUser(String value) { - _updateUser = value; - } - - set name(String value) { - _name = value; - } - - set isTop(bool value) { - _isTop = value; - } - - set sort(int value) { - _sort = value; - } - - set isDelete(int value) { - _isDelete = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/channels_list.dart b/lib/retrofit/data/channels_list.dart deleted file mode 100644 index 4f12fbe5..00000000 --- a/lib/retrofit/data/channels_list.dart +++ /dev/null @@ -1,155 +0,0 @@ -/// channels : ["海峡","回乡","boom"] -/// isOpen : true -/// preferentialList : [{"createTime":"2023-04-21 16:15:42","giftdMoney":"0.00","gitfdCouponId":null,"id":"1506553893994102784","isDeleted":0,"rechargeMoney":"0.01","rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。
储值活动不与其他活动同享

","sortValue":1,"tenantCode":"admin"}] - -class ChannelsList { - ChannelsList({ - List channels, - bool isOpen, - List preferentialList,}){ - _channels = channels; - _isOpen = isOpen; - _preferentialList = preferentialList; -} - - ChannelsList.fromJson(dynamic json) { - _channels = json['channels'] != null ? json['channels'].cast() : []; - _isOpen = json['isOpen']; - if (json['preferentialList'] != null) { - _preferentialList = []; - json['preferentialList'].forEach((v) { - _preferentialList.add(PreferentialList.fromJson(v)); - }); - } - } - List _channels; - bool _isOpen; - List _preferentialList; -ChannelsList copyWith({ List channels, - bool isOpen, - List preferentialList, -}) => ChannelsList( channels: channels ?? _channels, - isOpen: isOpen ?? _isOpen, - preferentialList: preferentialList ?? _preferentialList, -); - List get channels => _channels; - bool get isOpen => _isOpen; - List get preferentialList => _preferentialList; - - Map toJson() { - final map = {}; - map['channels'] = _channels; - map['isOpen'] = _isOpen; - if (_preferentialList != null) { - map['preferentialList'] = _preferentialList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// createTime : "2023-04-21 16:15:42" -/// giftdMoney : "0.00" -/// gitfdCouponId : null -/// id : "1506553893994102784" -/// isDeleted : 0 -/// rechargeMoney : "0.01" -/// rechargeType : 0 -/// remark : "

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。
储值活动不与其他活动同享

" -/// sortValue : 1 -/// tenantCode : "admin" - -class PreferentialList { - PreferentialList({ - String createTime, - String giftdMoney, - dynamic gitfdCouponId, - String id, - num isDeleted, - String rechargeMoney, - num rechargeType, - String remark, - num sortValue, - String tenantCode,}){ - _createTime = createTime; - _giftdMoney = giftdMoney; - _gitfdCouponId = gitfdCouponId; - _id = id; - _isDeleted = isDeleted; - _rechargeMoney = rechargeMoney; - _rechargeType = rechargeType; - _remark = remark; - _sortValue = sortValue; - _tenantCode = tenantCode; -} - - PreferentialList.fromJson(dynamic json) { - _createTime = json['createTime']; - _giftdMoney = json['giftdMoney']; - _gitfdCouponId = json['gitfdCouponId']; - _id = json['id']; - _isDeleted = json['isDeleted']; - _rechargeMoney = json['rechargeMoney']; - _rechargeType = json['rechargeType']; - _remark = json['remark']; - _sortValue = json['sortValue']; - _tenantCode = json['tenantCode']; - } - String _createTime; - String _giftdMoney; - dynamic _gitfdCouponId; - String _id; - num _isDeleted; - String _rechargeMoney; - num _rechargeType; - String _remark; - num _sortValue; - String _tenantCode; -PreferentialList copyWith({ String createTime, - String giftdMoney, - dynamic gitfdCouponId, - String id, - num isDeleted, - String rechargeMoney, - num rechargeType, - String remark, - num sortValue, - String tenantCode, -}) => PreferentialList( createTime: createTime ?? _createTime, - giftdMoney: giftdMoney ?? _giftdMoney, - gitfdCouponId: gitfdCouponId ?? _gitfdCouponId, - id: id ?? _id, - isDeleted: isDeleted ?? _isDeleted, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - rechargeType: rechargeType ?? _rechargeType, - remark: remark ?? _remark, - sortValue: sortValue ?? _sortValue, - tenantCode: tenantCode ?? _tenantCode, -); - String get createTime => _createTime; - String get giftdMoney => _giftdMoney; - dynamic get gitfdCouponId => _gitfdCouponId; - String get id => _id; - num get isDeleted => _isDeleted; - String get rechargeMoney => _rechargeMoney; - num get rechargeType => _rechargeType; - String get remark => _remark; - num get sortValue => _sortValue; - String get tenantCode => _tenantCode; - - Map toJson() { - final map = {}; - map['createTime'] = _createTime; - map['giftdMoney'] = _giftdMoney; - map['gitfdCouponId'] = _gitfdCouponId; - map['id'] = _id; - map['isDeleted'] = _isDeleted; - map['rechargeMoney'] = _rechargeMoney; - map['rechargeType'] = _rechargeType; - map['remark'] = _remark; - map['sortValue'] = _sortValue; - map['tenantCode'] = _tenantCode; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/chapter.dart b/lib/retrofit/data/chapter.dart deleted file mode 100644 index 430d1917..00000000 --- a/lib/retrofit/data/chapter.dart +++ /dev/null @@ -1,136 +0,0 @@ -/// id : "1452530820865589248" -/// createTime : "2021-10-25 15:01:49" -/// createUser : "1" -/// updateTime : "2021-11-02 17:09:56" -/// updateUser : "1" -/// courseId : "1452472611438067712" -/// name : "111" -/// content : {"coverImg":"https://pos.upload.gznl.top/0000/2021/11/3e014154-57cc-441e-9d02-aa53975979f5.webp","remark":"11111111","fileUrl":"https://pos.upload.gznl.top/0000/2021/11/d87dd996-e269-46eb-b7ef-f8ceddfabef2.mp4"} -/// sort : 0 -/// isDelete : 0 - -class Chapter { - Chapter({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String courseId, - String name, - Content content, - int sort, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _courseId = courseId; - _name = name; - _content = content; - _sort = sort; - _isDelete = isDelete; -} - - Chapter.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _courseId = json['courseId']; - _name = json['name']; - _content = json['content'] != null ? Content.fromJson(json['content']) : null; - _sort = json['sort']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _courseId; - String _name; - Content _content; - int _sort; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get courseId => _courseId; - String get name => _name; - Content get content => _content; - int get sort => _sort; - int get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['courseId'] = _courseId; - map['name'] = _name; - if (_content != null) { - map['content'] = _content.toJson(); - } - map['sort'] = _sort; - map['isDelete'] = _isDelete; - return map; - } - -} - -/// coverImg : "https://pos.upload.gznl.top/0000/2021/11/3e014154-57cc-441e-9d02-aa53975979f5.webp" -/// remark : "11111111" -/// fileUrl : "https://pos.upload.gznl.top/0000/2021/11/d87dd996-e269-46eb-b7ef-f8ceddfabef2.mp4" - -class Content { - Content({ - String coverImg, - String remark, - String fileUrl,}){ - _coverImg = coverImg; - _remark = remark; - _fileUrl = fileUrl; -} - - Content.fromJson(dynamic json) { - _coverImg = json['coverImg']; - _remark = json['remark']; - _fileUrl = json['fileUrl']; - } - String _coverImg; - String _remark; - String _fileUrl; - - String get coverImg => _coverImg; - String get remark => _remark; - String get fileUrl => _fileUrl; - - - set coverImg(String value) { - _coverImg = value; - } - - Map toJson() { - final map = {}; - map['coverImg'] = _coverImg; - map['remark'] = _remark; - map['fileUrl'] = _fileUrl; - return map; - } - - set remark(String value) { - _remark = value; - } - - set fileUrl(String value) { - _fileUrl = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/clerk_manage_list.dart b/lib/retrofit/data/clerk_manage_list.dart deleted file mode 100644 index ddbf2a5c..00000000 --- a/lib/retrofit/data/clerk_manage_list.dart +++ /dev/null @@ -1,511 +0,0 @@ -/// records : [{"id":"1718209460100399104","createTime":"2023-10-28 18:13:53","createUser":"0","updateTime":"2023-10-28 18:13:53","updateUser":"0","account":"王松涛","name":"王松涛","org":null,"station":null,"type":0,"email":"","mobile":"18738828830","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/66165_d3QhlRvnTKGAo6s_1698281591/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1716755848744665088","createTime":"2023-10-24 17:57:45","createUser":"0","updateTime":"2023-10-24 17:57:45","updateUser":"0","account":"李晟垒","name":"李晟垒","org":null,"station":null,"type":0,"email":"","mobile":"17629876603","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/249437_3fqtwXiGSuKq7ld_1697021007/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1716755840049872896","createTime":"2023-10-24 17:57:43","createUser":"0","updateTime":"2023-10-24 17:57:43","updateUser":"0","account":"高凤丽","name":"高凤丽","org":null,"station":null,"type":0,"email":"","mobile":"17698645321","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/879260_Hq64nFhRQu-oyYO_1693879864/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1712817865955999744","createTime":"2023-10-13 21:09:37","createUser":"0","updateTime":"2023-10-13 21:09:37","updateUser":"0","account":"马增凯","name":"马增凯","org":null,"station":null,"type":0,"email":"","mobile":"18539252112","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/26498_W5VMMKB8Ss-E9y-_1697005237/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1700087952224288768","createTime":"2023-09-08 18:05:29","createUser":"1684404021814624256","updateTime":"2023-09-08 18:05:29","updateUser":"1684404021814624256","account":"美食街运营","name":"美食街运营","org":null,"station":null,"type":0,"email":"","mobile":"","sex":{"desc":"未知","code":"N"},"status":true,"avatar":"","nation":{"key":"","data":""},"education":{"key":"","data":""},"positionStatus":{"key":"","data":""},"workDescribe":"","passwordErrorLastTime":"2023-10-08 10:15:03","passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":"2023-10-08 10:15:03"},{"id":"1694559126463447040","createTime":"2023-08-24 11:55:54","createUser":"0","updateTime":"2023-08-24 11:55:54","updateUser":"0","account":"金威","name":"金威","org":null,"station":null,"type":0,"email":"","mobile":"15871028672","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/670541_3pcB-e15RfK-v8S_1666828735/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1693150526188814336","createTime":"2023-08-20 14:38:37","createUser":"0","updateTime":"2023-08-20 14:38:37","updateUser":"0","account":"赵铭","name":"赵铭","org":null,"station":null,"type":0,"email":"","mobile":"15238461762","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/139874_aavX133wRmuEdfb_1681271010/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1692815660305874944","createTime":"2023-08-19 16:27:59","createUser":"0","updateTime":"2023-08-19 16:27:59","updateUser":"0","account":"张培林","name":"张培林","org":null,"station":null,"type":0,"email":"","mobile":"17734788755","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/159908_v3PahHp4ToiDy3w_1692188937/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1692772387621175296","createTime":"2023-08-19 13:36:02","createUser":"0","updateTime":"2023-08-19 13:36:02","updateUser":"0","account":"黄婷","name":"黄婷","org":null,"station":null,"type":0,"email":"","mobile":"15623342902","sex":{"desc":"未知","code":"N"},"status":false,"avatar":"https://wework.qpic.cn/wwpic/289190_R216gvd3Qw2lLwV_1684395430/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":null,"passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":null},{"id":"1692710101808316416","createTime":"2023-08-19 09:28:32","createUser":"0","updateTime":"2023-08-19 09:28:48","updateUser":"1684404021814624256","account":"胡灿","name":"胡灿","org":null,"station":null,"type":0,"email":"","mobile":"15921879317","sex":{"desc":"未知","code":"N"},"status":true,"avatar":"https://wework.qpic.cn/bizmail/BW6FKlOvPUwibCldA3qzZWwzeZyBXjNuhF4CqibDByr4AwqFafL6eNmg/0","nation":{"key":null,"data":""},"education":{"key":null,"data":""},"positionStatus":{"key":null,"data":""},"workDescribe":"","passwordErrorLastTime":"2023-11-22 09:17:42","passwordErrorNum":0,"passwordExpireTime":null,"password":"e10adc3949ba59abbe56e057f20f883e","lastLoginTime":"2023-11-22 09:17:42"}] -/// total : "26" -/// size : "10" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "3" - -class ClerkManageList { - ClerkManageList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - ClerkManageList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -ClerkManageList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => ClerkManageList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1718209460100399104" -/// createTime : "2023-10-28 18:13:53" -/// createUser : "0" -/// updateTime : "2023-10-28 18:13:53" -/// updateUser : "0" -/// account : "王松涛" -/// name : "王松涛" -/// org : null -/// station : null -/// type : 0 -/// email : "" -/// mobile : "18738828830" -/// sex : {"desc":"未知","code":"N"} -/// status : false -/// avatar : "https://wework.qpic.cn/wwpic/66165_d3QhlRvnTKGAo6s_1698281591/0" -/// nation : {"key":null,"data":""} -/// education : {"key":null,"data":""} -/// positionStatus : {"key":null,"data":""} -/// workDescribe : "" -/// passwordErrorLastTime : null -/// passwordErrorNum : 0 -/// passwordExpireTime : null -/// password : "e10adc3949ba59abbe56e057f20f883e" -/// lastLoginTime : null - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String account, - String name, - dynamic org, - dynamic station, - num type, - String email, - String mobile, - Sex sex, - bool status, - String avatar, - Nation nation, - Education education, - PositionStatus positionStatus, - String workDescribe, - dynamic passwordErrorLastTime, - num passwordErrorNum, - dynamic passwordExpireTime, - String password, - dynamic lastLoginTime,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _account = account; - _name = name; - _org = org; - _station = station; - _type = type; - _email = email; - _mobile = mobile; - _sex = sex; - _status = status; - _avatar = avatar; - _nation = nation; - _education = education; - _positionStatus = positionStatus; - _workDescribe = workDescribe; - _passwordErrorLastTime = passwordErrorLastTime; - _passwordErrorNum = passwordErrorNum; - _passwordExpireTime = passwordExpireTime; - _password = password; - _lastLoginTime = lastLoginTime; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _account = json['account']; - _name = json['name']; - _org = json['org']; - _station = json['station']; - _type = json['type']; - _email = json['email']; - _mobile = json['mobile']; - _sex = json['sex'] != null ? Sex.fromJson(json['sex']) : null; - _status = json['status']; - _avatar = json['avatar']; - _nation = json['nation'] != null ? Nation.fromJson(json['nation']) : null; - _education = json['education'] != null ? Education.fromJson(json['education']) : null; - _positionStatus = json['positionStatus'] != null ? PositionStatus.fromJson(json['positionStatus']) : null; - _workDescribe = json['workDescribe']; - _passwordErrorLastTime = json['passwordErrorLastTime']; - _passwordErrorNum = json['passwordErrorNum']; - _passwordExpireTime = json['passwordExpireTime']; - _password = json['password']; - _lastLoginTime = json['lastLoginTime']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _account; - String _name; - dynamic _org; - dynamic _station; - num _type; - String _email; - String _mobile; - Sex _sex; - bool _status; - String _avatar; - Nation _nation; - Education _education; - PositionStatus _positionStatus; - String _workDescribe; - dynamic _passwordErrorLastTime; - num _passwordErrorNum; - dynamic _passwordExpireTime; - String _password; - dynamic _lastLoginTime; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String account, - String name, - dynamic org, - dynamic station, - num type, - String email, - String mobile, - Sex sex, - bool status, - String avatar, - Nation nation, - Education education, - PositionStatus positionStatus, - String workDescribe, - dynamic passwordErrorLastTime, - num passwordErrorNum, - dynamic passwordExpireTime, - String password, - dynamic lastLoginTime, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - account: account ?? _account, - name: name ?? _name, - org: org ?? _org, - station: station ?? _station, - type: type ?? _type, - email: email ?? _email, - mobile: mobile ?? _mobile, - sex: sex ?? _sex, - status: status ?? _status, - avatar: avatar ?? _avatar, - nation: nation ?? _nation, - education: education ?? _education, - positionStatus: positionStatus ?? _positionStatus, - workDescribe: workDescribe ?? _workDescribe, - passwordErrorLastTime: passwordErrorLastTime ?? _passwordErrorLastTime, - passwordErrorNum: passwordErrorNum ?? _passwordErrorNum, - passwordExpireTime: passwordExpireTime ?? _passwordExpireTime, - password: password ?? _password, - lastLoginTime: lastLoginTime ?? _lastLoginTime, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get account => _account; - String get name => _name; - dynamic get org => _org; - dynamic get station => _station; - num get type => _type; - String get email => _email; - String get mobile => _mobile; - Sex get sex => _sex; - bool get status => _status; - String get avatar => _avatar; - Nation get nation => _nation; - Education get education => _education; - PositionStatus get positionStatus => _positionStatus; - String get workDescribe => _workDescribe; - dynamic get passwordErrorLastTime => _passwordErrorLastTime; - num get passwordErrorNum => _passwordErrorNum; - dynamic get passwordExpireTime => _passwordExpireTime; - String get password => _password; - dynamic get lastLoginTime => _lastLoginTime; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['account'] = _account; - map['name'] = _name; - map['org'] = _org; - map['station'] = _station; - map['type'] = _type; - map['email'] = _email; - map['mobile'] = _mobile; - if (_sex != null) { - map['sex'] = _sex.toJson(); - } - map['status'] = _status; - map['avatar'] = _avatar; - if (_nation != null) { - map['nation'] = _nation.toJson(); - } - if (_education != null) { - map['education'] = _education.toJson(); - } - if (_positionStatus != null) { - map['positionStatus'] = _positionStatus.toJson(); - } - map['workDescribe'] = _workDescribe; - map['passwordErrorLastTime'] = _passwordErrorLastTime; - map['passwordErrorNum'] = _passwordErrorNum; - map['passwordExpireTime'] = _passwordExpireTime; - map['password'] = _password; - map['lastLoginTime'] = _lastLoginTime; - return map; - } - -} - -/// key : null -/// data : "" - -class PositionStatus { - PositionStatus({ - dynamic key, - String data,}){ - _key = key; - _data = data; -} - - PositionStatus.fromJson(dynamic json) { - _key = json['key']; - _data = json['data']; - } - dynamic _key; - String _data; -PositionStatus copyWith({ dynamic key, - String data, -}) => PositionStatus( key: key ?? _key, - data: data ?? _data, -); - dynamic get key => _key; - String get data => _data; - - Map toJson() { - final map = {}; - map['key'] = _key; - map['data'] = _data; - return map; - } - -} - -/// key : null -/// data : "" - -class Education { - Education({ - dynamic key, - String data,}){ - _key = key; - _data = data; -} - - Education.fromJson(dynamic json) { - _key = json['key']; - _data = json['data']; - } - dynamic _key; - String _data; -Education copyWith({ dynamic key, - String data, -}) => Education( key: key ?? _key, - data: data ?? _data, -); - dynamic get key => _key; - String get data => _data; - - Map toJson() { - final map = {}; - map['key'] = _key; - map['data'] = _data; - return map; - } - -} - -/// key : null -/// data : "" - -class Nation { - Nation({ - dynamic key, - String data,}){ - _key = key; - _data = data; -} - - Nation.fromJson(dynamic json) { - _key = json['key']; - _data = json['data']; - } - dynamic _key; - String _data; -Nation copyWith({ dynamic key, - String data, -}) => Nation( key: key ?? _key, - data: data ?? _data, -); - dynamic get key => _key; - String get data => _data; - - Map toJson() { - final map = {}; - map['key'] = _key; - map['data'] = _data; - return map; - } - -} - -/// desc : "未知" -/// code : "N" - -class Sex { - Sex({ - String desc, - String code,}){ - _desc = desc; - _code = code; -} - - Sex.fromJson(dynamic json) { - _desc = json['desc']; - _code = json['code']; - } - String _desc; - String _code; -Sex copyWith({ String desc, - String code, -}) => Sex( desc: desc ?? _desc, - code: code ?? _code, -); - String get desc => _desc; - String get code => _code; - - Map toJson() { - final map = {}; - map['desc'] = _desc; - map['code'] = _code; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/collect_class_list.dart b/lib/retrofit/data/collect_class_list.dart deleted file mode 100644 index be69a97d..00000000 --- a/lib/retrofit/data/collect_class_list.dart +++ /dev/null @@ -1,114 +0,0 @@ -/// id : "1454326699855446016" -/// createTime : "2021-10-30 13:58:00" -/// createUser : "1" -/// updateTime : "2021-10-30 13:58:00" -/// updateUser : "1" -/// name : "111" -/// sort : 0 -/// enabled : true -/// isDelete : 0 - -class CollectClassList { - CollectClassList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - int sort, - bool enabled, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _name = name; - _sort = sort; - _enabled = enabled; - _isDelete = isDelete; -} - - CollectClassList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _name = json['name']; - _sort = json['sort']; - _enabled = json['enabled']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _name; - int _sort; - bool _enabled; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get name => _name; - int get sort => _sort; - bool get enabled => _enabled; - int get isDelete => _isDelete; - - - set id(String value) { - _id = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['name'] = _name; - map['sort'] = _sort; - map['enabled'] = _enabled; - map['isDelete'] = _isDelete; - return map; - } - - set createTime(String value) { - _createTime = value; - } - - set createUser(String value) { - _createUser = value; - } - - set updateTime(String value) { - _updateTime = value; - } - - set updateUser(String value) { - _updateUser = value; - } - - set name(String value) { - _name = value; - } - - set sort(int value) { - _sort = value; - } - - set enabled(bool value) { - _enabled = value; - } - - set isDelete(int value) { - _isDelete = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/comunity_comment.dart b/lib/retrofit/data/comunity_comment.dart deleted file mode 100644 index ba218cd3..00000000 --- a/lib/retrofit/data/comunity_comment.dart +++ /dev/null @@ -1,165 +0,0 @@ -/// id : "1450279348069203968" -/// subject : "哈哈哈哈哈哈😃😃😃😃" -/// subjectInfo : {"type":"image","images":["https://pos.upload.gznl.top/admin/2021/10/9a15049b-9828-4056-84d7-21b9055d2cb0.jpeg"],"video":""} -/// memberInfo : {"mid":null,"nickname":null,"avatar":""} -/// likes : 0 -/// viewers : 0 -/// comments : 0 -/// selfLike : false -/// selfFollow : false -/// createTime : "2021-10-19 09:55:16" - -class ComunityComment { - ComunityComment({ - String id, - String subject, - SubjectInfo subjectInfo, - MemberInfo memberInfo, - int likes, - int viewers, - int comments, - bool selfLike, - bool selfFollow, - String createTime, - String location, - String longitude, - String latitude, - String coverImg,}){ - this.id = id; - this.subject = subject; - this.subjectInfo = subjectInfo; - this.memberInfo = memberInfo; - this.likes = likes; - this.viewers = viewers; - this.comments = comments; - this.selfLike = selfLike; - this.selfFollow = selfFollow; - this.createTime = createTime; - this.location = location; - this.longitude = longitude; - this.latitude = latitude; - this.coverImg = coverImg; -} - - ComunityComment.fromJson(dynamic json) { - this.id = json['id']; - this.subject = json['subject']; - this.subjectInfo = json['subjectInfo'] != null ? SubjectInfo.fromJson(json['subjectInfo']) : null; - this.memberInfo = json['memberInfo'] != null ? MemberInfo.fromJson(json['memberInfo']) : null; - this.likes = json['likes']; - this.viewers = json['viewers']; - this.comments = json['comments']; - this.selfLike = json['selfLike']; - this.selfFollow = json['selfFollow']; - this.createTime = json['createTime']; - this.location = json['location']; - this.longitude = json['longitude']; - this.latitude = json['latitude']; - this.coverImg = json['coverImg']; - } - String id; - String subject; - SubjectInfo subjectInfo; - MemberInfo memberInfo; - int likes; - int viewers; - int comments; - bool selfLike; - bool selfFollow; - String createTime; - String location; - String longitude; - String latitude; - String coverImg; - - Map toJson() { - final map = {}; - map['id'] = this.id; - map['subject'] = this.subject; - if (this.subjectInfo != null) { - map['subjectInfo'] = this.subjectInfo.toJson(); - } - if (this.memberInfo != null) { - map['memberInfo'] = this.memberInfo.toJson(); - } - map['likes'] = this.likes; - map['viewers'] = this.viewers; - map['comments'] = this.comments; - map['selfLike'] = this.selfLike; - map['selfFollow'] = this.selfFollow; - map['createTime'] = this.createTime; - map['location'] = this.location; - map['longitude'] = this.longitude; - map['latitude'] = this.latitude; - map['coverImg'] = this.coverImg; - return map; - } - -} - -/// mid : null -/// nickname : null -/// avatar : "" - -class MemberInfo { - MemberInfo({ - dynamic mid, - dynamic nickname, - String avatar,}){ - this.mid = mid; - this.nickname = nickname; - this.avatar = avatar; -} - - MemberInfo.fromJson(dynamic json) { - this.mid = json['mid']; - this.nickname = json['nickname']; - this.avatar = json['avatar']; - } - dynamic mid; - dynamic nickname; - String avatar; - - Map toJson() { - final map = {}; - map['mid'] = this.mid; - map['nickname'] = this.nickname; - map['avatar'] = this.avatar; - return map; - } - -} - -/// type : "image" -/// images : ["https://pos.upload.gznl.top/admin/2021/10/9a15049b-9828-4056-84d7-21b9055d2cb0.jpeg"] -/// video : "" - -class SubjectInfo { - SubjectInfo({ - String type, - List images, - String video, - String coverImg,}){ - this.type = type; - this.images = images; - this.video = video; -} - - SubjectInfo.fromJson(dynamic json) { - this.type = json['type']; - this.images = json['images'] != null ? json['images'].cast() : []; - this.video = json['video']; - } - String type; - List images; - String video; - - Map toJson() { - final map = {}; - map['type'] = this.type; - map['images'] = this.images; - map['video'] = this.video; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/coupon.dart b/lib/retrofit/data/coupon.dart deleted file mode 100644 index b1009616..00000000 --- a/lib/retrofit/data/coupon.dart +++ /dev/null @@ -1,109 +0,0 @@ -import 'package:huixiang/retrofit/data/store.dart'; - -class Coupon { - Coupon(); - - Coupon.test(this.couponName, this.status, this.isEx); - - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - int bizType; - String fullAmount; - String discountAmount; - int discountPercent; - String bizId; - String publishStartTime; - String publishEndTime; - String useStartTime; - String useEndTime; - String promotionId; - bool centreDisplay; - bool allProduct; - String tenantCode; - String remark; - String tenantName; - int isDelete; - String couponName; - String limitAmount; - String couponImg; - String couponDescription; - String memberCouponId; - String receiveTime; - String storeId; - dynamic useTime; - int status; - List storeList; - bool isEx = false; - - factory Coupon.fromJson(Map json) => Coupon() - ..id = json['id'] as String - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String - ..bizType = json['bizType'] as int - ..fullAmount = json['fullAmount'] as String - ..discountAmount = json['discountAmount'] as String - ..discountPercent = json['discountPercent'] as int - ..bizId = json['bizId'] as String - ..publishStartTime = json['publishStartTime'] as String - ..publishEndTime = json['publishEndTime'] as String - ..useStartTime = json['useStartTime'] as String - ..useEndTime = json['useEndTime'] as String - ..promotionId = json['promotionId'] as String - ..centreDisplay = json['centreDisplay'] as bool - ..allProduct = json['allProduct'] as bool - ..tenantCode = json['tenantCode'] as String - ..remark = json['remark'] as String - ..tenantName = json['tenantName'] as String - ..isDelete = json['isDelete'] as int - ..couponName = json['couponName'] as String - ..limitAmount = json['limitAmount'] as String - ..couponImg = json['couponImg'] as String - ..couponDescription = json['couponDescription'] as String - ..memberCouponId = json['memberCouponId'] as String - ..receiveTime = json['receiveTime'] as String - ..storeId = json['storeId'] as String - ..useTime = json['useTime'] - ..status = json['status'] - ..storeList = (json['storeList'] as List) - .map((e) => Store.fromJson(e)) - .toList(); - - Map toJson() => { - 'id': this.id, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'bizType': this.bizType, - 'fullAmount': this.fullAmount, - 'discountAmount': this.discountAmount, - 'discountPercent': this.discountPercent, - 'bizId': this.bizId, - 'publishStartTime': this.publishStartTime, - 'publishEndTime': this.publishEndTime, - 'useStartTime': this.useStartTime, - 'useEndTime': this.useEndTime, - 'promotionId': this.promotionId, - 'centreDisplay': this.centreDisplay, - 'allProduct' : this.allProduct, - 'tenantCode': this.tenantCode, - 'remark':this.remark, - 'tenantName': this.tenantName, - 'isDelete': this.isDelete, - 'couponName': this.couponName, - 'limitAmount': this.limitAmount, - 'couponImg': this.couponImg, - 'couponDescription': this.couponDescription, - 'memberCouponId': this.memberCouponId, - 'receiveTime': this.receiveTime, - 'storeId': this.storeId, - 'useTime': this.useTime, - 'status': this.status, - 'storeList': (this.storeList != null && this.storeList.length > 0) ? this.storeList.map((e) => e.toJson()).toList() : [] - }; -} \ No newline at end of file diff --git a/lib/retrofit/data/coupon_detail.dart b/lib/retrofit/data/coupon_detail.dart deleted file mode 100644 index 3badc924..00000000 --- a/lib/retrofit/data/coupon_detail.dart +++ /dev/null @@ -1,120 +0,0 @@ -/// id : "1493050078934335488" -/// createTime : "2022-02-14 10:30:53" -/// createUser : "1307141152536788992" -/// updateTime : "2022-02-14 10:30:53" -/// updateUser : "1307141152536788992" -/// mid : "1486626867212451840" -/// couponId : "1435510333782360064" -/// receiveTime : "2022-02-14 10:30:53" -/// useTime : null -/// useTimeStart : "2022-02-14 10:30:53" -/// useTimeEnd : "2022-02-15 10:30:53" -/// status : 1 -/// isDeleted : false -/// tenantCode : "1166" -/// couponCode : "" - -class CouponDetail { - CouponDetail({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String couponId, - String receiveTime, - dynamic useTime, - String useTimeStart, - String useTimeEnd, - int status, - bool isDeleted, - String tenantCode, - String couponCode,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _couponId = couponId; - _receiveTime = receiveTime; - _useTime = useTime; - _useTimeStart = useTimeStart; - _useTimeEnd = useTimeEnd; - _status = status; - _isDeleted = isDeleted; - _tenantCode = tenantCode; - _couponCode = couponCode; -} - - CouponDetail.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _couponId = json['couponId']; - _receiveTime = json['receiveTime']; - _useTime = json['useTime']; - _useTimeStart = json['useTimeStart']; - _useTimeEnd = json['useTimeEnd']; - _status = json['status']; - _isDeleted = json['isDeleted']; - _tenantCode = json['tenantCode']; - _couponCode = json['couponCode']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _couponId; - String _receiveTime; - dynamic _useTime; - String _useTimeStart; - String _useTimeEnd; - int _status; - bool _isDeleted; - String _tenantCode; - String _couponCode; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get couponId => _couponId; - String get receiveTime => _receiveTime; - dynamic get useTime => _useTime; - String get useTimeStart => _useTimeStart; - String get useTimeEnd => _useTimeEnd; - int get status => _status; - bool get isDeleted => _isDeleted; - String get tenantCode => _tenantCode; - String get couponCode => _couponCode; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['couponId'] = _couponId; - map['receiveTime'] = _receiveTime; - map['useTime'] = _useTime; - map['useTimeStart'] = _useTimeStart; - map['useTimeEnd'] = _useTimeEnd; - map['status'] = _status; - map['isDeleted'] = _isDeleted; - map['tenantCode'] = _tenantCode; - map['couponCode'] = _couponCode; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/coupon_vo.dart b/lib/retrofit/data/coupon_vo.dart deleted file mode 100644 index 2fc4b4c1..00000000 --- a/lib/retrofit/data/coupon_vo.dart +++ /dev/null @@ -1,90 +0,0 @@ - -class CouponVo { - String bizId; - num bizType; - bool centreDisplay; - String couponDescription; - String couponImg; - String couponName; - String createTime; - String createUser; - String discountAmount; - num discountPercent; - String fullAmount; - String id; - num isDelete; - String memberCouponId; - String promotionId; - String publishEndTime; - String publishStartTime; - String receiveTime; - bool received; - num status; - String tenantCode; - String updateTime; - String updateUser; - String useEndTime; - String useStartTime; - String useTime; - - CouponVo({this.bizId, this.bizType, this.centreDisplay, this.couponDescription, this.couponImg, this.couponName, this.createTime, this.createUser, this.discountAmount, this.discountPercent, this.fullAmount, this.id, this.isDelete, this.memberCouponId, this.promotionId, this.publishEndTime, this.publishStartTime, this.receiveTime, this.received, this.status, this.tenantCode, this.updateTime, this.updateUser, this.useEndTime, this.useStartTime, this.useTime}); - - factory CouponVo.fromJson(Map json) => CouponVo( - bizId: json['bizId'] as String, - bizType: json['bizType'] as num, - centreDisplay: json['centreDisplay'] as bool, - couponDescription: json['couponDescription'] as String, - couponImg: json['couponImg'] as String, - couponName: json['couponName'] as String, - createTime: json['createTime'] as String, - createUser: json['createUser'] as String, - discountAmount: json['discountAmount'] as String, - discountPercent: json['discountPercent'] as num, - fullAmount: json['fullAmount'] as String, - id: json['id'] as String, - isDelete: json['isDelete'] as num, - memberCouponId: json['memberCouponId'], - promotionId: json['promotionId'] as String, - publishEndTime: json['publishEndTime'] as String, - publishStartTime: json['publishStartTime'] as String, - receiveTime: json['receiveTime'] as String, - received: json['received'] as bool, - status: json['status'] as num, - tenantCode: json['tenantCode'] as String, - updateTime: json['updateTime'] as String, - updateUser: json['updateUser'] as String, - useEndTime: json['useEndTime'] as String, - useStartTime: json['useStartTime'] as String, - useTime: json['useTime'] as String, - ); - - Map toJson() => { - 'bizId': this.bizId, - 'bizType': this.bizType, - 'centreDisplay': this.centreDisplay, - 'couponDescription': this.couponDescription, - 'couponImg': this.couponImg, - 'couponName': this.couponName, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'discountAmount': this.discountAmount, - 'discountPercent': this.discountPercent, - 'fullAmount': this.fullAmount, - 'id': this.id, - 'isDelete': this.isDelete, - 'memberCouponId': this.memberCouponId, - 'promotionId': this.promotionId, - 'publishEndTime': this.publishEndTime, - 'publishStartTime': this.publishStartTime, - 'receiveTime': this.receiveTime, - 'received': this.received, - 'status': this.status, - 'tenantCode': this.tenantCode, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'useEndTime': this.useEndTime, - 'useStartTime': this.useStartTime, - 'useTime': this.useTime, - }; -} - diff --git a/lib/retrofit/data/course_details.dart b/lib/retrofit/data/course_details.dart deleted file mode 100644 index e1437279..00000000 --- a/lib/retrofit/data/course_details.dart +++ /dev/null @@ -1,222 +0,0 @@ -/// id : "1455102859841372160" -/// createTime : "2021-11-01 17:22:11" -/// createUser : "1" -/// updateTime : "2021-11-01 17:22:11" -/// updateUser : "1" -/// categoryId : "1452472226421932032" -/// subject : "后会无期" -/// tags : ["11"] -/// coverImg : "https://pos.upload.gznl.top/0000/2021/11/d8305d15-1a39-4b08-a172-eba7f18b9968.jpg" -/// author : {"name":"1","avatar":"1"} -/// introduce : "1" -/// viewers : 0 -/// likes : 0 -/// state : true -/// isDelete : 0 - -class CourseDetails { - CourseDetails({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String categoryId, - String subject, - List tags, - String coverImg, - Author author, - String introduce, - int viewers, - int likes, - bool selfLiked, - bool state, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _categoryId = categoryId; - _subject = subject; - _tags = tags; - _coverImg = coverImg; - _author = author; - _introduce = introduce; - _viewers = viewers; - _likes = likes; - _selfLiked = selfLiked; - _state = state; - _isDelete = isDelete; -} - - CourseDetails.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _categoryId = json['categoryId']; - _subject = json['subject']; - _tags = json['tags'] != null ? json['tags'].cast() : []; - _coverImg = json['coverImg']; - _author = json['author'] != null ? Author.fromJson(json['author']) : null; - _introduce = json['introduce']; - _viewers = json['viewers']; - _likes = json['likes']; - _selfLiked = json['selfLiked']; - _state = json['state']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _categoryId; - String _subject; - List _tags; - String _coverImg; - Author _author; - String _introduce; - int _viewers; - int _likes; - bool _selfLiked; - bool _state; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get categoryId => _categoryId; - String get subject => _subject; - List get tags => _tags; - String get coverImg => _coverImg; - Author get author => _author; - String get introduce => _introduce; - int get viewers => _viewers; - int get likes => _likes; - bool get selfLiked => _selfLiked; - bool get state => _state; - int get isDelete => _isDelete; - - - set id(String value) { - _id = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['categoryId'] = _categoryId; - map['subject'] = _subject; - map['tags'] = _tags; - map['coverImg'] = _coverImg; - if (_author != null) { - map['author'] = _author.toJson(); - } - map['introduce'] = _introduce; - map['viewers'] = _viewers; - map['likes'] = _likes; - map['selfLiked'] = _selfLiked; - map['state'] = _state; - map['isDelete'] = _isDelete; - return map; - } - - set createTime(String value) { - _createTime = value; - } - - set createUser(String value) { - _createUser = value; - } - - set updateTime(String value) { - _updateTime = value; - } - - set updateUser(String value) { - _updateUser = value; - } - - set categoryId(String value) { - _categoryId = value; - } - - set subject(String value) { - _subject = value; - } - - set tags(List value) { - _tags = value; - } - - set coverImg(String value) { - _coverImg = value; - } - - set author(Author value) { - _author = value; - } - - set introduce(String value) { - _introduce = value; - } - - set viewers(int value) { - _viewers = value; - } - - set likes(int value) { - _likes = value; - } - - set selfLiked(bool value) { - _selfLiked = value; - } - - set state(bool value) { - _state = value; - } - - set isDelete(int value) { - _isDelete = value; - } -} - -/// name : "1" -/// avatar : "1" - -class Author { - Author({ - String name, - String avatar,}){ - _name = name; - _avatar = avatar; -} - - Author.fromJson(dynamic json) { - _name = json['name']; - _avatar = json['avatar']; - } - String _name; - String _avatar; - - String get name => _name; - String get avatar => _avatar; - - Map toJson() { - final map = {}; - map['name'] = _name; - map['avatar'] = _avatar; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/course_list.dart b/lib/retrofit/data/course_list.dart deleted file mode 100644 index 3f9142fa..00000000 --- a/lib/retrofit/data/course_list.dart +++ /dev/null @@ -1,220 +0,0 @@ -/// id : "1452470112895369216" -/// createTime : "2021-10-25 11:00:35" -/// createUser : "1" -/// updateTime : "2021-10-25 11:00:35" -/// updateUser : "1" -/// categoryId : "1452453250065235968" -/// subject : "11" -/// tags : ["11"] -/// coverImg : "https://pos.upload.gznl.top/0000/2021/10/61dda29b-19cf-4d47-b6c7-c07f895beeaa.jpg" -/// author : {"name":"11","avatar":"11"} -/// introduce : "11" -/// viewers : 0 -/// likes : 0 -/// state : true -/// isDelete : 0 - -class CourseList { - CourseList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String categoryId, - String subject, - List tags, - String coverImg, - Author author, - String introduce, - int viewers, - int likes, - bool state, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _categoryId = categoryId; - _subject = subject; - _tags = tags; - _coverImg = coverImg; - _author = author; - _introduce = introduce; - _viewers = viewers; - _likes = likes; - _state = state; - _isDelete = isDelete; -} - - CourseList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _categoryId = json['categoryId']; - _subject = json['subject']; - _tags = json['tags'] != null ? json['tags'].cast() : []; - _coverImg = json['coverImg']; - _author = json['author'] != null ? Author.fromJson(json['author']) : null; - _introduce = json['introduce']; - _viewers = json['viewers']; - _likes = json['likes']; - _state = json['state']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _categoryId; - String _subject; - List _tags; - String _coverImg; - Author _author; - String _introduce; - int _viewers; - int _likes; - bool _state; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get categoryId => _categoryId; - String get subject => _subject; - List get tags => _tags; - String get coverImg => _coverImg; - Author get author => _author; - String get introduce => _introduce; - int get viewers => _viewers; - int get likes => _likes; - bool get state => _state; - int get isDelete => _isDelete; - - - set id(String value) { - _id = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['categoryId'] = _categoryId; - map['subject'] = _subject; - map['tags'] = _tags; - map['coverImg'] = _coverImg; - if (_author != null) { - map['author'] = _author.toJson(); - } - map['introduce'] = _introduce; - map['viewers'] = _viewers; - map['likes'] = _likes; - map['state'] = _state; - map['isDelete'] = _isDelete; - return map; - } - - set createTime(String value) { - _createTime = value; - } - - set createUser(String value) { - _createUser = value; - } - - set updateTime(String value) { - _updateTime = value; - } - - set updateUser(String value) { - _updateUser = value; - } - - set categoryId(String value) { - _categoryId = value; - } - - set subject(String value) { - _subject = value; - } - - set tags(List value) { - _tags = value; - } - - set coverImg(String value) { - _coverImg = value; - } - - set author(Author value) { - _author = value; - } - - set introduce(String value) { - _introduce = value; - } - - set viewers(int value) { - _viewers = value; - } - - set likes(int value) { - _likes = value; - } - - set state(bool value) { - _state = value; - } - - set isDelete(int value) { - _isDelete = value; - } -} - -/// name : "11" -/// avatar : "11" - -class Author { - Author({ - String name, - String avatar,}){ - _name = name; - _avatar = avatar; -} - - Author.fromJson(dynamic json) { - _name = json['name']; - _avatar = json['avatar']; - } - String _name; - String _avatar; - - String get name => _name; - String get avatar => _avatar; - - - set name(String value) { - _name = value; - } - - Map toJson() { - final map = {}; - map['name'] = _name; - map['avatar'] = _avatar; - return map; - } - - set avatar(String value) { - _avatar = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/data_type.dart b/lib/retrofit/data/data_type.dart deleted file mode 100644 index cf67431b..00000000 --- a/lib/retrofit/data/data_type.dart +++ /dev/null @@ -1,16 +0,0 @@ - -class DataType { - DataType(); - - String desc; - String code; - - factory DataType.fromJson(Map json) => DataType() - ..desc = json['desc'] as String - ..code = json['code'] as String; - - Map toJson() => { - 'desc': this.desc, - 'code': this.code, - }; -} diff --git a/lib/retrofit/data/day_count.dart b/lib/retrofit/data/day_count.dart deleted file mode 100644 index aafd50b3..00000000 --- a/lib/retrofit/data/day_count.dart +++ /dev/null @@ -1,177 +0,0 @@ -/// summaryDate : "2023-09-14" -/// dayMoney : "0" -/// discountSum : "0.00" -/// paySum : "0" -/// rechargeMoney : "0" -/// refundMoney : "0" -/// orderNum : 0 -/// rechargeOrderNum : 0 -/// refundOrderNum : 0 -/// payOrderNum : 0 -/// discountOrderNum : 0 -/// startDate : null -/// endDate : null -/// tablePerConsumption : null -/// numberOfPeople : 0 -/// peoplePerConsumption : "0" -/// realDiscountPer : null -/// tableRate : null - -class DayCount { - DayCount({ - String summaryDate, - String dayMoney, - String discountSum, - String paySum, - String rechargeMoney, - String refundMoney, - num orderNum, - num rechargeOrderNum, - num refundOrderNum, - num payOrderNum, - num discountOrderNum, - dynamic startDate, - dynamic endDate, - dynamic tablePerConsumption, - num numberOfPeople, - String peoplePerConsumption, - dynamic realDiscountPer, - dynamic tableRate,}){ - _summaryDate = summaryDate; - _dayMoney = dayMoney; - _discountSum = discountSum; - _paySum = paySum; - _rechargeMoney = rechargeMoney; - _refundMoney = refundMoney; - _orderNum = orderNum; - _rechargeOrderNum = rechargeOrderNum; - _refundOrderNum = refundOrderNum; - _payOrderNum = payOrderNum; - _discountOrderNum = discountOrderNum; - _startDate = startDate; - _endDate = endDate; - _tablePerConsumption = tablePerConsumption; - _numberOfPeople = numberOfPeople; - _peoplePerConsumption = peoplePerConsumption; - _realDiscountPer = realDiscountPer; - _tableRate = tableRate; -} - - DayCount.fromJson(dynamic json) { - _summaryDate = json['summaryDate']; - _dayMoney = json['dayMoney']; - _discountSum = json['discountSum']; - _paySum = json['paySum']; - _rechargeMoney = json['rechargeMoney']; - _refundMoney = json['refundMoney']; - _orderNum = json['orderNum']; - _rechargeOrderNum = json['rechargeOrderNum']; - _refundOrderNum = json['refundOrderNum']; - _payOrderNum = json['payOrderNum']; - _discountOrderNum = json['discountOrderNum']; - _startDate = json['startDate']; - _endDate = json['endDate']; - _tablePerConsumption = json['tablePerConsumption']; - _numberOfPeople = json['numberOfPeople']; - _peoplePerConsumption = json['peoplePerConsumption']; - _realDiscountPer = json['realDiscountPer']; - _tableRate = json['tableRate']; - } - String _summaryDate; - String _dayMoney; - String _discountSum; - String _paySum; - String _rechargeMoney; - String _refundMoney; - num _orderNum; - num _rechargeOrderNum; - num _refundOrderNum; - num _payOrderNum; - num _discountOrderNum; - dynamic _startDate; - dynamic _endDate; - dynamic _tablePerConsumption; - num _numberOfPeople; - String _peoplePerConsumption; - dynamic _realDiscountPer; - dynamic _tableRate; -DayCount copyWith({ String summaryDate, - String dayMoney, - String discountSum, - String paySum, - String rechargeMoney, - String refundMoney, - num orderNum, - num rechargeOrderNum, - num refundOrderNum, - num payOrderNum, - num discountOrderNum, - dynamic startDate, - dynamic endDate, - dynamic tablePerConsumption, - num numberOfPeople, - String peoplePerConsumption, - dynamic realDiscountPer, - dynamic tableRate, -}) => DayCount( summaryDate: summaryDate ?? _summaryDate, - dayMoney: dayMoney ?? _dayMoney, - discountSum: discountSum ?? _discountSum, - paySum: paySum ?? _paySum, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - refundMoney: refundMoney ?? _refundMoney, - orderNum: orderNum ?? _orderNum, - rechargeOrderNum: rechargeOrderNum ?? _rechargeOrderNum, - refundOrderNum: refundOrderNum ?? _refundOrderNum, - payOrderNum: payOrderNum ?? _payOrderNum, - discountOrderNum: discountOrderNum ?? _discountOrderNum, - startDate: startDate ?? _startDate, - endDate: endDate ?? _endDate, - tablePerConsumption: tablePerConsumption ?? _tablePerConsumption, - numberOfPeople: numberOfPeople ?? _numberOfPeople, - peoplePerConsumption: peoplePerConsumption ?? _peoplePerConsumption, - realDiscountPer: realDiscountPer ?? _realDiscountPer, - tableRate: tableRate ?? _tableRate, -); - String get summaryDate => _summaryDate; - String get dayMoney => _dayMoney; - String get discountSum => _discountSum; - String get paySum => _paySum; - String get rechargeMoney => _rechargeMoney; - String get refundMoney => _refundMoney; - num get orderNum => _orderNum; - num get rechargeOrderNum => _rechargeOrderNum; - num get refundOrderNum => _refundOrderNum; - num get payOrderNum => _payOrderNum; - num get discountOrderNum => _discountOrderNum; - dynamic get startDate => _startDate; - dynamic get endDate => _endDate; - dynamic get tablePerConsumption => _tablePerConsumption; - num get numberOfPeople => _numberOfPeople; - String get peoplePerConsumption => _peoplePerConsumption; - dynamic get realDiscountPer => _realDiscountPer; - dynamic get tableRate => _tableRate; - - Map toJson() { - final map = {}; - map['summaryDate'] = _summaryDate; - map['dayMoney'] = _dayMoney; - map['discountSum'] = _discountSum; - map['paySum'] = _paySum; - map['rechargeMoney'] = _rechargeMoney; - map['refundMoney'] = _refundMoney; - map['orderNum'] = _orderNum; - map['rechargeOrderNum'] = _rechargeOrderNum; - map['refundOrderNum'] = _refundOrderNum; - map['payOrderNum'] = _payOrderNum; - map['discountOrderNum'] = _discountOrderNum; - map['startDate'] = _startDate; - map['endDate'] = _endDate; - map['tablePerConsumption'] = _tablePerConsumption; - map['numberOfPeople'] = _numberOfPeople; - map['peoplePerConsumption'] = _peoplePerConsumption; - map['realDiscountPer'] = _realDiscountPer; - map['tableRate'] = _tableRate; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/day_flow_list.dart b/lib/retrofit/data/day_flow_list.dart deleted file mode 100644 index 4730a7bc..00000000 --- a/lib/retrofit/data/day_flow_list.dart +++ /dev/null @@ -1,97 +0,0 @@ -/// localDate : null -/// localDateTime : "2023-09-04 12:18:20" -/// count : 0 -/// amount : "19.00" -/// refundAmount : "0.00" -/// storeName : "屏东剉冰店(烧冷冰)" -/// nickname : null -/// phone : null - -class DayFlowList { - DayFlowList({ - dynamic localDate, - String localDateTime, - num count, - String amount, - String refundAmount, - String storeName, - dynamic nickname, - dynamic phone,}){ - _localDate = localDate; - _localDateTime = localDateTime; - _count = count; - _amount = amount; - _refundAmount = refundAmount; - _storeName = storeName; - _nickname = nickname; - _phone = phone; -} - - DayFlowList.fromJson(dynamic json) { - _localDate = json['localDate']; - _localDateTime = json['localDateTime']; - _count = json['count']; - _amount = json['amount']; - _refundAmount = json['refundAmount']; - _storeName = json['storeName']; - _nickname = json['nickname']; - _phone = json['phone']; - } - dynamic _localDate; - String _localDateTime; - num _count; - String _amount; - String _refundAmount; - String _storeName; - dynamic _nickname; - dynamic _phone; -DayFlowList copyWith({ dynamic localDate, - String localDateTime, - num count, - String amount, - String refundAmount, - String storeName, - dynamic nickname, - dynamic phone, -}) => DayFlowList( localDate: localDate ?? _localDate, - localDateTime: localDateTime ?? _localDateTime, - count: count ?? _count, - amount: amount ?? _amount, - refundAmount: refundAmount ?? _refundAmount, - storeName: storeName ?? _storeName, - nickname: nickname ?? _nickname, - phone: phone ?? _phone, -); - dynamic get localDate => _localDate; - String get localDateTime => _localDateTime; - num get count => _count; - String get amount => _amount; - String get refundAmount => _refundAmount; - String get storeName => _storeName; - dynamic get nickname => _nickname; - dynamic get phone => _phone; - List _detailList; - - - List get detailList => _detailList; - - set detailList(List value) { - _detailList = value; - } - - Map toJson() { - final map = {}; - map['localDate'] = _localDate; - map['localDateTime'] = _localDateTime; - map['count'] = _count; - map['amount'] = _amount; - map['refundAmount'] = _refundAmount; - map['storeName'] = _storeName; - map['nickname'] = _nickname; - map['phone'] = _phone; - return map; - } - - - -} \ No newline at end of file diff --git a/lib/retrofit/data/delivery_info.dart b/lib/retrofit/data/delivery_info.dart deleted file mode 100644 index c58156cb..00000000 --- a/lib/retrofit/data/delivery_info.dart +++ /dev/null @@ -1,33 +0,0 @@ - -class DeliveryInfo { - bool dadaRegStatus; - String dadaSourceId; - bool dadaStatus; - bool dianwodaRegStatus; - bool dianwodaStatus; - bool meituanRegStatus; - bool meituanStatus; - - DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus}); - - factory DeliveryInfo.fromJson(Map json) => DeliveryInfo( - dadaRegStatus: json['dadaRegStatus'] as bool, - dadaSourceId: json['dadaSourceId'] as String, - dadaStatus: json['dadaStatus'] as bool, - dianwodaRegStatus: json['dianwodaRegStatus'] as bool, - dianwodaStatus: json['dianwodaStatus'] as bool, - meituanRegStatus: json['meituanRegStatus'] as bool, - meituanStatus: json['meituanStatus'] as bool, - ); - - Map toJson() => { - 'dadaRegStatus': this.dadaRegStatus, - 'dadaSourceId': this.dadaSourceId, - 'dadaStatus': this.dadaStatus, - 'dianwodaRegStatus': this.dianwodaRegStatus, - 'dianwodaStatus': this.dianwodaStatus, - 'meituanRegStatus': this.meituanRegStatus, - 'meituanStatus': this.meituanStatus, - }; -} - diff --git a/lib/retrofit/data/down_order.dart b/lib/retrofit/data/down_order.dart deleted file mode 100644 index 3c5d84bc..00000000 --- a/lib/retrofit/data/down_order.dart +++ /dev/null @@ -1,135 +0,0 @@ -import 'package:huixiang/retrofit/data/order_product_vo.dart'; - -class DownOrder { - DownOrder({ - String id, - String orderCode, - dynamic storeId, - dynamic storeName, - dynamic orderStatus, - dynamic returnType, - dynamic shipperCode, - dynamic logisticsNum, - String orderSum, - dynamic accountPay, - dynamic discountAmount, - dynamic postFee, - dynamic paySum, - dynamic overTime, - List orderProductVOList, - dynamic moneyReturnList, - dynamic goodsReturnList, - dynamic tablePrice, - dynamic parentCode, - String parentId, - dynamic peopleNum, - int orderSource, - }) { - this.id = id; - this.orderCode = orderCode; - this.storeId = storeId; - this.storeName = storeName; - this.orderStatus = orderStatus; - this.returnType = returnType; - this.shipperCode = shipperCode; - this.logisticsNum = logisticsNum; - this.orderSum = orderSum; - this.accountPay = accountPay; - this.discountAmount = discountAmount; - this.postFee = postFee; - this.paySum = paySum; - this.overTime = overTime; - this.orderProductVOList = orderProductVOList; - this.moneyReturnList = moneyReturnList; - this.goodsReturnList = goodsReturnList; - this.tablePrice = tablePrice; - this.parentCode = parentCode; - this.parentId = parentId; - this.peopleNum = peopleNum; - this.orderSource = orderSource; - } - - DownOrder.fromJson(dynamic json) { - this.id = json['id']; - this.orderCode = json['orderCode']; - this.storeId = json['storeId']; - this.storeName = json['storeName']; - this.orderStatus = json['orderStatus']; - this.returnType = json['returnType']; - this.shipperCode = json['shipperCode']; - this.logisticsNum = json['logisticsNum']; - this.orderSum = json['orderSum']; - this.accountPay = json['accountPay']; - this.discountAmount = json['discountAmount']; - this.postFee = json['postFee']; - this.paySum = json['paySum']; - this.overTime = json['overTime']; - if (json['orderProductVOList'] != null) { - this.orderProductVOList = []; - json['orderProductVOList'].forEach((v) { - this.orderProductVOList.add(OrderProductVOList.fromJson(v)); - }); - } - this.moneyReturnList = json['moneyReturnList']; - this.goodsReturnList = json['goodsReturnList']; - this.tablePrice = json['tablePrice']; - this.parentCode = json['parentCode']; - this.parentId = json['parentId']; - this.peopleNum = json['peopleNum']; - this.orderSource = json['orderSource']; - } - - String id; - String orderCode; - dynamic storeId; - dynamic storeName; - dynamic orderStatus; - dynamic returnType; - dynamic shipperCode; - dynamic logisticsNum; - String orderSum; - dynamic accountPay; - dynamic discountAmount; - dynamic postFee; - dynamic paySum; - dynamic overTime; - List orderProductVOList; - dynamic moneyReturnList; - dynamic goodsReturnList; - dynamic tablePrice; - dynamic parentCode; - String parentId; - dynamic peopleNum; - int orderSource; - - Map toJson() { - final map = {}; - map['id'] = this.id; - map['orderCode'] = this.orderCode; - map['storeId'] = this.storeId; - map['storeName'] = this.storeName; - map['orderStatus'] = this.orderStatus; - map['returnType'] = this.returnType; - map['shipperCode'] = this.shipperCode; - map['logisticsNum'] = this.logisticsNum; - map['orderSum'] = this.orderSum; - map['accountPay'] = this.accountPay; - map['discountAmount'] = this.discountAmount; - map['postFee'] = this.postFee; - map['paySum'] = this.paySum; - map['overTime'] = this.overTime; - if (this.orderProductVOList != null) { - map['orderProductVOList'] = - this.orderProductVOList.map((v) => v.toJson()).toList(); - } - map['moneyReturnList'] = this.moneyReturnList; - map['goodsReturnList'] = this.goodsReturnList; - map['tablePrice'] = this.tablePrice; - map['parentCode'] = this.parentCode; - map['parentId'] = this.parentId; - map['peopleNum'] = this.peopleNum; - map['orderSource'] = this.orderSource; - return map; - } -} - diff --git a/lib/retrofit/data/edit_specs_detail_list.dart b/lib/retrofit/data/edit_specs_detail_list.dart deleted file mode 100644 index b061b1cb..00000000 --- a/lib/retrofit/data/edit_specs_detail_list.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:flutter/cupertino.dart'; - -class EditSpecsDetailList { - String _specsDetailName; - TextEditingController _goodPriceController; - TextEditingController _originalPriceController; - TextEditingController _packagingFeeController; - TextEditingController _specsWeightController; - TextEditingController _skuStockController; - - TextEditingController get goodPriceController => _goodPriceController; - TextEditingController get originalPriceController => _originalPriceController; - TextEditingController get packagingFeeController => _packagingFeeController; - TextEditingController get specsWeightController => _specsWeightController; - TextEditingController get skuStockController => _skuStockController; - - - String get specsDetailName => _specsDetailName; - - set specsDetailName(String value) { - _specsDetailName = value; - } - - EditSpecsDetailList(String specsDetailName){ - _specsDetailName = specsDetailName; - _goodPriceController = TextEditingController(); - _originalPriceController = TextEditingController(); - _packagingFeeController = TextEditingController(); - _specsWeightController = TextEditingController(); - _skuStockController = TextEditingController(); - } -} \ No newline at end of file diff --git a/lib/retrofit/data/exchange_order.dart b/lib/retrofit/data/exchange_order.dart deleted file mode 100644 index fb48bcb5..00000000 --- a/lib/retrofit/data/exchange_order.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:huixiang/retrofit/data/exchange_order_goods.dart'; - -class ExchangeOrder { - ExchangeOrder(); - - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String storeId; - String mid; - String orderCode; - String amount; - String money; - int payStatus; - int payType; - int sendStatus; - String address; - String storeName; - String recAddress; - int state; - int useTyped; - int isDelete; - List creditOrderDetailList; - - factory ExchangeOrder.fromJson(Map json) => ExchangeOrder() - ..id = json['id'] as String - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String - ..storeId = json['storeId'] as String - ..mid = json['mid'] as String - ..orderCode = json['orderCode'] as String - ..amount = json['amount'] as String - ..money = json['money'] as String - ..payStatus = json['payStatus'] as int - ..payType = json['payType'] as int - ..sendStatus = json['sendStatus'] as int - ..address = json['address'] as String - ..storeName = json['storeName'] as String - ..recAddress = json['recAddress'] as String - ..state = json['state'] as int - ..useTyped = json['useTyped'] as int - ..isDelete = json['isDelete'] as int - ..creditOrderDetailList = (json['creditOrderDetailList'] as List) - ?.map((e) => e == null - ? null - : ExchangeOrderGoods.fromJson(e as Map)) - ?.toList(); - - Map toJson() => { - 'id': this.id, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'storeId': this.storeId, - 'mid': this.mid, - 'orderCode': this.orderCode, - 'amount': this.amount, - 'money': this.money, - 'payStatus': this.payStatus, - 'payType':this.payType, - 'sendStatus': this.sendStatus, - 'address': this.address, - 'storeName': this.storeName, - 'recAddress': this.recAddress, - 'state': this.state, - 'useTyped': this.useTyped, - 'isDelete': this.isDelete, - 'creditOrderDetailList': this.creditOrderDetailList.map((e) => e.toJson()).toList(), - }; -} diff --git a/lib/retrofit/data/exchange_order_goods.dart b/lib/retrofit/data/exchange_order_goods.dart deleted file mode 100644 index d0800a02..00000000 --- a/lib/retrofit/data/exchange_order_goods.dart +++ /dev/null @@ -1,71 +0,0 @@ - -class ExchangeOrderGoods { - ExchangeOrderGoods(); - - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String orderId; - String goodsId; - String categoryId; - String name; - String description; - String worth; - String price; - String money; - String couponId; - bool canPick; - bool canDelivery; - String goodsMainImg; - String goodsViceImg; - int goodsNumber; - int isDelete; - - factory ExchangeOrderGoods.fromJson(Map json) => - ExchangeOrderGoods() - ..id = json['id'] as String - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String - ..orderId = json['orderId'] as String - ..goodsId = json['goodsId'] as String - ..categoryId = json['categoryId'] as String - ..name = json['name'] as String - ..description = json['description'] as String - ..worth = json['worth'] as String - ..price = json['price'] as String - ..money = json['money'] as String - ..couponId = json['couponId'] as String - ..canPick = json['canPick'] as bool - ..canDelivery = json['canDelivery'] as bool - ..goodsMainImg = json['goodsMainImg'] as String - ..goodsViceImg = json['goodsViceImg'] as String - ..goodsNumber = json['goodsNumber'] as int - ..isDelete = json['isDelete'] as int; - - Map toJson() => { - 'id': this.id, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'orderId': this.orderId, - 'goodsId': this.goodsId, - 'categoryId': this.categoryId, - 'name': this.name, - 'description': this.description, - 'worth': this.worth, - 'price': this.price, - 'money': this.money, - 'couponId': this.couponId, - 'canPick': this.canPick, - 'canDelivery': this.canDelivery, - 'goodsMainImg': this.goodsMainImg, - 'goodsViceImg': this.goodsViceImg, - 'goodsNumber': this.goodsNumber, - 'isDelete': this.isDelete, - }; -} diff --git a/lib/retrofit/data/farmers_list.dart b/lib/retrofit/data/farmers_list.dart deleted file mode 100644 index 4bec5df6..00000000 --- a/lib/retrofit/data/farmers_list.dart +++ /dev/null @@ -1,614 +0,0 @@ -/// goodList : [{"productImg":"https://pos.upload.lotus-wallet.com/1178/2022/04/7dfa5c3e-b23e-4424-b886-f1dbb4f15ba1.jpg","productSkuVOList":[{"ticketStyle":"","productId":"1517366419690356736","isDelete":0,"ticketDays":"0","setMeal":"","updateUser":"1347839370706550784","skuPrice":"8.00","skuStock":1,"weight":0,"updateTime":"2022-04-22 12:55:20","ticketType":"","sort":50,"storeId":"1347853925696405504","version":0,"deliveries":0,"volume":0,"autoRenewSkuStock":0,"skuNameStr":"份","createTime":"2022-04-22 12:55:20","createUser":"1347839370706550784","id":"1517366419740688384","applyPrice":"8.00","skuAttrList":[{"attrValueId":"1517366419723911168","isDelete":0,"updateUser":"1347839370706550784","updateTime":"2022-04-22 12:55:20","attrId":"1517366419715522560","createTime":"2022-04-22 12:55:20","createUser":"1347839370706550784","id":"1517366419753271296","skuId":"1517366419740688384"}],"skuCode":"P202204221255202"}],"thumbnailImg":"https://pos.upload.lotus-wallet.com/1178/2022/06/9295bf3f-9d8b-4d5c-857e-4f80327ddc74.jpg","tenantCode":"1178","storeId":"1347853925696405504","productName":"苋菜","posShow":false,"price":"8.00","sellCount":27,"details":"","id":"1517366419690356736","applyPrice":"8.00","stock":1,"status":0,"info":""}] -/// typeName : "蔬菜宅配" - -class FarmersList { - FarmersList({ - List goodList, - String typeName, - String agriculturaListImg, - }) { - _goodList = goodList; - _typeName = typeName; - _agriculturaListImg = agriculturaListImg; - } - - FarmersList.fromJson(dynamic json) { - if (json['goodList'] != null) { - _goodList = []; - json['goodList'].forEach((v) { - _goodList.add(GoodList.fromJson(v)); - }); - } - _typeName = json['typeName']; - _agriculturaListImg = json['agriculturaListImg']; - } - - List _goodList; - String _typeName; - String _agriculturaListImg; - - FarmersList copyWith({ - List goodList, - String typeName, - String agriculturaListImg, - }) => - FarmersList( - goodList: goodList ?? _goodList, - typeName: typeName ?? _typeName, - agriculturaListImg: agriculturaListImg ?? _agriculturaListImg, - ); - - List get goodList => _goodList; - - String get typeName => _typeName; - - String get agriculturaListImg => _agriculturaListImg; - - Map toJson() { - final map = {}; - if (_goodList != null) { - map['goodList'] = _goodList.map((v) => v.toJson()).toList(); - } - map['typeName'] = _typeName; - map['agriculturaListImg'] = _agriculturaListImg; - return map; - } -} - -/// productImg : "https://pos.upload.lotus-wallet.com/1178/2022/04/7dfa5c3e-b23e-4424-b886-f1dbb4f15ba1.jpg" -/// productSkuVOList : [{"ticketStyle":"","productId":"1517366419690356736","isDelete":0,"ticketDays":"0","setMeal":"","updateUser":"1347839370706550784","skuPrice":"8.00","skuStock":1,"weight":0,"updateTime":"2022-04-22 12:55:20","ticketType":"","sort":50,"storeId":"1347853925696405504","version":0,"deliveries":0,"volume":0,"autoRenewSkuStock":0,"skuNameStr":"份","createTime":"2022-04-22 12:55:20","createUser":"1347839370706550784","id":"1517366419740688384","applyPrice":"8.00","skuAttrList":[{"attrValueId":"1517366419723911168","isDelete":0,"updateUser":"1347839370706550784","updateTime":"2022-04-22 12:55:20","attrId":"1517366419715522560","createTime":"2022-04-22 12:55:20","createUser":"1347839370706550784","id":"1517366419753271296","skuId":"1517366419740688384"}],"skuCode":"P202204221255202"}] -/// thumbnailImg : "https://pos.upload.lotus-wallet.com/1178/2022/06/9295bf3f-9d8b-4d5c-857e-4f80327ddc74.jpg" -/// tenantCode : "1178" -/// storeId : "1347853925696405504" -/// productName : "苋菜" -/// posShow : false -/// price : "8.00" -/// sellCount : 27 -/// details : "" -/// id : "1517366419690356736" -/// applyPrice : "8.00" -/// stock : 1 -/// status : 0 -/// info : "" - -class GoodList { - GoodList({ - String productImg, - List productSkuVOList, - String thumbnailImg, - String tenantCode, - String storeId, - String productName, - bool posShow, - String price, - num sellCount, - String details, - String id, - String applyPrice, - dynamic stock, - dynamic status, - String info, - }) { - _productImg = productImg; - _productSkuVOList = productSkuVOList; - _thumbnailImg = thumbnailImg; - _tenantCode = tenantCode; - _storeId = storeId; - _productName = productName; - _posShow = posShow; - _price = price; - _sellCount = sellCount; - _details = details; - _id = id; - _applyPrice = applyPrice; - _stock = stock; - _status = status; - _info = info; - } - - GoodList.fromJson(dynamic json) { - _productImg = json['productImg']; - if (json['productSkuVOList'] != null) { - _productSkuVOList = []; - json['productSkuVOList'].forEach((v) { - _productSkuVOList.add(ProductSkuVoList.fromJson(v)); - }); - } - _thumbnailImg = json['thumbnailImg']; - _tenantCode = json['tenantCode']; - _storeId = json['storeId']; - _productName = json['productName']; - _posShow = json['posShow']; - _price = json['price']; - _sellCount = json['sellCount']; - _details = json['details']; - _id = json['id']; - _applyPrice = json['applyPrice']; - _stock = json['stock']; - _status = json['status']; - _info = json['info']; - } - - String _productImg; - List _productSkuVOList; - String _thumbnailImg; - String _tenantCode; - String _storeId; - String _productName; - bool _posShow; - String _price; - num _sellCount; - String _details; - String _id; - String _applyPrice; - dynamic _stock; - dynamic _status; - String _info; - - GoodList copyWith({ - String productImg, - List productSkuVOList, - String thumbnailImg, - String tenantCode, - String storeId, - String productName, - bool posShow, - String price, - num sellCount, - String details, - String id, - String applyPrice, - dynamic stock, - dynamic status, - String info, - }) => - GoodList( - productImg: productImg ?? _productImg, - productSkuVOList: productSkuVOList ?? _productSkuVOList, - thumbnailImg: thumbnailImg ?? _thumbnailImg, - tenantCode: tenantCode ?? _tenantCode, - storeId: storeId ?? _storeId, - productName: productName ?? _productName, - posShow: posShow ?? _posShow, - price: price ?? _price, - sellCount: sellCount ?? _sellCount, - details: details ?? _details, - id: id ?? _id, - applyPrice: applyPrice ?? _applyPrice, - stock: stock ?? _stock, - status: status ?? _status, - info: info ?? _info, - ); - - String get productImg => _productImg; - - List get productSkuVOList => _productSkuVOList; - - String get thumbnailImg => _thumbnailImg; - - String get tenantCode => _tenantCode; - - String get storeId => _storeId; - - String get productName => _productName; - - bool get posShow => _posShow; - - String get price => _price; - - num get sellCount => _sellCount; - - String get details => _details; - - String get id => _id; - - String get applyPrice => _applyPrice; - - dynamic get stock => _stock; - - dynamic get status => _status; - - String get info => _info; - - Map toJson() { - final map = {}; - map['productImg'] = _productImg; - if (_productSkuVOList != null) { - map['productSkuVOList'] = - _productSkuVOList.map((v) => v.toJson()).toList(); - } - map['thumbnailImg'] = _thumbnailImg; - map['tenantCode'] = _tenantCode; - map['storeId'] = _storeId; - map['productName'] = _productName; - map['posShow'] = _posShow; - map['price'] = _price; - map['sellCount'] = _sellCount; - map['details'] = _details; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - map['stock'] = _stock; - map['status'] = _status; - map['info'] = _info; - return map; - } -} - -/// ticketStyle : "" -/// productId : "1517366419690356736" -/// isDelete : 0 -/// ticketDays : "0" -/// setMeal : "" -/// updateUser : "1347839370706550784" -/// skuPrice : "8.00" -/// skuStock : 1 -/// weight : 0 -/// updateTime : "2022-04-22 12:55:20" -/// ticketType : "" -/// sort : 50 -/// storeId : "1347853925696405504" -/// version : 0 -/// deliveries : 0 -/// volume : 0 -/// autoRenewSkuStock : 0 -/// skuNameStr : "份" -/// createTime : "2022-04-22 12:55:20" -/// createUser : "1347839370706550784" -/// id : "1517366419740688384" -/// applyPrice : "8.00" -/// skuAttrList : [{"attrValueId":"1517366419723911168","isDelete":0,"updateUser":"1347839370706550784","updateTime":"2022-04-22 12:55:20","attrId":"1517366419715522560","createTime":"2022-04-22 12:55:20","createUser":"1347839370706550784","id":"1517366419753271296","skuId":"1517366419740688384"}] -/// skuCode : "P202204221255202" - -class ProductSkuVoList { - ProductSkuVoList({ - String ticketStyle, - String productId, - num isDelete, - String ticketDays, - String setMeal, - String updateUser, - String skuPrice, - num skuStock, - num weight, - String updateTime, - String ticketType, - num sort, - String storeId, - num version, - num deliveries, - num volume, - num autoRenewSkuStock, - String skuNameStr, - String createTime, - String createUser, - String id, - String applyPrice, - List skuAttrList, - String skuCode, - }) { - _ticketStyle = ticketStyle; - _productId = productId; - _isDelete = isDelete; - _ticketDays = ticketDays; - _setMeal = setMeal; - _updateUser = updateUser; - _skuPrice = skuPrice; - _skuStock = skuStock; - _weight = weight; - _updateTime = updateTime; - _ticketType = ticketType; - _sort = sort; - _storeId = storeId; - _version = version; - _deliveries = deliveries; - _volume = volume; - _autoRenewSkuStock = autoRenewSkuStock; - _skuNameStr = skuNameStr; - _createTime = createTime; - _createUser = createUser; - _id = id; - _applyPrice = applyPrice; - _skuAttrList = skuAttrList; - _skuCode = skuCode; - } - - ProductSkuVoList.fromJson(dynamic json) { - _ticketStyle = json['ticketStyle']; - _productId = json['productId']; - _isDelete = json['isDelete']; - _ticketDays = json['ticketDays']; - _setMeal = json['setMeal']; - _updateUser = json['updateUser']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - _weight = json['weight']; - _updateTime = json['updateTime']; - _ticketType = json['ticketType']; - _sort = json['sort']; - _storeId = json['storeId']; - _version = json['version']; - _deliveries = json['deliveries']; - _volume = json['volume']; - _autoRenewSkuStock = json['autoRenewSkuStock']; - _skuNameStr = json['skuNameStr']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _applyPrice = json['applyPrice']; - if (json['skuAttrList'] != null) { - _skuAttrList = []; - json['skuAttrList'].forEach((v) { - _skuAttrList.add(SkuAttrList.fromJson(v)); - }); - } - _skuCode = json['skuCode']; - } - - String _ticketStyle; - String _productId; - num _isDelete; - String _ticketDays; - String _setMeal; - String _updateUser; - String _skuPrice; - num _skuStock; - num _weight; - String _updateTime; - String _ticketType; - num _sort; - String _storeId; - num _version; - num _deliveries; - num _volume; - num _autoRenewSkuStock; - String _skuNameStr; - String _createTime; - String _createUser; - String _id; - String _applyPrice; - List _skuAttrList; - String _skuCode; - - ProductSkuVoList copyWith({ - String ticketStyle, - String productId, - num isDelete, - String ticketDays, - String setMeal, - String updateUser, - String skuPrice, - num skuStock, - num weight, - String updateTime, - String ticketType, - num sort, - String storeId, - num version, - num deliveries, - num volume, - num autoRenewSkuStock, - String skuNameStr, - String createTime, - String createUser, - String id, - String applyPrice, - List skuAttrList, - String skuCode, - }) => - ProductSkuVoList( - ticketStyle: ticketStyle ?? _ticketStyle, - productId: productId ?? _productId, - isDelete: isDelete ?? _isDelete, - ticketDays: ticketDays ?? _ticketDays, - setMeal: setMeal ?? _setMeal, - updateUser: updateUser ?? _updateUser, - skuPrice: skuPrice ?? _skuPrice, - skuStock: skuStock ?? _skuStock, - weight: weight ?? _weight, - updateTime: updateTime ?? _updateTime, - ticketType: ticketType ?? _ticketType, - sort: sort ?? _sort, - storeId: storeId ?? _storeId, - version: version ?? _version, - deliveries: deliveries ?? _deliveries, - volume: volume ?? _volume, - autoRenewSkuStock: autoRenewSkuStock ?? _autoRenewSkuStock, - skuNameStr: skuNameStr ?? _skuNameStr, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - id: id ?? _id, - applyPrice: applyPrice ?? _applyPrice, - skuAttrList: skuAttrList ?? _skuAttrList, - skuCode: skuCode ?? _skuCode, - ); - - String get ticketStyle => _ticketStyle; - - String get productId => _productId; - - num get isDelete => _isDelete; - - String get ticketDays => _ticketDays; - - String get setMeal => _setMeal; - - String get updateUser => _updateUser; - - String get skuPrice => _skuPrice; - - num get skuStock => _skuStock; - - num get weight => _weight; - - String get updateTime => _updateTime; - - String get ticketType => _ticketType; - - num get sort => _sort; - - String get storeId => _storeId; - - num get version => _version; - - num get deliveries => _deliveries; - - num get volume => _volume; - - num get autoRenewSkuStock => _autoRenewSkuStock; - - String get skuNameStr => _skuNameStr; - - String get createTime => _createTime; - - String get createUser => _createUser; - - String get id => _id; - - String get applyPrice => _applyPrice; - - List get skuAttrList => _skuAttrList; - - String get skuCode => _skuCode; - - Map toJson() { - final map = {}; - map['ticketStyle'] = _ticketStyle; - map['productId'] = _productId; - map['isDelete'] = _isDelete; - map['ticketDays'] = _ticketDays; - map['setMeal'] = _setMeal; - map['updateUser'] = _updateUser; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - map['weight'] = _weight; - map['updateTime'] = _updateTime; - map['ticketType'] = _ticketType; - map['sort'] = _sort; - map['storeId'] = _storeId; - map['version'] = _version; - map['deliveries'] = _deliveries; - map['volume'] = _volume; - map['autoRenewSkuStock'] = _autoRenewSkuStock; - map['skuNameStr'] = _skuNameStr; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - if (_skuAttrList != null) { - map['skuAttrList'] = _skuAttrList.map((v) => v.toJson()).toList(); - } - map['skuCode'] = _skuCode; - return map; - } -} - -/// attrValueId : "1517366419723911168" -/// isDelete : 0 -/// updateUser : "1347839370706550784" -/// updateTime : "2022-04-22 12:55:20" -/// attrId : "1517366419715522560" -/// createTime : "2022-04-22 12:55:20" -/// createUser : "1347839370706550784" -/// id : "1517366419753271296" -/// skuId : "1517366419740688384" - -class SkuAttrList { - SkuAttrList({ - String attrValueId, - num isDelete, - String updateUser, - String updateTime, - String attrId, - String createTime, - String createUser, - String id, - String skuId, - }) { - _attrValueId = attrValueId; - _isDelete = isDelete; - _updateUser = updateUser; - _updateTime = updateTime; - _attrId = attrId; - _createTime = createTime; - _createUser = createUser; - _id = id; - _skuId = skuId; - } - - SkuAttrList.fromJson(dynamic json) { - _attrValueId = json['attrValueId']; - _isDelete = json['isDelete']; - _updateUser = json['updateUser']; - _updateTime = json['updateTime']; - _attrId = json['attrId']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _skuId = json['skuId']; - } - - String _attrValueId; - num _isDelete; - String _updateUser; - String _updateTime; - String _attrId; - String _createTime; - String _createUser; - String _id; - String _skuId; - - SkuAttrList copyWith({ - String attrValueId, - num isDelete, - String updateUser, - String updateTime, - String attrId, - String createTime, - String createUser, - String id, - String skuId, - }) => - SkuAttrList( - attrValueId: attrValueId ?? _attrValueId, - isDelete: isDelete ?? _isDelete, - updateUser: updateUser ?? _updateUser, - updateTime: updateTime ?? _updateTime, - attrId: attrId ?? _attrId, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - id: id ?? _id, - skuId: skuId ?? _skuId, - ); - - String get attrValueId => _attrValueId; - - num get isDelete => _isDelete; - - String get updateUser => _updateUser; - - String get updateTime => _updateTime; - - String get attrId => _attrId; - - String get createTime => _createTime; - - String get createUser => _createUser; - - String get id => _id; - - String get skuId => _skuId; - - Map toJson() { - final map = {}; - map['attrValueId'] = _attrValueId; - map['isDelete'] = _isDelete; - map['updateUser'] = _updateUser; - map['updateTime'] = _updateTime; - map['attrId'] = _attrId; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['skuId'] = _skuId; - return map; - } -} diff --git a/lib/retrofit/data/findMiNiGroupList.dart b/lib/retrofit/data/findMiNiGroupList.dart deleted file mode 100644 index 8b22f8f5..00000000 --- a/lib/retrofit/data/findMiNiGroupList.dart +++ /dev/null @@ -1,269 +0,0 @@ -/// id : "1435148069191548928" -/// storeId : "1333246101343436800" -/// groupName : "��Ʒ�人" -/// groupImg : "https://pos.upload.gznl.top/1175/2021/09/c9abb054-4509-4f22-9671-6f712ab7e493.webp" -/// sort : 0 -/// productList : [{"id":"1440501052276211712","supplierName":"����","storeId":"1333246101343436800","categoryId":"1300688133322440704","groupId":"1435148069191548928","shortName":"����","productName":"֧������","sellDesc":"","productCode":"PRO202109221019480000000000001","weight":"0","applyPrice":"0.00","price":"0.01","stock":-48,"sellCount":48,"needLogistics":1,"oversold":1,"status":1,"posShow":true,"attrStyle":0,"isDelete":0,"productAttrValues":null,"skuList":null,"imgPathList":null,"buyNum":0,"imgPath":"https://pos.upload.gznl.top/1175/2021/09/ade72b41-23a2-4f29-ae50-4e620b7e9011.webp","setMeal":1,"printerFlag":"DEFAULT","markProductNone":null},{"id":"1435893909921202176","supplierName":"����","storeId":"1333246101343436800","categoryId":"1300688133322440704","groupId":"1435148069191548928","shortName":"����","productName":"������","sellDesc":"","productCode":"PRO202109091712400000000000003","weight":"0","applyPrice":"0.00","price":"9999.00","stock":-10,"sellCount":10,"needLogistics":1,"oversold":1,"status":1,"posShow":true,"attrStyle":0,"isDelete":0,"productAttrValues":null,"skuList":null,"imgPathList":null,"buyNum":0,"imgPath":"https://pos.upload.gznl.top/1175/2021/09/1d212bc1-b952-4aba-a870-8538009da680.webp","setMeal":1,"printerFlag":"DEFAULT","markProductNone":null},{"id":"1435781813317402624","supplierName":"��Ͽ����","storeId":"1333246101343436800","categoryId":"1300688133322440704","groupId":"1435148069191548928","shortName":"ƴ�̲���","productName":"ƴ�̲���(��ѡ��)","sellDesc":"","productCode":"PRO202109090947140000000000001","weight":"0","applyPrice":"0.00","price":"2.00","stock":-15,"sellCount":17,"needLogistics":1,"oversold":1,"status":1,"posShow":true,"attrStyle":0,"isDelete":0,"productAttrValues":null,"skuList":null,"imgPathList":null,"buyNum":0,"imgPath":"https://pos.upload.gznl.top/1175/2021/09/c1412e9a-2c5a-4658-9850-8dde8d1e9321.webp","setMeal":1,"printerFlag":"DEFAULT","markProductNone":null}] -/// productPageVO : null - -class FindMiNiGroupList { - String id; - String storeId; - String groupName; - String groupImg; - int sort; - double goodsIndex = 0; - double height = 0; - List productList; - dynamic productPageVO; - - static FindMiNiGroupList fromJson(Map map) { - if (map == null) return null; - FindMiNiGroupList findMiNiGroupListBean = FindMiNiGroupList(); - findMiNiGroupListBean.id = map['id']; - findMiNiGroupListBean.storeId = map['storeId']; - findMiNiGroupListBean.groupName = map['groupName']; - findMiNiGroupListBean.groupImg = map['groupImg']; - findMiNiGroupListBean.sort = map['sort']; - findMiNiGroupListBean.productList = []..addAll( - (map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o)) - ); - findMiNiGroupListBean.productPageVO = map['productPageVO']; - return findMiNiGroupListBean; - } - - Map toJson() => { - "id": id, - "storeId": storeId, - "groupName": groupName, - "groupImg": groupImg, - "sort": sort, - "productList": productList, - "productPageVO": productPageVO, - }; -} - -/// id : "1440501052276211712" -/// supplierName : "����" -/// storeId : "1333246101343436800" -/// categoryId : "1300688133322440704" -/// groupId : "1435148069191548928" -/// shortName : "����" -/// productName : "֧������" -/// sellDesc : "" -/// productCode : "PRO202109221019480000000000001" -/// weight : "0" -/// applyPrice : "0.00" -/// price : "0.01" -/// stock : -48 -/// sellCount : 48 -/// needLogistics : 1 -/// oversold : 1 -/// status : 1 -/// posShow : true -/// attrStyle : 0 -/// isDelete : 0 -/// productAttrValues : null -/// skuList : null -/// imgPathList : null -/// buyNum : 0 -/// imgPath : "https://pos.upload.gznl.top/1175/2021/09/ade72b41-23a2-4f29-ae50-4e620b7e9011.webp" -/// setMeal : 1 -/// printerFlag : "DEFAULT" -/// markProductNone : null - -class ProductListBean { - String id; - String supplierName; - String storeId; - String categoryId; - String groupId; - String shortName; - String productName; - String sellDesc; - String productCode; - String weight; - String applyPrice; - String price; - String vipPrice; - int stock; - int sellCount; - int needLogistics; - int oversold; - int status; - bool posShow; - int attrStyle; - int isDelete; - dynamic productAttrValues; - dynamic skuList; - dynamic imgPathList; - int buyNum; - String imgPath; - int setMeal; - String printerFlag; - dynamic markProductNone; - SubscribeParam subscribeParam; - bool isSetMeal; - - static ProductListBean fromJson(Map map) { - if (map == null) return null; - ProductListBean productListBean = ProductListBean(); - productListBean.id = map['id']; - productListBean.supplierName = map['supplierName']; - productListBean.storeId = map['storeId']; - productListBean.categoryId = map['categoryId']; - productListBean.groupId = map['groupId']; - productListBean.shortName = map['shortName']; - productListBean.productName = map['productName']; - productListBean.sellDesc = map['sellDesc']; - productListBean.productCode = map['productCode']; - productListBean.weight = map['weight']; - productListBean.applyPrice = map['applyPrice']; - productListBean.price = map['price']; - productListBean.vipPrice = map['vipPrice']; - productListBean.stock = map['stock']; - productListBean.sellCount = map['sellCount']; - productListBean.needLogistics = map['needLogistics']; - productListBean.oversold = map['oversold']; - productListBean.status = map['status']; - productListBean.posShow = map['posShow']; - productListBean.attrStyle = map['attrStyle']; - productListBean.isDelete = map['isDelete']; - productListBean.productAttrValues = map['productAttrValues']; - productListBean.skuList = map['skuList']; - productListBean.imgPathList = map['imgPathList']; - productListBean.buyNum = map['buyNum']; - productListBean.imgPath = map['imgPath']; - productListBean.setMeal = map['setMeal']; - productListBean.printerFlag = map['printerFlag']; - productListBean.markProductNone = map['markProductNone']; - productListBean.subscribeParam = SubscribeParam.fromJson(map['subscribeParam']); - productListBean.isSetMeal = map['isSetMeal']; - return productListBean; - } - - Map toJson() => { - "id": id, - "supplierName": supplierName, - "storeId": storeId, - "categoryId": categoryId, - "groupId": groupId, - "shortName": shortName, - "productName": productName, - "sellDesc": sellDesc, - "productCode": productCode, - "weight": weight, - "applyPrice": applyPrice, - "price": price, - "vipPrice":vipPrice, - "stock": stock, - "sellCount": sellCount, - "needLogistics": needLogistics, - "oversold": oversold, - "status": status, - "posShow": posShow, - "attrStyle": attrStyle, - "isDelete": isDelete, - "productAttrValues": productAttrValues, - "skuList": skuList, - "imgPathList": imgPathList, - "buyNum": buyNum, - "imgPath": imgPath, - "setMeal": setMeal, - "printerFlag": printerFlag, - "markProductNone": markProductNone, - "subscribeParam": subscribeParam, - "isSetMeal": isSetMeal, - }; -} - -/// isEnableSubscribe : true -/// dayOrDate : 3 -/// startAfterDays : null -/// daysValidate : null -/// subscribeStartTime : "2023-04-20 00:00:00" -/// subscribeEndTime : "2023-04-30 00:00:00" -/// stores : ["海峡姐妹","前进麦味","百年川椒","小吃街"] - -class SubscribeParam { - SubscribeParam({ - bool isEnableSubscribe, - num dayOrDate, - dynamic startAfterDays, - dynamic daysValidate, - String subscribeStartTime, - String subscribeEndTime, - List stores,}) { - _isEnableSubscribe = isEnableSubscribe; - _dayOrDate = dayOrDate; - _startAfterDays = startAfterDays; - _daysValidate = daysValidate; - _subscribeStartTime = subscribeStartTime; - _subscribeEndTime = subscribeEndTime; - _stores = stores; - } - - SubscribeParam.fromJson(dynamic json) { - if(json == null) - return; - _isEnableSubscribe = json['isEnableSubscribe']; - _dayOrDate = json['dayOrDate']; - _startAfterDays = json['startAfterDays']; - _daysValidate = json['daysValidate']; - _subscribeStartTime = json['subscribeStartTime']; - _subscribeEndTime = json['subscribeEndTime']; - _stores = json['stores'] != null ? json['stores'].cast() : []; - } - - bool _isEnableSubscribe; - num _dayOrDate; - dynamic _startAfterDays; - dynamic _daysValidate; - String _subscribeStartTime; - String _subscribeEndTime; - List _stores; - - SubscribeParam copyWith({ bool isEnableSubscribe, - num dayOrDate, - dynamic startAfterDays, - dynamic daysValidate, - String subscribeStartTime, - String subscribeEndTime, - List stores, - }) => - SubscribeParam( - isEnableSubscribe: isEnableSubscribe ?? _isEnableSubscribe, - dayOrDate: dayOrDate ?? _dayOrDate, - startAfterDays: startAfterDays ?? _startAfterDays, - daysValidate: daysValidate ?? _daysValidate, - subscribeStartTime: subscribeStartTime ?? _subscribeStartTime, - subscribeEndTime: subscribeEndTime ?? _subscribeEndTime, - stores: stores ?? _stores, - ); - - bool get isEnableSubscribe => _isEnableSubscribe; - - num get dayOrDate => _dayOrDate; - - dynamic get startAfterDays => _startAfterDays; - - dynamic get daysValidate => _daysValidate; - - String get subscribeStartTime => _subscribeStartTime; - - String get subscribeEndTime => _subscribeEndTime; - - List get stores => _stores; - - Map toJson() { - final map = {}; - map['isEnableSubscribe'] = _isEnableSubscribe; - map['dayOrDate'] = _dayOrDate; - map['startAfterDays'] = _startAfterDays; - map['daysValidate'] = _daysValidate; - map['subscribeStartTime'] = _subscribeStartTime; - map['subscribeEndTime'] = _subscribeEndTime; - map['stores'] = _stores; - return map; - } -} diff --git a/lib/retrofit/data/follow_list.dart b/lib/retrofit/data/follow_list.dart deleted file mode 100644 index c46a3211..00000000 --- a/lib/retrofit/data/follow_list.dart +++ /dev/null @@ -1,169 +0,0 @@ -/// pageNum : 1 -/// pageSize : 100 -/// size : 1 -/// pages : 1 -/// hasPreviousPage : false -/// hasNextPage : false -/// total : "1" -/// list : [{"mid":"1406879717390286848","nickname":"flutter无敌","avatar":"https://pos.upload.gznl.top/admin/2021/10/fb4dadec-a836-49bd-a4c9-c35fc9fd5008.jpeg"}] - -class FollowList { - FollowList({ - int pageNum, - int pageSize, - int size, - int pages, - bool hasPreviousPage, - bool hasNextPage, - String total, - List list,}){ - _pageNum = pageNum; - _pageSize = pageSize; - _size = size; - _pages = pages; - _hasPreviousPage = hasPreviousPage; - _hasNextPage = hasNextPage; - _total = total; - _list = list; -} - - FollowList.fromJson(dynamic json) { - _pageNum = json['pageNum']; - _pageSize = json['pageSize']; - _size = json['size']; - _pages = json['pages']; - _hasPreviousPage = json['hasPreviousPage']; - _hasNextPage = json['hasNextPage']; - _total = json['total']; - if (json['list'] != null) { - _list = []; - json['list'].forEach((v) { - _list.add(ListData.fromJson(v)); - }); - } - } - int _pageNum; - int _pageSize; - int _size; - int _pages; - bool _hasPreviousPage; - bool _hasNextPage; - String _total; - List _list; - - int get pageNum => _pageNum; - int get pageSize => _pageSize; - int get size => _size; - int get pages => _pages; - bool get hasPreviousPage => _hasPreviousPage; - bool get hasNextPage => _hasNextPage; - String get total => _total; - List get list => _list; - - - set pageNum(int value) { - _pageNum = value; - } - - Map toJson() { - final map = {}; - map['pageNum'] = _pageNum; - map['pageSize'] = _pageSize; - map['size'] = _size; - map['pages'] = _pages; - map['hasPreviousPage'] = _hasPreviousPage; - map['hasNextPage'] = _hasNextPage; - map['total'] = _total; - if (_list != null) { - map['list'] = _list.map((v) => v.toJson()).toList(); - } - return map; - } - - set pageSize(int value) { - _pageSize = value; - } - - set size(int value) { - _size = value; - } - - set pages(int value) { - _pages = value; - } - - set hasPreviousPage(bool value) { - _hasPreviousPage = value; - } - - set hasNextPage(bool value) { - _hasNextPage = value; - } - - set total(String value) { - _total = value; - } - - set list(List value) { - _list = value; - } -} - -/// mid : "1406879717390286848" -/// nickname : "flutter无敌" -/// avatar : "https://pos.upload.gznl.top/admin/2021/10/fb4dadec-a836-49bd-a4c9-c35fc9fd5008.jpeg" - -class ListData { - ListData({ - String mid, - bool isFollow, - String nickname, - String avatar,}){ - _mid = mid; - _nickname = nickname; - _isFollow = isFollow; - _avatar = avatar; -} - - ListData.fromJson(dynamic json) { - _mid = json['mid']; - _nickname = json['nickname']; - _isFollow = json['isFollow']; - _avatar = json['avatar']; - } - String _mid; - String _nickname; - String _avatar; - bool _isFollow; - - String get mid => _mid; - String get nickname => _nickname; - bool get isFollow => _isFollow; - String get avatar => _avatar; - - - set mid(String value) { - _mid = value; - } - - set isFollow(bool value) { - _isFollow = value; - } - - Map toJson() { - final map = {}; - map['mid'] = _mid; - map['nickname'] = _nickname; - map['isFollow'] = _isFollow; - map['avatar'] = _avatar; - return map; - } - - set nickname(String value) { - _nickname = value; - } - - set avatar(String value) { - _avatar = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/founder.dart b/lib/retrofit/data/founder.dart deleted file mode 100644 index 5b04113b..00000000 --- a/lib/retrofit/data/founder.dart +++ /dev/null @@ -1,51 +0,0 @@ -/// name : "李旭清" -/// position : "集团创始人" -/// description : "1993年,台湾同胞李旭清在台湾创建“海峡姐妹”" -/// imgUrl : "https://pos.upload.gznl.top/MDAwMA==/2021/07/3f169d8c-5cb8-4789-a8f6-f2ce17277106.webp" -/// profile : "

" - -class Founder { - String _name; - String _position; - String _description; - String _imgUrl; - String _profile; - - String get name => _name; - String get position => _position; - String get description => _description; - String get imgUrl => _imgUrl; - String get profile => _profile; - - Founder({ - String name, - String position, - String description, - String imgUrl, - String profile}){ - _name = name; - _position = position; - _description = description; - _imgUrl = imgUrl; - _profile = profile; -} - - Founder.fromJson(dynamic json) { - _name = json["name"]; - _position = json["position"]; - _description = json["description"]; - _imgUrl = json["imgUrl"]; - _profile = json["profile"]; - } - - Map toJson() { - var map = {}; - map["name"] = _name; - map["position"] = _position; - map["description"] = _description; - map["imgUrl"] = _imgUrl; - map["profile"] = _profile; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/goods.dart b/lib/retrofit/data/goods.dart deleted file mode 100644 index 0b5cfaba..00000000 --- a/lib/retrofit/data/goods.dart +++ /dev/null @@ -1,215 +0,0 @@ -/// id : "1420627244354633728" -/// createTime : "2021-07-29 14:08:24" -/// createUser : "1" -/// updateTime : "2021-11-10 13:59:42" -/// updateUser : "1" -/// categoryId : "2" -/// storeId : "0" -/// name : "回乡" -/// description : "免费拿,一人发一个!" -/// detail : "

(1) 兑换商品中所要求的积分达到方可兑换

\n

(2)先到先得

" -/// worth : "9999.00" -/// price : "1" -/// money : "2.00" -/// onePrice : "0" -/// oneMoney : "0.00" -/// stock : 28 -/// sales : 22 -/// isHot : true -/// sortOrder : 6 -/// state : 1 -/// canPick : true -/// canDelivery : true -/// isDelete : 0 -/// categoryName : null -/// mainImgPath : "https://pos.upload.gznl.top/0000/2021/07/bd3a1387-02a0-4ad9-9505-f4c43b26aa3b.webp" -/// viceImgPaths : ["https://pos.upload.gznl.top/0000/2021/07/bd3a1387-02a0-4ad9-9505-f4c43b26aa3b.webp","https://pos.upload.gznl.top/0000/2021/07/bd3a1387-02a0-4ad9-9505-f4c43b26aa3b.webp"] - -class Goods { - Goods({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String categoryId, - String storeId, - String name, - String description, - String detail, - String worth, - String price, - String money, - String onePrice, - String oneMoney, - String oneBean, - String orderId, - int stock, - int sales, - bool isHot, - int sortOrder, - int state, - bool canPick, - bool canDelivery, - int buyTimes, - int isDelete, - dynamic categoryName, - String mainImgPath, - List viceImgPaths,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _categoryId = categoryId; - _storeId = storeId; - _name = name; - _description = description; - _detail = detail; - _worth = worth; - _price = price; - _money = money; - _onePrice = onePrice; - _oneMoney = oneMoney; - _oneBean = oneBean; - _orderId = orderId; - _stock = stock; - _sales = sales; - _isHot = isHot; - _sortOrder = sortOrder; - _state = state; - _canPick = canPick; - _canDelivery = canDelivery; - _isDelete = isDelete; - _buyTimes = buyTimes; - _categoryName = categoryName; - _mainImgPath = mainImgPath; - _viceImgPaths = viceImgPaths; - } - - Goods.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _categoryId = json['categoryId']; - _storeId = json['storeId']; - _name = json['name']; - _description = json['description']; - _detail = json['detail']; - _worth = json['worth']; - _price = json['price']; - _money = json['money']; - _onePrice = json['onePrice']; - _oneMoney = json['oneMoney']; - _oneBean = json['oneBean']; - _orderId = json['orderId']; - _stock = json['stock']; - _sales = json['sales']; - _isHot = json['isHot']; - _sortOrder = json['sortOrder']; - _state = json['state']; - _canPick = json['canPick']; - _canDelivery = json['canDelivery']; - _isDelete = json['isDelete']; - _buyTimes =json['buyTimes']; - _categoryName = json['categoryName']; - _mainImgPath = json['mainImgPath']; - _viceImgPaths = json['viceImgPaths'] != null ? json['viceImgPaths'].cast() : []; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _categoryId; - String _storeId; - String _name; - String _description; - String _detail; - String _worth; - String _price; - String _money; - String _onePrice; - String _oneMoney; - String _oneBean; - String _orderId; - int _stock; - int _sales; - bool _isHot; - int _sortOrder; - int _state; - bool _canPick; - bool _canDelivery; - int _isDelete; - int _buyTimes; - dynamic _categoryName; - String _mainImgPath; - List _viceImgPaths; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get categoryId => _categoryId; - String get storeId => _storeId; - String get name => _name; - String get description => _description; - String get detail => _detail; - String get worth => _worth; - String get price => _price; - String get money => _money; - String get onePrice => _onePrice; - String get oneMoney => _oneMoney; - String get oneBean => _oneBean; - String get orderId => _orderId; - int get stock => _stock; - int get sales => _sales; - bool get isHot => _isHot; - int get sortOrder => _sortOrder; - int get state => _state; - bool get canPick => _canPick; - bool get canDelivery => _canDelivery; - int get isDelete => _isDelete; - int get buyTimes => _buyTimes; - dynamic get categoryName => _categoryName; - String get mainImgPath => _mainImgPath; - List get viceImgPaths => _viceImgPaths; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['categoryId'] = _categoryId; - map['storeId'] = _storeId; - map['name'] = _name; - map['description'] = _description; - map['detail'] = _detail; - map['worth'] = _worth; - map['price'] = _price; - map['money'] = _money; - map['onePrice'] = _onePrice; - map['oneMoney'] = _oneMoney; - map['oneBean'] = _oneBean; - map['orderId'] = _orderId; - map['stock'] = _stock; - map['sales'] = _sales; - map['isHot'] = _isHot; - map['sortOrder'] = _sortOrder; - map['state'] = _state; - map['canPick'] = _canPick; - map['canDelivery'] = _canDelivery; - map['isDelete'] = _isDelete; - map['buyTimes'] = _buyTimes; - map['categoryName'] = _categoryName; - map['mainImgPath'] = _mainImgPath; - map['viceImgPaths'] = _viceImgPaths; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/goods_category.dart b/lib/retrofit/data/goods_category.dart deleted file mode 100644 index 019b79b3..00000000 --- a/lib/retrofit/data/goods_category.dart +++ /dev/null @@ -1,86 +0,0 @@ -/// id : "1412705737469067264" -/// createTime : "2021-07-07 17:31:09" -/// createUser : "1" -/// updateTime : "2021-07-20 16:50:28" -/// updateUser : "1" -/// parentId : "0" -/// name : "饮食" -/// miniShow : 1 -/// sortOrder : 1 -/// isDelete : 0 - -class GoodsCategory { - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _parentId; - String _name; - int _miniShow; - int _sortOrder; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get parentId => _parentId; - String get name => _name; - int get miniShow => _miniShow; - int get sortOrder => _sortOrder; - int get isDelete => _isDelete; - - GoodsCategory({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String parentId, - String name, - int miniShow, - int sortOrder, - int isDelete}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _parentId = parentId; - _name = name; - _miniShow = miniShow; - _sortOrder = sortOrder; - _isDelete = isDelete; -} - - GoodsCategory.fromJson(dynamic json) { - _id = json["id"]; - _createTime = json["createTime"]; - _createUser = json["createUser"]; - _updateTime = json["updateTime"]; - _updateUser = json["updateUser"]; - _parentId = json["parentId"]; - _name = json["name"]; - _miniShow = json["miniShow"]; - _sortOrder = json["sortOrder"]; - _isDelete = json["isDelete"]; - } - - Map toJson() { - var map = {}; - map["id"] = _id; - map["createTime"] = _createTime; - map["createUser"] = _createUser; - map["updateTime"] = _updateTime; - map["updateUser"] = _updateUser; - map["parentId"] = _parentId; - map["name"] = _name; - map["miniShow"] = _miniShow; - map["sortOrder"] = _sortOrder; - map["isDelete"] = _isDelete; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/goods_category_list.dart b/lib/retrofit/data/goods_category_list.dart deleted file mode 100644 index 93320b74..00000000 --- a/lib/retrofit/data/goods_category_list.dart +++ /dev/null @@ -1,123 +0,0 @@ -/// id : "1300687829071822848" -/// categoryName : "火锅餐饮" -/// categoryPath : "" -/// categoryImg : null -/// depth : 1 -/// parentName : null -/// parentId : null -/// sortOrder : 1 -/// status : 1 -/// isDelete : 0 -/// childs : null -/// posType : null - -class GoodsCategoryList { - GoodsCategoryList({ - String id, - String categoryName, - String categoryPath, - dynamic categoryImg, - num depth, - dynamic parentName, - dynamic parentId, - num sortOrder, - num status, - num isDelete, - dynamic childs, - dynamic posType,}){ - _id = id; - _categoryName = categoryName; - _categoryPath = categoryPath; - _categoryImg = categoryImg; - _depth = depth; - _parentName = parentName; - _parentId = parentId; - _sortOrder = sortOrder; - _status = status; - _isDelete = isDelete; - _childs = childs; - _posType = posType; -} - - GoodsCategoryList.fromJson(dynamic json) { - _id = json['id']; - _categoryName = json['categoryName']; - _categoryPath = json['categoryPath']; - _categoryImg = json['categoryImg']; - _depth = json['depth']; - _parentName = json['parentName']; - _parentId = json['parentId']; - _sortOrder = json['sortOrder']; - _status = json['status']; - _isDelete = json['isDelete']; - _childs = json['childs']; - _posType = json['posType']; - } - String _id; - String _categoryName; - String _categoryPath; - dynamic _categoryImg; - num _depth; - dynamic _parentName; - dynamic _parentId; - num _sortOrder; - num _status; - num _isDelete; - dynamic _childs; - dynamic _posType; -GoodsCategoryList copyWith({ String id, - String categoryName, - String categoryPath, - dynamic categoryImg, - num depth, - dynamic parentName, - dynamic parentId, - num sortOrder, - num status, - num isDelete, - dynamic childs, - dynamic posType, -}) => GoodsCategoryList( id: id ?? _id, - categoryName: categoryName ?? _categoryName, - categoryPath: categoryPath ?? _categoryPath, - categoryImg: categoryImg ?? _categoryImg, - depth: depth ?? _depth, - parentName: parentName ?? _parentName, - parentId: parentId ?? _parentId, - sortOrder: sortOrder ?? _sortOrder, - status: status ?? _status, - isDelete: isDelete ?? _isDelete, - childs: childs ?? _childs, - posType: posType ?? _posType, -); - String get id => _id; - String get categoryName => _categoryName; - String get categoryPath => _categoryPath; - dynamic get categoryImg => _categoryImg; - num get depth => _depth; - dynamic get parentName => _parentName; - dynamic get parentId => _parentId; - num get sortOrder => _sortOrder; - num get status => _status; - num get isDelete => _isDelete; - dynamic get childs => _childs; - dynamic get posType => _posType; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['categoryName'] = _categoryName; - map['categoryPath'] = _categoryPath; - map['categoryImg'] = _categoryImg; - map['depth'] = _depth; - map['parentName'] = _parentName; - map['parentId'] = _parentId; - map['sortOrder'] = _sortOrder; - map['status'] = _status; - map['isDelete'] = _isDelete; - map['childs'] = _childs; - map['posType'] = _posType; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/goods_type_sales_list.dart b/lib/retrofit/data/goods_type_sales_list.dart deleted file mode 100644 index ef6db0db..00000000 --- a/lib/retrofit/data/goods_type_sales_list.dart +++ /dev/null @@ -1,51 +0,0 @@ -/// name : "筒仔米糕" -/// value : "10.00" -/// sale : "1" -/// percentage : "0.0059" - -class GoodsTypeSalesList { - GoodsTypeSalesList({ - String name, - String value, - String sale, - String percentage,}){ - _name = name; - _value = value; - _sale = sale; - _percentage = percentage; -} - - GoodsTypeSalesList.fromJson(dynamic json) { - _name = json['name']; - _value = json['value']; - _sale = json['sale']; - _percentage = json['percentage']; - } - String _name; - String _value; - String _sale; - String _percentage; -GoodsTypeSalesList copyWith({ String name, - String value, - String sale, - String percentage, -}) => GoodsTypeSalesList( name: name ?? _name, - value: value ?? _value, - sale: sale ?? _sale, - percentage: percentage ?? _percentage, -); - String get name => _name; - String get value => _value; - String get sale => _sale; - String get percentage => _percentage; - - Map toJson() { - final map = {}; - map['name'] = _name; - map['value'] = _value; - map['sale'] = _sale; - map['percentage'] = _percentage; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/headlines_list.dart b/lib/retrofit/data/headlines_list.dart deleted file mode 100644 index c99df15e..00000000 --- a/lib/retrofit/data/headlines_list.dart +++ /dev/null @@ -1,99 +0,0 @@ -/// id : "1463790611994771456" -/// createTime : "2021-11-25 16:44:12" -/// createUser : "1" -/// updateTime : "2021-11-25 16:45:55" -/// updateUser : "1" -/// name : "海峡姐妹" -/// introduce : "22" -/// coverImg : "https://pos.upload.gznl.top/0000/2021/11/899b578b-f594-42f7-91e1-cebc5dbc39da.webp" -/// bannerImg : "https://pos.upload.gznl.top/0000/2021/11/7a41ebe2-d3b1-44ea-9cda-2e952b58d54c.webp" -/// sort : 0 -/// isDelete : 0 -/// tenantCode : "admin" - -class HeadlinesList { - HeadlinesList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - String introduce, - String coverImg, - String bannerImg, - int sort, - int isDelete, - String tenantCode,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _name = name; - _introduce = introduce; - _coverImg = coverImg; - _bannerImg = bannerImg; - _sort = sort; - _isDelete = isDelete; - _tenantCode = tenantCode; -} - - HeadlinesList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _name = json['name']; - _introduce = json['introduce']; - _coverImg = json['coverImg']; - _bannerImg = json['bannerImg']; - _sort = json['sort']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _name; - String _introduce; - String _coverImg; - String _bannerImg; - int _sort; - int _isDelete; - String _tenantCode; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get name => _name; - String get introduce => _introduce; - String get coverImg => _coverImg; - String get bannerImg => _bannerImg; - int get sort => _sort; - int get isDelete => _isDelete; - String get tenantCode => _tenantCode; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['name'] = _name; - map['introduce'] = _introduce; - map['coverImg'] = _coverImg; - map['bannerImg'] = _bannerImg; - map['sort'] = _sort; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/headlines_list_details.dart b/lib/retrofit/data/headlines_list_details.dart deleted file mode 100644 index ac802bd5..00000000 --- a/lib/retrofit/data/headlines_list_details.dart +++ /dev/null @@ -1,99 +0,0 @@ -/// id : "1463790611994771456" -/// createTime : "2021-11-25 16:44:12" -/// createUser : "1" -/// updateTime : "2021-11-25 16:45:55" -/// updateUser : "1" -/// name : "海峡姐妹" -/// introduce : "22" -/// coverImg : "https://pos.upload.gznl.top/0000/2021/11/899b578b-f594-42f7-91e1-cebc5dbc39da.webp" -/// bannerImg : "https://pos.upload.gznl.top/0000/2021/11/7a41ebe2-d3b1-44ea-9cda-2e952b58d54c.webp" -/// sort : 0 -/// isDelete : 0 -/// tenantCode : "admin" - -class HeadlinesListDetails { - HeadlinesListDetails({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - String introduce, - String coverImg, - String bannerImg, - int sort, - int isDelete, - String tenantCode,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _name = name; - _introduce = introduce; - _coverImg = coverImg; - _bannerImg = bannerImg; - _sort = sort; - _isDelete = isDelete; - _tenantCode = tenantCode; -} - - HeadlinesListDetails.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _name = json['name']; - _introduce = json['introduce']; - _coverImg = json['coverImg']; - _bannerImg = json['bannerImg']; - _sort = json['sort']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _name; - String _introduce; - String _coverImg; - String _bannerImg; - int _sort; - int _isDelete; - String _tenantCode; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get name => _name; - String get introduce => _introduce; - String get coverImg => _coverImg; - String get bannerImg => _bannerImg; - int get sort => _sort; - int get isDelete => _isDelete; - String get tenantCode => _tenantCode; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['name'] = _name; - map['introduce'] = _introduce; - map['coverImg'] = _coverImg; - map['bannerImg'] = _bannerImg; - map['sort'] = _sort; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/home_rank.dart b/lib/retrofit/data/home_rank.dart deleted file mode 100644 index 49f2a3c5..00000000 --- a/lib/retrofit/data/home_rank.dart +++ /dev/null @@ -1,1080 +0,0 @@ -/// CommodityList : [{"goodList":[{"productImg":"https://pos.upload.gznl.top/1175/2022/04/fc9dfd1f-c5b9-4a23-95f7-9ddcadb33410.jpg","productSkuVOList":[{"ticketStyle":"","productId":"1519870512681975808","isDelete":0,"ticketDays":"0","setMeal":"","updateUser":"1333246101196636160","skuPrice":"0.01","skuStock":10,"weight":0,"updateTime":"2022-04-29 10:45:43","ticketType":"","sort":50,"storeId":"1511585212109160448","version":0,"deliveries":0,"volume":0,"autoRenewSkuStock":0,"skuNameStr":"","createTime":"2022-04-29 10:45:43","createUser":"1333246101196636160","id":"1519870513038491648","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1519870512921051136","isDelete":0,"updateUser":"1333246101196636160","updateTime":"2022-04-29 10:45:43","attrId":"1519870512837165056","createTime":"2022-04-29 10:45:43","createUser":"1333246101196636160","id":"1519870513097211904","skuId":"1519870513038491648"}],"skuCode":"P202204291045422"}],"thumbnailImg":"","productName":"原味奶茶","posShow":true,"price":"0.01","sellCount":5,"details":"","id":"1519870512681975808","applyPrice":"0.00","stock":10,"status":1,"info":""}],"typeName":"好吃榜"}] -/// CommodityZone : [{"productImg":"https://pos.upload.gznl.top/1174/2021/12/7eeee579-f536-4481-8953-12e423f7edee.jpg","productSkuVOList":[{"ticketStyle":"","productId":"1472767814229032960","isDelete":0,"ticketDays":"0","setMeal":"","updateUser":"1328618782859460608","skuPrice":"13.00","skuStock":864,"weight":0,"updateTime":"2021-12-20 11:16:24","ticketType":"","sort":50,"storeId":"1328618782985289728","version":0,"deliveries":0,"volume":0,"autoRenewSkuStock":0,"skuNameStr":"","createTime":"2021-12-20 11:16:24","createUser":"1328618782859460608","id":"1472767814275170304","applyPrice":"13.00","skuAttrList":[{"attrValueId":"1472767814262587392","isDelete":0,"updateUser":"1328618782859460608","updateTime":"2021-12-20 11:16:24","attrId":"1472767814254198784","createTime":"2021-12-20 11:16:24","createUser":"1328618782859460608","id":"1472767814287753216","skuId":"1472767814275170304"}],"skuCode":"P202112201116242"}],"thumbnailImg":"","productName":"红薯魔方吐司","posShow":true,"price":"13.00","sellCount":135,"details":"","id":"1472767814229032960","applyPrice":"13.00","stock":865,"status":1,"info":""}] -/// CommodityListImg : "https://pos.upload.gznl.top/0000/2022/06/86331f31-cae1-4096-8773-561524d71c18.png" - -class HomeRank { - HomeRank({ - List commodityList, - List commodityZone, - String commodityListImg,}){ - _commodityList = commodityList; - _commodityZone = commodityZone; - _commodityListImg = commodityListImg; -} - - HomeRank.fromJson(dynamic json) { - if (json['CommodityList'] != null) { - _commodityList = []; - json['CommodityList'].forEach((v) { - _commodityList.add(CommodityList.fromJson(v)); - }); - } - if (json['CommodityZone'] != null) { - _commodityZone = []; - json['CommodityZone'].forEach((v) { - _commodityZone.add(CommodityZone.fromJson(v)); - }); - } - _commodityListImg = json['CommodityListImg']; - } - List _commodityList; - List _commodityZone; - String _commodityListImg; -HomeRank copyWith({ List commodityList, - List commodityZone, - String commodityListImg, -}) => HomeRank( commodityList: commodityList ?? _commodityList, - commodityZone: commodityZone ?? _commodityZone, - commodityListImg: commodityListImg ?? _commodityListImg, -); - List get commodityList => _commodityList; - List get commodityZone => _commodityZone; - String get commodityListImg => _commodityListImg; - - Map toJson() { - final map = {}; - if (_commodityList != null) { - map['CommodityList'] = _commodityList.map((v) => v.toJson()).toList(); - } - if (_commodityZone != null) { - map['CommodityZone'] = _commodityZone.map((v) => v.toJson()).toList(); - } - map['CommodityListImg'] = _commodityListImg; - return map; - } - -} - -/// productImg : "https://pos.upload.gznl.top/1174/2021/12/7eeee579-f536-4481-8953-12e423f7edee.jpg" -/// productSkuVOList : [{"ticketStyle":"","productId":"1472767814229032960","isDelete":0,"ticketDays":"0","setMeal":"","updateUser":"1328618782859460608","skuPrice":"13.00","skuStock":864,"weight":0,"updateTime":"2021-12-20 11:16:24","ticketType":"","sort":50,"storeId":"1328618782985289728","version":0,"deliveries":0,"volume":0,"autoRenewSkuStock":0,"skuNameStr":"","createTime":"2021-12-20 11:16:24","createUser":"1328618782859460608","id":"1472767814275170304","applyPrice":"13.00","skuAttrList":[{"attrValueId":"1472767814262587392","isDelete":0,"updateUser":"1328618782859460608","updateTime":"2021-12-20 11:16:24","attrId":"1472767814254198784","createTime":"2021-12-20 11:16:24","createUser":"1328618782859460608","id":"1472767814287753216","skuId":"1472767814275170304"}],"skuCode":"P202112201116242"}] -/// thumbnailImg : "" -/// productName : "红薯魔方吐司" -/// posShow : true -/// price : "13.00" -/// sellCount : 135 -/// details : "" -/// id : "1472767814229032960" -/// applyPrice : "13.00" -/// stock : 865 -/// status : 1 -/// info : "" - -class CommodityZone { - CommodityZone({ - String productImg, - List productSkuVOList, - String thumbnailImg, - String tenantCode, - String storeId, - String productName, - bool posShow, - String price, - int sellCount, - String details, - String id, - String applyPrice, - int stock, - int status, - String info,}){ - _productImg = productImg; - _productSkuVOList = productSkuVOList; - _thumbnailImg = thumbnailImg; - _tenantCode = tenantCode; - _storeId = storeId; - _productName = productName; - _posShow = posShow; - _price = price; - _sellCount = sellCount; - _details = details; - _id = id; - _applyPrice = applyPrice; - _stock = stock; - _status = status; - _info = info; -} - - CommodityZone.fromJson(dynamic json) { - _productImg = json['productImg']; - if (json['productSkuVOList'] != null) { - _productSkuVOList = []; - json['productSkuVOList'].forEach((v) { - _productSkuVOList.add(ProductSkuVoList.fromJson(v)); - }); - } - _thumbnailImg = json['thumbnailImg']; - _tenantCode = json['tenantCode']; - _storeId = json['storeId']; - _productName = json['productName']; - _posShow = json['posShow']; - _price = json['price']; - _sellCount = json['sellCount']; - _details = json['details']; - _id = json['id']; - _applyPrice = json['applyPrice']; - _stock = json['stock']; - _status = json['status']; - _info = json['info']; - } - String _productImg; - List _productSkuVOList; - String _thumbnailImg; - String _tenantCode; - String _storeId; - String _productName; - bool _posShow; - String _price; - int _sellCount; - String _details; - String _id; - String _applyPrice; - int _stock; - int _status; - String _info; -CommodityZone copyWith({ String productImg, - List productSkuVOList, - String thumbnailImg, - String tenantCode, - String storeId, - String productName, - bool posShow, - String price, - int sellCount, - String details, - String id, - String applyPrice, - int stock, - int status, - String info, -}) => CommodityZone( productImg: productImg ?? _productImg, - productSkuVOList: productSkuVOList ?? _productSkuVOList, - thumbnailImg: thumbnailImg ?? _thumbnailImg, - tenantCode: tenantCode ?? _tenantCode, - storeId: storeId ?? _storeId, - productName: productName ?? _productName, - posShow: posShow ?? _posShow, - price: price ?? _price, - sellCount: sellCount ?? _sellCount, - details: details ?? _details, - id: id ?? _id, - applyPrice: applyPrice ?? _applyPrice, - stock: stock ?? _stock, - status: status ?? _status, - info: info ?? _info, -); - String get productImg => _productImg; - List get productSkuVOList => _productSkuVOList; - String get thumbnailImg => _thumbnailImg; - String get tenantCode => _tenantCode; - String get storeId => _storeId; - String get productName => _productName; - bool get posShow => _posShow; - String get price => _price; - int get sellCount => _sellCount; - String get details => _details; - String get id => _id; - String get applyPrice => _applyPrice; - int get stock => _stock; - int get status => _status; - String get info => _info; - - Map toJson() { - final map = {}; - map['productImg'] = _productImg; - if (_productSkuVOList != null) { - map['productSkuVOList'] = _productSkuVOList.map((v) => v.toJson()).toList(); - } - map['thumbnailImg'] = _thumbnailImg; - map['tenantCode'] = _tenantCode; - map['storeId'] = _storeId; - map['productName'] = _productName; - map['posShow'] = _posShow; - map['price'] = _price; - map['sellCount'] = _sellCount; - map['details'] = _details; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - map['stock'] = _stock; - map['status'] = _status; - map['info'] = _info; - return map; - } - -} - -/// ticketStyle : "" -/// productId : "1472767814229032960" -/// isDelete : 0 -/// ticketDays : "0" -/// setMeal : "" -/// updateUser : "1328618782859460608" -/// skuPrice : "13.00" -/// skuStock : 864 -/// weight : 0 -/// updateTime : "2021-12-20 11:16:24" -/// ticketType : "" -/// sort : 50 -/// storeId : "1328618782985289728" -/// version : 0 -/// deliveries : 0 -/// volume : 0 -/// autoRenewSkuStock : 0 -/// skuNameStr : "" -/// createTime : "2021-12-20 11:16:24" -/// createUser : "1328618782859460608" -/// id : "1472767814275170304" -/// applyPrice : "13.00" -/// skuAttrList : [{"attrValueId":"1472767814262587392","isDelete":0,"updateUser":"1328618782859460608","updateTime":"2021-12-20 11:16:24","attrId":"1472767814254198784","createTime":"2021-12-20 11:16:24","createUser":"1328618782859460608","id":"1472767814287753216","skuId":"1472767814275170304"}] -/// skuCode : "P202112201116242" - -class ProductSkuVoList { - ProductSkuVoList({ - String ticketStyle, - String productId, - int isDelete, - String ticketDays, - String setMeal, - String updateUser, - String skuPrice, - int skuStock, - int weight, - String updateTime, - String ticketType, - int sort, - int version, - int deliveries, - int volume, - int autoRenewSkuStock, - String skuNameStr, - String createTime, - String createUser, - String id, - String applyPrice, - List skuAttrList, - String skuCode,}){ - _ticketStyle = ticketStyle; - _productId = productId; - _isDelete = isDelete; - _ticketDays = ticketDays; - _setMeal = setMeal; - _updateUser = updateUser; - _skuPrice = skuPrice; - _skuStock = skuStock; - _weight = weight; - _updateTime = updateTime; - _ticketType = ticketType; - _sort = sort; - // _storeIds = storeIds; - _version = version; - _deliveries = deliveries; - _volume = volume; - _autoRenewSkuStock = autoRenewSkuStock; - _skuNameStr = skuNameStr; - _createTime = createTime; - _createUser = createUser; - _id = id; - _applyPrice = applyPrice; - _skuAttrList = skuAttrList; - _skuCode = skuCode; -} - - ProductSkuVoList.fromJson(dynamic json) { - _ticketStyle = json['ticketStyle']; - _productId = json['productId']; - _isDelete = json['isDelete']; - _ticketDays = json['ticketDays']; - _setMeal = json['setMeal']; - _updateUser = json['updateUser']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - _weight = json['weight']; - _updateTime = json['updateTime']; - _ticketType = json['ticketType']; - _sort = json['sort']; - // _storeIds = json['storeIds']; - _version = json['version']; - _deliveries = json['deliveries']; - _volume = json['volume']; - _autoRenewSkuStock = json['autoRenewSkuStock']; - _skuNameStr = json['skuNameStr']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _applyPrice = json['applyPrice']; - if (json['skuAttrList'] != null) { - _skuAttrList = []; - json['skuAttrList'].forEach((v) { - _skuAttrList.add(SkuAttrList.fromJson(v)); - }); - } - _skuCode = json['skuCode']; - } - String _ticketStyle; - String _productId; - int _isDelete; - String _ticketDays; - String _setMeal; - String _updateUser; - String _skuPrice; - int _skuStock; - int _weight; - String _updateTime; - String _ticketType; - int _sort; - // String _storeIds; - int _version; - int _deliveries; - int _volume; - int _autoRenewSkuStock; - String _skuNameStr; - String _createTime; - String _createUser; - String _id; - String _applyPrice; - List _skuAttrList; - String _skuCode; -ProductSkuVoList copyWith({ String ticketStyle, - String productId, - int isDelete, - String ticketDays, - String setMeal, - String updateUser, - String skuPrice, - int skuStock, - int weight, - String updateTime, - String ticketType, - int sort, - // String storeIds, - int version, - int deliveries, - int volume, - int autoRenewSkuStock, - String skuNameStr, - String createTime, - String createUser, - String id, - String applyPrice, - List skuAttrList, - String skuCode, -}) => ProductSkuVoList( ticketStyle: ticketStyle ?? _ticketStyle, - productId: productId ?? _productId, - isDelete: isDelete ?? _isDelete, - ticketDays: ticketDays ?? _ticketDays, - setMeal: setMeal ?? _setMeal, - updateUser: updateUser ?? _updateUser, - skuPrice: skuPrice ?? _skuPrice, - skuStock: skuStock ?? _skuStock, - weight: weight ?? _weight, - updateTime: updateTime ?? _updateTime, - ticketType: ticketType ?? _ticketType, - sort: sort ?? _sort, - // storeId: storeId ?? _storeIds, - version: version ?? _version, - deliveries: deliveries ?? _deliveries, - volume: volume ?? _volume, - autoRenewSkuStock: autoRenewSkuStock ?? _autoRenewSkuStock, - skuNameStr: skuNameStr ?? _skuNameStr, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - id: id ?? _id, - applyPrice: applyPrice ?? _applyPrice, - skuAttrList: skuAttrList ?? _skuAttrList, - skuCode: skuCode ?? _skuCode, -); - String get ticketStyle => _ticketStyle; - String get productId => _productId; - int get isDelete => _isDelete; - String get ticketDays => _ticketDays; - String get setMeal => _setMeal; - String get updateUser => _updateUser; - String get skuPrice => _skuPrice; - int get skuStock => _skuStock; - int get weight => _weight; - String get updateTime => _updateTime; - String get ticketType => _ticketType; - int get sort => _sort; - // String get storeIds => _storeIds; - int get version => _version; - int get deliveries => _deliveries; - int get volume => _volume; - int get autoRenewSkuStock => _autoRenewSkuStock; - String get skuNameStr => _skuNameStr; - String get createTime => _createTime; - String get createUser => _createUser; - String get id => _id; - String get applyPrice => _applyPrice; - List get skuAttrList => _skuAttrList; - String get skuCode => _skuCode; - - Map toJson() { - final map = {}; - map['ticketStyle'] = _ticketStyle; - map['productId'] = _productId; - map['isDelete'] = _isDelete; - map['ticketDays'] = _ticketDays; - map['setMeal'] = _setMeal; - map['updateUser'] = _updateUser; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - map['weight'] = _weight; - map['updateTime'] = _updateTime; - map['ticketType'] = _ticketType; - map['sort'] = _sort; - // map['storeIds'] = _storeIds; - map['version'] = _version; - map['deliveries'] = _deliveries; - map['volume'] = _volume; - map['autoRenewSkuStock'] = _autoRenewSkuStock; - map['skuNameStr'] = _skuNameStr; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - if (_skuAttrList != null) { - map['skuAttrList'] = _skuAttrList.map((v) => v.toJson()).toList(); - } - map['skuCode'] = _skuCode; - return map; - } - -} - -/// attrValueId : "1472767814262587392" -/// isDelete : 0 -/// updateUser : "1328618782859460608" -/// updateTime : "2021-12-20 11:16:24" -/// attrId : "1472767814254198784" -/// createTime : "2021-12-20 11:16:24" -/// createUser : "1328618782859460608" -/// id : "1472767814287753216" -/// skuId : "1472767814275170304" - -class SkuAttrList { - SkuAttrList({ - String attrValueId, - int isDelete, - String updateUser, - String updateTime, - String attrId, - String createTime, - String createUser, - String id, - String skuId,}){ - _attrValueId = attrValueId; - _isDelete = isDelete; - _updateUser = updateUser; - _updateTime = updateTime; - _attrId = attrId; - _createTime = createTime; - _createUser = createUser; - _id = id; - _skuId = skuId; -} - - SkuAttrList.fromJson(dynamic json) { - _attrValueId = json['attrValueId']; - _isDelete = json['isDelete']; - _updateUser = json['updateUser']; - _updateTime = json['updateTime']; - _attrId = json['attrId']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _skuId = json['skuId']; - } - String _attrValueId; - int _isDelete; - String _updateUser; - String _updateTime; - String _attrId; - String _createTime; - String _createUser; - String _id; - String _skuId; -SkuAttrList copyWith({ String attrValueId, - int isDelete, - String updateUser, - String updateTime, - String attrId, - String createTime, - String createUser, - String id, - String skuId, -}) => SkuAttrList( attrValueId: attrValueId ?? _attrValueId, - isDelete: isDelete ?? _isDelete, - updateUser: updateUser ?? _updateUser, - updateTime: updateTime ?? _updateTime, - attrId: attrId ?? _attrId, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - id: id ?? _id, - skuId: skuId ?? _skuId, -); - String get attrValueId => _attrValueId; - int get isDelete => _isDelete; - String get updateUser => _updateUser; - String get updateTime => _updateTime; - String get attrId => _attrId; - String get createTime => _createTime; - String get createUser => _createUser; - String get id => _id; - String get skuId => _skuId; - - Map toJson() { - final map = {}; - map['attrValueId'] = _attrValueId; - map['isDelete'] = _isDelete; - map['updateUser'] = _updateUser; - map['updateTime'] = _updateTime; - map['attrId'] = _attrId; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['skuId'] = _skuId; - return map; - } - -} - -/// goodList : [{"productImg":"https://pos.upload.gznl.top/1175/2022/04/fc9dfd1f-c5b9-4a23-95f7-9ddcadb33410.jpg","productSkuVOList":[{"ticketStyle":"","productId":"1519870512681975808","isDelete":0,"ticketDays":"0","setMeal":"","updateUser":"1333246101196636160","skuPrice":"0.01","skuStock":10,"weight":0,"updateTime":"2022-04-29 10:45:43","ticketType":"","sort":50,"storeId":"1511585212109160448","version":0,"deliveries":0,"volume":0,"autoRenewSkuStock":0,"skuNameStr":"","createTime":"2022-04-29 10:45:43","createUser":"1333246101196636160","id":"1519870513038491648","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1519870512921051136","isDelete":0,"updateUser":"1333246101196636160","updateTime":"2022-04-29 10:45:43","attrId":"1519870512837165056","createTime":"2022-04-29 10:45:43","createUser":"1333246101196636160","id":"1519870513097211904","skuId":"1519870513038491648"}],"skuCode":"P202204291045422"}],"thumbnailImg":"","productName":"原味奶茶","posShow":true,"price":"0.01","sellCount":5,"details":"","id":"1519870512681975808","applyPrice":"0.00","stock":10,"status":1,"info":""}] -/// typeName : "好吃榜" - -class CommodityList { - CommodityList({ - List goodList, - String typeName,}){ - _goodList = goodList; - _typeName = typeName; -} - - CommodityList.fromJson(dynamic json) { - if (json['goodList'] != null) { - _goodList = []; - json['goodList'].forEach((v) { - _goodList.add(GoodList.fromJson(v)); - }); - } - _typeName = json['typeName']; - } - List _goodList; - String _typeName; -CommodityList copyWith({ List goodList, - String typeName, -}) => CommodityList( goodList: goodList ?? _goodList, - typeName: typeName ?? _typeName, -); - List get goodList => _goodList; - String get typeName => _typeName; - - Map toJson() { - final map = {}; - if (_goodList != null) { - map['goodList'] = _goodList.map((v) => v.toJson()).toList(); - } - map['typeName'] = _typeName; - return map; - } - -} - -/// productImg : "https://pos.upload.gznl.top/1175/2022/04/fc9dfd1f-c5b9-4a23-95f7-9ddcadb33410.jpg" -/// productSkuVOList : [{"ticketStyle":"","productId":"1519870512681975808","isDelete":0,"ticketDays":"0","setMeal":"","updateUser":"1333246101196636160","skuPrice":"0.01","skuStock":10,"weight":0,"updateTime":"2022-04-29 10:45:43","ticketType":"","sort":50,"storeId":"1511585212109160448","version":0,"deliveries":0,"volume":0,"autoRenewSkuStock":0,"skuNameStr":"","createTime":"2022-04-29 10:45:43","createUser":"1333246101196636160","id":"1519870513038491648","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1519870512921051136","isDelete":0,"updateUser":"1333246101196636160","updateTime":"2022-04-29 10:45:43","attrId":"1519870512837165056","createTime":"2022-04-29 10:45:43","createUser":"1333246101196636160","id":"1519870513097211904","skuId":"1519870513038491648"}],"skuCode":"P202204291045422"}] -/// thumbnailImg : "" -/// productName : "原味奶茶" -/// posShow : true -/// price : "0.01" -/// sellCount : 5 -/// details : "" -/// id : "1519870512681975808" -/// applyPrice : "0.00" -/// stock : 10 -/// status : 1 -/// info : "" - -class GoodList { - GoodList({ - String productImg, - List goodProductSkuVOList, - String thumbnailImg, - String tenantCode, - String storeId, - String productName, - bool posShow, - String price, - int sellCount, - String details, - String id, - String applyPrice, - int stock, - int status, - String info,}){ - _productImg = productImg; - _goodProductSkuVOList = goodProductSkuVOList; - _thumbnailImg = thumbnailImg; - _tenantCode = tenantCode; - _storeId = storeId; - _productName = productName; - _posShow = posShow; - _price = price; - _sellCount = sellCount; - _details = details; - _id = id; - _applyPrice = applyPrice; - _stock = stock; - _status = status; - _info = info; -} - - GoodList.fromJson(dynamic json) { - _productImg = json['productImg']; - if (json['productSkuVOList'] != null) { - _goodProductSkuVOList = []; - json['productSkuVOList'].forEach((v) { - _goodProductSkuVOList.add(GoodProductSkuVOList.fromJson(v)); - }); - } - _thumbnailImg = json['thumbnailImg']; - _tenantCode = json['tenantCode']; - _storeId = json['storeId']; - _productName = json['productName']; - _posShow = json['posShow']; - _price = json['price']; - _sellCount = json['sellCount']; - _details = json['details']; - _id = json['id']; - _applyPrice = json['applyPrice']; - _stock = json['stock']; - _status = json['status']; - _info = json['info']; - } - String _productImg; - List _goodProductSkuVOList; - String _thumbnailImg; - String _tenantCode; - String _storeId; - String _productName; - bool _posShow; - String _price; - int _sellCount; - String _details; - String _id; - String _applyPrice; - int _stock; - int _status; - String _info; -GoodList copyWith({ String productImg, - List goodProductSkuVOList, - String thumbnailImg, - String tenantCode, - String storeId, - String productName, - bool posShow, - String price, - int sellCount, - String details, - String id, - String applyPrice, - int stock, - int status, - String info, -}) => GoodList( productImg: productImg ?? _productImg, - goodProductSkuVOList: goodProductSkuVOList ?? _goodProductSkuVOList, - thumbnailImg: thumbnailImg ?? _thumbnailImg, - tenantCode: tenantCode ?? _tenantCode, - storeId: storeId ?? _storeId, - productName: productName ?? _productName, - posShow: posShow ?? _posShow, - price: price ?? _price, - sellCount: sellCount ?? _sellCount, - details: details ?? _details, - id: id ?? _id, - applyPrice: applyPrice ?? _applyPrice, - stock: stock ?? _stock, - status: status ?? _status, - info: info ?? _info, -); - String get productImg => _productImg; - List get goodProductSkuVOList => _goodProductSkuVOList; - String get thumbnailImg => _thumbnailImg; - String get tenantCode => _tenantCode; - String get storeId => _storeId; - String get productName => _productName; - bool get posShow => _posShow; - String get price => _price; - int get sellCount => _sellCount; - String get details => _details; - String get id => _id; - String get applyPrice => _applyPrice; - int get stock => _stock; - int get status => _status; - String get info => _info; - - Map toJson() { - final map = {}; - map['productImg'] = _productImg; - if (_goodProductSkuVOList != null) { - map['goodProductSkuVOList'] = _goodProductSkuVOList.map((v) => v.toJson()).toList(); - } - map['thumbnailImg'] = _thumbnailImg; - map['tenantCode'] = _tenantCode; - map['storeId'] = _storeId; - map['productName'] = _productName; - map['posShow'] = _posShow; - map['price'] = _price; - map['sellCount'] = _sellCount; - map['details'] = _details; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - map['stock'] = _stock; - map['status'] = _status; - map['info'] = _info; - return map; - } - -} - -/// ticketStyle : "" -/// productId : "1519870512681975808" -/// isDelete : 0 -/// ticketDays : "0" -/// setMeal : "" -/// updateUser : "1333246101196636160" -/// skuPrice : "0.01" -/// skuStock : 10 -/// weight : 0 -/// updateTime : "2022-04-29 10:45:43" -/// ticketType : "" -/// sort : 50 -/// storeId : "1511585212109160448" -/// version : 0 -/// deliveries : 0 -/// volume : 0 -/// autoRenewSkuStock : 0 -/// skuNameStr : "" -/// createTime : "2022-04-29 10:45:43" -/// createUser : "1333246101196636160" -/// id : "1519870513038491648" -/// applyPrice : "0.00" -/// skuAttrList : [{"attrValueId":"1519870512921051136","isDelete":0,"updateUser":"1333246101196636160","updateTime":"2022-04-29 10:45:43","attrId":"1519870512837165056","createTime":"2022-04-29 10:45:43","createUser":"1333246101196636160","id":"1519870513097211904","skuId":"1519870513038491648"}] -/// skuCode : "P202204291045422" - -class GoodProductSkuVOList { - GoodProductSkuVOList({ - String ticketStyle, - String productId, - int isDelete, - String ticketDays, - String setMeal, - String updateUser, - String skuPrice, - int skuStock, - int weight, - String updateTime, - String ticketType, - int sort, - // String storeIds, - int version, - int deliveries, - int volume, - int autoRenewSkuStock, - String skuNameStr, - String createTime, - String createUser, - String id, - String applyPrice, - List goodSkuAttrList, - String skuCode,}){ - _ticketStyle = ticketStyle; - _productId = productId; - _isDelete = isDelete; - _ticketDays = ticketDays; - _setMeal = setMeal; - _updateUser = updateUser; - _skuPrice = skuPrice; - _skuStock = skuStock; - _weight = weight; - _updateTime = updateTime; - _ticketType = ticketType; - _sort = sort; - // _storeIds = storeIds; - _version = version; - _deliveries = deliveries; - _volume = volume; - _autoRenewSkuStock = autoRenewSkuStock; - _skuNameStr = skuNameStr; - _createTime = createTime; - _createUser = createUser; - _id = id; - _applyPrice = applyPrice; - _goodSkuAttrList = goodSkuAttrList; - _skuCode = skuCode; -} - - GoodProductSkuVOList.fromJson(dynamic json) { - _ticketStyle = json['ticketStyle']; - _productId = json['productId']; - _isDelete = json['isDelete']; - _ticketDays = json['ticketDays']; - _setMeal = json['setMeal']; - _updateUser = json['updateUser']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - _weight = json['weight']; - _updateTime = json['updateTime']; - _ticketType = json['ticketType']; - _sort = json['sort']; - // _storeIds = json['storeIds']; - _version = json['version']; - _deliveries = json['deliveries']; - _volume = json['volume']; - _autoRenewSkuStock = json['autoRenewSkuStock']; - _skuNameStr = json['skuNameStr']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _applyPrice = json['applyPrice']; - if (json['goodSkuAttrList'] != null) { - _goodSkuAttrList = []; - json['goodSkuAttrList'].forEach((v) { - _goodSkuAttrList.add(GoodSkuAttrList.fromJson(v)); - }); - } - _skuCode = json['skuCode']; - } - String _ticketStyle; - String _productId; - int _isDelete; - String _ticketDays; - String _setMeal; - String _updateUser; - String _skuPrice; - int _skuStock; - int _weight; - String _updateTime; - String _ticketType; - int _sort; - // String _storeIds; - int _version; - int _deliveries; - int _volume; - int _autoRenewSkuStock; - String _skuNameStr; - String _createTime; - String _createUser; - String _id; - String _applyPrice; - List _goodSkuAttrList; - String _skuCode; -ProductSkuVoList copyWith({ String ticketStyle, - String productId, - int isDelete, - String ticketDays, - String setMeal, - String updateUser, - String skuPrice, - int skuStock, - int weight, - String updateTime, - String ticketType, - int sort, - // String storeIds, - int version, - int deliveries, - int volume, - int autoRenewSkuStock, - String skuNameStr, - String createTime, - String createUser, - String id, - String applyPrice, - List goodSkuAttrList, - String skuCode, -}) => ProductSkuVoList( ticketStyle: ticketStyle ?? _ticketStyle, - productId: productId ?? _productId, - isDelete: isDelete ?? _isDelete, - ticketDays: ticketDays ?? _ticketDays, - setMeal: setMeal ?? _setMeal, - updateUser: updateUser ?? _updateUser, - skuPrice: skuPrice ?? _skuPrice, - skuStock: skuStock ?? _skuStock, - weight: weight ?? _weight, - updateTime: updateTime ?? _updateTime, - ticketType: ticketType ?? _ticketType, - sort: sort ?? _sort, - // storeIds: storeIds ?? _storeIds, - version: version ?? _version, - deliveries: deliveries ?? _deliveries, - volume: volume ?? _volume, - autoRenewSkuStock: autoRenewSkuStock ?? _autoRenewSkuStock, - skuNameStr: skuNameStr ?? _skuNameStr, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - id: id ?? _id, - applyPrice: applyPrice ?? _applyPrice, - skuAttrList: goodSkuAttrList ?? _goodSkuAttrList, - skuCode: skuCode ?? _skuCode, -); - String get ticketStyle => _ticketStyle; - String get productId => _productId; - int get isDelete => _isDelete; - String get ticketDays => _ticketDays; - String get setMeal => _setMeal; - String get updateUser => _updateUser; - String get skuPrice => _skuPrice; - int get skuStock => _skuStock; - int get weight => _weight; - String get updateTime => _updateTime; - String get ticketType => _ticketType; - int get sort => _sort; - // String get storeIds => _storeIds; - int get version => _version; - int get deliveries => _deliveries; - int get volume => _volume; - int get autoRenewSkuStock => _autoRenewSkuStock; - String get skuNameStr => _skuNameStr; - String get createTime => _createTime; - String get createUser => _createUser; - String get id => _id; - String get applyPrice => _applyPrice; - List get goodSkuAttrList => _goodSkuAttrList; - String get skuCode => _skuCode; - - Map toJson() { - final map = {}; - map['ticketStyle'] = _ticketStyle; - map['productId'] = _productId; - map['isDelete'] = _isDelete; - map['ticketDays'] = _ticketDays; - map['setMeal'] = _setMeal; - map['updateUser'] = _updateUser; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - map['weight'] = _weight; - map['updateTime'] = _updateTime; - map['ticketType'] = _ticketType; - map['sort'] = _sort; - // map['storeIds'] = _storeIds; - map['version'] = _version; - map['deliveries'] = _deliveries; - map['volume'] = _volume; - map['autoRenewSkuStock'] = _autoRenewSkuStock; - map['skuNameStr'] = _skuNameStr; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - if (_goodSkuAttrList != null) { - map['goodSkuAttrList'] = _goodSkuAttrList.map((v) => v.toJson()).toList(); - } - map['skuCode'] = _skuCode; - return map; - } - -} - -/// attrValueId : "1519870512921051136" -/// isDelete : 0 -/// updateUser : "1333246101196636160" -/// updateTime : "2022-04-29 10:45:43" -/// attrId : "1519870512837165056" -/// createTime : "2022-04-29 10:45:43" -/// createUser : "1333246101196636160" -/// id : "1519870513097211904" -/// skuId : "1519870513038491648" - -class GoodSkuAttrList { - GoodSkuAttrList({ - String attrValueId, - int isDelete, - String updateUser, - String updateTime, - String attrId, - String createTime, - String createUser, - String id, - String skuId,}){ - _attrValueId = attrValueId; - _isDelete = isDelete; - _updateUser = updateUser; - _updateTime = updateTime; - _attrId = attrId; - _createTime = createTime; - _createUser = createUser; - _id = id; - _skuId = skuId; -} - - GoodSkuAttrList.fromJson(dynamic json) { - _attrValueId = json['attrValueId']; - _isDelete = json['isDelete']; - _updateUser = json['updateUser']; - _updateTime = json['updateTime']; - _attrId = json['attrId']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _skuId = json['skuId']; - } - String _attrValueId; - int _isDelete; - String _updateUser; - String _updateTime; - String _attrId; - String _createTime; - String _createUser; - String _id; - String _skuId; - SkuAttrList copyWith({ String attrValueId, - int isDelete, - String updateUser, - String updateTime, - String attrId, - String createTime, - String createUser, - String id, - String skuId, -}) => SkuAttrList( attrValueId: attrValueId ?? _attrValueId, - isDelete: isDelete ?? _isDelete, - updateUser: updateUser ?? _updateUser, - updateTime: updateTime ?? _updateTime, - attrId: attrId ?? _attrId, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - id: id ?? _id, - skuId: skuId ?? _skuId, -); - String get attrValueId => _attrValueId; - int get isDelete => _isDelete; - String get updateUser => _updateUser; - String get updateTime => _updateTime; - String get attrId => _attrId; - String get createTime => _createTime; - String get createUser => _createUser; - String get id => _id; - String get skuId => _skuId; - - Map toJson() { - final map = {}; - map['attrValueId'] = _attrValueId; - map['isDelete'] = _isDelete; - map['updateUser'] = _updateUser; - map['updateTime'] = _updateTime; - map['attrId'] = _attrId; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['skuId'] = _skuId; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/home_recommend_list.dart b/lib/retrofit/data/home_recommend_list.dart deleted file mode 100644 index 9b45b10c..00000000 --- a/lib/retrofit/data/home_recommend_list.dart +++ /dev/null @@ -1,416 +0,0 @@ -/// id : "1473532263365869568" -/// createTime : "2021-12-22 13:54:03" -/// createUser : "1364043181062094848" -/// updateTime : "2021-12-22 13:54:03" -/// updateUser : "1364043181062094848" -/// supplierName : "测试" -/// storeId : "1364043181120815104" -/// categoryId : "1343391656220557312" -/// groupId : "1473531667711787008" -/// shortName : "可爱" -/// productName : "回乡牛公仔" -/// sellDesc : "" -/// productCode : "PRO202112221354030000000000004" -/// weight : "0" -/// applyPrice : "0.00" -/// price : "49.00" -/// stock : 0 -/// sellCount : 0 -/// needLogistics : 1 -/// oversold : 1 -/// organic : 0 -/// status : 1 -/// posShow : true -/// productType : 0 -/// productNumber : 1 -/// setMeal : 1 -/// attrStyle : 0 -/// detail : "" -/// isDelete : 0 -/// printerFlag : "DEFAULT" -/// materialId : null -/// imgs : ["https://pos.upload.gznl.top/1179/2021/12/1bff0936-f2a2-401e-befd-e00b416763ad.png"] -/// productSkuList : [{"id":"1473532264519303168","createTime":"2021-12-22 13:54:03","createUser":"1364043181062094848","updateTime":"2021-12-22 13:54:03","updateUser":"1364043181062094848","storeId":"1364043181120815104","skuCode":"P202112221354035","skuNameStr":"","productId":"1473532263365869568","skuPrice":"49.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":0,"sort":50,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":0}] - -class HomeRecommendList { - HomeRecommendList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String supplierName, - String storeId, - String categoryId, - String groupId, - String shortName, - String productName, - String sellDesc, - String productCode, - String weight, - String applyPrice, - String price, - int stock, - int sellCount, - int needLogistics, - int oversold, - int organic, - int status, - bool posShow, - int productType, - int productNumber, - int setMeal, - int attrStyle, - String detail, - int isDelete, - String printerFlag, - dynamic materialId, - List imgs, - List productSkuList,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _supplierName = supplierName; - _storeId = storeId; - _categoryId = categoryId; - _groupId = groupId; - _shortName = shortName; - _productName = productName; - _sellDesc = sellDesc; - _productCode = productCode; - _weight = weight; - _applyPrice = applyPrice; - _price = price; - _stock = stock; - _sellCount = sellCount; - _needLogistics = needLogistics; - _oversold = oversold; - _organic = organic; - _status = status; - _posShow = posShow; - _productType = productType; - _productNumber = productNumber; - _setMeal = setMeal; - _attrStyle = attrStyle; - _detail = detail; - _isDelete = isDelete; - _printerFlag = printerFlag; - _materialId = materialId; - _imgs = imgs; - _productSkuList = productSkuList; -} - - HomeRecommendList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _supplierName = json['supplierName']; - _storeId = json['storeId']; - _categoryId = json['categoryId']; - _groupId = json['groupId']; - _shortName = json['shortName']; - _productName = json['productName']; - _sellDesc = json['sellDesc']; - _productCode = json['productCode']; - _weight = json['weight']; - _applyPrice = json['applyPrice']; - _price = json['price']; - _stock = json['stock']; - _sellCount = json['sellCount']; - _needLogistics = json['needLogistics']; - _oversold = json['oversold']; - _organic = json['organic']; - _status = json['status']; - _posShow = json['posShow']; - _productType = json['productType']; - _productNumber = json['productNumber']; - _setMeal = json['setMeal']; - _attrStyle = json['attrStyle']; - _detail = json['detail']; - _isDelete = json['isDelete']; - _printerFlag = json['printerFlag']; - _materialId = json['materialId']; - _imgs = json['imgs'] != null ? json['imgs'].cast() : []; - if (json['productSkuList'] != null) { - _productSkuList = []; - json['productSkuList'].forEach((v) { - _productSkuList.add(ProductSkuList.fromJson(v)); - }); - } - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _supplierName; - String _storeId; - String _categoryId; - String _groupId; - String _shortName; - String _productName; - String _sellDesc; - String _productCode; - String _weight; - String _applyPrice; - String _price; - int _stock; - int _sellCount; - int _needLogistics; - int _oversold; - int _organic; - int _status; - bool _posShow; - int _productType; - int _productNumber; - int _setMeal; - int _attrStyle; - String _detail; - int _isDelete; - String _printerFlag; - dynamic _materialId; - List _imgs; - List _productSkuList; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get supplierName => _supplierName; - String get storeId => _storeId; - String get categoryId => _categoryId; - String get groupId => _groupId; - String get shortName => _shortName; - String get productName => _productName; - String get sellDesc => _sellDesc; - String get productCode => _productCode; - String get weight => _weight; - String get applyPrice => _applyPrice; - String get price => _price; - int get stock => _stock; - int get sellCount => _sellCount; - int get needLogistics => _needLogistics; - int get oversold => _oversold; - int get organic => _organic; - int get status => _status; - bool get posShow => _posShow; - int get productType => _productType; - int get productNumber => _productNumber; - int get setMeal => _setMeal; - int get attrStyle => _attrStyle; - String get detail => _detail; - int get isDelete => _isDelete; - String get printerFlag => _printerFlag; - dynamic get materialId => _materialId; - List get imgs => _imgs; - List get productSkuList => _productSkuList; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['supplierName'] = _supplierName; - map['storeId'] = _storeId; - map['categoryId'] = _categoryId; - map['groupId'] = _groupId; - map['shortName'] = _shortName; - map['productName'] = _productName; - map['sellDesc'] = _sellDesc; - map['productCode'] = _productCode; - map['weight'] = _weight; - map['applyPrice'] = _applyPrice; - map['price'] = _price; - map['stock'] = _stock; - map['sellCount'] = _sellCount; - map['needLogistics'] = _needLogistics; - map['oversold'] = _oversold; - map['organic'] = _organic; - map['status'] = _status; - map['posShow'] = _posShow; - map['productType'] = _productType; - map['productNumber'] = _productNumber; - map['setMeal'] = _setMeal; - map['attrStyle'] = _attrStyle; - map['detail'] = _detail; - map['isDelete'] = _isDelete; - map['printerFlag'] = _printerFlag; - map['materialId'] = _materialId; - map['imgs'] = _imgs; - if (_productSkuList != null) { - map['productSkuList'] = _productSkuList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1473532264519303168" -/// createTime : "2021-12-22 13:54:03" -/// createUser : "1364043181062094848" -/// updateTime : "2021-12-22 13:54:03" -/// updateUser : "1364043181062094848" -/// storeId : "1364043181120815104" -/// skuCode : "P202112221354035" -/// skuNameStr : "" -/// productId : "1473532263365869568" -/// skuPrice : "49.00" -/// applyPrice : "0.00" -/// vipPrice : null -/// skuImg : null -/// skuStock : 0 -/// sort : 50 -/// setMeal : "" -/// weight : 0.0 -/// volume : 0.0 -/// isDelete : 0 -/// material : null -/// version : 0 - -class ProductSkuList { - ProductSkuList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String skuCode, - String skuNameStr, - String productId, - String skuPrice, - String applyPrice, - dynamic vipPrice, - dynamic skuImg, - int skuStock, - int sort, - String setMeal, - double weight, - double volume, - int isDelete, - dynamic material, - int version,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _skuCode = skuCode; - _skuNameStr = skuNameStr; - _productId = productId; - _skuPrice = skuPrice; - _applyPrice = applyPrice; - _vipPrice = vipPrice; - _skuImg = skuImg; - _skuStock = skuStock; - _sort = sort; - _setMeal = setMeal; - _weight = weight; - _volume = volume; - _isDelete = isDelete; - _material = material; - _version = version; -} - - ProductSkuList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _skuCode = json['skuCode']; - _skuNameStr = json['skuNameStr']; - _productId = json['productId']; - _skuPrice = json['skuPrice']; - _applyPrice = json['applyPrice']; - _vipPrice = json['vipPrice']; - _skuImg = json['skuImg']; - _skuStock = json['skuStock']; - _sort = json['sort']; - _setMeal = json['setMeal']; - _weight = json['weight']; - _volume = json['volume']; - _isDelete = json['isDelete']; - _material = json['material']; - _version = json['version']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _skuCode; - String _skuNameStr; - String _productId; - String _skuPrice; - String _applyPrice; - dynamic _vipPrice; - dynamic _skuImg; - int _skuStock; - int _sort; - String _setMeal; - double _weight; - double _volume; - int _isDelete; - dynamic _material; - int _version; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get skuCode => _skuCode; - String get skuNameStr => _skuNameStr; - String get productId => _productId; - String get skuPrice => _skuPrice; - String get applyPrice => _applyPrice; - dynamic get vipPrice => _vipPrice; - dynamic get skuImg => _skuImg; - int get skuStock => _skuStock; - int get sort => _sort; - String get setMeal => _setMeal; - double get weight => _weight; - double get volume => _volume; - int get isDelete => _isDelete; - dynamic get material => _material; - int get version => _version; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['skuCode'] = _skuCode; - map['skuNameStr'] = _skuNameStr; - map['productId'] = _productId; - map['skuPrice'] = _skuPrice; - map['applyPrice'] = _applyPrice; - map['vipPrice'] = _vipPrice; - map['skuImg'] = _skuImg; - map['skuStock'] = _skuStock; - map['sort'] = _sort; - map['setMeal'] = _setMeal; - map['weight'] = _weight; - map['volume'] = _volume; - map['isDelete'] = _isDelete; - map['material'] = _material; - map['version'] = _version; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/invitation_list.dart b/lib/retrofit/data/invitation_list.dart deleted file mode 100644 index 3cc572a5..00000000 --- a/lib/retrofit/data/invitation_list.dart +++ /dev/null @@ -1,57 +0,0 @@ -/// mid : "1484477944838488064" -/// nickname : "回乡_888888" -/// avatar : "" -/// phone : "15447898756" -/// isFollow : null -/// createTime : "2022-01-21 18:48:17" - -class InvitationList { - InvitationList({ - String mid, - String nickname, - String avatar, - String phone, - dynamic isFollow, - String createTime,}){ - _mid = mid; - _nickname = nickname; - _avatar = avatar; - _phone = phone; - _isFollow = isFollow; - _createTime = createTime; -} - - InvitationList.fromJson(dynamic json) { - _mid = json['mid']; - _nickname = json['nickname']; - _avatar = json['avatar']; - _phone = json['phone']; - _isFollow = json['isFollow']; - _createTime = json['createTime']; - } - String _mid; - String _nickname; - String _avatar; - String _phone; - dynamic _isFollow; - String _createTime; - - String get mid => _mid; - String get nickname => _nickname; - String get avatar => _avatar; - String get phone => _phone; - dynamic get isFollow => _isFollow; - String get createTime => _createTime; - - Map toJson() { - final map = {}; - map['mid'] = _mid; - map['nickname'] = _nickname; - map['avatar'] = _avatar; - map['phone'] = _phone; - map['isFollow'] = _isFollow; - map['createTime'] = _createTime; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/ip_data.dart b/lib/retrofit/data/ip_data.dart deleted file mode 100644 index 532f1804..00000000 --- a/lib/retrofit/data/ip_data.dart +++ /dev/null @@ -1,105 +0,0 @@ -/// ip : "27.18.151.119" -/// pro : "湖北省" -/// proCode : "420000" -/// city : "武汉市" -/// cityCode : "420100" -/// region : "" -/// regionCode : "0" -/// addr : "湖北省武汉市 电信" -/// regionNames : "" -/// err : "" - -class IpData { - IpData({ - String ip, - String pro, - String proCode, - String city, - String cityCode, - String region, - String regionCode, - String addr, - String regionNames, - String err,}){ - _ip = ip; - _pro = pro; - _proCode = proCode; - _city = city; - _cityCode = cityCode; - _region = region; - _regionCode = regionCode; - _addr = addr; - _regionNames = regionNames; - _err = err; -} - - IpData.fromJson(dynamic json) { - _ip = json['ip']; - _pro = json['pro']; - _proCode = json['proCode']; - _city = json['city']; - _cityCode = json['cityCode']; - _region = json['region']; - _regionCode = json['regionCode']; - _addr = json['addr']; - _regionNames = json['regionNames']; - _err = json['err']; - } - String _ip; - String _pro; - String _proCode; - String _city; - String _cityCode; - String _region; - String _regionCode; - String _addr; - String _regionNames; - String _err; -IpData copyWith({ String ip, - String pro, - String proCode, - String city, - String cityCode, - String region, - String regionCode, - String addr, - String regionNames, - String err, -}) => IpData( ip: ip ?? _ip, - pro: pro ?? _pro, - proCode: proCode ?? _proCode, - city: city ?? _city, - cityCode: cityCode ?? _cityCode, - region: region ?? _region, - regionCode: regionCode ?? _regionCode, - addr: addr ?? _addr, - regionNames: regionNames ?? _regionNames, - err: err ?? _err, -); - String get ip => _ip; - String get pro => _pro; - String get proCode => _proCode; - String get city => _city; - String get cityCode => _cityCode; - String get region => _region; - String get regionCode => _regionCode; - String get addr => _addr; - String get regionNames => _regionNames; - String get err => _err; - - Map toJson() { - final map = {}; - map['ip'] = _ip; - map['pro'] = _pro; - map['proCode'] = _proCode; - map['city'] = _city; - map['cityCode'] = _cityCode; - map['region'] = _region; - map['regionCode'] = _regionCode; - map['addr'] = _addr; - map['regionNames'] = _regionNames; - map['err'] = _err; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/launch_join_act.dart b/lib/retrofit/data/launch_join_act.dart deleted file mode 100644 index 1c980954..00000000 --- a/lib/retrofit/data/launch_join_act.dart +++ /dev/null @@ -1,148 +0,0 @@ -/// id : "1491606527402835968" -/// createTime : "2022-02-10 10:54:43" -/// createUser : "1478548720785031168" -/// updateTime : "2022-02-10 10:54:43" -/// updateUser : "1478548720785031168" -/// storeId : "1460885296764682240" -/// type : 1 -/// actTemplateId : "1490571620652154880" -/// actTimeId : "1490571620887035904" -/// actRecordId : "1491606526735941632" -/// mid : "1478548720785031168" -/// orderId : "1491606528052953088" -/// isLeader : true -/// memberAvatar : "" -/// memberNickname : "斯基" -/// productId : "1490571670107193344" -/// actPrice : "60" -/// state : false -/// isDelete : null - -class LaunchJoinAct { - LaunchJoinAct({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - int type, - String actTemplateId, - String actTimeId, - String actRecordId, - String mid, - String orderId, - bool isLeader, - String memberAvatar, - String memberNickname, - String productId, - String actPrice, - bool state, - dynamic isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _type = type; - _actTemplateId = actTemplateId; - _actTimeId = actTimeId; - _actRecordId = actRecordId; - _mid = mid; - _orderId = orderId; - _isLeader = isLeader; - _memberAvatar = memberAvatar; - _memberNickname = memberNickname; - _productId = productId; - _actPrice = actPrice; - _state = state; - _isDelete = isDelete; -} - - LaunchJoinAct.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _type = json['type']; - _actTemplateId = json['actTemplateId']; - _actTimeId = json['actTimeId']; - _actRecordId = json['actRecordId']; - _mid = json['mid']; - _orderId = json['orderId']; - _isLeader = json['isLeader']; - _memberAvatar = json['memberAvatar']; - _memberNickname = json['memberNickname']; - _productId = json['productId']; - _actPrice = json['actPrice']; - _state = json['state']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - int _type; - String _actTemplateId; - String _actTimeId; - String _actRecordId; - String _mid; - String _orderId; - bool _isLeader; - String _memberAvatar; - String _memberNickname; - String _productId; - String _actPrice; - bool _state; - dynamic _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - int get type => _type; - String get actTemplateId => _actTemplateId; - String get actTimeId => _actTimeId; - String get actRecordId => _actRecordId; - String get mid => _mid; - String get orderId => _orderId; - bool get isLeader => _isLeader; - String get memberAvatar => _memberAvatar; - String get memberNickname => _memberNickname; - String get productId => _productId; - String get actPrice => _actPrice; - bool get state => _state; - dynamic get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['type'] = _type; - map['actTemplateId'] = _actTemplateId; - map['actTimeId'] = _actTimeId; - map['actRecordId'] = _actRecordId; - map['mid'] = _mid; - map['orderId'] = _orderId; - map['isLeader'] = _isLeader; - map['memberAvatar'] = _memberAvatar; - map['memberNickname'] = _memberNickname; - map['productId'] = _productId; - map['actPrice'] = _actPrice; - map['state'] = _state; - map['isDelete'] = _isDelete; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/login_info.dart b/lib/retrofit/data/login_info.dart deleted file mode 100644 index 4ba91f8e..00000000 --- a/lib/retrofit/data/login_info.dart +++ /dev/null @@ -1,639 +0,0 @@ -/// authInfo : {"token":"eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3R5cGUiOiJQTEFURk9STV9BUFAiLCJuYW1lIjoi5Zue5LmhXzg4ODg4OCIsInRva2VuX3R5cGUiOiJ0b2tlbiIsInVzZXJpZCI6IjE0ODQ0Nzc5NDQ4Mzg0ODgwNjQiLCJhY2NvdW50IjoiMTU0NDc4OTg3NTYiLCJleHAiOjE2NDUzNTQwOTksIm5iZiI6MTY0Mjc2MjA5OX0.dIGWaCR6uuJ4YcgTfEEeVGJtOmpAlLaxQ2sEnd_9_zw","tokenType":"token","refreshToken":"eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJpZCI6IjE0ODQ0Nzc5NDQ4Mzg0ODgwNjQiLCJleHAiOjE2NDUzNTQwOTksIm5iZiI6MTY0Mjc2MjA5OX0.ZrG-JCemN_HtFzE512311Tksh2o21ywgjHhhGeXXWrE","name":"回乡_888888","account":"15447898756","avatar":null,"workDescribe":null,"userId":"1484477944838488064","userType":"PLATFORM_APP","expire":"2592000","expiration":"2022-02-20 18:48:19","mobile":"15447898756"} -/// interviewCouponList : [{"id":"1478615682588344320","createTime":"2022-01-05 14:33:45","createUser":"1333246101196636160","updateTime":"2022-01-05 14:33:45","updateUser":"1333246101196636160","storeId":"0","couponName":"新品10-5","bizType":1,"allProduct":true,"productSkuId":[],"fullAmount":"10.00","discountAmount":"5.00","fullNumber":1,"discountPercent":100,"sellPrice":"0.00","sellCount":0,"bizId":"","publishStartTime":"2022-01-01 00:00:00","publishEndTime":"2022-01-31 00:00:00","useStartTime":"2022-01-02 00:00:00","useEndTime":"2022-01-30 00:00:00","promotionId":"0","dateOrDay":false,"startAfterDays":0,"daysValidate":0,"businessType":0,"centreDisplay":false,"tenantCode":"1175","isDelete":0,"storeName":"海峡姐妹茶","number":1}] -/// newUserCouponList : null -/// firstLoginCouponList : [{"id":"1484456566340976640","createTime":"2022-01-21 17:23:20","createUser":"1333246101196636160","updateTime":"2022-01-21 17:23:20","updateUser":"1333246101196636160","storeId":"1333246101343436800","couponName":"新会员","bizType":1,"allProduct":true,"productSkuId":[],"fullAmount":"14.00","discountAmount":"7.00","fullNumber":1,"discountPercent":100,"sellPrice":"0.00","sellCount":0,"bizId":"","publishStartTime":"2022-01-01 00:00:00","publishEndTime":"2022-01-31 00:00:00","useStartTime":"2022-01-01 00:00:00","useEndTime":"2022-02-01 00:00:00","promotionId":"0","dateOrDay":false,"startAfterDays":0,"daysValidate":0,"businessType":0,"centreDisplay":false,"tenantCode":"1175","isDelete":0,"storeName":"海峡姐妹茶(汉街店)","number":1},{"id":"1484456980566245376","createTime":"2022-01-21 17:24:59","createUser":"1336877238389309440","updateTime":"2022-01-21 17:24:59","updateUser":"1336877238389309440","storeId":"1328618782985289728","couponName":"新会员8-8","bizType":1,"allProduct":true,"productSkuId":[],"fullAmount":"8.00","discountAmount":"8.00","fullNumber":1,"discountPercent":100,"sellPrice":"0.00","sellCount":0,"bizId":"","publishStartTime":"2022-01-01 00:00:00","publishEndTime":"2022-01-31 00:00:00","useStartTime":"2022-01-01 00:00:00","useEndTime":"2022-01-31 00:00:00","promotionId":"0","dateOrDay":false,"startAfterDays":0,"daysValidate":0,"businessType":0,"centreDisplay":false,"tenantCode":"1174","isDelete":0,"storeName":"前进麦味(凯德1818店)","number":1}] - -class LoginInfo { - LoginInfo({ - AuthInfo authInfo, - List interviewCouponList, - dynamic newUserCouponList, - List firstLoginCouponList,}){ - _authInfo = authInfo; - _interviewCouponList = interviewCouponList; - _newUserCouponList = newUserCouponList; - _firstLoginCouponList = firstLoginCouponList; -} - - LoginInfo.fromJson(dynamic json) { - _authInfo = json['authInfo'] != null ? AuthInfo.fromJson(json['authInfo']) : null; - if (json['interviewCouponList'] != null) { - _interviewCouponList = []; - json['interviewCouponList'].forEach((v) { - _interviewCouponList.add(InterviewCouponList.fromJson(v)); - }); - } - _newUserCouponList = json['newUserCouponList']; - if (json['firstLoginCouponList'] != null) { - _firstLoginCouponList = []; - json['firstLoginCouponList'].forEach((v) { - _firstLoginCouponList.add(FirstLoginCouponList.fromJson(v)); - }); - } - } - AuthInfo _authInfo; - List _interviewCouponList; - dynamic _newUserCouponList; - List _firstLoginCouponList; - - AuthInfo get authInfo => _authInfo; - List get interviewCouponList => _interviewCouponList; - dynamic get newUserCouponList => _newUserCouponList; - List get firstLoginCouponList => _firstLoginCouponList; - - Map toJson() { - final map = {}; - if (_authInfo != null) { - map['authInfo'] = _authInfo.toJson(); - } - if (_interviewCouponList != null) { - map['interviewCouponList'] = _interviewCouponList.map((v) => v.toJson()).toList(); - } - map['newUserCouponList'] = _newUserCouponList; - if (_firstLoginCouponList != null) { - map['firstLoginCouponList'] = _firstLoginCouponList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1484456566340976640" -/// createTime : "2022-01-21 17:23:20" -/// createUser : "1333246101196636160" -/// updateTime : "2022-01-21 17:23:20" -/// updateUser : "1333246101196636160" -/// storeId : "1333246101343436800" -/// couponName : "新会员" -/// bizType : 1 -/// allProduct : true -/// productSkuId : [] -/// fullAmount : "14.00" -/// discountAmount : "7.00" -/// fullNumber : 1 -/// discountPercent : 100 -/// sellPrice : "0.00" -/// sellCount : 0 -/// bizId : "" -/// publishStartTime : "2022-01-01 00:00:00" -/// publishEndTime : "2022-01-31 00:00:00" -/// useStartTime : "2022-01-01 00:00:00" -/// useEndTime : "2022-02-01 00:00:00" -/// promotionId : "0" -/// dateOrDay : false -/// startAfterDays : 0 -/// daysValidate : 0 -/// businessType : 0 -/// centreDisplay : false -/// tenantCode : "1175" -/// isDelete : 0 -/// storeName : "海峡姐妹茶(汉街店)" -/// number : 1 - -class FirstLoginCouponList { - FirstLoginCouponList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String couponName, - int bizType, - bool allProduct, - List productSkuId, - String fullAmount, - String discountAmount, - int fullNumber, - int discountPercent, - String sellPrice, - int sellCount, - String bizId, - String publishStartTime, - String publishEndTime, - String useStartTime, - String useEndTime, - String promotionId, - bool dateOrDay, - int startAfterDays, - int daysValidate, - int businessType, - bool centreDisplay, - String tenantCode, - int isDelete, - String storeName, - int number,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _couponName = couponName; - _bizType = bizType; - _allProduct = allProduct; - // _productSkuId = productSkuId; - _fullAmount = fullAmount; - _discountAmount = discountAmount; - _fullNumber = fullNumber; - _discountPercent = discountPercent; - _sellPrice = sellPrice; - _sellCount = sellCount; - _bizId = bizId; - _publishStartTime = publishStartTime; - _publishEndTime = publishEndTime; - _useStartTime = useStartTime; - _useEndTime = useEndTime; - _promotionId = promotionId; - _dateOrDay = dateOrDay; - _startAfterDays = startAfterDays; - _daysValidate = daysValidate; - _businessType = businessType; - _centreDisplay = centreDisplay; - _tenantCode = tenantCode; - _isDelete = isDelete; - _storeName = storeName; - _number = number; -} - - FirstLoginCouponList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _couponName = json['couponName']; - _bizType = json['bizType']; - _allProduct = json['allProduct']; - // if (json['productSkuId'] != null) { - // _productSkuId = []; - // json['productSkuId'].forEach((v) { - // _productSkuId.add(dynamic.fromJson(v)); - // }); - // } - _fullAmount = json['fullAmount']; - _discountAmount = json['discountAmount']; - _fullNumber = json['fullNumber']; - _discountPercent = json['discountPercent']; - _sellPrice = json['sellPrice']; - _sellCount = json['sellCount']; - _bizId = json['bizId']; - _publishStartTime = json['publishStartTime']; - _publishEndTime = json['publishEndTime']; - _useStartTime = json['useStartTime']; - _useEndTime = json['useEndTime']; - _promotionId = json['promotionId']; - _dateOrDay = json['dateOrDay']; - _startAfterDays = json['startAfterDays']; - _daysValidate = json['daysValidate']; - _businessType = json['businessType']; - _centreDisplay = json['centreDisplay']; - _tenantCode = json['tenantCode']; - _isDelete = json['isDelete']; - _storeName = json['storeName']; - _number = json['number']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _couponName; - int _bizType; - bool _allProduct; - // List _productSkuId; - String _fullAmount; - String _discountAmount; - int _fullNumber; - int _discountPercent; - String _sellPrice; - int _sellCount; - String _bizId; - String _publishStartTime; - String _publishEndTime; - String _useStartTime; - String _useEndTime; - String _promotionId; - bool _dateOrDay; - int _startAfterDays; - int _daysValidate; - int _businessType; - bool _centreDisplay; - String _tenantCode; - int _isDelete; - String _storeName; - int _number; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get couponName => _couponName; - int get bizType => _bizType; - bool get allProduct => _allProduct; - // List get productSkuId => _productSkuId; - String get fullAmount => _fullAmount; - String get discountAmount => _discountAmount; - int get fullNumber => _fullNumber; - int get discountPercent => _discountPercent; - String get sellPrice => _sellPrice; - int get sellCount => _sellCount; - String get bizId => _bizId; - String get publishStartTime => _publishStartTime; - String get publishEndTime => _publishEndTime; - String get useStartTime => _useStartTime; - String get useEndTime => _useEndTime; - String get promotionId => _promotionId; - bool get dateOrDay => _dateOrDay; - int get startAfterDays => _startAfterDays; - int get daysValidate => _daysValidate; - int get businessType => _businessType; - bool get centreDisplay => _centreDisplay; - String get tenantCode => _tenantCode; - int get isDelete => _isDelete; - String get storeName => _storeName; - int get number => _number; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['couponName'] = _couponName; - map['bizType'] = _bizType; - map['allProduct'] = _allProduct; - // if (_productSkuId != null) { - // map['productSkuId'] = _productSkuId.map((v) => v.toJson()).toList(); - // } - map['fullAmount'] = _fullAmount; - map['discountAmount'] = _discountAmount; - map['fullNumber'] = _fullNumber; - map['discountPercent'] = _discountPercent; - map['sellPrice'] = _sellPrice; - map['sellCount'] = _sellCount; - map['bizId'] = _bizId; - map['publishStartTime'] = _publishStartTime; - map['publishEndTime'] = _publishEndTime; - map['useStartTime'] = _useStartTime; - map['useEndTime'] = _useEndTime; - map['promotionId'] = _promotionId; - map['dateOrDay'] = _dateOrDay; - map['startAfterDays'] = _startAfterDays; - map['daysValidate'] = _daysValidate; - map['businessType'] = _businessType; - map['centreDisplay'] = _centreDisplay; - map['tenantCode'] = _tenantCode; - map['isDelete'] = _isDelete; - map['storeName'] = _storeName; - map['number'] = _number; - return map; - } - -} - -/// id : "1478615682588344320" -/// createTime : "2022-01-05 14:33:45" -/// createUser : "1333246101196636160" -/// updateTime : "2022-01-05 14:33:45" -/// updateUser : "1333246101196636160" -/// storeId : "0" -/// couponName : "新品10-5" -/// bizType : 1 -/// allProduct : true -/// productSkuId : [] -/// fullAmount : "10.00" -/// discountAmount : "5.00" -/// fullNumber : 1 -/// discountPercent : 100 -/// sellPrice : "0.00" -/// sellCount : 0 -/// bizId : "" -/// publishStartTime : "2022-01-01 00:00:00" -/// publishEndTime : "2022-01-31 00:00:00" -/// useStartTime : "2022-01-02 00:00:00" -/// useEndTime : "2022-01-30 00:00:00" -/// promotionId : "0" -/// dateOrDay : false -/// startAfterDays : 0 -/// daysValidate : 0 -/// businessType : 0 -/// centreDisplay : false -/// tenantCode : "1175" -/// isDelete : 0 -/// storeName : "海峡姐妹茶" -/// number : 1 - -class InterviewCouponList { - InterviewCouponList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String couponName, - int bizType, - bool allProduct, - List productSkuId, - String fullAmount, - String discountAmount, - int fullNumber, - int discountPercent, - String sellPrice, - int sellCount, - String bizId, - String publishStartTime, - String publishEndTime, - String useStartTime, - String useEndTime, - String promotionId, - bool dateOrDay, - int startAfterDays, - int daysValidate, - int businessType, - bool centreDisplay, - String tenantCode, - int isDelete, - String storeName, - int number,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _couponName = couponName; - _bizType = bizType; - _allProduct = allProduct; - // _productSkuId = productSkuId; - _fullAmount = fullAmount; - _discountAmount = discountAmount; - _fullNumber = fullNumber; - _discountPercent = discountPercent; - _sellPrice = sellPrice; - _sellCount = sellCount; - _bizId = bizId; - _publishStartTime = publishStartTime; - _publishEndTime = publishEndTime; - _useStartTime = useStartTime; - _useEndTime = useEndTime; - _promotionId = promotionId; - _dateOrDay = dateOrDay; - _startAfterDays = startAfterDays; - _daysValidate = daysValidate; - _businessType = businessType; - _centreDisplay = centreDisplay; - _tenantCode = tenantCode; - _isDelete = isDelete; - _storeName = storeName; - _number = number; -} - - InterviewCouponList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _couponName = json['couponName']; - _bizType = json['bizType']; - _allProduct = json['allProduct']; - // if (json['productSkuId'] != null) { - // _productSkuId = []; - // json['productSkuId'].forEach((v) { - // _productSkuId.add(dynamic.fromJson(v)); - // }); - // } - _fullAmount = json['fullAmount']; - _discountAmount = json['discountAmount']; - _fullNumber = json['fullNumber']; - _discountPercent = json['discountPercent']; - _sellPrice = json['sellPrice']; - _sellCount = json['sellCount']; - _bizId = json['bizId']; - _publishStartTime = json['publishStartTime']; - _publishEndTime = json['publishEndTime']; - _useStartTime = json['useStartTime']; - _useEndTime = json['useEndTime']; - _promotionId = json['promotionId']; - _dateOrDay = json['dateOrDay']; - _startAfterDays = json['startAfterDays']; - _daysValidate = json['daysValidate']; - _businessType = json['businessType']; - _centreDisplay = json['centreDisplay']; - _tenantCode = json['tenantCode']; - _isDelete = json['isDelete']; - _storeName = json['storeName']; - _number = json['number']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _couponName; - int _bizType; - bool _allProduct; - // List _productSkuId; - String _fullAmount; - String _discountAmount; - int _fullNumber; - int _discountPercent; - String _sellPrice; - int _sellCount; - String _bizId; - String _publishStartTime; - String _publishEndTime; - String _useStartTime; - String _useEndTime; - String _promotionId; - bool _dateOrDay; - int _startAfterDays; - int _daysValidate; - int _businessType; - bool _centreDisplay; - String _tenantCode; - int _isDelete; - String _storeName; - int _number; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get couponName => _couponName; - int get bizType => _bizType; - bool get allProduct => _allProduct; - // List get productSkuId => _productSkuId; - String get fullAmount => _fullAmount; - String get discountAmount => _discountAmount; - int get fullNumber => _fullNumber; - int get discountPercent => _discountPercent; - String get sellPrice => _sellPrice; - int get sellCount => _sellCount; - String get bizId => _bizId; - String get publishStartTime => _publishStartTime; - String get publishEndTime => _publishEndTime; - String get useStartTime => _useStartTime; - String get useEndTime => _useEndTime; - String get promotionId => _promotionId; - bool get dateOrDay => _dateOrDay; - int get startAfterDays => _startAfterDays; - int get daysValidate => _daysValidate; - int get businessType => _businessType; - bool get centreDisplay => _centreDisplay; - String get tenantCode => _tenantCode; - int get isDelete => _isDelete; - String get storeName => _storeName; - int get number => _number; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['couponName'] = _couponName; - map['bizType'] = _bizType; - map['allProduct'] = _allProduct; - // if (_productSkuId != null) { - // map['productSkuId'] = _productSkuId.map((v) => v.toJson()).toList(); - // } - map['fullAmount'] = _fullAmount; - map['discountAmount'] = _discountAmount; - map['fullNumber'] = _fullNumber; - map['discountPercent'] = _discountPercent; - map['sellPrice'] = _sellPrice; - map['sellCount'] = _sellCount; - map['bizId'] = _bizId; - map['publishStartTime'] = _publishStartTime; - map['publishEndTime'] = _publishEndTime; - map['useStartTime'] = _useStartTime; - map['useEndTime'] = _useEndTime; - map['promotionId'] = _promotionId; - map['dateOrDay'] = _dateOrDay; - map['startAfterDays'] = _startAfterDays; - map['daysValidate'] = _daysValidate; - map['businessType'] = _businessType; - map['centreDisplay'] = _centreDisplay; - map['tenantCode'] = _tenantCode; - map['isDelete'] = _isDelete; - map['storeName'] = _storeName; - map['number'] = _number; - return map; - } - -} - -/// token : "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3R5cGUiOiJQTEFURk9STV9BUFAiLCJuYW1lIjoi5Zue5LmhXzg4ODg4OCIsInRva2VuX3R5cGUiOiJ0b2tlbiIsInVzZXJpZCI6IjE0ODQ0Nzc5NDQ4Mzg0ODgwNjQiLCJhY2NvdW50IjoiMTU0NDc4OTg3NTYiLCJleHAiOjE2NDUzNTQwOTksIm5iZiI6MTY0Mjc2MjA5OX0.dIGWaCR6uuJ4YcgTfEEeVGJtOmpAlLaxQ2sEnd_9_zw" -/// tokenType : "token" -/// refreshToken : "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJpZCI6IjE0ODQ0Nzc5NDQ4Mzg0ODgwNjQiLCJleHAiOjE2NDUzNTQwOTksIm5iZiI6MTY0Mjc2MjA5OX0.ZrG-JCemN_HtFzE512311Tksh2o21ywgjHhhGeXXWrE" -/// name : "回乡_888888" -/// account : "15447898756" -/// avatar : null -/// workDescribe : null -/// userId : "1484477944838488064" -/// userType : "PLATFORM_APP" -/// expire : "2592000" -/// expiration : "2022-02-20 18:48:19" -/// mobile : "15447898756" - -class AuthInfo { - AuthInfo({ - String token, - String tokenType, - String refreshToken, - String name, - String account, - dynamic avatar, - dynamic workDescribe, - String userId, - String userType, - String expire, - String expiration, - String mobile,}){ - _token = token; - _tokenType = tokenType; - _refreshToken = refreshToken; - _name = name; - _account = account; - _avatar = avatar; - _workDescribe = workDescribe; - _userId = userId; - _userType = userType; - _expire = expire; - _expiration = expiration; - _mobile = mobile; -} - - AuthInfo.fromJson(dynamic json) { - _token = json['token']; - _tokenType = json['tokenType']; - _refreshToken = json['refreshToken']; - _name = json['name']; - _account = json['account']; - _avatar = json['avatar']; - _workDescribe = json['workDescribe']; - _userId = json['userId']; - _userType = json['userType']; - _expire = json['expire']; - _expiration = json['expiration']; - _mobile = json['mobile']; - } - String _token; - String _tokenType; - String _refreshToken; - String _name; - String _account; - dynamic _avatar; - dynamic _workDescribe; - String _userId; - String _userType; - String _expire; - String _expiration; - String _mobile; - - String get token => _token; - String get tokenType => _tokenType; - String get refreshToken => _refreshToken; - String get name => _name; - String get account => _account; - dynamic get avatar => _avatar; - dynamic get workDescribe => _workDescribe; - String get userId => _userId; - String get userType => _userType; - String get expire => _expire; - String get expiration => _expiration; - String get mobile => _mobile; - - Map toJson() { - final map = {}; - map['token'] = _token; - map['tokenType'] = _tokenType; - map['refreshToken'] = _refreshToken; - map['name'] = _name; - map['account'] = _account; - map['avatar'] = _avatar; - map['workDescribe'] = _workDescribe; - map['userId'] = _userId; - map['userType'] = _userType; - map['expire'] = _expire; - map['expiration'] = _expiration; - map['mobile'] = _mobile; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/logistics.dart b/lib/retrofit/data/logistics.dart deleted file mode 100644 index ad48f765..00000000 --- a/lib/retrofit/data/logistics.dart +++ /dev/null @@ -1,55 +0,0 @@ -/// logisticCode : "" -/// shipperCode : "" -/// state : 0 -/// success : true -/// traces : [{"acceptStation":"","acceptTime":""}] - -class Logistics { - String logisticCode; - String shipperCode; - int state; - bool success; - List traces; - - static Logistics fromJson(Map map) { - if (map == null) return null; - Logistics logisticsBean = Logistics(); - logisticsBean.logisticCode = map['logisticCode']; - logisticsBean.shipperCode = map['shipperCode']; - logisticsBean.state = map['state']; - logisticsBean.success = map['success']; - logisticsBean.traces = []..addAll( - (map['traces'] as List ?? []).map((o) => TracesBean.fromMap(o)) - ); - return logisticsBean; - } - - Map toJson() => { - "logisticCode": logisticCode, - "shipperCode": shipperCode, - "state": state, - "success": success, - "traces": traces, - }; -} - -/// acceptStation : "" -/// acceptTime : "" - -class TracesBean { - String acceptStation; - String acceptTime; - - static TracesBean fromMap(Map map) { - if (map == null) return null; - TracesBean tracesBean = TracesBean(); - tracesBean.acceptStation = map['acceptStation']; - tracesBean.acceptTime = map['acceptTime']; - return tracesBean; - } - - Map toJson() => { - "acceptStation": acceptStation, - "acceptTime": acceptTime, - }; -} \ No newline at end of file diff --git a/lib/retrofit/data/member_Infor.dart b/lib/retrofit/data/member_Infor.dart deleted file mode 100644 index 4ce6e03e..00000000 --- a/lib/retrofit/data/member_Infor.dart +++ /dev/null @@ -1,134 +0,0 @@ -/// id : "1379254113602109440" -/// nickname : "哈哈哈" -/// headimg : "https://pos.upload.gznl.top/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg" -/// userType : true -/// sex : "0" -/// level : 1 -/// remark : "" -/// createTime : "2021-04-06 10:06:21" -/// birth : "1998-09-17" -/// organic : 0 -/// age : 23 -/// signature : "" -/// background : "" -/// follow : 1 -/// fans : 0 -/// trendTotal : 4 -/// gainLikeTotal : 9 - -class MemberInfor { - MemberInfor({ - String id, - String nickname, - String headimg, - bool userType, - String sex, - int level, - String remark, - String createTime, - String birth, - int organic, - int age, - String signature, - String background, - dynamic follow, - dynamic fans, - dynamic trendTotal, - dynamic gainLikeTotal,}){ - _id = id; - _nickname = nickname; - _headimg = headimg; - _userType = userType; - _sex = sex; - _level = level; - _remark = remark; - _createTime = createTime; - _birth = birth; - _organic = organic; - _age = age; - _signature = signature; - _background = background; - _follow = follow; - _fans = fans; - _trendTotal = trendTotal; - _gainLikeTotal = gainLikeTotal; -} - - MemberInfor.fromJson(dynamic json) { - _id = json['id']; - _nickname = json['nickname']; - _headimg = json['headimg']; - _userType = json['userType']; - _sex = json['sex']; - _level = json['level']; - _remark = json['remark']; - _createTime = json['createTime']; - _birth = json['birth']; - _organic = json['organic']; - _age = json['age']; - _signature = json['signature']; - _background = json['background']; - _follow = json['follow']; - _fans = json['fans']; - _trendTotal = json['trendTotal']; - _gainLikeTotal = json['gainLikeTotal']; - } - String _id; - String _nickname; - String _headimg; - bool _userType; - String _sex; - int _level; - String _remark; - String _createTime; - String _birth; - int _organic; - int _age; - String _signature; - String _background; - dynamic _follow; - dynamic _fans; - dynamic _trendTotal; - dynamic _gainLikeTotal; - - String get id => _id; - String get nickname => _nickname; - String get headimg => _headimg; - bool get userType => _userType; - String get sex => _sex; - int get level => _level; - String get remark => _remark; - String get createTime => _createTime; - String get birth => _birth; - int get organic => _organic; - int get age => _age; - String get signature => _signature; - String get background => _background; - dynamic get follow => _follow; - dynamic get fans => _fans; - dynamic get trendTotal => _trendTotal; - dynamic get gainLikeTotal => _gainLikeTotal; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['nickname'] = _nickname; - map['headimg'] = _headimg; - map['userType'] = _userType; - map['sex'] = _sex; - map['level'] = _level; - map['remark'] = _remark; - map['createTime'] = _createTime; - map['birth'] = _birth; - map['organic'] = _organic; - map['age'] = _age; - map['signature'] = _signature; - map['background'] = _background; - map['follow'] = _follow; - map['fans'] = _fans; - map['trendTotal'] = _trendTotal; - map['gainLikeTotal'] = _gainLikeTotal; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/member_comment_list.dart b/lib/retrofit/data/member_comment_list.dart deleted file mode 100644 index 193f7b82..00000000 --- a/lib/retrofit/data/member_comment_list.dart +++ /dev/null @@ -1,92 +0,0 @@ - -/// content : "" -/// createTime : "" -/// createUser : "0" -/// hidden : true -/// id : "0" -/// isDelete : 0 -/// likes : 0 -/// mid : "0" -/// parentContent : "" -/// parentId : "0" -/// parentMid : "0" -/// parentUserAvatarUrl : "" -/// parentUserName : "" -/// relationalId : "0" -/// relationalType : 0 -/// updateTime : "" -/// updateUser : "0" -/// userAvatarUrl : "" -/// username : "" - -class MemberCommentList { - String content; - String createTime; - String createUser; - bool hidden; - String id; - int isDelete; - int likes; - String mid; - String parentContent; - String parentId; - String parentMid; - String parentUserAvatarUrl; - String parentUserName; - String relationalId; - int relationalType; - String updateTime; - String updateUser; - String userAvatarUrl; - String username; - bool liked; - - static MemberCommentList fromJson(Map map) { - if (map == null) return null; - MemberCommentList listBean = MemberCommentList(); - listBean.content = map['content']; - listBean.createTime = map['createTime']; - listBean.createUser = map['createUser']; - listBean.hidden = map['hidden']; - listBean.id = map['id']; - listBean.isDelete = map['isDelete']; - listBean.likes = map['likes']; - listBean.mid = map['mid']; - listBean.parentContent = map['parentContent']; - listBean.parentId = map['parentId']; - listBean.parentMid = map['parentMid']; - listBean.parentUserAvatarUrl = map['parentUserAvatarUrl']; - listBean.parentUserName = map['parentUserName']; - listBean.relationalId = map['relationalId']; - listBean.relationalType = map['relationalType']; - listBean.updateTime = map['updateTime']; - listBean.updateUser = map['updateUser']; - listBean.userAvatarUrl = map['userAvatarUrl']; - listBean.username = map['username']; - listBean.liked = map['liked']; - return listBean; - } - - Map toJson() => { - "content": content, - "createTime": createTime, - "createUser": createUser, - "hidden": hidden, - "id": id, - "isDelete": isDelete, - "likes": likes, - "mid": mid, - "parentContent": parentContent, - "parentId": parentId, - "parentMid": parentMid, - "parentUserAvatarUrl": parentUserAvatarUrl, - "parentUserName": parentUserName, - "relationalId": relationalId, - "relationalType": relationalType, - "updateTime": updateTime, - "updateUser": updateUser, - "userAvatarUrl": userAvatarUrl, - "username": username, - "liked": liked, - }; -} \ No newline at end of file diff --git a/lib/retrofit/data/member_rank.dart b/lib/retrofit/data/member_rank.dart deleted file mode 100644 index 9de56f34..00000000 --- a/lib/retrofit/data/member_rank.dart +++ /dev/null @@ -1,37 +0,0 @@ - -class MemberRank { - MemberRank(); - - String id; - String nextId; - String nextName; - int nextOrigin; - String rankContent; - String rankImg; - String rankName; - int rankOrigin; - bool status; - - factory MemberRank.fromJson(Map json) => MemberRank() - ..id = json['id'] as String - ..nextId = json['nextId'] as String - ..nextName = json['nextName'] as String - ..nextOrigin = json['nextOrigin'] as int - ..rankContent = json['rankContent'] as String - ..rankImg = json['rankImg'] as String - ..rankName = json['rankName'] as String - ..rankOrigin = json['rankOrigin'] as int - ..status = json['status'] as bool; - - Map toJson() =>{ - 'id': this.id, - 'nextId': this.nextId, - 'nextName': this.nextName, - 'nextOrigin': this.nextOrigin, - 'rankContent': this.rankContent, - 'rankImg': this.rankImg, - 'rankName': this.rankName, - 'rankOrigin': this.rankOrigin, - 'status': this.status, - }; -} diff --git a/lib/retrofit/data/member_recharge_list.dart b/lib/retrofit/data/member_recharge_list.dart deleted file mode 100644 index 0fa2db51..00000000 --- a/lib/retrofit/data/member_recharge_list.dart +++ /dev/null @@ -1,159 +0,0 @@ -/// id : "1681490552371019776" -/// rechargeMoney : "100.00" -/// giftdMoney : "10.00" -/// limitNum : 0 -/// gitfdCouponId : null -/// startDate : null -/// endDate : null -/// startTime : null -/// endTime : null -/// tenantCode : "1175" -/// createTime : "2023-07-21 09:22:53" -/// isDeleted : 0 -/// rechargeType : 0 -/// remark : "充值100.00 赠送10.00" -/// sortValue : 0 -/// useNum : 0 - -class MemberRechargeList { - MemberRechargeList({ - String id, - String rechargeMoney, - String giftdMoney, - dynamic limitNum, - dynamic gitfdCouponId, - dynamic startDate, - dynamic endDate, - dynamic startTime, - dynamic endTime, - String tenantCode, - String createTime, - num isDeleted, - num rechargeType, - String remark, - num sortValue, - dynamic useNum,}){ - _id = id; - _rechargeMoney = rechargeMoney; - _giftdMoney = giftdMoney; - _limitNum = limitNum; - _gitfdCouponId = gitfdCouponId; - _startDate = startDate; - _endDate = endDate; - _startTime = startTime; - _endTime = endTime; - _tenantCode = tenantCode; - _createTime = createTime; - _isDeleted = isDeleted; - _rechargeType = rechargeType; - _remark = remark; - _sortValue = sortValue; - _useNum = useNum; -} - - MemberRechargeList.fromJson(dynamic json) { - _id = json['id']; - _rechargeMoney = json['rechargeMoney']; - _giftdMoney = json['giftdMoney']; - _limitNum = json['limitNum']; - _gitfdCouponId = json['gitfdCouponId']; - _startDate = json['startDate']; - _endDate = json['endDate']; - _startTime = json['startTime']; - _endTime = json['endTime']; - _tenantCode = json['tenantCode']; - _createTime = json['createTime']; - _isDeleted = json['isDeleted']; - _rechargeType = json['rechargeType']; - _remark = json['remark']; - _sortValue = json['sortValue']; - _useNum = json['useNum']; - } - String _id; - String _rechargeMoney; - String _giftdMoney; - dynamic _limitNum; - dynamic _gitfdCouponId; - dynamic _startDate; - dynamic _endDate; - dynamic _startTime; - dynamic _endTime; - String _tenantCode; - String _createTime; - num _isDeleted; - num _rechargeType; - String _remark; - num _sortValue; - dynamic _useNum; -MemberRechargeList copyWith({ String id, - String rechargeMoney, - String giftdMoney, - dynamic limitNum, - dynamic gitfdCouponId, - dynamic startDate, - dynamic endDate, - dynamic startTime, - dynamic endTime, - String tenantCode, - String createTime, - num isDeleted, - num rechargeType, - String remark, - num sortValue, - dynamic useNum, -}) => MemberRechargeList( id: id ?? _id, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - giftdMoney: giftdMoney ?? _giftdMoney, - limitNum: limitNum ?? _limitNum, - gitfdCouponId: gitfdCouponId ?? _gitfdCouponId, - startDate: startDate ?? _startDate, - endDate: endDate ?? _endDate, - startTime: startTime ?? _startTime, - endTime: endTime ?? _endTime, - tenantCode: tenantCode ?? _tenantCode, - createTime: createTime ?? _createTime, - isDeleted: isDeleted ?? _isDeleted, - rechargeType: rechargeType ?? _rechargeType, - remark: remark ?? _remark, - sortValue: sortValue ?? _sortValue, - useNum: useNum ?? _useNum, -); - String get id => _id; - String get rechargeMoney => _rechargeMoney; - String get giftdMoney => _giftdMoney; - dynamic get limitNum => _limitNum; - dynamic get gitfdCouponId => _gitfdCouponId; - dynamic get startDate => _startDate; - dynamic get endDate => _endDate; - dynamic get startTime => _startTime; - dynamic get endTime => _endTime; - String get tenantCode => _tenantCode; - String get createTime => _createTime; - num get isDeleted => _isDeleted; - num get rechargeType => _rechargeType; - String get remark => _remark; - num get sortValue => _sortValue; - dynamic get useNum => _useNum; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['rechargeMoney'] = _rechargeMoney; - map['giftdMoney'] = _giftdMoney; - map['limitNum'] = _limitNum; - map['gitfdCouponId'] = _gitfdCouponId; - map['startDate'] = _startDate; - map['endDate'] = _endDate; - map['startTime'] = _startTime; - map['endTime'] = _endTime; - map['tenantCode'] = _tenantCode; - map['createTime'] = _createTime; - map['isDeleted'] = _isDeleted; - map['rechargeType'] = _rechargeType; - map['remark'] = _remark; - map['sortValue'] = _sortValue; - map['useNum'] = _useNum; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/member_source.dart b/lib/retrofit/data/member_source.dart deleted file mode 100644 index 1cea0162..00000000 --- a/lib/retrofit/data/member_source.dart +++ /dev/null @@ -1,198 +0,0 @@ -/// id : "1412687522458238976" -/// createTime : "2021-07-07 16:18:46" -/// createUser : "1405494095400402944" -/// updateTime : "2021-07-07 16:18:46" -/// updateUser : "1405494095400402944" -/// mid : "1405494095400402944" -/// openid : "" -/// nickname : "" -/// headimg : "" -/// balance : "1780.00" -/// realRecharge : "988.89" -/// sex : "0" -/// status : true -/// onCredit : false -/// loginTime : "2021-07-20 17:28:57" -/// loginNum : 30 -/// tenantCode : "1177" -/// source : 1 -/// expendAmount : "20.00" -/// buyTimes : 1 -/// lastBuyTime : "2021-07-20 16:15:02" -/// vip_no : null -/// expireTime : null -/// integral : 0 -/// level : 1 -/// vipRegStore : null - -class MemberSource { - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _openid; - String _nickname; - String _headimg; - String _balance; - String _realRecharge; - String _sex; - bool _status; - bool _onCredit; - String _loginTime; - int _loginNum; - String _tenantCode; - int _source; - String _expendAmount; - int _buyTimes; - String _lastBuyTime; - dynamic _vipNo; - dynamic _expireTime; - int _integral; - int _level; - dynamic _vipRegStore; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get openid => _openid; - String get nickname => _nickname; - String get headimg => _headimg; - String get balance => _balance; - String get realRecharge => _realRecharge; - String get sex => _sex; - bool get status => _status; - bool get onCredit => _onCredit; - String get loginTime => _loginTime; - int get loginNum => _loginNum; - String get tenantCode => _tenantCode; - int get source => _source; - String get expendAmount => _expendAmount; - int get buyTimes => _buyTimes; - String get lastBuyTime => _lastBuyTime; - dynamic get vipNo => _vipNo; - dynamic get expireTime => _expireTime; - int get integral => _integral; - int get level => _level; - dynamic get vipRegStore => _vipRegStore; - - MemberSource({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String openid, - String nickname, - String headimg, - String balance, - String realRecharge, - String sex, - bool status, - bool onCredit, - String loginTime, - int loginNum, - String tenantCode, - int source, - String expendAmount, - int buyTimes, - String lastBuyTime, - dynamic vipNo, - dynamic expireTime, - int integral, - int level, - dynamic vipRegStore}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _openid = openid; - _nickname = nickname; - _headimg = headimg; - _balance = balance; - _realRecharge = realRecharge; - _sex = sex; - _status = status; - _onCredit = onCredit; - _loginTime = loginTime; - _loginNum = loginNum; - _tenantCode = tenantCode; - _source = source; - _expendAmount = expendAmount; - _buyTimes = buyTimes; - _lastBuyTime = lastBuyTime; - _vipNo = vipNo; - _expireTime = expireTime; - _integral = integral; - _level = level; - _vipRegStore = vipRegStore; -} - - MemberSource.fromJson(dynamic json) { - _id = json["id"]; - _createTime = json["createTime"]; - _createUser = json["createUser"]; - _updateTime = json["updateTime"]; - _updateUser = json["updateUser"]; - _mid = json["mid"]; - _openid = json["openid"]; - _nickname = json["nickname"]; - _headimg = json["headimg"]; - _balance = json["balance"]; - _realRecharge = json["realRecharge"]; - _sex = json["sex"]; - _status = json["status"]; - _onCredit = json["onCredit"]; - _loginTime = json["loginTime"]; - _loginNum = json["loginNum"]; - _tenantCode = json["tenantCode"]; - _source = json["source"]; - _expendAmount = json["expendAmount"]; - _buyTimes = json["buyTimes"]; - _lastBuyTime = json["lastBuyTime"]; - _vipNo = json["vip_no"]; - _expireTime = json["expireTime"]; - _integral = json["integral"]; - _level = json["level"]; - _vipRegStore = json["vipRegStore"]; - } - - Map toJson() { - var map = {}; - map["id"] = _id; - map["createTime"] = _createTime; - map["createUser"] = _createUser; - map["updateTime"] = _updateTime; - map["updateUser"] = _updateUser; - map["mid"] = _mid; - map["openid"] = _openid; - map["nickname"] = _nickname; - map["headimg"] = _headimg; - map["balance"] = _balance; - map["realRecharge"] = _realRecharge; - map["sex"] = _sex; - map["status"] = _status; - map["onCredit"] = _onCredit; - map["loginTime"] = _loginTime; - map["loginNum"] = _loginNum; - map["tenantCode"] = _tenantCode; - map["source"] = _source; - map["expendAmount"] = _expendAmount; - map["buyTimes"] = _buyTimes; - map["lastBuyTime"] = _lastBuyTime; - map["vip_no"] = _vipNo; - map["expireTime"] = _expireTime; - map["integral"] = _integral; - map["level"] = _level; - map["vipRegStore"] = _vipRegStore; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/message.dart b/lib/retrofit/data/message.dart deleted file mode 100644 index 395b2bea..00000000 --- a/lib/retrofit/data/message.dart +++ /dev/null @@ -1,106 +0,0 @@ -/// id : "1483062749750624256" -/// createTime : "2022-01-17 21:04:48" -/// createUser : "0" -/// updateTime : "2022-01-17 21:04:48" -/// updateUser : "0" -/// mid : "1478548672881885184" -/// title : "粉丝关注" -/// content : "哈哈哈关注了你!" -/// typed : 4 -/// relational : "{\"businessId\":1483062749356359680,\"mid\":1379254113602109440,\"avatar\":\"https://pos.upload.gznl.top/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg\",\"typed\":\"MEMBER\",\"nickname\":\"哈哈哈\",\"action\":\"FOLLOW\",\"receiveMid\":1478548672881885184}" -/// state : 0 -/// isDelete : 0 -/// followed : false - -class Message { - Message({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String title, - String content, - int typed, - String relational, - int state, - int isDelete, - bool followed,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _title = title; - _content = content; - _typed = typed; - _relational = relational; - _state = state; - _isDelete = isDelete; - _followed = followed; -} - - Message.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _title = json['title']; - _content = json['content']; - _typed = json['typed']; - _relational = json['relational']; - _state = json['state']; - _isDelete = json['isDelete']; - _followed = json['followed']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _title; - String _content; - int _typed; - String _relational; - int _state; - int _isDelete; - bool _followed; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get title => _title; - String get content => _content; - int get typed => _typed; - String get relational => _relational; - int get state => _state; - int get isDelete => _isDelete; - bool get followed => _followed; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['title'] = _title; - map['content'] = _content; - map['typed'] = _typed; - map['relational'] = _relational; - map['state'] = _state; - map['isDelete'] = _isDelete; - map['followed'] = _followed; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/miNiDetail.dart b/lib/retrofit/data/miNiDetail.dart deleted file mode 100644 index 8b116c3e..00000000 --- a/lib/retrofit/data/miNiDetail.dart +++ /dev/null @@ -1,1064 +0,0 @@ -/// id : "1433994980233314304" -/// createTime : "2021-09-04 11:27:00" -/// createUser : "1333246101196636160" -/// updateTime : "2021-10-08 15:51:01" -/// updateUser : "1333246101196636160" -/// supplierName : "����" -/// storeId : "1333246101343436800" -/// categoryId : "1300688133322440704" -/// groupId : "1426086173217914880" -/// shortName : "����" -/// productName : "�������̲�" -/// sellDesc : "" -/// productCode : "PRO202109041127000000000000001" -/// weight : "0" -/// applyPrice : "0.00" -/// price : "5.00" -/// stock : -52 -/// sellCount : 25 -/// needLogistics : 1 -/// oversold : 1 -/// status : 1 -/// posShow : true -/// productType : 0 -/// productNumber : 0 -/// setMeal : 1 -/// attrStyle : 1 -/// isDelete : 0 -/// printerFlag : "DEFAULT" -/// materialId : null -/// imgs : ["https://pos.upload.gznl.top/1175/2021/09/b87e91a4-fe36-4268-803a-94e5bfaea3eb.webp"] -/// storeDTO : {"id":"1333246101343436800","storeName":"��Ͽ���ò��(���ֵ�)","nickName":"","logo":"https://pos.upload.gznl.top/1175/2021/07/ae873881-b3ab-4332-b863-f3055b200e07.webp","productCount":31,"soldNum":1518} -/// attrList : [{"productId":"1433994980233314304","attrName":"�¶�","sortOrder":null,"needImg":false,"isDelete":0,"attrCode":null,"id":"1433994980644356096","attrValueList":[{"id":"1434076666832879616","attrId":"1433994980644356096","attrValue":"ȥ��","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null},{"id":"1433994980849876992","attrId":"1433994980644356096","attrValue":"�ٱ�","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null},{"id":"1434076667034206208","attrId":"1433994980644356096","attrValue":"������","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null}]},{"productId":"1433994980233314304","attrName":"����","sortOrder":0,"needImg":false,"isDelete":0,"attrCode":null,"id":"1434076668170862592","attrValueList":[{"id":"1434076668615458816","attrId":"1434076668170862592","attrValue":"�б�","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null},{"id":"1434076668376383488","attrId":"1434076668170862592","attrValue":"��","attrValueImg":"","sortOrder":0,"isDelete":0,"attrValueCode":null}]},{"productId":"1433994980233314304","attrName":"���","sortOrder":0,"needImg":false,"isDelete":0,"attrCode":null,"id":"1434076667252310016","attrValueList":[{"id":"1434076667919204352","attrId":"1434076667252310016","attrValue":"����","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null},{"id":"1434076667696906240","attrId":"1434076667252310016","attrValue":"�����","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null},{"id":"1434076667478802432","attrId":"1434076667252310016","attrValue":"������","attrValueImg":"","sortOrder":0,"isDelete":0,"attrValueCode":null}]}] -/// productSkuVOList : [{"id":"1446382612795883520","createTime":"2021-09-04 16:51:38","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:38","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651376","skuNameStr":"ȥ�� �б� ����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382613043347456","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382612795883520","attrId":"1433994980644356096","attrValueId":"1434076666832879616","sortOrder":null,"isDelete":0},{"id":"1446382613278228480","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382612795883520","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382613479555072","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382612795883520","attrId":"1434076667252310016","attrValueId":"1434076667919204352","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382613697658880","createTime":"2021-09-04 16:51:37","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:37","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651374","skuNameStr":"ȥ�� �б� �����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382613911568384","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382613697658880","attrId":"1433994980644356096","attrValueId":"1434076666832879616","sortOrder":null,"isDelete":0},{"id":"1446382614112894976","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382613697658880","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382614330998784","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382613697658880","attrId":"1434076667252310016","attrValueId":"1434076667696906240","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382614553296896","createTime":"2021-09-04 16:51:37","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:37","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651362","skuNameStr":"ȥ�� �б� ������","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382614788177920","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382614553296896","attrId":"1433994980644356096","attrValueId":"1434076666832879616","sortOrder":null,"isDelete":0},{"id":"1446382615002087424","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382614553296896","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382615199219712","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382614553296896","attrId":"1434076667252310016","attrValueId":"1434076667478802432","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382615413129216","createTime":"2021-09-04 16:51:38","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:38","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651375","skuNameStr":"ȥ�� �� ����","productId":"1433994980233314304","skuPrice":"10.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-4,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382615639621632","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382615413129216","attrId":"1433994980644356096","attrValueId":"1434076666832879616","sortOrder":null,"isDelete":0},{"id":"1446382615845142528","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382615413129216","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382616050663424","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382615413129216","attrId":"1434076667252310016","attrValueId":"1434076667919204352","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382616281350144","createTime":"2021-09-04 16:51:37","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:37","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651373","skuNameStr":"ȥ�� �� �����","productId":"1433994980233314304","skuPrice":"10.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382616516231168","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382616281350144","attrId":"1433994980644356096","attrValueId":"1434076666832879616","sortOrder":null,"isDelete":0},{"id":"1446382616734334976","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382616281350144","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382616935661568","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382616281350144","attrId":"1434076667252310016","attrValueId":"1434076667696906240","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382617149571072","createTime":"2021-09-04 16:51:37","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:37","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651361","skuNameStr":"ȥ�� �� ������","productId":"1433994980233314304","skuPrice":"10.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382617363480576","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382617149571072","attrId":"1433994980644356096","attrValueId":"1434076666832879616","sortOrder":null,"isDelete":0},{"id":"1446382617573195776","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382617149571072","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382617787105280","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382617149571072","attrId":"1434076667252310016","attrValueId":"1434076667478802432","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382618005209088","createTime":"2021-09-04 11:27:00","createUser":"1333246101196636160","updateTime":"2021-09-04 11:27:00","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041127002","skuNameStr":"�ٱ� �б� ����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382618231701504","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382618005209088","attrId":"1433994980644356096","attrValueId":"1433994980849876992","sortOrder":null,"isDelete":0},{"id":"1446382618458193920","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382618005209088","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382618676297728","createTime":"2021-10-08 15:51:03","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:03","updateUser":"1333246101196636160","skuId":"1446382618005209088","attrId":"1434076667252310016","attrValueId":"1434076667919204352","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382618890207232","createTime":"2021-09-04 11:27:00","createUser":"1333246101196636160","updateTime":"2021-09-04 11:27:00","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041127002","skuNameStr":"�ٱ� �б� �����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382619104116736","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382618890207232","attrId":"1433994980644356096","attrValueId":"1433994980849876992","sortOrder":null,"isDelete":0},{"id":"1446382619318026240","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382618890207232","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382619531935744","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382618890207232","attrId":"1434076667252310016","attrValueId":"1434076667696906240","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382619737456640","createTime":"2021-09-04 11:27:00","createUser":"1333246101196636160","updateTime":"2021-09-04 11:27:00","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041127002","skuNameStr":"�ٱ� �б� ������","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382619951366144","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382619737456640","attrId":"1433994980644356096","attrValueId":"1433994980849876992","sortOrder":null,"isDelete":0},{"id":"1446382620148498432","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382619737456640","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382620362407936","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382619737456640","attrId":"1434076667252310016","attrValueId":"1434076667478802432","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382620626649088","createTime":"2021-09-04 11:27:00","createUser":"1333246101196636160","updateTime":"2021-09-04 11:27:00","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041127002","skuNameStr":"�ٱ� �� ����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382620907667456","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382620626649088","attrId":"1433994980644356096","attrValueId":"1433994980849876992","sortOrder":null,"isDelete":0},{"id":"1446382621121576960","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382620626649088","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382621335486464","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382620626649088","attrId":"1434076667252310016","attrValueId":"1434076667919204352","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382621549395968","createTime":"2021-09-04 11:27:00","createUser":"1333246101196636160","updateTime":"2021-09-04 11:27:00","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041127002","skuNameStr":"�ٱ� �� �����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382621759111168","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382621549395968","attrId":"1433994980644356096","attrValueId":"1433994980849876992","sortOrder":null,"isDelete":0},{"id":"1446382621968826368","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382621549395968","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382622178541568","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382621549395968","attrId":"1434076667252310016","attrValueId":"1434076667696906240","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382622400839680","createTime":"2021-09-04 11:27:00","createUser":"1333246101196636160","updateTime":"2021-09-04 11:27:00","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041127002","skuNameStr":"�ٱ� �� ������","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":"","weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382622610554880","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382622400839680","attrId":"1433994980644356096","attrValueId":"1433994980849876992","sortOrder":null,"isDelete":0},{"id":"1446382622828658688","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382622400839680","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382623038373888","createTime":"2021-10-08 15:51:04","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:04","updateUser":"1333246101196636160","skuId":"1446382622400839680","attrId":"1434076667252310016","attrValueId":"1434076667478802432","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382623277449216","createTime":"2021-09-04 16:51:39","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:39","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651394","skuNameStr":"������ �б� ����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382623491358720","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382623277449216","attrId":"1433994980644356096","attrValueId":"1434076667034206208","sortOrder":null,"isDelete":0},{"id":"1446382623709462528","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382623277449216","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382623919177728","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382623277449216","attrId":"1434076667252310016","attrValueId":"1434076667919204352","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382624149864448","createTime":"2021-09-04 16:51:39","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:39","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651382","skuNameStr":"������ �б� �����","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-1,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382624393134080","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382624149864448","attrId":"1433994980644356096","attrValueId":"1434076667034206208","sortOrder":null,"isDelete":0},{"id":"1446382624607043584","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382624149864448","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382624816758784","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382624149864448","attrId":"1434076667252310016","attrValueId":"1434076667696906240","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382625043251200","createTime":"2021-09-04 16:51:38","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:38","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651388","skuNameStr":"������ �б� ������","productId":"1433994980233314304","skuPrice":"5.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-2,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382625252966400","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382625043251200","attrId":"1433994980644356096","attrValueId":"1434076667034206208","sortOrder":null,"isDelete":0},{"id":"1446382625462681600","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382625043251200","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382625701756928","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382625043251200","attrId":"1434076667252310016","attrValueId":"1434076667478802432","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382625907277824","createTime":"2021-09-04 16:51:39","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:39","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651383","skuNameStr":"������ �� ����","productId":"1433994980233314304","skuPrice":"10.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-5,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382626125381632","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382625907277824","attrId":"1433994980644356096","attrValueId":"1434076667034206208","sortOrder":null,"isDelete":0},{"id":"1446382626335096832","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382625907277824","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382626553200640","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382625907277824","attrId":"1434076667252310016","attrValueId":"1434076667919204352","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382626800664576","createTime":"2021-09-04 16:51:39","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:39","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651389","skuNameStr":"������ �� �����","productId":"1433994980233314304","skuPrice":"10.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-1,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382627006185472","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382626800664576","attrId":"1433994980644356096","attrValueId":"1434076667034206208","sortOrder":null,"isDelete":0},{"id":"1446382627211706368","createTime":"2021-10-08 15:51:05","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:05","updateUser":"1333246101196636160","skuId":"1446382626800664576","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382627413032960","createTime":"2021-10-08 15:51:06","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:06","updateUser":"1333246101196636160","skuId":"1446382626800664576","attrId":"1434076667252310016","attrValueId":"1434076667696906240","sortOrder":null,"isDelete":0}],"setMealDTOList":null},{"id":"1446382627631136768","createTime":"2021-09-04 16:51:38","createUser":"1333246101196636160","updateTime":"2021-09-04 16:51:38","updateUser":"1333246101196636160","storeId":"1333246101343436800","skuCode":"P202109041651387","skuNameStr":"������ �� ������","productId":"1433994980233314304","skuPrice":"10.00","applyPrice":"0.00","vipPrice":null,"skuImg":null,"skuStock":-3,"sort":null,"setMeal":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":null,"skuAttrCodeDTOList":null,"skuAttrList":[{"id":"1446382627866017792","createTime":"2021-10-08 15:51:06","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:06","updateUser":"1333246101196636160","skuId":"1446382627631136768","attrId":"1433994980644356096","attrValueId":"1434076667034206208","sortOrder":null,"isDelete":0},{"id":"1446382628092510208","createTime":"2021-10-08 15:51:06","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:06","updateUser":"1333246101196636160","skuId":"1446382627631136768","attrId":"1434076668170862592","attrValueId":"1434076668376383488","sortOrder":null,"isDelete":0},{"id":"1446382628306419712","createTime":"2021-10-08 15:51:06","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:06","updateUser":"1333246101196636160","skuId":"1446382627631136768","attrId":"1434076667252310016","attrValueId":"1434076667478802432","sortOrder":null,"isDelete":0}],"setMealDTOList":null}] -/// shipAddress : "����·��Ͽ�����̲�" -/// buyCount : 3 -/// promotionShowVOList : [] -/// buyNum : 1 -/// productPlatterInfos : null -/// markProductNone : null -/// namePinyin : null -/// nameInitials : null - -class MiNiDetail { - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String supplierName; - String storeId; - String categoryId; - String groupId; - String shortName; - String productName; - String sellDesc; - String productCode; - String weight; - String applyPrice; - String price; - int stock; - int sellCount; - int needLogistics; - int oversold; - int organic; - int status; - bool posShow; - int productType; - int productNumber; - int setMeal; - int attrStyle; - String detail; - String details; - int isDelete; - String printerFlag; - String thumbnailImg; - dynamic materialId; - List imgs; - StoreDTOBean storeDTO; - List attrList; - List productSkuVOList; - String shipAddress; - int buyCount; - List promotionShowVOList; - int buyNum; - dynamic productPlatterInfos; - dynamic markProductNone; - dynamic namePinyin; - dynamic nameInitials; - SubscribeParam subscribeParam; - - static MiNiDetail fromJson(Map map) { - if (map == null) return null; - MiNiDetail miNiDetailBean = MiNiDetail(); - miNiDetailBean.id = map['id']; - miNiDetailBean.createTime = map['createTime']; - miNiDetailBean.createUser = map['createUser']; - miNiDetailBean.updateTime = map['updateTime']; - miNiDetailBean.updateUser = map['updateUser']; - miNiDetailBean.supplierName = map['supplierName']; - miNiDetailBean.storeId = map['storeId']; - miNiDetailBean.categoryId = map['categoryId']; - miNiDetailBean.groupId = map['groupId']; - miNiDetailBean.shortName = map['shortName']; - miNiDetailBean.productName = map['productName']; - miNiDetailBean.sellDesc = map['sellDesc']; - miNiDetailBean.productCode = map['productCode']; - miNiDetailBean.weight = map['weight']; - miNiDetailBean.applyPrice = map['applyPrice']; - miNiDetailBean.price = map['price']; - miNiDetailBean.stock = map['stock']; - miNiDetailBean.sellCount = map['sellCount']; - miNiDetailBean.needLogistics = map['needLogistics']; - miNiDetailBean.oversold = map['oversold']; - miNiDetailBean.organic = map['organic']; - miNiDetailBean.status = map['status']; - miNiDetailBean.posShow = map['posShow']; - miNiDetailBean.productType = map['productType']; - miNiDetailBean.productNumber = map['productNumber']; - miNiDetailBean.setMeal = map['setMeal']; - miNiDetailBean.attrStyle = map['attrStyle']; - miNiDetailBean.detail = map['detail']; - miNiDetailBean.details = map['details']; - miNiDetailBean.isDelete = map['isDelete']; - miNiDetailBean.printerFlag = map['printerFlag']; - miNiDetailBean.thumbnailImg = map['thumbnailImg']; - miNiDetailBean.materialId = map['materialId']; - miNiDetailBean.imgs = [] - ..addAll((map['imgs'] as List ?? []).map((o) => o.toString())); - miNiDetailBean.storeDTO = StoreDTOBean.fromJson(map['storeDTO']); - miNiDetailBean.attrList = []..addAll( - (map['attrList'] as List ?? []).map((o) => AttrListBean.fromJson(o))); - miNiDetailBean.productSkuVOList = []..addAll( - (map['productSkuVOList'] as List ?? []) - .map((o) => ProductSkuVOListBean.fromJson(o))); - miNiDetailBean.shipAddress = map['shipAddress']; - miNiDetailBean.buyCount = map['buyCount']; - miNiDetailBean.promotionShowVOList = map['promotionShowVOList']; - miNiDetailBean.buyNum = map['buyNum']; - miNiDetailBean.productPlatterInfos = map['productPlatterInfos']; - miNiDetailBean.markProductNone = map['markProductNone']; - miNiDetailBean.namePinyin = map['namePinyin']; - miNiDetailBean.nameInitials = map['nameInitials']; - miNiDetailBean.subscribeParam = - SubscribeParam.fromJson(map['subscribeParam']); - return miNiDetailBean; - } - - Map toJson() => { - "id": id, - "createTime": createTime, - "createUser": createUser, - "updateTime": updateTime, - "updateUser": updateUser, - "supplierName": supplierName, - "storeId": storeId, - "categoryId": categoryId, - "groupId": groupId, - "shortName": shortName, - "productName": productName, - "sellDesc": sellDesc, - "productCode": productCode, - "weight": weight, - "applyPrice": applyPrice, - "price": price, - "stock": stock, - "sellCount": sellCount, - "needLogistics": needLogistics, - "oversold": oversold, - "organic": organic, - "status": status, - "posShow": posShow, - "productType": productType, - "productNumber": productNumber, - "setMeal": setMeal, - "attrStyle": attrStyle, - "detail": detail, - "details": details, - "isDelete": isDelete, - "printerFlag": printerFlag, - "thumbnailImg": thumbnailImg, - "materialId": materialId, - "imgs": imgs, - "storeDTO": storeDTO, - "attrList": attrList, - "productSkuVOList": productSkuVOList, - "shipAddress": shipAddress, - "buyCount": buyCount, - "promotionShowVOList": promotionShowVOList, - "buyNum": buyNum, - "productPlatterInfos": productPlatterInfos, - "markProductNone": markProductNone, - "namePinyin": namePinyin, - "nameInitials": nameInitials, - "subscribeParam": subscribeParam, - }; -} - -/// id : "1446382612795883520" -/// createTime : "2021-09-04 16:51:38" -/// createUser : "1333246101196636160" -/// updateTime : "2021-09-04 16:51:38" -/// updateUser : "1333246101196636160" -/// storeId : "1333246101343436800" -/// skuCode : "P202109041651376" -/// skuNameStr : "ȥ�� �б� ����" -/// productId : "1433994980233314304" -/// skuPrice : "5.00" -/// applyPrice : "0.00" -/// vipPrice : null -/// skuImg : null -/// skuStock : -3 -/// sort : null -/// setMeal : null -/// weight : 0.0 -/// volume : 0.0 -/// isDelete : 0 -/// material : null -/// version : null -/// skuAttrCodeDTOList : null -/// skuAttrList : [{"id":"1446382613043347456","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382612795883520","attrId":"1433994980644356096","attrValueId":"1434076666832879616","sortOrder":null,"isDelete":0},{"id":"1446382613278228480","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382612795883520","attrId":"1434076668170862592","attrValueId":"1434076668615458816","sortOrder":null,"isDelete":0},{"id":"1446382613479555072","createTime":"2021-10-08 15:51:02","createUser":"1333246101196636160","updateTime":"2021-10-08 15:51:02","updateUser":"1333246101196636160","skuId":"1446382612795883520","attrId":"1434076667252310016","attrValueId":"1434076667919204352","sortOrder":null,"isDelete":0}] -/// setMealDTOList : null - -class ProductSkuVOListBean { - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String storeId; - String skuCode; - String skuNameStr; - String productId; - String skuPrice; - String applyPrice; - dynamic vipPrice; - dynamic skuImg; - int skuStock; - dynamic sort; - dynamic setMeal; - double weight; - double volume; - int isDelete; - dynamic material; - dynamic version; - dynamic skuAttrCodeDTOList; - List skuAttrList; - List productSetMeals; - dynamic setMealDTOList; - - static ProductSkuVOListBean fromJson(Map map) { - if (map == null) return null; - ProductSkuVOListBean productSkuVOListBean = ProductSkuVOListBean(); - productSkuVOListBean.id = map['id']; - productSkuVOListBean.createTime = map['createTime']; - productSkuVOListBean.createUser = map['createUser']; - productSkuVOListBean.updateTime = map['updateTime']; - productSkuVOListBean.updateUser = map['updateUser']; - productSkuVOListBean.storeId = map['storeId']; - productSkuVOListBean.skuCode = map['skuCode']; - productSkuVOListBean.skuNameStr = map['skuNameStr']; - productSkuVOListBean.productId = map['productId']; - productSkuVOListBean.skuPrice = map['skuPrice']; - productSkuVOListBean.applyPrice = map['applyPrice']; - productSkuVOListBean.vipPrice = map['vipPrice']; - productSkuVOListBean.skuImg = map['skuImg']; - productSkuVOListBean.skuStock = map['skuStock']; - productSkuVOListBean.sort = map['sort']; - productSkuVOListBean.setMeal = map['setMeal']; - productSkuVOListBean.weight = map['weight']; - productSkuVOListBean.volume = map['volume']; - productSkuVOListBean.isDelete = map['isDelete']; - productSkuVOListBean.material = map['material']; - productSkuVOListBean.version = map['version']; - productSkuVOListBean.skuAttrCodeDTOList = map['skuAttrCodeDTOList']; - productSkuVOListBean.skuAttrList = []..addAll( - (map['skuAttrList'] as List ?? []) - .map((o) => SkuAttrListBean.fromJson(o))); - productSkuVOListBean.productSetMeals = []..addAll( - (map['productSetMeals'] as List ?? []) - .map((o) => ProductSetMeals.fromJson(o))); - productSkuVOListBean.setMealDTOList = map['setMealDTOList']; - return productSkuVOListBean; - } - - Map toJson() => { - "id": id, - "createTime": createTime, - "createUser": createUser, - "updateTime": updateTime, - "updateUser": updateUser, - "storeId": storeId, - "skuCode": skuCode, - "skuNameStr": skuNameStr, - "productId": productId, - "skuPrice": skuPrice, - "applyPrice": applyPrice, - "vipPrice": vipPrice, - "skuImg": skuImg, - "skuStock": skuStock, - "sort": sort, - "setMeal": setMeal, - "weight": weight, - "volume": volume, - "isDelete": isDelete, - "material": material, - "version": version, - "skuAttrCodeDTOList": skuAttrCodeDTOList, - "skuAttrList": skuAttrList, - "setMealDTOList": setMealDTOList, - }; -} - -/// id : "1446382613043347456" -/// createTime : "2021-10-08 15:51:02" -/// createUser : "1333246101196636160" -/// updateTime : "2021-10-08 15:51:02" -/// updateUser : "1333246101196636160" -/// skuId : "1446382612795883520" -/// attrId : "1433994980644356096" -/// attrValueId : "1434076666832879616" -/// sortOrder : null -/// isDelete : 0 - -class SkuAttrListBean { - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String skuId; - String attrId; - String attrValueId; - dynamic sortOrder; - int isDelete; - - static SkuAttrListBean fromJson(Map map) { - if (map == null) return null; - SkuAttrListBean skuAttrListBean = SkuAttrListBean(); - skuAttrListBean.id = map['id']; - skuAttrListBean.createTime = map['createTime']; - skuAttrListBean.createUser = map['createUser']; - skuAttrListBean.updateTime = map['updateTime']; - skuAttrListBean.updateUser = map['updateUser']; - skuAttrListBean.skuId = map['skuId']; - skuAttrListBean.attrId = map['attrId']; - skuAttrListBean.attrValueId = map['attrValueId']; - skuAttrListBean.sortOrder = map['sortOrder']; - skuAttrListBean.isDelete = map['isDelete']; - return skuAttrListBean; - } - - Map toJson() => { - "id": id, - "createTime": createTime, - "createUser": createUser, - "updateTime": updateTime, - "updateUser": updateUser, - "skuId": skuId, - "attrId": attrId, - "attrValueId": attrValueId, - "sortOrder": sortOrder, - "isDelete": isDelete, - }; -} - -/// groupName : "酒水选1" -/// totalNumber : 4 -/// optionalNumber : 1 -/// productInfoList : [{"productId":"1372091668961951744","productName":"白云边12年300ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/34cbd11d-402c-4278-b1e3-8d1d780a8ee5.jpg","allSku":true,"skuInfoList":[{"id":"1372091669003894784","skuName":"","productSkuAttrList":[{"id":"1372091669012283392","createTime":"2021-03-17 15:45:21","createUser":"1311123845502992384","updateTime":"2021-03-17 15:45:21","updateUser":"1311123845502992384","skuId":"1372091669003894784","attrId":"1372091668978728960","attrValueId":"1372091668987117568","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372091668978728960","attrName":"","attrValueList":[{"attrId":"1372091668987117568","attrName":"","attrValueList":null}]}],"number":1},{"productId":"1372091974143705088","productName":"白云边9年250ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/333c5280-fe1f-4294-a334-0cf11b0ab7a6.jpg","allSku":true,"skuInfoList":[{"id":"1372091974194036736","skuName":"","productSkuAttrList":[{"id":"1372091974202425344","createTime":"2021-03-17 15:46:34","createUser":"1311123845502992384","updateTime":"2021-03-17 15:46:34","updateUser":"1311123845502992384","skuId":"1372091974194036736","attrId":"1372091974164676608","attrValueId":"1372091974173065216","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372091974164676608","attrName":"","attrValueList":[{"attrId":"1372091974173065216","attrName":"","attrValueList":null}]}],"number":1},{"productId":"1372092276561412096","productName":"毛铺紫荞酒500ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/b8869284-ccb8-4c97-8ba7-88a140ac4b08.jpg","allSku":true,"skuInfoList":[{"id":"1372092276607549440","skuName":"","productSkuAttrList":[{"id":"1372092276615938048","createTime":"2021-03-17 15:47:46","createUser":"1311123845502992384","updateTime":"2021-03-17 15:47:46","updateUser":"1311123845502992384","skuId":"1372092276607549440","attrId":"1372092276582383616","attrValueId":"1372092276594966528","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372092276582383616","attrName":"","attrValueList":[{"attrId":"1372092276594966528","attrName":"","attrValueList":null}]}],"number":1},{"productId":"1372092499190874112","productName":"毛铺苦荞酒500ml","productImg":"https://pos.upload.gznl.top/MDAwMA==/2021/03/f5a64d71-9b20-43d3-b992-89a5a270895b.jpg","allSku":true,"skuInfoList":[{"id":"1372092499237011456","skuName":"","productSkuAttrList":[{"id":"1372092499249594368","createTime":"2021-03-17 15:48:39","createUser":"1311123845502992384","updateTime":"2021-03-17 15:48:39","updateUser":"1311123845502992384","skuId":"1372092499237011456","attrId":"1372092499211845632","attrValueId":"1372092499224428544","sortOrder":null,"isDelete":0}]}],"productAttrInfoList":[{"attrId":"1372092499211845632","attrName":"","attrValueList":[{"attrId":"1372092499224428544","attrName":"","attrValueList":null}]}],"number":1}] - -class ProductSetMeals { - ProductSetMeals({ - String groupName, - int totalNumber, - int optionalNumber, - List productInfoList, - }) { - _groupName = groupName; - _totalNumber = totalNumber; - _optionalNumber = optionalNumber; - _productInfoList = productInfoList; - } - - ProductSetMeals.fromJson(dynamic json) { - _groupName = json['groupName']; - _totalNumber = json['totalNumber']; - _optionalNumber = json['optionalNumber']; - if (json['productInfoList'] != null) { - _productInfoList = []; - json['productInfoList'].forEach((v) { - _productInfoList.add(ProductInfoList.fromJson(v)); - }); - } - } - - String _groupName; - int _totalNumber; - int _optionalNumber; - List _productInfoList; - - ProductSetMeals copyWith({ - String groupName, - int totalNumber, - int optionalNumber, - List productInfoList, - }) => - ProductSetMeals( - groupName: groupName ?? _groupName, - totalNumber: totalNumber ?? _totalNumber, - optionalNumber: optionalNumber ?? _optionalNumber, - productInfoList: productInfoList ?? _productInfoList, - ); - - String get groupName => _groupName; - - int get totalNumber => _totalNumber; - - int get optionalNumber => _optionalNumber; - - List get productInfoList => _productInfoList; - - Map toJson() { - final map = {}; - map['groupName'] = _groupName; - map['totalNumber'] = _totalNumber; - map['optionalNumber'] = _optionalNumber; - if (_productInfoList != null) { - map['productInfoList'] = _productInfoList.map((v) => v.toJson()).toList(); - } - return map; - } -} - -/// productId : "1372091668961951744" -/// productName : "白云边12年300ml" -/// productImg : "https://pos.upload.gznl.top/MDAwMA==/2021/03/34cbd11d-402c-4278-b1e3-8d1d780a8ee5.jpg" -/// allSku : true -/// skuInfoList : [{"id":"1372091669003894784","skuName":"","productSkuAttrList":[{"id":"1372091669012283392","createTime":"2021-03-17 15:45:21","createUser":"1311123845502992384","updateTime":"2021-03-17 15:45:21","updateUser":"1311123845502992384","skuId":"1372091669003894784","attrId":"1372091668978728960","attrValueId":"1372091668987117568","sortOrder":null,"isDelete":0}]}] -/// productAttrInfoList : [{"attrId":"1372091668978728960","attrName":"","attrValueList":[{"attrId":"1372091668987117568","attrName":"","attrValueList":null}]}] -/// number : 1 - -class ProductInfoList { - ProductInfoList({ - String productId, - String productName, - String productImg, - bool allSku, - List skuInfoList, - List productAttrInfoList, - int number, - }) { - _productId = productId; - _productName = productName; - _productImg = productImg; - _allSku = allSku; - _skuInfoList = skuInfoList; - _productAttrInfoList = productAttrInfoList; - _number = number; - } - - ProductInfoList.fromJson(dynamic json) { - _productId = json['productId']; - _productName = json['productName']; - _productImg = json['productImg']; - _allSku = json['allSku']; - if (json['skuInfoList'] != null) { - _skuInfoList = []; - json['skuInfoList'].forEach((v) { - _skuInfoList.add(SkuInfoList.fromJson(v)); - }); - } - if (json['productAttrInfoList'] != null) { - _productAttrInfoList = []; - json['productAttrInfoList'].forEach((v) { - _productAttrInfoList.add(ProductAttrInfoList.fromJson(v)); - }); - } - _number = json['number']; - } - - String _productId; - String _productName; - String _productImg; - bool _allSku; - List _skuInfoList; - List _productAttrInfoList; - int _number; - int _count = 0; - - ProductInfoList copyWith({ - String productId, - String productName, - String productImg, - bool allSku, - List skuInfoList, - List productAttrInfoList, - int number, - }) => - ProductInfoList( - productId: productId ?? _productId, - productName: productName ?? _productName, - productImg: productImg ?? _productImg, - allSku: allSku ?? _allSku, - skuInfoList: skuInfoList ?? _skuInfoList, - productAttrInfoList: productAttrInfoList ?? _productAttrInfoList, - number: number ?? _number, - ); - - String get productId => _productId; - - String get productName => _productName; - - String get productImg => _productImg; - - bool get allSku => _allSku; - - List get skuInfoList => _skuInfoList; - - List get productAttrInfoList => _productAttrInfoList; - int number; - - int get count => _count; - - set count(int value) { - _count = value; - } - - Map toJson() { - final map = {}; - map['productId'] = _productId; - map['productName'] = _productName; - map['productImg'] = _productImg; - map['allSku'] = _allSku; - if (_skuInfoList != null) { - map['skuInfoList'] = _skuInfoList.map((v) => v.toJson()).toList(); - } - if (_productAttrInfoList != null) { - map['productAttrInfoList'] = - _productAttrInfoList.map((v) => v.toJson()).toList(); - } - map['number'] = _number; - return map; - } -} - -/// attrId : "1372091668978728960" -/// attrName : "" -/// attrValueList : [{"attrId":"1372091668987117568","attrName":"","attrValueList":null}] - -class ProductAttrInfoList { - ProductAttrInfoList({ - String attrId, - String attrName, - List attrValueList, - }) { - _attrId = attrId; - _attrName = attrName; - _attrValueList = attrValueList; - } - - ProductAttrInfoList.fromJson(dynamic json) { - _attrId = json['attrId']; - _attrName = json['attrName']; - if (json['attrValueList'] != null) { - _attrValueList = []; - json['attrValueList'].forEach((v) { - _attrValueList.add(AttrValueList.fromJson(v)); - }); - } - } - - String _attrId; - String _attrName; - List _attrValueList; - String _selectSku; - - ProductAttrInfoList copyWith({ - String attrId, - String attrName, - List attrValueList, - }) => - ProductAttrInfoList( - attrId: attrId ?? _attrId, - attrName: attrName ?? _attrName, - attrValueList: attrValueList ?? _attrValueList, - ); - - String get attrId => _attrId; - - String get attrName => _attrName; - - List get attrValueList => _attrValueList; - - String get selectSku => _selectSku; - - set selectSku(String value) { - _selectSku = value; - } - - Map toJson() { - final map = {}; - map['attrId'] = _attrId; - map['attrName'] = _attrName; - if (_attrValueList != null) { - map['attrValueList'] = _attrValueList.map((v) => v.toJson()).toList(); - } - return map; - } -} - -/// attrId : "1372091668987117568" -/// attrName : "" -/// attrValueList : null - -class AttrValueList { - AttrValueList({ - String attrId, - String attrName, - dynamic attrValueList, - }) { - _attrId = attrId; - _attrName = attrName; - _attrValueList = attrValueList; - } - - AttrValueList.fromJson(dynamic json) { - _attrId = json['attrId']; - _attrName = json['attrName']; - _attrValueList = json['attrValueList']; - } - - String _attrId; - String _attrName; - dynamic _attrValueList; - - AttrValueList copyWith({ - String attrId, - String attrName, - dynamic attrValueList, - }) => - AttrValueList( - attrId: attrId ?? _attrId, - attrName: attrName ?? _attrName, - attrValueList: attrValueList ?? _attrValueList, - ); - - String get attrId => _attrId; - - String get attrName => _attrName; - - dynamic get attrValueList => _attrValueList; - - Map toJson() { - final map = {}; - map['attrId'] = _attrId; - map['attrName'] = _attrName; - map['attrValueList'] = _attrValueList; - return map; - } -} - -/// id : "1372091669003894784" -/// skuName : "" -/// productSkuAttrList : [{"id":"1372091669012283392","createTime":"2021-03-17 15:45:21","createUser":"1311123845502992384","updateTime":"2021-03-17 15:45:21","updateUser":"1311123845502992384","skuId":"1372091669003894784","attrId":"1372091668978728960","attrValueId":"1372091668987117568","sortOrder":null,"isDelete":0}] - -class SkuInfoList { - SkuInfoList({ - String id, - String skuName, - List productSkuAttrList, - }) { - _id = id; - _skuName = skuName; - _productSkuAttrList = productSkuAttrList; - } - - SkuInfoList.fromJson(dynamic json) { - _id = json['id']; - _skuName = json['skuName']; - if (json['productSkuAttrList'] != null) { - _productSkuAttrList = []; - json['productSkuAttrList'].forEach((v) { - _productSkuAttrList.add(ProductSkuAttrList.fromJson(v)); - }); - } - } - - String _id; - String _skuName; - bool _isSelected = false; - List _productSkuAttrList; - - SkuInfoList copyWith({ - String id, - String skuName, - List productSkuAttrList, - }) => - SkuInfoList( - id: id ?? _id, - skuName: skuName ?? _skuName, - productSkuAttrList: productSkuAttrList ?? _productSkuAttrList, - ); - - String get id => _id; - - String get skuName => _skuName; - - List get productSkuAttrList => _productSkuAttrList; - - bool get isSelected => _isSelected; - - set isSelected(bool value) { - _isSelected = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['skuName'] = _skuName; - if (_productSkuAttrList != null) { - map['productSkuAttrList'] = - _productSkuAttrList.map((v) => v.toJson()).toList(); - } - return map; - } -} - -/// id : "1372091669012283392" -/// createTime : "2021-03-17 15:45:21" -/// createUser : "1311123845502992384" -/// updateTime : "2021-03-17 15:45:21" -/// updateUser : "1311123845502992384" -/// skuId : "1372091669003894784" -/// attrId : "1372091668978728960" -/// attrValueId : "1372091668987117568" -/// sortOrder : null -/// isDelete : 0 - -class ProductSkuAttrList { - ProductSkuAttrList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String skuId, - String attrId, - String attrValueId, - dynamic sortOrder, - int isDelete, - }) { - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _skuId = skuId; - _attrId = attrId; - _attrValueId = attrValueId; - _sortOrder = sortOrder; - _isDelete = isDelete; - } - - ProductSkuAttrList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _skuId = json['skuId']; - _attrId = json['attrId']; - _attrValueId = json['attrValueId']; - _sortOrder = json['sortOrder']; - _isDelete = json['isDelete']; - } - - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _skuId; - String _attrId; - String _attrValueId; - dynamic _sortOrder; - int _isDelete; - - ProductSkuAttrList copyWith({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String skuId, - String attrId, - String attrValueId, - dynamic sortOrder, - int isDelete, - }) => - ProductSkuAttrList( - id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - skuId: skuId ?? _skuId, - attrId: attrId ?? _attrId, - attrValueId: attrValueId ?? _attrValueId, - sortOrder: sortOrder ?? _sortOrder, - isDelete: isDelete ?? _isDelete, - ); - - String get id => _id; - - String get createTime => _createTime; - - String get createUser => _createUser; - - String get updateTime => _updateTime; - - String get updateUser => _updateUser; - - String get skuId => _skuId; - - String get attrId => _attrId; - - String get attrValueId => _attrValueId; - - dynamic get sortOrder => _sortOrder; - - int get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['skuId'] = _skuId; - map['attrId'] = _attrId; - map['attrValueId'] = _attrValueId; - map['sortOrder'] = _sortOrder; - map['isDelete'] = _isDelete; - return map; - } -} - -/// productId : "1433994980233314304" -/// attrName : "�¶�" -/// sortOrder : null -/// needImg : false -/// isDelete : 0 -/// attrCode : null -/// id : "1433994980644356096" -/// attrValueList : [{"id":"1434076666832879616","attrId":"1433994980644356096","attrValue":"ȥ��","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null},{"id":"1433994980849876992","attrId":"1433994980644356096","attrValue":"�ٱ�","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null},{"id":"1434076667034206208","attrId":"1433994980644356096","attrValue":"������","attrValueImg":"","sortOrder":null,"isDelete":0,"attrValueCode":null}] - -class AttrListBean { - String productId; - String attrName; - dynamic sortOrder; - bool needImg; - int isDelete; - dynamic attrCode; - String id; - List attrValueList; - - static AttrListBean fromJson(Map map) { - if (map == null) return null; - AttrListBean attrListBean = AttrListBean(); - attrListBean.productId = map['productId']; - attrListBean.attrName = map['attrName']; - attrListBean.sortOrder = map['sortOrder']; - attrListBean.needImg = map['needImg']; - attrListBean.isDelete = map['isDelete']; - attrListBean.attrCode = map['attrCode']; - attrListBean.id = map['id']; - attrListBean.attrValueList = []..addAll((map['attrValueList'] as List ?? []) - .map((o) => AttrValueListBean.fromJson(o))); - return attrListBean; - } - - Map toJson() => { - "productId": productId, - "attrName": attrName, - "sortOrder": sortOrder, - "needImg": needImg, - "isDelete": isDelete, - "attrCode": attrCode, - "id": id, - "attrValueList": attrValueList, - }; -} - -/// id : "1434076666832879616" -/// attrId : "1433994980644356096" -/// attrValue : "ȥ��" -/// attrValueImg : "" -/// sortOrder : null -/// isDelete : 0 -/// attrValueCode : null - -class AttrValueListBean { - String id; - String attrId; - String attrValue; - String attrValueImg; - dynamic sortOrder; - int isDelete; - dynamic attrValueCode; - bool isSelected; - - static AttrValueListBean fromJson(Map map) { - if (map == null) return null; - AttrValueListBean attrValueListBean = AttrValueListBean(); - attrValueListBean.id = map['id']; - attrValueListBean.attrId = map['attrId']; - attrValueListBean.attrValue = map['attrValue']; - attrValueListBean.attrValueImg = map['attrValueImg']; - attrValueListBean.sortOrder = map['sortOrder']; - attrValueListBean.isDelete = map['isDelete']; - attrValueListBean.attrValueCode = map['attrValueCode']; - return attrValueListBean; - } - - Map toJson() => { - "id": id, - "attrId": attrId, - "attrValue": attrValue, - "attrValueImg": attrValueImg, - "sortOrder": sortOrder, - "isDelete": isDelete, - "attrValueCode": attrValueCode, - }; -} - -/// id : "1333246101343436800" -/// storeName : "��Ͽ���ò��(���ֵ�)" -/// nickName : "" -/// logo : "https://pos.upload.gznl.top/1175/2021/07/ae873881-b3ab-4332-b863-f3055b200e07.png" -/// productCount : 31 -/// soldNum : 1518 - -class StoreDTOBean { - String id; - String storeName; - String nickName; - String logo; - dynamic productCount; - dynamic soldNum; - - static StoreDTOBean fromJson(Map map) { - if (map == null) return null; - StoreDTOBean storeDTOBean = StoreDTOBean(); - storeDTOBean.id = map['id']; - storeDTOBean.storeName = map['storeName']; - storeDTOBean.nickName = map['nickName']; - storeDTOBean.logo = map['logo']; - storeDTOBean.productCount = map['productCount']; - storeDTOBean.soldNum = map['soldNum']; - return storeDTOBean; - } - - Map toJson() => { - "id": id, - "storeName": storeName, - "nickName": nickName, - "logo": logo, - "productCount": productCount, - "soldNum": soldNum, - }; -} - - -/// isEnableSubscribe : true -/// dayOrDate : 3 -/// startAfterDays : null -/// daysValidate : null -/// subscribeStartTime : "2023-04-20 00:00:00" -/// subscribeEndTime : "2023-04-30 00:00:00" -/// stores : ["海峡姐妹","前进麦味","百年川椒","小吃街"] - -class SubscribeParam { - SubscribeParam({ - bool isEnableSubscribe, - num dayOrDate, - dynamic startAfterDays, - dynamic daysValidate, - String subscribeStartTime, - String subscribeEndTime, - List stores,}) { - _isEnableSubscribe = isEnableSubscribe; - _dayOrDate = dayOrDate; - _startAfterDays = startAfterDays; - _daysValidate = daysValidate; - _subscribeStartTime = subscribeStartTime; - _subscribeEndTime = subscribeEndTime; - _stores = stores; - } - - SubscribeParam.fromJson(dynamic json) { - if(json == null) - return; - _isEnableSubscribe = json['isEnableSubscribe']; - _dayOrDate = json['dayOrDate']; - _startAfterDays = json['startAfterDays']; - _daysValidate = json['daysValidate']; - _subscribeStartTime = json['subscribeStartTime']; - _subscribeEndTime = json['subscribeEndTime']; - _stores = json['stores'] != null ? json['stores'].cast() : []; - } - - bool _isEnableSubscribe; - num _dayOrDate; - dynamic _startAfterDays; - dynamic _daysValidate; - String _subscribeStartTime; - String _subscribeEndTime; - List _stores; - - SubscribeParam copyWith({ bool isEnableSubscribe, - num dayOrDate, - dynamic startAfterDays, - dynamic daysValidate, - String subscribeStartTime, - String subscribeEndTime, - List stores, - }) => - SubscribeParam( - isEnableSubscribe: isEnableSubscribe ?? _isEnableSubscribe, - dayOrDate: dayOrDate ?? _dayOrDate, - startAfterDays: startAfterDays ?? _startAfterDays, - daysValidate: daysValidate ?? _daysValidate, - subscribeStartTime: subscribeStartTime ?? _subscribeStartTime, - subscribeEndTime: subscribeEndTime ?? _subscribeEndTime, - stores: stores ?? _stores, - ); - - bool get isEnableSubscribe => _isEnableSubscribe; - - num get dayOrDate => _dayOrDate; - - dynamic get startAfterDays => _startAfterDays; - - dynamic get daysValidate => _daysValidate; - - String get subscribeStartTime => _subscribeStartTime; - - String get subscribeEndTime => _subscribeEndTime; - - List get stores => _stores; - - Map toJson() { - final map = {}; - map['isEnableSubscribe'] = _isEnableSubscribe; - map['dayOrDate'] = _dayOrDate; - map['startAfterDays'] = _startAfterDays; - map['daysValidate'] = _daysValidate; - map['subscribeStartTime'] = _subscribeStartTime; - map['subscribeEndTime'] = _subscribeEndTime; - map['stores'] = _stores; - return map; - } -} diff --git a/lib/retrofit/data/min_order_info.dart b/lib/retrofit/data/min_order_info.dart deleted file mode 100644 index 65b2efba..00000000 --- a/lib/retrofit/data/min_order_info.dart +++ /dev/null @@ -1,738 +0,0 @@ -import 'package:huixiang/retrofit/data/order_product_vo.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; - -class MinOrderInfo { - MinOrderInfo({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - String storeId, - String storeName, - String tableId, - int orderType, - bool clearTable, - String mid, - String parentId, - String parentCode, - String orderCode, - String dayFlowCode, - int orderStatus, - int sendStatus, - int payStatus, - String memberAccount, - String logisticsId, - String shipperCode, - String logisticsName, - String logisticsNum, - dynamic logisticsCase, - int refundStatus, - dynamic addressExt, - String postFee, - String orderSum, - String paySum, - String paySumSub, - String accountPay, - String couponSubPrice, - String customPrice, - String removeDecimal, - bool isSubscribe, - dynamic subcribeTime, - dynamic sendTime, - dynamic confirmTime, - dynamic returnMoneyTime, - String notes, - dynamic prepayId, - dynamic payTime, - int payChannel, - dynamic payNum, - String promotionId, - String couponId, - String couponName, - int isDelete, - int isTakeOut, - int batch, - String orderDiscountPrice, - String dishesDiscountPrice, - String orderPercentPrice, - String finalPayPrice, - String activityNoPrice, - String activityDiscountPrice, - String totalDiscountPrice, - String totalPackagingFee, - String benefitDiscountAmount, - int orderSource, - dynamic address, - dynamic discountPercent, - String discountAmount, - dynamic discountType, - dynamic uniqueDiscountType, - dynamic discountMoney, - dynamic overTime, - List orderProductVOList, - dynamic moneyReturnList, - dynamic goodsReturnList, - dynamic moneyReturnVOList, - dynamic goodsReturnVOList, - dynamic moneyReturnActionHistoryList, - dynamic goodsReturnActionHistoryList, - String currentTime, - dynamic tablePrice, - String tableName, - String balance, - String money, - dynamic prodNum, - bool onCredit, - OrderInfoVo orderInfoVo, - String endPayTime, - String orderSumPrice, - bool isRaise,}){ - this.id = id; - this.createTime = createTime; - this.createUser = createUser; - this.updateTime = updateTime; - this.updateUser = updateUser; - this.tenantCode = tenantCode; - this.storeId = storeId; - this.storeName = storeName; - this.tableId = tableId; - this.orderType = orderType; - this.clearTable = clearTable; - this.mid = mid; - this.parentId = parentId; - this.parentCode = parentCode; - this.orderCode = orderCode; - this.dayFlowCode = dayFlowCode; - this.orderStatus = orderStatus; - this.sendStatus = sendStatus; - this.payStatus = payStatus; - this.memberAccount = memberAccount; - this.logisticsId = logisticsId; - this.shipperCode = shipperCode; - this.logisticsName = logisticsName; - this.logisticsNum = logisticsNum; - this.logisticsCase = logisticsCase; - this.refundStatus = refundStatus; - this.addressExt = addressExt; - this.postFee = postFee; - this.orderSum = orderSum; - this.paySum = paySum; - this.paySumSub = paySumSub; - this.accountPay = accountPay; - this.couponSubPrice = couponSubPrice; - this.customPrice = customPrice; - this.removeDecimal = removeDecimal; - this.isSubscribe = isSubscribe; - this.subcribeTime = subcribeTime; - this.sendTime = sendTime; - this.confirmTime = confirmTime; - this.returnMoneyTime = returnMoneyTime; - this.notes = notes; - this.prepayId = prepayId; - this.payTime = payTime; - this.payChannel = payChannel; - this.payNum = payNum; - this.promotionId = promotionId; - this.couponId = couponId; - this.couponName = couponName; - this.isDelete = isDelete; - this.isTakeOut = isTakeOut; - this.batch = batch; - this.orderDiscountPrice = orderDiscountPrice; - this.dishesDiscountPrice = dishesDiscountPrice; - this.orderPercentPrice = orderPercentPrice; - this.finalPayPrice = finalPayPrice; - this.activityNoPrice = activityNoPrice; - this.activityDiscountPrice = activityDiscountPrice; - this.totalDiscountPrice = totalDiscountPrice; - this.totalPackagingFee = totalPackagingFee; - this.benefitDiscountAmount = benefitDiscountAmount; - this.orderSource = orderSource; - this.address = address; - this.discountPercent = discountPercent; - this.discountAmount = discountAmount; - this.discountType = discountType; - this.uniqueDiscountType = uniqueDiscountType; - this.discountMoney = discountMoney; - this.overTime = overTime; - this.orderProductVOList = orderProductVOList; - this.moneyReturnList = moneyReturnList; - this.goodsReturnList = goodsReturnList; - this.moneyReturnVOList = moneyReturnVOList; - this.goodsReturnVOList = goodsReturnVOList; - this.moneyReturnActionHistoryList = moneyReturnActionHistoryList; - this.goodsReturnActionHistoryList = goodsReturnActionHistoryList; - this.currentTime = currentTime; - this.tablePrice = tablePrice; - this.tableName = tableName; - this.balance = balance; - this.money = money; - this.prodNum = prodNum; - this.onCredit = onCredit; - this.orderInfoVo = orderInfoVo; - this.endPayTime = endPayTime; - this.orderSumPrice = orderSumPrice; - this.isRaise = isRaise; -} - - MinOrderInfo.fromJson(dynamic json) { - this.id = json['id']; - this.createTime = json['createTime']; - this.createUser = json['createUser']; - this.updateTime = json['updateTime']; - this.updateUser = json['updateUser']; - this.tenantCode = json['tenantCode']; - this.storeId = json['storeId']; - this.storeName = json['storeName']; - this.tableId = json['tableId']; - this.orderType = json['orderType']; - this.clearTable = json['clearTable']; - this.mid = json['mid']; - this.parentId = json['parentId']; - this.parentCode = json['parentCode']; - this.orderCode = json['orderCode']; - this.dayFlowCode = json['dayFlowCode']; - this.orderStatus = json['orderStatus']; - this.sendStatus = json['sendStatus']; - this.payStatus = json['payStatus']; - this.memberAccount = json['memberAccount']; - this.logisticsId = json['logisticsId']; - this.shipperCode = json['shipperCode']; - this.logisticsName = json['logisticsName']; - this.logisticsNum = json['logisticsNum']; - this.logisticsCase = json['logisticsCase']; - this.refundStatus = json['refundStatus']; - this.addressExt = json['addressExt']; - this.postFee = json['postFee']; - this.orderSum = json['orderSum']; - this.paySum = json['paySum']; - this.paySumSub = json['paySumSub']; - this.accountPay = json['accountPay']; - this.couponSubPrice = json['couponSubPrice']; - this.customPrice = json['customPrice']; - this.removeDecimal = json['removeDecimal']; - this.isSubscribe = json['isSubscribe']; - this.subcribeTime = json['subcribeTime']; - this.sendTime = json['sendTime']; - this.confirmTime = json['confirmTime']; - this.returnMoneyTime = json['returnMoneyTime']; - this.notes = json['notes']; - this.prepayId = json['prepayId']; - this.payTime = json['payTime']; - this.payChannel = json['payChannel']; - this.payNum = json['payNum']; - this.promotionId = json['promotionId']; - this.couponId = json['couponId']; - this.couponName = json['couponName']; - this.isDelete = json['isDelete']; - this.isTakeOut = json['isTakeOut']; - this.batch = json['batch']; - this.orderDiscountPrice = json['orderDiscountPrice']; - this.dishesDiscountPrice = json['dishesDiscountPrice']; - this.orderPercentPrice = json['orderPercentPrice']; - this.finalPayPrice = json['finalPayPrice']; - this.activityNoPrice = json['activityNoPrice']; - this.activityDiscountPrice = json['activityDiscountPrice']; - this.totalDiscountPrice = json['totalDiscountPrice']; - this.totalPackagingFee = json['totalPackagingFee']; - this.benefitDiscountAmount = json['benefitDiscountAmount']; - this.orderSource = json['orderSource']; - this.address = json['address']; - this.discountPercent = json['discountPercent']; - this.discountAmount = json['discountAmount']; - this.discountType = json['discountType']; - this.uniqueDiscountType = json['uniqueDiscountType']; - this.discountMoney = json['discountMoney']; - this.overTime = json['overTime']; - if (json['orderProductVOList'] != null) { - this.orderProductVOList = []; - json['orderProductVOList'].forEach((v) { - this.orderProductVOList.add(OrderProductVOList.fromJson(v)); - }); - } - this.moneyReturnList = json['moneyReturnList']; - this.goodsReturnList = json['goodsReturnList']; - this.moneyReturnVOList = json['moneyReturnVOList']; - this.goodsReturnVOList = json['goodsReturnVOList']; - this.moneyReturnActionHistoryList = json['moneyReturnActionHistoryList']; - this.goodsReturnActionHistoryList = json['goodsReturnActionHistoryList']; - this.currentTime = json['currentTime']; - this.tablePrice = json['tablePrice']; - this.tableName = json['tableName']; - this.balance = json['balance']; - this.money = json['money']; - this.prodNum = json['prodNum']; - this.onCredit = json['onCredit']; - this.orderInfoVo = json['orderInfoVo'] != null ? OrderInfoVo.fromJson(json['orderInfoVo']) : null; - this.endPayTime = json['endPayTime']; - this.orderSumPrice = json['orderSumPrice']; - this.isRaise = json['isRaise']; - } - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String tenantCode; - String storeId; - String storeName; - String tableId; - int orderType; - bool clearTable; - String mid; - String parentId; - String parentCode; - String orderCode; - String dayFlowCode; - int orderStatus; - int sendStatus; - int payStatus; - String memberAccount; - String logisticsId; - String shipperCode; - String logisticsName; - String logisticsNum; - dynamic logisticsCase; - int refundStatus; - dynamic addressExt; - String postFee; - String orderSum; - String paySum; - String paySumSub; - String accountPay; - String couponSubPrice; - String customPrice; - String removeDecimal; - bool isSubscribe; - dynamic subcribeTime; - dynamic sendTime; - dynamic confirmTime; - dynamic returnMoneyTime; - String notes; - dynamic prepayId; - dynamic payTime; - int payChannel; - dynamic payNum; - String promotionId; - String couponId; - String couponName; - int isDelete; - int isTakeOut; - int batch; - String orderDiscountPrice; - String dishesDiscountPrice; - String orderPercentPrice; - String finalPayPrice; - String activityNoPrice; - String activityDiscountPrice; - String totalDiscountPrice; - String totalPackagingFee; - String benefitDiscountAmount; - int orderSource; - dynamic address; - dynamic discountPercent; - String discountAmount; - dynamic discountType; - dynamic uniqueDiscountType; - dynamic discountMoney; - dynamic overTime; - List orderProductVOList; - dynamic moneyReturnList; - dynamic goodsReturnList; - dynamic moneyReturnVOList; - dynamic goodsReturnVOList; - dynamic moneyReturnActionHistoryList; - dynamic goodsReturnActionHistoryList; - String currentTime; - dynamic tablePrice; - String tableName; - String balance; - String money; - dynamic prodNum; - bool onCredit; - OrderInfoVo orderInfoVo; - String endPayTime; - String orderSumPrice; - bool isRaise; - - Map toJson() { - final map = {}; - map['id'] = this.id; - map['createTime'] = this.createTime; - map['createUser'] = this.createUser; - map['updateTime'] = this.updateTime; - map['updateUser'] = this.updateUser; - map['tenantCode'] = this.tenantCode; - map['storeId'] = this.storeId; - map['storeName'] = this.storeName; - map['tableId'] = this.tableId; - map['orderType'] = this.orderType; - map['clearTable'] = this.clearTable; - map['mid'] = this.mid; - map['parentId'] = this.parentId; - map['parentCode'] = this.parentCode; - map['orderCode'] = this.orderCode; - map['dayFlowCode'] = this.dayFlowCode; - map['orderStatus'] = this.orderStatus; - map['sendStatus'] = this.sendStatus; - map['payStatus'] = this.payStatus; - map['memberAccount'] = this.memberAccount; - map['logisticsId'] = this.logisticsId; - map['shipperCode'] = this.shipperCode; - map['logisticsName'] = this.logisticsName; - map['logisticsNum'] = this.logisticsNum; - map['logisticsCase'] = this.logisticsCase; - map['refundStatus'] = this.refundStatus; - map['addressExt'] = this.addressExt; - map['postFee'] = this.postFee; - map['orderSum'] = this.orderSum; - map['paySum'] = this.paySum; - map['paySumSub'] = this.paySumSub; - map['accountPay'] = this.accountPay; - map['couponSubPrice'] = this.couponSubPrice; - map['customPrice'] = this.customPrice; - map['removeDecimal'] = this.removeDecimal; - map['isSubscribe'] = this.isSubscribe; - map['subcribeTime'] = this.subcribeTime; - map['sendTime'] = this.sendTime; - map['confirmTime'] = this.confirmTime; - map['returnMoneyTime'] = this.returnMoneyTime; - map['notes'] = this.notes; - map['prepayId'] = this.prepayId; - map['payTime'] = this.payTime; - map['payChannel'] = this.payChannel; - map['payNum'] = this.payNum; - map['promotionId'] = this.promotionId; - map['couponId'] = this.couponId; - map['couponName'] = this.couponName; - map['isDelete'] = this.isDelete; - map['isTakeOut'] = this.isTakeOut; - map['batch'] = this.batch; - map['orderDiscountPrice'] = this.orderDiscountPrice; - map['dishesDiscountPrice'] = this.dishesDiscountPrice; - map['orderPercentPrice'] = this.orderPercentPrice; - map['finalPayPrice'] = this.finalPayPrice; - map['activityNoPrice'] = this.activityNoPrice; - map['activityDiscountPrice'] = this.activityDiscountPrice; - map['totalDiscountPrice'] = this.totalDiscountPrice; - map['totalPackagingFee'] = this.totalPackagingFee; - map['benefitDiscountAmount'] = this.benefitDiscountAmount; - map['orderSource'] = this.orderSource; - map['address'] = this.address; - map['discountPercent'] = this.discountPercent; - map['discountAmount'] = this.discountAmount; - map['discountType'] = this.discountType; - map['uniqueDiscountType'] = this.uniqueDiscountType; - map['discountMoney'] = this.discountMoney; - map['overTime'] = this.overTime; - if (this.orderProductVOList != null) { - map['orderProductVOList'] = this.orderProductVOList.map((v) => v.toJson()).toList(); - } - map['moneyReturnList'] = this.moneyReturnList; - map['goodsReturnList'] = this.goodsReturnList; - map['moneyReturnVOList'] = this.moneyReturnVOList; - map['goodsReturnVOList'] = this.goodsReturnVOList; - map['moneyReturnActionHistoryList'] = this.moneyReturnActionHistoryList; - map['goodsReturnActionHistoryList'] = this.goodsReturnActionHistoryList; - map['currentTime'] = this.currentTime; - map['tablePrice'] = this.tablePrice; - map['tableName'] = this.tableName; - map['balance'] = this.balance; - map['money'] = this.money; - map['prodNum'] = this.prodNum; - map['onCredit'] = this.onCredit; - if (this.orderInfoVo != null) { - map['orderInfoVo'] = this.orderInfoVo.toJson(); - } - map['endPayTime'] = this.endPayTime; - map['orderSumPrice'] = this.orderSumPrice; - map['isRaise'] = this.isRaise; - return map; - } - -} - -/// orderNum : 0 -/// productNum : 0 -/// mins : 1 -/// memberVO : {"vipNo":"1406879717390286848","nickname":"","headimg":"","userType":true,"sex":"0","level":1,"addressId":null,"remark":null,"phone":"15827991714","createTime":"2021-07-10 15:44:23","birth":"1993-02-19","balance":"0.00","money":"9999608.09","points":"1147","isBind":true,"memberRankVo":{"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null},"age":28} -/// postAge : "0.00" -/// price : "208.00" -/// orderSum : "208.00" -/// discountAmount : null -/// promotionInfoList : null -/// couponList : null -/// threshold : "0" -/// freePostAge : "0" -/// orderProductList : null - -class OrderInfoVo { - OrderInfoVo({ - int orderNum, - int productNum, - int mins, - MemberVO memberVO, - String postAge, - String price, - String orderSum, - String discountAmount, - dynamic promotionInfoList, - dynamic couponList, - String threshold, - String freePostAge, - dynamic orderProductList,}){ - this.orderNum = orderNum; - this.productNum = productNum; - this.mins = mins; - this.memberVO = memberVO; - this.postAge = postAge; - this.price = price; - this.orderSum = orderSum; - this.discountAmount = discountAmount; - this.promotionInfoList = promotionInfoList; - this.couponList = couponList; - this.threshold = threshold; - this.freePostAge = freePostAge; - this.orderProductList = orderProductList; -} - - OrderInfoVo.fromJson(dynamic json) { - this.orderNum = json['orderNum']; - this.productNum = json['productNum']; - this.mins = json['mins']; - this.memberVO = json['memberVO'] != null ? MemberVO.fromJson(json['memberVO']) : null; - this.postAge = json['postAge']; - this.price = json['price']; - this.orderSum = json['orderSum']; - this.discountAmount = json['discountAmount']; - this.promotionInfoList = json['promotionInfoList']; - this.couponList = json['couponList']; - this.threshold = json['threshold']; - this.freePostAge = json['freePostAge']; - this.orderProductList = json['orderProductList']; - } - int orderNum; - int productNum; - int mins; - MemberVO memberVO; - String postAge; - String price; - String orderSum; - String discountAmount; - dynamic promotionInfoList; - dynamic couponList; - String threshold; - String freePostAge; - dynamic orderProductList; - - Map toJson() { - final map = {}; - map['orderNum'] = this.orderNum; - map['productNum'] = this.productNum; - map['mins'] = this.mins; - if (this.memberVO != null) { - map['memberVO'] = this.memberVO.toJson(); - } - map['postAge'] = this.postAge; - map['price'] = this.price; - map['orderSum'] = this.orderSum; - map['discountAmount'] = this.discountAmount; - map['promotionInfoList'] = this.promotionInfoList; - map['couponList'] = this.couponList; - map['threshold'] = this.threshold; - map['freePostAge'] = this.freePostAge; - map['orderProductList'] = this.orderProductList; - return map; - } - -} - -/// vipNo : "1406879717390286848" -/// nickname : "" -/// headimg : "" -/// userType : true -/// sex : "0" -/// level : 1 -/// addressId : null -/// remark : null -/// phone : "15827991714" -/// createTime : "2021-07-10 15:44:23" -/// birth : "1993-02-19" -/// balance : "0.00" -/// money : "9999608.09" -/// points : "1147" -/// isBind : true -/// memberRankVo : {"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null} -/// age : 28 - -class MemberVO { - MemberVO({ - String vipNo, - String nickname, - String headimg, - bool userType, - String sex, - int level, - dynamic addressId, - dynamic remark, - String phone, - String createTime, - String birth, - String balance, - String money, - String points, - bool isBind, - MemberRankVo memberRankVo, - int age,}){ - this.vipNo = vipNo; - this.nickname = nickname; - this.headimg = headimg; - this.userType = userType; - this.sex = sex; - this.level = level; - this.addressId = addressId; - this.remark = remark; - this.phone = phone; - this.createTime = createTime; - this.birth = birth; - this.balance = balance; - this.money = money; - this.points = points; - this.isBind = isBind; - this.memberRankVo = memberRankVo; - this.age = age; -} - - MemberVO.fromJson(dynamic json) { - this.vipNo = json['vipNo']; - this.nickname = json['nickname']; - this.headimg = json['headimg']; - this.userType = json['userType']; - this.sex = json['sex']; - this.level = json['level']; - this.addressId = json['addressId']; - this.remark = json['remark']; - this.phone = json['phone']; - this.createTime = json['createTime']; - this.birth = json['birth']; - this.balance = json['balance']; - this.money = json['money']; - this.points = json['points']; - this.isBind = json['isBind']; - this.memberRankVo = json['memberRankVo'] != null ? MemberRankVo.fromJson(json['memberRankVo']) : null; - this.age = json['age']; - } - String vipNo; - String nickname; - String headimg; - bool userType; - String sex; - int level; - dynamic addressId; - dynamic remark; - String phone; - String createTime; - String birth; - String balance; - String money; - String points; - bool isBind; - MemberRankVo memberRankVo; - int age; - - Map toJson() { - final map = {}; - map['vipNo'] = this.vipNo; - map['nickname'] = this.nickname; - map['headimg'] = this.headimg; - map['userType'] = this.userType; - map['sex'] = this.sex; - map['level'] = this.level; - map['addressId'] = this.addressId; - map['remark'] = this.remark; - map['phone'] = this.phone; - map['createTime'] = this.createTime; - map['birth'] = this.birth; - map['balance'] = this.balance; - map['money'] = this.money; - map['points'] = this.points; - map['isBind'] = this.isBind; - if (this.memberRankVo != null) { - map['memberRankVo'] = this.memberRankVo.toJson(); - } - map['age'] = this.age; - return map; - } - -} - -/// id : "1402947503522840576" -/// rankName : "黄金会员" -/// rankOrigin : 8888 -/// rankContent : "" -/// rankImg : "" -/// status : true -/// nextId : "1402947503522840577" -/// nextName : "钻石会员" -/// nextOrigin : null - -class MemberRankVo { - MemberRankVo({ - String id, - String rankName, - int rankOrigin, - String rankContent, - String rankImg, - bool status, - String nextId, - String nextName, - dynamic nextOrigin,}){ - this.id = id; - this.rankName = rankName; - this.rankOrigin = rankOrigin; - this.rankContent = rankContent; - this.rankImg = rankImg; - this.status = status; - this.nextId = nextId; - this.nextName = nextName; - this.nextOrigin = nextOrigin; -} - - MemberRankVo.fromJson(dynamic json) { - this.id = json['id']; - this.rankName = json['rankName']; - this.rankOrigin = json['rankOrigin']; - this.rankContent = json['rankContent']; - this.rankImg = json['rankImg']; - this.status = json['status']; - this.nextId = json['nextId']; - this.nextName = json['nextName']; - this.nextOrigin = json['nextOrigin']; - } - String id; - String rankName; - int rankOrigin; - String rankContent; - String rankImg; - bool status; - String nextId; - String nextName; - dynamic nextOrigin; - - Map toJson() { - final map = {}; - map['id'] = this.id; - map['rankName'] = this.rankName; - map['rankOrigin'] = this.rankOrigin; - map['rankContent'] = this.rankContent; - map['rankImg'] = this.rankImg; - map['status'] = this.status; - map['nextId'] = this.nextId; - map['nextName'] = this.nextName; - map['nextOrigin'] = this.nextOrigin; - return map; - } - -} diff --git a/lib/retrofit/data/mini.dart b/lib/retrofit/data/mini.dart deleted file mode 100644 index 98dafceb..00000000 --- a/lib/retrofit/data/mini.dart +++ /dev/null @@ -1,37 +0,0 @@ -/// miniDownloadUrl : "" -/// miniVersion : "1.0" -/// miniAppId : "wx7eeaa89de16f3180" - -class Mini { - String _miniDownloadUrl; - String _miniVersion; - String _miniAppId; - - String get miniDownloadUrl => _miniDownloadUrl; - String get miniVersion => _miniVersion; - String get miniAppId => _miniAppId; - - Mini({ - String miniDownloadUrl, - String miniVersion, - String miniAppId}){ - _miniDownloadUrl = miniDownloadUrl; - _miniVersion = miniVersion; - _miniAppId = miniAppId; -} - - Mini.fromJson(dynamic json) { - _miniDownloadUrl = json["miniDownloadUrl"]; - _miniVersion = json["miniVersion"]; - _miniAppId = json["miniAppId"]; - } - - Map toJson() { - var map = {}; - map["miniDownloadUrl"] = _miniDownloadUrl; - map["miniVersion"] = _miniVersion; - map["miniAppId"] = _miniAppId; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/msg_stats.dart b/lib/retrofit/data/msg_stats.dart deleted file mode 100644 index cb3f4d17..00000000 --- a/lib/retrofit/data/msg_stats.dart +++ /dev/null @@ -1,29 +0,0 @@ -/// name : "4" -/// number : 8 - -class MsgStats { - MsgStats({ - String name, - int number,}){ - _name = name; - _number = number; -} - - MsgStats.fromJson(dynamic json) { - _name = json['name']; - _number = json['number']; - } - String _name; - int _number; - - String get name => _name; - int get number => _number; - - Map toJson() { - final map = {}; - map['name'] = _name; - map['number'] = _number; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/order_info.dart b/lib/retrofit/data/order_info.dart deleted file mode 100644 index b2139368..00000000 --- a/lib/retrofit/data/order_info.dart +++ /dev/null @@ -1,893 +0,0 @@ - -import 'package:huixiang/retrofit/data/down_order.dart'; -import 'package:huixiang/retrofit/data/order_product_vo.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; - -/// id : "1408358257373741056" -/// createTime : "2021-06-25 17:35:49" -/// createUser : "1404743858104827904" -/// updateTime : "2021-06-25 17:35:49" -/// updateUser : "1404743858104827904" -/// tenantCode : "1177" -/// storeId : "1344490596986781696" -/// storeName : "测试" -/// tableId : "0" -/// mid : "1404743858104827904" -/// parentId : "1408358257004642304" -/// parentCode : "202106251735490003" -/// orderCode : "202106251735490004" -/// dayFlowCode : "003" -/// orderStatus : 2 -/// sendStatus : 0 -/// payStatus : 1 -/// memberAccount : "占永辉_o3DjK5OuaeRBR-yo_GEh6gs5J9xI" -/// logisticsId : "0" -/// shipperCode : "" -/// logisticsName : "" -/// logisticsNum : "" -/// logisticsCase : null -/// refundStatus : -1 -/// addressExt : {"addressId":null,"country":null,"countryId":null,"province":"湖北省","provinceId":null,"city":"武汉市","cityId":null,"district":"武昌区","districtId":null,"address":"楚河汉界","recName":null,"recMobile":null,"longitude":"114.344225","latitude":"30.554177"} -/// postFee : "0.00" -/// orderSum : "20.00" -/// paySum : "17.80" -/// paySumSub : "0.00" -/// accountPay : "0.00" -/// couponSubPrice : "2.20" -/// customPrice : "0.00" -/// removeDecimal : "0.00" -/// isSubscribe : false -/// subcribeTime : null -/// sendTime : null -/// confirmTime : null -/// returnMoneyTime : null -/// notes : "" -/// prepayId : null -/// payTime : "2021-06-25 17:35:49" -/// payChannel : 3 -/// payNum : "" -/// promotionId : "1405723544309989376" -/// couponId : "1407162997398306816" -/// isDelete : 0 -/// isTakeOut : 0 -/// batch : 1 -/// orderDiscountPrice : "0.00" -/// dishesDiscountPrice : "0.00" -/// orderPercentPrice : "0.00" -/// finalPayPrice : "20.00" -/// activityNoPrice : "0.00" -/// activityDiscountPrice : "0.00" -/// totalDiscountPrice : "0.00" -/// orderSource : 1 -/// storeVO : {"id":"1344490596986781696","storeName":"小小店","nickName":"","businessService":"WIFI,免费停车","businessType":"测试","logo":"","openStartTime":"08:25:43","openEndTime":"23:25:43","shipAddress":"汉街总部国际","remark":null,"mobile":"13554204268","refundAddress":null,"refundTel":null,"refundContact":null,"isAutoSendRefundAddress":1,"soldNum":null,"storeTemplateConfig":null,"storeTable":null,"threshold":null,"freePostAge":null,"logisticsThreshold":null,"logisticsFreePostAge":null,"longitude":"114.3442250000","latitude":"30.5541770000","deliveryDistance":null,"couponVO":null,"posType":{"desc":"零售商店","code":"RETAILSTORE"},"banners":null,"tips":null,"storeBrandImg":null,"defaultPostAge":null} -/// orderDetail : {"orderProductList":[{"id":"1408358257390518272","platterList":null,"tenantCode":"1177","storeId":"1344490596986781696","orderId":"1408358257373741056","productId":"1404742074535772160","productName":"商品1","skuId":"1404744485652398080","skuNameStr":"中","skuImg":"","buyNum":2,"refundNum":0,"weight":0,"applyPrice":"0.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"2.20","discountPercent":100}],"discountName":null,"discountMoney":null,"discountNumber":null,"activityName":null,"couponDTO":null,"orderSumPrice":"20.00","paySumPrice":"17.80","activityNoPrice":"0.00","activityPrice":"0.00","dishesList":[],"customPrice":"0.00","nextPerson":"占永辉","isTakeOut":0,"memberRec":null,"isSubscribe":null,"subcribeTime":null,"postFee":"0.00","shipperCode":"","logisticsName":"","logisticsNum":"","orderNum":0,"productNum":0,"mins":1,"predictTime":null} -/// productList : [{"id":"1408358257390518272","createTime":"2021-06-25 17:35:49","createUser":"1404743858104827904","updateTime":"2021-06-25 17:35:49","updateUser":"1404743858104827904","tenantCode":null,"storeId":"1344490596986781696","orderId":"1408358257373741056","productId":"1404742074535772160","productName":"商品1","skuId":"1404744485652398080","skuNameStr":"中","skuImg":"","buyNum":2,"refundNum":0,"weight":0,"applyPrice":"0.00","sellPrice":"10.00","postPay":"0.00","isDelete":0,"discountAmount":"2.20","discountPercent":11,"status":true,"batch":1}] - -class OrderInfo { - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String tenantCode; - String storeId; - String storeName; - String tableId; - String mid; - String parentId; - String parentCode; - String orderCode; - int orderType; - String dayFlowCode; - int orderStatus; - int sendStatus; - int payStatus; - String memberAccount; - String logisticsId; - String shipperCode; - String logisticsName; - String logisticsNum; - dynamic logisticsCase; - int refundStatus; - AddressExt addressExt; - String postFee; - String orderSum; - String paySum; - String paySumSub; - String accountPay; - String couponSubPrice; - String customPrice; - String removeDecimal; - bool isSubscribe; - dynamic subcribeTime; - dynamic sendTime; - dynamic confirmTime; - dynamic returnMoneyTime; - String notes; - dynamic prepayId; - String payTime; - int payChannel; - String payNum; - String promotionId; - String couponId; - String benefitDiscountAmount; - int isDelete; - int isTakeOut; - int batch; - String orderDiscountPrice; - String dishesDiscountPrice; - String orderPercentPrice; - String finalPayPrice; - String activityNoPrice; - String activityDiscountPrice; - String vipDiscountPrice; - String totalDiscountPrice; - String totalPackagingFee; - int orderSource; - StoreVO storeVO; - OrderDetail orderDetail; - List productList; - - OrderInfo( - {String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantCode, - String storeId, - String storeName, - String tableId, - String mid, - String parentId, - String parentCode, - String orderCode, - int orderType, - String dayFlowCode, - int orderStatus, - int sendStatus, - int payStatus, - String memberAccount, - String logisticsId, - String shipperCode, - String logisticsName, - String logisticsNum, - dynamic logisticsCase, - int refundStatus, - AddressExt addressExt, - String postFee, - String orderSum, - String paySum, - String paySumSub, - String accountPay, - String couponSubPrice, - String customPrice, - String removeDecimal, - bool isSubscribe, - dynamic subcribeTime, - dynamic sendTime, - dynamic confirmTime, - dynamic returnMoneyTime, - String notes, - dynamic prepayId, - String payTime, - int payChannel, - String payNum, - String promotionId, - String couponId, - String benefitDiscountAmount, - int isDelete, - int isTakeOut, - int batch, - String orderDiscountPrice, - String dishesDiscountPrice, - String orderPercentPrice, - String finalPayPrice, - String activityNoPrice, - String activityDiscountPrice, - String vipDiscountPrice, - String totalDiscountPrice, - String totalPackagingFee, - int orderSource, - StoreVO storeVO, - OrderDetail orderDetail, - List< OrderProductVOList> productList}) { - this.id = id; - this.createTime = createTime; - this.createUser = createUser; - this.updateTime = updateTime; - this.updateUser = updateUser; - this.tenantCode = tenantCode; - this.storeId = storeId; - this.storeName = storeName; - this.tableId = tableId; - this.mid = mid; - this.parentId = parentId; - this.parentCode = parentCode; - this.orderCode = orderCode; - this.orderType = orderType; - this.dayFlowCode = dayFlowCode; - this.orderStatus = orderStatus; - this.sendStatus = sendStatus; - this.payStatus = payStatus; - this.memberAccount = memberAccount; - this.logisticsId = logisticsId; - this.shipperCode = shipperCode; - this.logisticsName = logisticsName; - this.logisticsNum = logisticsNum; - this.logisticsCase = logisticsCase; - this.refundStatus = refundStatus; - this.addressExt = addressExt; - this.postFee = postFee; - this.orderSum = orderSum; - this.paySum = paySum; - this.paySumSub = paySumSub; - this.accountPay = accountPay; - this.couponSubPrice = couponSubPrice; - this.customPrice = customPrice; - this.removeDecimal = removeDecimal; - this.isSubscribe = isSubscribe; - this.subcribeTime = subcribeTime; - this.sendTime = sendTime; - this.confirmTime = confirmTime; - this.returnMoneyTime = returnMoneyTime; - this.notes = notes; - this.prepayId = prepayId; - this.payTime = payTime; - this.payChannel = payChannel; - this.payNum = payNum; - this.promotionId = promotionId; - this.couponId = couponId; - this.benefitDiscountAmount =benefitDiscountAmount; - this.isDelete = isDelete; - this.isTakeOut = isTakeOut; - this.batch = batch; - this.orderDiscountPrice = orderDiscountPrice; - this.dishesDiscountPrice = dishesDiscountPrice; - this.orderPercentPrice = orderPercentPrice; - this.finalPayPrice = finalPayPrice; - this.activityNoPrice = activityNoPrice; - this.activityDiscountPrice = activityDiscountPrice; - this.vipDiscountPrice = vipDiscountPrice; - this.totalDiscountPrice = totalDiscountPrice; - this.totalPackagingFee = totalPackagingFee; - this.orderSource = orderSource; - this.storeVO = storeVO; - this.orderDetail = orderDetail; - this.productList = productList; - } - - OrderInfo.fromJson(dynamic json) { - this.id = json["id"]; - this.createTime = json["createTime"]; - this.createUser = json["createUser"]; - this.updateTime = json["updateTime"]; - this.updateUser = json["updateUser"]; - this.tenantCode = json["tenantCode"]; - this.storeId = json["storeId"]; - this.storeName = json["storeName"]; - this.tableId = json["tableId"]; - this.mid = json["mid"]; - this.parentId = json["parentId"]; - this.parentCode = json["parentCode"]; - this.orderCode = json["orderCode"]; - this.orderType = json["orderType"]; - this.dayFlowCode = json["dayFlowCode"]; - this.orderStatus = json["orderStatus"]; - this.sendStatus = json["sendStatus"]; - this.payStatus = json["payStatus"]; - this.memberAccount = json["memberAccount"]; - this.logisticsId = json["logisticsId"]; - this.shipperCode = json["shipperCode"]; - this.logisticsName = json["logisticsName"]; - this.logisticsNum = json["logisticsNum"]; - this.logisticsCase = json["logisticsCase"]; - this.refundStatus = json["refundStatus"]; - this.addressExt = json["addressExt"] != null - ? AddressExt.fromJson(json["addressExt"]) - : null; - this.postFee = json["postFee"]; - this.orderSum = json["orderSum"]; - this.paySum = json["paySum"]; - this.paySumSub = json["paySumSub"]; - this.accountPay = json["accountPay"]; - this.couponSubPrice = json["couponSubPrice"]; - this.customPrice = json["customPrice"]; - this.removeDecimal = json["removeDecimal"]; - this.isSubscribe = json["isSubscribe"]; - this.subcribeTime = json["subcribeTime"]; - this.sendTime = json["sendTime"]; - this.confirmTime = json["confirmTime"]; - this.returnMoneyTime = json["returnMoneyTime"]; - this.notes = json["notes"]; - this.prepayId = json["prepayId"]; - this.payTime = json["payTime"]; - this.payChannel = json["payChannel"]; - this.payNum = json["payNum"]; - this.promotionId = json["promotionId"]; - this.couponId = json["couponId"]; - this.benefitDiscountAmount = json["benefitDiscountAmount"]; - this.isDelete = json["isDelete"]; - this.isTakeOut = json["isTakeOut"]; - this.batch = json["batch"]; - this.orderDiscountPrice = json["orderDiscountPrice"]; - this.dishesDiscountPrice = json["dishesDiscountPrice"]; - this.orderPercentPrice = json["orderPercentPrice"]; - this.finalPayPrice = json["finalPayPrice"]; - this.activityNoPrice = json["activityNoPrice"]; - this.activityDiscountPrice = json["activityDiscountPrice"]; - this.vipDiscountPrice = json["vipDiscountPrice"]; - this.totalDiscountPrice = json["totalDiscountPrice"]; - this.totalPackagingFee =json["totalPackagingFee"]; - this.orderSource = json["orderSource"]; - this.storeVO = - json["storeVO"] != null ? StoreVO.fromJson(json["storeVO"]) : null; - this.orderDetail = json["orderDetail"] != null - ? OrderDetail.fromJson(json["orderDetail"]) - : null; - if (json["productList"] != null) { - this.productList = []; - json["productList"].forEach((v) { - this.productList.add( OrderProductVOList.fromJson(v)); - }); - } - } - - Map toJson() { - var map = {}; - map["id"] = this.id; - map["createTime"] = this.createTime; - map["createUser"] = this.createUser; - map["updateTime"] = this.updateTime; - map["updateUser"] = this.updateUser; - map["tenantCode"] = this.tenantCode; - map["storeId"] = this.storeId; - map["storeName"] = this.storeName; - map["tableId"] = this.tableId; - map["mid"] = this.mid; - map["parentId"] = this.parentId; - map["parentCode"] = this.parentCode; - map["orderCode"] = this.orderCode; - map["orderType"] = this.orderType; - map["dayFlowCode"] = this.dayFlowCode; - map["orderStatus"] = this.orderStatus; - map["sendStatus"] = this.sendStatus; - map["payStatus"] = this.payStatus; - map["memberAccount"] = this.memberAccount; - map["logisticsId"] = this.logisticsId; - map["shipperCode"] = this.shipperCode; - map["logisticsName"] = this.logisticsName; - map["logisticsNum"] = this.logisticsNum; - map["logisticsCase"] = this.logisticsCase; - map["refundStatus"] = this.refundStatus; - if (this.addressExt != null) { - map["addressExt"] = this.addressExt.toJson(); - } - map["postFee"] = this.postFee; - map["orderSum"] = this.orderSum; - map["paySum"] = this.paySum; - map["paySumSub"] = this.paySumSub; - map["accountPay"] = this.accountPay; - map["couponSubPrice"] = this.couponSubPrice; - map["customPrice"] = this.customPrice; - map["removeDecimal"] = this.removeDecimal; - map["isSubscribe"] = this.isSubscribe; - map["subcribeTime"] = this.subcribeTime; - map["sendTime"] = this.sendTime; - map["confirmTime"] = this.confirmTime; - map["returnMoneyTime"] = this.returnMoneyTime; - map["notes"] = this.notes; - map["prepayId"] = this.prepayId; - map["payTime"] = this.payTime; - map["payChannel"] = this.payChannel; - map["payNum"] = this.payNum; - map["promotionId"] = this.promotionId; - map["couponId"] = this.couponId; - map["benefitDiscountAmount"] = this.benefitDiscountAmount; - map["isDelete"] = this.isDelete; - map["isTakeOut"] = this.isTakeOut; - map["batch"] = this.batch; - map["orderDiscountPrice"] = this.orderDiscountPrice; - map["dishesDiscountPrice"] = this.dishesDiscountPrice; - map["orderPercentPrice"] = this.orderPercentPrice; - map["finalPayPrice"] = this.finalPayPrice; - map["activityNoPrice"] = this.activityNoPrice; - map["activityDiscountPrice"] = this.activityDiscountPrice; - map["vipDiscountPrice"] = this.vipDiscountPrice; - map["totalDiscountPrice"] = this.totalDiscountPrice; - map["totalPackagingFee"] = this.totalPackagingFee; - map["orderSource"] = this.orderSource; - if (this.storeVO != null) { - map["storeVO"] = this.storeVO.toJson(); - } - if (this.orderDetail != null) { - map["orderDetail"] = this.orderDetail.toJson(); - } - if (this.productList != null) { - map["productList"] = this.productList.map((v) => v.toJson()).toList(); - } - return map; - } -} - -class OrderDetail { - List< OrderProductVOList> orderProductList; - dynamic discountName; - dynamic discountMoney; - dynamic discountNumber; - dynamic activityName; - CouponDTO couponDTO; - String orderSumPrice; - String paySumPrice; - String activityNoPrice; - String activityPrice; - String promotionName; - List dishesList; - String customPrice; - String nextPerson; - int isTakeOut; - dynamic memberRec; - dynamic isSubscribe; - dynamic subcribeTime; - String postFee; - String shipperCode; - String logisticsName; - String logisticsNum; - int orderNum; - int productNum; - int mins; - dynamic predictTime; - - OrderDetail( - {List< OrderProductVOList> orderProductList, - dynamic discountName, - dynamic discountMoney, - dynamic discountNumber, - dynamic activityName, - CouponDTO couponDTO, - String orderSumPrice, - String paySumPrice, - String activityNoPrice, - String activityPrice, - String promotionName, - List dishesList, - String customPrice, - String nextPerson, - int isTakeOut, - dynamic memberRec, - dynamic isSubscribe, - dynamic subcribeTime, - String postFee, - String shipperCode, - String logisticsName, - String logisticsNum, - int orderNum, - int productNum, - int mins, - dynamic predictTime}) { - this.orderProductList = orderProductList; - this.discountName = discountName; - this.discountMoney = discountMoney; - this.discountNumber = discountNumber; - this.activityName = activityName; - this.couponDTO = couponDTO; - this.orderSumPrice = orderSumPrice; - this.paySumPrice = paySumPrice; - this.activityNoPrice = activityNoPrice; - this.activityPrice = activityPrice; - this.promotionName = promotionName; - this.dishesList = dishesList; - this.customPrice = customPrice; - this.nextPerson = nextPerson; - this.isTakeOut = isTakeOut; - this.memberRec = memberRec; - this.isSubscribe = isSubscribe; - this.subcribeTime = subcribeTime; - this.postFee = postFee; - this.shipperCode = shipperCode; - this.logisticsName = logisticsName; - this.logisticsNum = logisticsNum; - this.orderNum = orderNum; - this.productNum = productNum; - this.mins = mins; - this.predictTime = predictTime; - } - - OrderDetail.fromJson(dynamic json) { - if (json["orderProductList"] != null) { - this.orderProductList = []; - json["orderProductList"].forEach((v) { - this.orderProductList.add( OrderProductVOList.fromJson(v)); - }); - } - this.discountName = json["discountName"]; - this.discountMoney = json["discountMoney"]; - this.discountNumber = json["discountNumber"]; - this.activityName = json["activityName"]; - this.couponDTO = json["couponDTO"] != null ? CouponDTO.fromJson(json["couponDTO"]) : null; - this.orderSumPrice = json["orderSumPrice"]; - this.paySumPrice = json["paySumPrice"]; - this.activityNoPrice = json["activityNoPrice"]; - this.activityPrice = json["activityPrice"]; - this.promotionName = json["promotionName"]; - if (json["dishesList"] != null) { - this.dishesList = []; - json["dishesList"].forEach((v) { - this.dishesList.add(v); - }); - } - this.customPrice = json["customPrice"]; - this.nextPerson = json["nextPerson"]; - this.isTakeOut = json["isTakeOut"]; - this.memberRec = json["memberRec"]; - this.isSubscribe = json["isSubscribe"]; - this.subcribeTime = json["subcribeTime"]; - this.postFee = json["postFee"]; - this.shipperCode = json["shipperCode"]; - this.logisticsName = json["logisticsName"]; - this.logisticsNum = json["logisticsNum"]; - this.orderNum = json["orderNum"]; - this.productNum = json["productNum"]; - this.mins = json["mins"]; - this.predictTime = json["predictTime"]; - } - - Map toJson() { - var map = {}; - if (this.orderProductList != null) { - map["orderProductList"] = - this.orderProductList.map((v) => v.toJson()).toList(); - } - map["discountName"] = this.discountName; - map["discountMoney"] = this.discountMoney; - map["discountNumber"] = this.discountNumber; - map["activityName"] = this.activityName; - map["couponDTO"] = this.couponDTO; - map["orderSumPrice"] = this.orderSumPrice; - map["paySumPrice"] = this.paySumPrice; - map["activityNoPrice"] = this.activityNoPrice; - map["activityPrice"] = this.activityPrice; - if (this.dishesList != null) { - map["dishesList"] = this.dishesList.map((v) => v.toJson()).toList(); - } - map["customPrice"] = this.customPrice; - map["nextPerson"] = this.nextPerson; - map["isTakeOut"] = this.isTakeOut; - map["memberRec"] = this.memberRec; - map["isSubscribe"] = this.isSubscribe; - map["subcribeTime"] = this.subcribeTime; - map["postFee"] = this.postFee; - map["shipperCode"] = this.shipperCode; - map["logisticsName"] = this.logisticsName; - map["logisticsNum"] = this.logisticsNum; - map["orderNum"] = this.orderNum; - map["productNum"] = this.productNum; - map["mins"] = this.mins; - map["predictTime"] = this.predictTime; - return map; - } -} - -class StoreVO { - String id; - String storeName; - String nickName; - String businessService; - String businessType; - String logo; - String openStartTime; - String openEndTime; - String shipAddress; - dynamic remark; - String mobile; - dynamic refundAddress; - dynamic refundTel; - dynamic refundContact; - int isAutoSendRefundAddress; - dynamic soldNum; - dynamic storeTemplateConfig; - dynamic storeTable; - dynamic threshold; - dynamic freePostAge; - dynamic logisticsThreshold; - dynamic logisticsFreePostAge; - String longitude; - String latitude; - dynamic deliveryDistance; - dynamic couponVO; - PosType posType; - dynamic banners; - dynamic tips; - dynamic storeBrandImg; - dynamic defaultPostAge; - - StoreVO( - {String id, - String storeName, - String nickName, - String businessService, - String businessType, - String logo, - String openStartTime, - String openEndTime, - String shipAddress, - dynamic remark, - String mobile, - dynamic refundAddress, - dynamic refundTel, - dynamic refundContact, - int isAutoSendRefundAddress, - dynamic soldNum, - dynamic storeTemplateConfig, - dynamic storeTable, - dynamic threshold, - dynamic freePostAge, - dynamic logisticsThreshold, - dynamic logisticsFreePostAge, - String longitude, - String latitude, - dynamic deliveryDistance, - dynamic couponVO, - PosType posType, - dynamic banners, - dynamic tips, - dynamic storeBrandImg, - dynamic defaultPostAge}) { - this.id = id; - this.storeName = storeName; - this.nickName = nickName; - this.businessService = businessService; - this.businessType = businessType; - this.logo = logo; - this.openStartTime = openStartTime; - this.openEndTime = openEndTime; - this.shipAddress = shipAddress; - this.remark = remark; - this.mobile = mobile; - this.refundAddress = refundAddress; - this.refundTel = refundTel; - this.refundContact = refundContact; - this.isAutoSendRefundAddress = isAutoSendRefundAddress; - this.soldNum = soldNum; - this.storeTemplateConfig = storeTemplateConfig; - this.storeTable = storeTable; - this.threshold = threshold; - this.freePostAge = freePostAge; - this.logisticsThreshold = logisticsThreshold; - this.logisticsFreePostAge = logisticsFreePostAge; - this.longitude = longitude; - this.latitude = latitude; - this.deliveryDistance = deliveryDistance; - this.couponVO = couponVO; - this.posType = posType; - this.banners = banners; - this.tips = tips; - this.storeBrandImg = storeBrandImg; - this.defaultPostAge = defaultPostAge; - } - - StoreVO.fromJson(dynamic json) { - this.id = json["id"]; - this.storeName = json["storeName"]; - this.nickName = json["nickName"]; - this.businessService = json["businessService"]; - this.businessType = json["businessType"]; - this.logo = json["logo"]; - this.openStartTime = json["openStartTime"]; - this.openEndTime = json["openEndTime"]; - this.shipAddress = json["shipAddress"]; - this.remark = json["remark"]; - this.mobile = json["mobile"]; - this.refundAddress = json["refundAddress"]; - this.refundTel = json["refundTel"]; - this.refundContact = json["refundContact"]; - this.isAutoSendRefundAddress = json["isAutoSendRefundAddress"]; - this.soldNum = json["soldNum"]; - this.storeTemplateConfig = json["storeTemplateConfig"]; - this.storeTable = json["storeTable"]; - this.threshold = json["threshold"]; - this.freePostAge = json["freePostAge"]; - this.logisticsThreshold = json["logisticsThreshold"]; - this.logisticsFreePostAge = json["logisticsFreePostAge"]; - this.longitude = json["longitude"]; - this.latitude = json["latitude"]; - this.deliveryDistance = json["deliveryDistance"]; - this.couponVO = json["couponVO"]; - this.posType = - json["posType"] != null ? PosType.fromJson(json["posType"]) : null; - this.banners = json["banners"]; - this.tips = json["tips"]; - this.storeBrandImg = json["storeBrandImg"]; - this.defaultPostAge = json["defaultPostAge"]; - } - - Map toJson() { - var map = {}; - map["id"] = this.id; - map["storeName"] = this.storeName; - map["nickName"] = this.nickName; - map["businessService"] = this.businessService; - map["businessType"] = this.businessType; - map["logo"] = this.logo; - map["openStartTime"] = this.openStartTime; - map["openEndTime"] = this.openEndTime; - map["shipAddress"] = this.shipAddress; - map["remark"] = this.remark; - map["mobile"] = this.mobile; - map["refundAddress"] = this.refundAddress; - map["refundTel"] = this.refundTel; - map["refundContact"] = this.refundContact; - map["isAutoSendRefundAddress"] = this.isAutoSendRefundAddress; - map["soldNum"] = this.soldNum; - map["storeTemplateConfig"] = this.storeTemplateConfig; - map["storeTable"] = this.storeTable; - map["threshold"] = this.threshold; - map["freePostAge"] = this.freePostAge; - map["logisticsThreshold"] = this.logisticsThreshold; - map["logisticsFreePostAge"] = this.logisticsFreePostAge; - map["longitude"] = this.longitude; - map["latitude"] = this.latitude; - map["deliveryDistance"] = this.deliveryDistance; - map["couponVO"] = this.couponVO; - if (this.posType != null) { - map["posType"] = this.posType.toJson(); - } - map["banners"] = this.banners; - map["tips"] = this.tips; - map["storeBrandImg"] = this.storeBrandImg; - map["defaultPostAge"] = this.defaultPostAge; - return map; - } -} - -/// desc : "零售商店" -/// code : "RETAILSTORE" - -class PosType { - String desc; - String code; - - PosType({String desc, String code}) { - this.desc = desc; - this.code = code; - } - - PosType.fromJson(dynamic json) { - this.desc = json["desc"]; - this.code = json["code"]; - } - - Map toJson() { - var map = {}; - map["desc"] = this.desc; - map["code"] = this.code; - return map; - } -} - -/// addressId : null -/// country : null -/// countryId : null -/// province : "湖北省" -/// provinceId : null -/// city : "武汉市" -/// cityId : null -/// district : "武昌区" -/// districtId : null -/// address : "楚河汉界" -/// recName : null -/// recMobile : null -/// longitude : "114.344225" -/// latitude : "30.554177" - -class AddressExt { - dynamic addressId; - dynamic country; - dynamic countryId; - String province; - dynamic provinceId; - String city; - dynamic cityId; - String district; - dynamic districtId; - String address; - dynamic recName; - dynamic recMobile; - String longitude; - String latitude; - - AddressExt( - {dynamic addressId, - dynamic country, - dynamic countryId, - String province, - dynamic provinceId, - String city, - dynamic cityId, - String district, - dynamic districtId, - String address, - dynamic recName, - dynamic recMobile, - String longitude, - String latitude}) { - this.addressId = addressId; - this.country = country; - this.countryId = countryId; - this.province = province; - this.provinceId = provinceId; - this.city = city; - this.cityId = cityId; - this.district = district; - this.districtId = districtId; - this.address = address; - this.recName = recName; - this.recMobile = recMobile; - this.longitude = longitude; - this.latitude = latitude; - } - - AddressExt.fromJson(dynamic json) { - this.addressId = json["addressId"]; - this.country = json["country"]; - this.countryId = json["countryId"]; - this.province = json["province"]; - this.provinceId = json["provinceId"]; - this.city = json["city"]; - this.cityId = json["cityId"]; - this.district = json["district"]; - this.districtId = json["districtId"]; - this.address = json["address"]; - this.recName = json["recName"]; - this.recMobile = json["recMobile"]; - this.longitude = json["longitude"]; - this.latitude = json["latitude"]; - } - - Map toJson() { - var map = {}; - map["addressId"] = this.addressId; - map["country"] = this.country; - map["countryId"] = this.countryId; - map["province"] = this.province; - map["provinceId"] = this.provinceId; - map["city"] = this.city; - map["cityId"] = this.cityId; - map["district"] = this.district; - map["districtId"] = this.districtId; - map["address"] = this.address; - map["recName"] = this.recName; - map["recMobile"] = this.recMobile; - map["longitude"] = this.longitude; - map["latitude"] = this.latitude; - return map; - } -} - -class CouponDTO { - // "name": "超级满减", - // "num": null, - // "money": "20.00", - // "receiveMoney": null - - String name; - dynamic num; - String money; - dynamic receiveMoney; - - CouponDTO.fromJson(dynamic json) { - name = json["name"]; - num = json["num"]; - money = json["money"]; - receiveMoney = json["receiveMoney"]; - } - - Map toJson() { - var map = {}; - map["name"] = name; - map["num"] = num; - map["money"] = money; - map["receiveMoney"] = receiveMoney; - return map; - } -} diff --git a/lib/retrofit/data/order_product_vo.dart b/lib/retrofit/data/order_product_vo.dart deleted file mode 100644 index 64259663..00000000 --- a/lib/retrofit/data/order_product_vo.dart +++ /dev/null @@ -1,401 +0,0 @@ -import 'package:huixiang/retrofit/data/shoppingCart.dart'; - -class OrderProductVOList { - OrderProductVOList({ - ActInfo actInfo, - AdditionalComment additionalComment, - int buyNum, - String canApplyIntervention, - Comment comment, - String commentStatus, - String discountAmount, - String id, - String productId, - String productName, - dynamic returnCode, - dynamic returnStatus, - dynamic returnType, - String sellPrice, - String skuId, - String skuImg, - String skuNameStr, - List setMealDataList, - String packagingFee, - }) { - this.actInfo = actInfo; - this.additionalComment = additionalComment; - this.buyNum = buyNum; - this.canApplyIntervention = canApplyIntervention; - this.comment = comment; - this.commentStatus = commentStatus; - this.discountAmount = discountAmount; - this.id = id; - this.productId = productId; - this.productName = productName; - this.returnCode = returnCode; - this.returnStatus = returnStatus; - this.returnType = returnType; - this.sellPrice = sellPrice; - this.skuId = skuId; - this.skuImg = skuImg; - this.skuNameStr = skuNameStr; - this.setMealDataList = setMealDataList; - this.packagingFee = packagingFee; - } - - OrderProductVOList.fromJson(dynamic json) { - this.actInfo = - json['actInfo'] != null ? ActInfo.fromJson(json['actInfo']) : null; - this.additionalComment = json['additionalComment'] != null - ? AdditionalComment.fromJson(json['additionalComment']) - : null; - this.buyNum = json['buyNum']; - this.canApplyIntervention = json['canApplyIntervention']; - this.comment = - json['comment'] != null ? Comment.fromJson(json['comment']) : null; - this.commentStatus = json['commentStatus']; - this.discountAmount = json['discountAmount']; - this.id = json['id']; - this.productId = json['productId']; - this.productName = json['productName']; - this.returnCode = json['returnCode']; - this.returnStatus = json['returnStatus']; - this.returnType = json['returnType']; - this.sellPrice = json['sellPrice']; - this.skuId = json['skuId']; - this.skuImg = json['skuImg']; - this.skuNameStr = json['skuNameStr']; - this.setMealDataList = []..addAll( - (json['setMealDataList'] as List ?? []) - .map((o) => SetMealDataList.fromJson(o))); - this.packagingFee = json['packagingFee']; - } - - ActInfo actInfo; - AdditionalComment additionalComment; - int buyNum; - String canApplyIntervention; - Comment comment; - String commentStatus; - String discountAmount; - String id; - String productId; - String productName; - String returnCode; - String returnStatus; - String returnType; - String sellPrice; - String skuId; - String skuImg; - String skuNameStr; - List setMealDataList; - String packagingFee; - - Map toJson() { - final map = {}; - if (this.actInfo != null) { - map['actInfo'] = this.actInfo.toJson(); - } - if (this.additionalComment != null) { - map['additionalComment'] = this.additionalComment.toJson(); - } - map['buyNum'] = this.buyNum; - map['canApplyIntervention'] = this.canApplyIntervention; - if (this.comment != null) { - map['comment'] = this.comment.toJson(); - } - map['commentStatus'] = this.commentStatus; - map['discountAmount'] = this.discountAmount; - map['id'] = this.id; - map['productId'] = this.productId; - map['productName'] = this.productName; - map['returnCode'] = this.returnCode; - map['returnStatus'] = this.returnStatus; - map['returnType'] = this.returnType; - map['sellPrice'] = this.sellPrice; - map['skuId'] = this.skuId; - map['skuImg'] = this.skuImg; - map['skuNameStr'] = this.skuNameStr; - map['setMealDataList']=this.setMealDataList; - map['packagingFee'] = this.packagingFee; - return map; - } - -} - -/// couponDiscountAmount : 0 -/// couponDiscountRate : 0 -/// couponId : 0 -/// couponType : 0 -/// discountAmount : 0 -/// discountRate : 0 -/// promotionId : 0 -/// promotionType : 0 - -class ActInfo { - ActInfo({ - String couponDiscountAmount, - int couponDiscountRate, - String couponId, - int couponType, - String discountAmount, - int discountRate, - String promotionId, - int promotionType, - }) { - this.couponDiscountAmount = couponDiscountAmount; - this.couponDiscountRate = couponDiscountRate; - this.couponId = couponId; - this.couponType = couponType; - this.discountAmount = discountAmount; - this.discountRate = discountRate; - this.promotionId = promotionId; - this.promotionType = promotionType; - } - - ActInfo.fromJson(dynamic json) { - this.couponDiscountAmount = json['couponDiscountAmount']; - this.couponDiscountRate = json['couponDiscountRate']; - this.couponId = json['couponId']; - this.couponType = json['couponType']; - this.discountAmount = json['discountAmount']; - this.discountRate = json['discountRate']; - this.promotionId = json['promotionId']; - this.promotionType = json['promotionType']; - } - - String couponDiscountAmount; - int couponDiscountRate; - String couponId; - int couponType; - String discountAmount; - int discountRate; - String promotionId; - int promotionType; - - Map toJson() { - final map = {}; - map['couponDiscountAmount'] = this.couponDiscountAmount; - map['couponDiscountRate'] = this.couponDiscountRate; - map['couponId'] = this.couponId; - map['couponType'] = this.couponType; - map['discountAmount'] = this.discountAmount; - map['discountRate'] = this.discountRate; - map['promotionId'] = this.promotionId; - map['promotionType'] = this.promotionType; - return map; - } - -} - -class AdditionalComment { - AdditionalComment({ - int bizType, - String commentImgs, - bool commentImgsFlag, - int commentStar, - String commentText, - int descStar, - bool hideFlag, - int id, - bool isDelete, - int likeNum, - int logisticsStar, - int mid, - int orderProductId, - int parentId, - int productId, - bool sensitiveFlag, - int serviceStar, - int storeId, - }) { - this.bizType = bizType; - this.commentImgs = commentImgs; - this.commentImgsFlag = commentImgsFlag; - this.commentStar = commentStar; - this.commentText = commentText; - this.descStar = descStar; - this.hideFlag = hideFlag; - this.id = id; - this.isDelete = isDelete; - this.likeNum = likeNum; - this.logisticsStar = logisticsStar; - this.mid = mid; - this.orderProductId = orderProductId; - this.parentId = parentId; - this.productId = productId; - this.sensitiveFlag = sensitiveFlag; - this.serviceStar = serviceStar; - this.storeId = storeId; - } - - AdditionalComment.fromJson(dynamic json) { - this.bizType = json['bizType']; - this.commentImgs = json['commentImgs']; - this.commentImgsFlag = json['commentImgsFlag']; - this.commentStar = json['commentStar']; - this.commentText = json['commentText']; - this.descStar = json['descStar']; - this.hideFlag = json['hideFlag']; - this.id = json['id']; - this.isDelete = json['isDelete']; - this.likeNum = json['likeNum']; - this.logisticsStar = json['logisticsStar']; - this.mid = json['mid']; - this.orderProductId = json['orderProductId']; - this.parentId = json['parentId']; - this.productId = json['productId']; - this.sensitiveFlag = json['sensitiveFlag']; - this.serviceStar = json['serviceStar']; - this.storeId = json['storeId']; - } - - int bizType; - String commentImgs; - bool commentImgsFlag; - int commentStar; - String commentText; - int descStar; - bool hideFlag; - int id; - bool isDelete; - int likeNum; - int logisticsStar; - int mid; - int orderProductId; - int parentId; - int productId; - bool sensitiveFlag; - int serviceStar; - int storeId; - - Map toJson() { - final map = {}; - map['bizType'] = this.bizType; - map['commentImgs'] = this.commentImgs; - map['commentImgsFlag'] = this.commentImgsFlag; - map['commentStar'] = this.commentStar; - map['commentText'] = this.commentText; - map['descStar'] = this.descStar; - map['hideFlag'] = this.hideFlag; - map['id'] = this.id; - map['isDelete'] = this.isDelete; - map['likeNum'] = this.likeNum; - map['logisticsStar'] = this.logisticsStar; - map['mid'] = this.mid; - map['orderProductId'] = this.orderProductId; - map['parentId'] = this.parentId; - map['productId'] = this.productId; - map['sensitiveFlag'] = this.sensitiveFlag; - map['serviceStar'] = this.serviceStar; - map['storeId'] = this.storeId; - return map; - } - -} - -class Comment { - Comment({ - int bizType, - String commentImgs, - bool commentImgsFlag, - int commentStar, - String commentText, - int descStar, - bool hideFlag, - int id, - bool isDelete, - int likeNum, - int logisticsStar, - int mid, - int orderProductId, - int parentId, - int productId, - bool sensitiveFlag, - int serviceStar, - int storeId, - }) { - this.bizType = bizType; - this.commentImgs = commentImgs; - this.commentImgsFlag = commentImgsFlag; - this.commentStar = commentStar; - this.commentText = commentText; - this.descStar = descStar; - this.hideFlag = hideFlag; - this.id = id; - this.isDelete = isDelete; - this.likeNum = likeNum; - this.logisticsStar = logisticsStar; - this.mid = mid; - this.orderProductId = orderProductId; - this.parentId = parentId; - this.productId = productId; - this.sensitiveFlag = sensitiveFlag; - this.serviceStar = serviceStar; - this.storeId = storeId; - } - - Comment.fromJson(dynamic json) { - this.bizType = json['bizType']; - this.commentImgs = json['commentImgs']; - this.commentImgsFlag = json['commentImgsFlag']; - this.commentStar = json['commentStar']; - this.commentText = json['commentText']; - this.descStar = json['descStar']; - this.hideFlag = json['hideFlag']; - this.id = json['id']; - this.isDelete = json['isDelete']; - this.likeNum = json['likeNum']; - this.logisticsStar = json['logisticsStar']; - this.mid = json['mid']; - this.orderProductId = json['orderProductId']; - this.parentId = json['parentId']; - this.productId = json['productId']; - this.sensitiveFlag = json['sensitiveFlag']; - this.serviceStar = json['serviceStar']; - this.storeId = json['storeId']; - } - - int bizType; - String commentImgs; - bool commentImgsFlag; - int commentStar; - String commentText; - int descStar; - bool hideFlag; - int id; - bool isDelete; - int likeNum; - int logisticsStar; - int mid; - int orderProductId; - int parentId; - int productId; - bool sensitiveFlag; - int serviceStar; - int storeId; - - Map toJson() { - final map = {}; - map['bizType'] = this.bizType; - map['commentImgs'] = this.commentImgs; - map['commentImgsFlag'] = this.commentImgsFlag; - map['commentStar'] = this.commentStar; - map['commentText'] = this.commentText; - map['descStar'] = this.descStar; - map['hideFlag'] = this.hideFlag; - map['id'] = this.id; - map['isDelete'] = this.isDelete; - map['likeNum'] = this.likeNum; - map['logisticsStar'] = this.logisticsStar; - map['mid'] = this.mid; - map['orderProductId'] = this.orderProductId; - map['parentId'] = this.parentId; - map['productId'] = this.productId; - map['sensitiveFlag'] = this.sensitiveFlag; - map['serviceStar'] = this.serviceStar; - map['storeId'] = this.storeId; - return map; - } - -} diff --git a/lib/retrofit/data/order_trend.dart b/lib/retrofit/data/order_trend.dart deleted file mode 100644 index 53d3389b..00000000 --- a/lib/retrofit/data/order_trend.dart +++ /dev/null @@ -1,33 +0,0 @@ -/// date : "2023-09-08" -/// number : 0 - -class OrderTrend { - OrderTrend({ - String date, - dynamic number,}){ - _date = date; - _number = number; -} - - OrderTrend.fromJson(dynamic json) { - _date = json['date']; - _number = json['number']; - } - String _date; - num _number; -OrderTrend copyWith({ String date, - dynamic number, -}) => OrderTrend( date: date ?? _date, - number: number ?? _number, -); - String get date => _date; - dynamic get number => _number; - - Map toJson() { - final map = {}; - map['date'] = _date; - map['number'] = _number; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/order_user_detail.dart b/lib/retrofit/data/order_user_detail.dart deleted file mode 100644 index 5b9008c4..00000000 --- a/lib/retrofit/data/order_user_detail.dart +++ /dev/null @@ -1,303 +0,0 @@ -/// id : "1732280985187254272" -/// createTime : "2023-12-06 14:09:06" -/// createUser : "0" -/// updateTime : "2023-12-06 14:09:06" -/// updateUser : "0" -/// mid : "1331427732277428224" -/// masterId : "0" -/// openid : "" -/// aliOpenid : null -/// douyinOpenid : null -/// nickname : "" -/// headimg : "" -/// rankId : "0" -/// rankExpireTime : null -/// balance : "0.00" -/// realRecharge : "0.00" -/// sex : "0" -/// status : true -/// onCredit : false -/// loginTime : "2023-12-12 10:20:11" -/// loginNum : 13 -/// tenantCode : "1196" -/// source : 1 -/// expendAmount : "45.00" -/// buyTimes : 1 -/// lastBuyTime : "2023-12-06 18:07:40" -/// vip_no : null -/// expireTime : "2033-12-12 10:20:11" -/// integral : 0 -/// level : 1 -/// vipRegStore : null -/// certification : false - -class OrderUserDetail { - OrderUserDetail({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String masterId, - String openid, - dynamic aliOpenid, - dynamic douyinOpenid, - String nickname, - String headimg, - String rankId, - dynamic rankExpireTime, - String balance, - String realRecharge, - String sex, - bool status, - bool onCredit, - String loginTime, - num loginNum, - String tenantCode, - num source, - String expendAmount, - num buyTimes, - String lastBuyTime, - dynamic vipNo, - String expireTime, - num integral, - num level, - dynamic vipRegStore, - bool certification,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _masterId = masterId; - _openid = openid; - _aliOpenid = aliOpenid; - _douyinOpenid = douyinOpenid; - _nickname = nickname; - _headimg = headimg; - _rankId = rankId; - _rankExpireTime = rankExpireTime; - _balance = balance; - _realRecharge = realRecharge; - _sex = sex; - _status = status; - _onCredit = onCredit; - _loginTime = loginTime; - _loginNum = loginNum; - _tenantCode = tenantCode; - _source = source; - _expendAmount = expendAmount; - _buyTimes = buyTimes; - _lastBuyTime = lastBuyTime; - _vipNo = vipNo; - _expireTime = expireTime; - _integral = integral; - _level = level; - _vipRegStore = vipRegStore; - _certification = certification; -} - - OrderUserDetail.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _masterId = json['masterId']; - _openid = json['openid']; - _aliOpenid = json['aliOpenid']; - _douyinOpenid = json['douyinOpenid']; - _nickname = json['nickname']; - _headimg = json['headimg']; - _rankId = json['rankId']; - _rankExpireTime = json['rankExpireTime']; - _balance = json['balance']; - _realRecharge = json['realRecharge']; - _sex = json['sex']; - _status = json['status']; - _onCredit = json['onCredit']; - _loginTime = json['loginTime']; - _loginNum = json['loginNum']; - _tenantCode = json['tenantCode']; - _source = json['source']; - _expendAmount = json['expendAmount']; - _buyTimes = json['buyTimes']; - _lastBuyTime = json['lastBuyTime']; - _vipNo = json['vip_no']; - _expireTime = json['expireTime']; - _integral = json['integral']; - _level = json['level']; - _vipRegStore = json['vipRegStore']; - _certification = json['certification']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _masterId; - String _openid; - dynamic _aliOpenid; - dynamic _douyinOpenid; - String _nickname; - String _headimg; - String _rankId; - dynamic _rankExpireTime; - String _balance; - String _realRecharge; - String _sex; - bool _status; - bool _onCredit; - String _loginTime; - num _loginNum; - String _tenantCode; - num _source; - String _expendAmount; - num _buyTimes; - String _lastBuyTime; - dynamic _vipNo; - String _expireTime; - num _integral; - num _level; - dynamic _vipRegStore; - bool _certification; -OrderUserDetail copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String masterId, - String openid, - dynamic aliOpenid, - dynamic douyinOpenid, - String nickname, - String headimg, - String rankId, - dynamic rankExpireTime, - String balance, - String realRecharge, - String sex, - bool status, - bool onCredit, - String loginTime, - num loginNum, - String tenantCode, - num source, - String expendAmount, - num buyTimes, - String lastBuyTime, - dynamic vipNo, - String expireTime, - num integral, - num level, - dynamic vipRegStore, - bool certification, -}) => OrderUserDetail( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - masterId: masterId ?? _masterId, - openid: openid ?? _openid, - aliOpenid: aliOpenid ?? _aliOpenid, - douyinOpenid: douyinOpenid ?? _douyinOpenid, - nickname: nickname ?? _nickname, - headimg: headimg ?? _headimg, - rankId: rankId ?? _rankId, - rankExpireTime: rankExpireTime ?? _rankExpireTime, - balance: balance ?? _balance, - realRecharge: realRecharge ?? _realRecharge, - sex: sex ?? _sex, - status: status ?? _status, - onCredit: onCredit ?? _onCredit, - loginTime: loginTime ?? _loginTime, - loginNum: loginNum ?? _loginNum, - tenantCode: tenantCode ?? _tenantCode, - source: source ?? _source, - expendAmount: expendAmount ?? _expendAmount, - buyTimes: buyTimes ?? _buyTimes, - lastBuyTime: lastBuyTime ?? _lastBuyTime, - vipNo: vipNo ?? _vipNo, - expireTime: expireTime ?? _expireTime, - integral: integral ?? _integral, - level: level ?? _level, - vipRegStore: vipRegStore ?? _vipRegStore, - certification: certification ?? _certification, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get masterId => _masterId; - String get openid => _openid; - dynamic get aliOpenid => _aliOpenid; - dynamic get douyinOpenid => _douyinOpenid; - String get nickname => _nickname; - String get headimg => _headimg; - String get rankId => _rankId; - dynamic get rankExpireTime => _rankExpireTime; - String get balance => _balance; - String get realRecharge => _realRecharge; - String get sex => _sex; - bool get status => _status; - bool get onCredit => _onCredit; - String get loginTime => _loginTime; - num get loginNum => _loginNum; - String get tenantCode => _tenantCode; - num get source => _source; - String get expendAmount => _expendAmount; - num get buyTimes => _buyTimes; - String get lastBuyTime => _lastBuyTime; - dynamic get vipNo => _vipNo; - String get expireTime => _expireTime; - num get integral => _integral; - num get level => _level; - dynamic get vipRegStore => _vipRegStore; - bool get certification => _certification; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['masterId'] = _masterId; - map['openid'] = _openid; - map['aliOpenid'] = _aliOpenid; - map['douyinOpenid'] = _douyinOpenid; - map['nickname'] = _nickname; - map['headimg'] = _headimg; - map['rankId'] = _rankId; - map['rankExpireTime'] = _rankExpireTime; - map['balance'] = _balance; - map['realRecharge'] = _realRecharge; - map['sex'] = _sex; - map['status'] = _status; - map['onCredit'] = _onCredit; - map['loginTime'] = _loginTime; - map['loginNum'] = _loginNum; - map['tenantCode'] = _tenantCode; - map['source'] = _source; - map['expendAmount'] = _expendAmount; - map['buyTimes'] = _buyTimes; - map['lastBuyTime'] = _lastBuyTime; - map['vip_no'] = _vipNo; - map['expireTime'] = _expireTime; - map['integral'] = _integral; - map['level'] = _level; - map['vipRegStore'] = _vipRegStore; - map['certification'] = _certification; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/page.dart b/lib/retrofit/data/page.dart deleted file mode 100644 index c92e8278..00000000 --- a/lib/retrofit/data/page.dart +++ /dev/null @@ -1,28 +0,0 @@ - - - - -import 'package:json_annotation/json_annotation.dart'; - -part 'page.g.dart'; - - -@JsonSerializable(genericArgumentFactories: true) -class PageInfo { - PageInfo(); - - int pageNum; - dynamic current; - int pageSize; - dynamic size; - dynamic pages; - bool hasPreviousPage; - bool hasNextPage; - String total; - List list; - List records; - - factory PageInfo.fromJson(Map json, D Function(dynamic d) fromJsonD) => _$PageInfoFromJson(json, fromJsonD); - - Map toJson(Object Function(D value) toJsonD) => _$PageInfoToJson(this, toJsonD); -} diff --git a/lib/retrofit/data/page.g.dart b/lib/retrofit/data/page.g.dart deleted file mode 100644 index e40a14ae..00000000 --- a/lib/retrofit/data/page.g.dart +++ /dev/null @@ -1,41 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'page.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -PageInfo _$PageInfoFromJson( - Map json, - D Function(Object json) fromJsonD, -) { - return PageInfo() - ..pageNum = json['pageNum'] as int - ..current = json['current'] - ..pageSize = json['pageSize'] as int - ..size = json['size'] - ..pages = json['pages'] - ..hasPreviousPage = json['hasPreviousPage'] as bool - ..hasNextPage = json['hasNextPage'] as bool - ..total = json['total'] as String - ..list = (json['list'] as List)?.map(fromJsonD)?.toList() - ..records = (json['records'] as List)?.map(fromJsonD)?.toList(); -} - -Map _$PageInfoToJson( - PageInfo instance, - Object Function(D value) toJsonD, -) => - { - 'pageNum': instance.pageNum, - 'current': instance.current, - 'pageSize': instance.pageSize, - 'size': instance.size, - 'pages': instance.pages, - 'hasPreviousPage': instance.hasPreviousPage, - 'hasNextPage': instance.hasNextPage, - 'total': instance.total, - 'list': instance.list?.map(toJsonD)?.toList(), - 'records': instance.records?.map(toJsonD)?.toList(), - }; diff --git a/lib/retrofit/data/phone_query_member_info.dart b/lib/retrofit/data/phone_query_member_info.dart deleted file mode 100644 index 30df614c..00000000 --- a/lib/retrofit/data/phone_query_member_info.dart +++ /dev/null @@ -1,545 +0,0 @@ -/// mid : "1379254113602109440" -/// sid : "1659496253991419904" -/// phoneNum : "13052919193" -/// nickName : "" -/// headimg : "" -/// sex : "0" -/// balance : "0.00" -/// realBalance : "0.00" -/// giftBalance : "0.00" -/// memberSourceCredit : false -/// money : "1.49" -/// memberCredit : false -/// greenMoney : "0.00" -/// raiseMoney : "0.00" -/// payPassword : "222222" -/// useableConponList : [{"id":"1730867009651998720","storeIds":["1333246101343436800","1432164681279078400","1665555596536971264"],"stores":[],"bizType":2,"fullType":"TOTAL_FULL","fullAmount":"0.00","discountAmount":"0.00","fullNumber":2,"dateOrDay":true,"startAfterDays":0,"daysValidate":3,"discountPercent":68,"limitAmount":"0.00","bizId":"","publishStartTime":"2023-05-05","publishEndTime":"2023-12-31","useStartTime":"2023-12-02 16:30:28","useEndTime":"2023-12-05 16:30:28","doStartTime":"00:00","doEndTime":"23:59","promotionId":"0","couponId":"1654409900576473088","receiveTime":"2023-12-02","useTime":null,"status":1,"tenantCode":"admin","type":2,"promotionName":"双杯优享6.8折(海峡姐妹)","usable":false,"usableReason":"不在可使用时间内,本券须在领取0天后,3天内使用","allProduct":false,"productSkuId":[],"productGroupIds":["1433971071249285120","1433971071266062336","1433971071287033856","1433971071303811072","1433971071316393984","1433972467273039872","1435141914704740352","1524320958125441024","1552172579970613248","1668105881067192320","1668134716433235968","1668134867440762880","1668134955919605760","1668135085221609472","1668135269255086080","1425708380399337472","1426064940447301632","1426067376096411648","1426095795836289024","1522572290481455104","1522572604823568384","1524327158112059392","1601821884305899520","1668135150308818944","1678291351080271872"],"productList":null,"isMaxCoupon":false,"productGroupList":[],"remark":"

1.本券自领取日起3天有效。
2.本券仅用于海峡姐妹饮品,一次性购买满2杯使用。
3.本券不可与其他活动同享。

","canUseBalance":true},{"id":"1738109465292439552","storeIds":["1432164681279078400"],"stores":[],"bizType":6,"fullType":"EACH_FULL","fullAmount":"0.00","discountAmount":"0.00","fullNumber":1,"dateOrDay":true,"startAfterDays":0,"daysValidate":90,"discountPercent":0,"limitAmount":"0.00","bizId":"","publishStartTime":"2023-08-28","publishEndTime":"2025-08-31","useStartTime":"2023-12-22 16:09:24","useEndTime":"2024-03-21 16:09:24","doStartTime":"00:00","doEndTime":"23:59","promotionId":"0","couponId":"1695995932824305664","receiveTime":"2023-12-22","useTime":null,"status":1,"tenantCode":"admin","type":6,"promotionName":"茶饮畅饮券","usable":false,"usableReason":null,"allProduct":false,"productSkuId":[],"productGroupIds":["1433971071249285120","1433971071266062336","1433971071287033856","1433971071303811072","1433972467273039872","1434859128668291072","1435141914704740352","1524320958125441024","1552172579970613248"],"productList":null,"isMaxCoupon":false,"productGroupList":[],"remark":"

1.本券仅作为有奖兑换凭证,不可转赠,不可兑换现金;
2.请在有效期内使用该券,逾期作废;
3.本券一次性核销。

","canUseBalance":true},{"id":"1739525906998755328","storeIds":["1432164681279078400"],"stores":[],"bizType":6,"fullType":"EACH_FULL","fullAmount":"0.00","discountAmount":"0.00","fullNumber":1,"dateOrDay":true,"startAfterDays":0,"daysValidate":90,"discountPercent":0,"limitAmount":"0.00","bizId":"","publishStartTime":"2023-08-28","publishEndTime":"2025-08-31","useStartTime":"2023-12-26 13:57:50","useEndTime":"2024-03-25 13:57:50","doStartTime":"00:00","doEndTime":"23:59","promotionId":"0","couponId":"1695995932824305664","receiveTime":"2023-12-26","useTime":null,"status":1,"tenantCode":"admin","type":6,"promotionName":"茶饮畅饮券","usable":false,"usableReason":null,"allProduct":false,"productSkuId":[],"productGroupIds":["1433971071249285120","1433971071266062336","1433971071287033856","1433971071303811072","1433972467273039872","1434859128668291072","1435141914704740352","1524320958125441024","1552172579970613248"],"productList":null,"isMaxCoupon":false,"productGroupList":[],"remark":"

1.本券仅作为有奖兑换凭证,不可转赠,不可兑换现金;
2.请在有效期内使用该券,逾期作废;
3.本券一次性核销。

","canUseBalance":true},{"id":"1739947698053709824","storeIds":["1627869775969386496"],"stores":[{"id":"1627869775969386496","createTime":"2023-02-21 11:16:14","createUser":"1","updateTime":"2023-02-21 11:16:14","updateUser":"1","tenantCode":"1193","useErp":false,"openStartTime":"08:00:00","openEndTime":"21:15:00","storeName":"海峡姐妹茶膳坊","nickName":"","logo":"https://pos.upload.lotus-wallet.com/1193/2023/05/335470b8-557e-4809-92b3-c8050f98bb7f.png","facade":"https://pos.upload.lotus-wallet.com/1193/2023/05/f4e502de-d3af-4524-962a-d588733f0b1b.jpg","shipAddress":null,"remark":"","mobile":"18696193737","longitude":"116.4273410000","latitude":"39.9028420000","refundAddress":"北京市东城区毛家湾胡同甲13号北京站第八候车室西侧第一跨2-8-1B","refundTel":null,"refundContact":null,"isAutoSendRefundAddress":1,"province":"北京","city":"北京","district":"东城区","address":"北京市东城区毛家湾胡同甲13号北京站第八候车室西侧第一跨2-8-1B","headName":"","headMobile":"","tel":"18696193737","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":true,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":{"mini_program_app_id":"wx8f3ce8f059abff52","mini_program_secret":"40a7eb06bb1eb537a2faf094baa787e1","mini_mch_id":"","mini_sub_mch_id":"1639906514","is_sub_app":true,"sub_app_id":"wx8f3ce8f059abff52","mini_mch_key":"e10adc3949ba59abbe56e057f20f883e","mini_key_path":"","mini_key_sn_no":"","mini_key_cert_path":"","mini_key_key_path":""},"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2088541867845156","appAuthToken":"202303BBbcba1639502a4d1c8e1c67e209b71D15"},"setting":{"speakerKey":"","speakerSn":"zsw03","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"refundApprover":null,"enableRefundApprover":null,"tableFee":{"merchant_table_price":"","per_capita_consumption":"30","pay_set":["0","1","2","3","4"]},"money":"1502.00","platformShow":true,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":0,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":{"use_auto_open":false,"use_finish_order":true,"use_flow_auto_open":true,"use_flow_finish_order":false},"posType":{"desc":"快消餐饮","code":"FASTSTORE"}}],"bizType":2,"fullType":"TOTAL_FULL","fullAmount":"0.00","discountAmount":"0.00","fullNumber":1,"dateOrDay":false,"startAfterDays":0,"daysValidate":0,"discountPercent":80,"limitAmount":"0.00","bizId":"","publishStartTime":"2023-12-26","publishEndTime":"2023-12-28","useStartTime":"2023-12-26 00:00:00","useEndTime":"2023-12-30 00:00:00","doStartTime":"00:00","doEndTime":"23:59","promotionId":"0","couponId":"1739593476279894016","receiveTime":"2023-12-27","useTime":null,"status":1,"tenantCode":"1193","type":2,"promotionName":"素燥饭八折券","usable":false,"usableReason":null,"allProduct":false,"productSkuId":["1647843685146034176"],"productGroupIds":[],"productList":[{"id":"1647843685146034176","createTime":"2023-04-17 14:05:25","createUser":"1627869775885500416","updateTime":"2023-06-21 13:02:44","updateUser":"1627869775885500416","supplierName":"茶膳坊","storeId":"1627869775969386496","categoryId":"1300687829071822848","groupId":"1646761808653975552","shortName":"主食搭配贡丸汤,美味又营养","productName":"素燥饭套餐","sellDesc":"","attribute":null,"productCode":"PRO202304171405240000000000003","weight":"0","applyPrice":"42.00","price":"42.00","vipPrice":"42.00","stock":991,"sellCount":1032,"needLogistics":1,"oversold":0,"organic":0,"status":1,"posShow":true,"subscribeParam":null,"isRaise":false,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"","info":"","buyCount":-53,"sellCountLimit":0,"stockRecoveryTime":"00:00:00","isAddPurchase":null,"limitNum":0,"rankId":"0","happyBean":0,"sort":0,"salesRules":null}],"isMaxCoupon":false,"productGroupList":null,"remark":"

111

","canUseBalance":true},{"id":"1739947724452659200","storeIds":["1627869775969386496"],"stores":[{"id":"1627869775969386496","createTime":"2023-02-21 11:16:14","createUser":"1","updateTime":"2023-02-21 11:16:14","updateUser":"1","tenantCode":"1193","useErp":false,"openStartTime":"08:00:00","openEndTime":"21:15:00","storeName":"海峡姐妹茶膳坊","nickName":"","logo":"https://pos.upload.lotus-wallet.com/1193/2023/05/335470b8-557e-4809-92b3-c8050f98bb7f.png","facade":"https://pos.upload.lotus-wallet.com/1193/2023/05/f4e502de-d3af-4524-962a-d588733f0b1b.jpg","shipAddress":null,"remark":"","mobile":"18696193737","longitude":"116.4273410000","latitude":"39.9028420000","refundAddress":"北京市东城区毛家湾胡同甲13号北京站第八候车室西侧第一跨2-8-1B","refundTel":null,"refundContact":null,"isAutoSendRefundAddress":1,"province":"北京","city":"北京","district":"东城区","address":"北京市东城区毛家湾胡同甲13号北京站第八候车室西侧第一跨2-8-1B","headName":"","headMobile":"","tel":"18696193737","businessService":"","businessType":"","deliveryInfo":null,"pickupType":{"dineInTakeStatus":true,"takeawayStatus":false,"expressDeliveryStatus":false},"miniParam":{"mini_program_app_id":"wx8f3ce8f059abff52","mini_program_secret":"40a7eb06bb1eb537a2faf094baa787e1","mini_mch_id":"","mini_sub_mch_id":"1639906514","is_sub_app":true,"sub_app_id":"wx8f3ce8f059abff52","mini_mch_key":"e10adc3949ba59abbe56e057f20f883e","mini_key_path":"","mini_key_sn_no":"","mini_key_cert_path":"","mini_key_key_path":""},"alipayParam":{"appid":"","privateKey":"","alipayPublicKey":"","alipayPid":"2088541867845156","appAuthToken":"202303BBbcba1639502a4d1c8e1c67e209b71D15"},"setting":{"speakerKey":"","speakerSn":"zsw03","printUsername":"","printUserPwd":"","tagWidth":null,"tagHeight":null},"refundApprover":null,"enableRefundApprover":null,"tableFee":{"merchant_table_price":"","per_capita_consumption":"30","pay_set":["0","1","2","3","4"]},"money":"1502.00","platformShow":true,"subMchId":"","serviceType":"EATSTORE","isEnable":true,"is_delete":0,"sort":0,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0},"autoSetting":{"use_auto_open":false,"use_finish_order":true,"use_flow_auto_open":true,"use_flow_finish_order":false},"posType":{"desc":"快消餐饮","code":"FASTSTORE"}}],"bizType":1,"fullType":"EACH_FULL","fullAmount":"49.00","discountAmount":"10.00","fullNumber":1,"dateOrDay":true,"startAfterDays":1,"daysValidate":90,"discountPercent":100,"limitAmount":"0.00","bizId":"","publishStartTime":"2023-06-19","publishEndTime":"2023-06-26","useStartTime":"2023-12-28 17:53:59","useEndTime":"2024-03-27 17:53:59","doStartTime":"00:00","doEndTime":"23:59","promotionId":"0","couponId":"1669883455174868992","receiveTime":"2023-12-27","useTime":null,"status":1,"tenantCode":"1193","type":1,"promotionName":"满49减10元端午礼券","usable":false,"usableReason":"不在可使用时间内,本券须在领取1天后,90天内使用","allProduct":true,"productSkuId":[],"productGroupIds":[],"productList":null,"isMaxCoupon":false,"productGroupList":null,"remark":"

1.本券自领取日,次日生效可用,90天内有效;
2.本券可用于购买海峡姐妹茶膳坊内商品,满49元可使用;
3.本券不可与其他活动同享;
4.本券不可转赠,不可找零。

\n

 

","canUseBalance":true}] - -class PhoneQueryMemberInfo { - PhoneQueryMemberInfo({ - String mid, - String sid, - String phoneNum, - String nickName, - String headimg, - String sex, - String balance, - String realBalance, - String giftBalance, - bool memberSourceCredit, - String money, - bool memberCredit, - String greenMoney, - String raiseMoney, - String payPassword, - List useableConponList,}){ - _mid = mid; - _sid = sid; - _phoneNum = phoneNum; - _nickName = nickName; - _headimg = headimg; - _sex = sex; - _balance = balance; - _realBalance = realBalance; - _giftBalance = giftBalance; - _memberSourceCredit = memberSourceCredit; - _money = money; - _memberCredit = memberCredit; - _greenMoney = greenMoney; - _raiseMoney = raiseMoney; - _payPassword = payPassword; - _useableConponList = useableConponList; -} - - PhoneQueryMemberInfo.fromJson(dynamic json) { - _mid = json['mid']; - _sid = json['sid']; - _phoneNum = json['phoneNum']; - _nickName = json['nickName']; - _headimg = json['headimg']; - _sex = json['sex']; - _balance = json['balance']; - _realBalance = json['realBalance']; - _giftBalance = json['giftBalance']; - _memberSourceCredit = json['memberSourceCredit']; - _money = json['money']; - _memberCredit = json['memberCredit']; - _greenMoney = json['greenMoney']; - _raiseMoney = json['raiseMoney']; - _payPassword = json['payPassword']; - if (json['useableConponList'] != null) { - _useableConponList = []; - json['useableConponList'].forEach((v) { - _useableConponList.add(UseableConponList.fromJson(v)); - }); - } - } - String _mid; - String _sid; - String _phoneNum; - String _nickName; - String _headimg; - String _sex; - String _balance; - String _realBalance; - String _giftBalance; - bool _memberSourceCredit; - String _money; - bool _memberCredit; - String _greenMoney; - String _raiseMoney; - String _payPassword; - List _useableConponList; -PhoneQueryMemberInfo copyWith({ String mid, - String sid, - String phoneNum, - String nickName, - String headimg, - String sex, - String balance, - String realBalance, - String giftBalance, - bool memberSourceCredit, - String money, - bool memberCredit, - String greenMoney, - String raiseMoney, - String payPassword, - List useableConponList, -}) => PhoneQueryMemberInfo( mid: mid ?? _mid, - sid: sid ?? _sid, - phoneNum: phoneNum ?? _phoneNum, - nickName: nickName ?? _nickName, - headimg: headimg ?? _headimg, - sex: sex ?? _sex, - balance: balance ?? _balance, - realBalance: realBalance ?? _realBalance, - giftBalance: giftBalance ?? _giftBalance, - memberSourceCredit: memberSourceCredit ?? _memberSourceCredit, - money: money ?? _money, - memberCredit: memberCredit ?? _memberCredit, - greenMoney: greenMoney ?? _greenMoney, - raiseMoney: raiseMoney ?? _raiseMoney, - payPassword: payPassword ?? _payPassword, - useableConponList: useableConponList ?? _useableConponList, -); - String get mid => _mid; - String get sid => _sid; - String get phoneNum => _phoneNum; - String get nickName => _nickName; - String get headimg => _headimg; - String get sex => _sex; - String get balance => _balance; - String get realBalance => _realBalance; - String get giftBalance => _giftBalance; - bool get memberSourceCredit => _memberSourceCredit; - String get money => _money; - bool get memberCredit => _memberCredit; - String get greenMoney => _greenMoney; - String get raiseMoney => _raiseMoney; - String get payPassword => _payPassword; - List get useableConponList => _useableConponList; - - Map toJson() { - final map = {}; - map['mid'] = _mid; - map['sid'] = _sid; - map['phoneNum'] = _phoneNum; - map['nickName'] = _nickName; - map['headimg'] = _headimg; - map['sex'] = _sex; - map['balance'] = _balance; - map['realBalance'] = _realBalance; - map['giftBalance'] = _giftBalance; - map['memberSourceCredit'] = _memberSourceCredit; - map['money'] = _money; - map['memberCredit'] = _memberCredit; - map['greenMoney'] = _greenMoney; - map['raiseMoney'] = _raiseMoney; - map['payPassword'] = _payPassword; - if (_useableConponList != null) { - map['useableConponList'] = _useableConponList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1730867009651998720" -/// storeIds : ["1333246101343436800","1432164681279078400","1665555596536971264"] -/// stores : [] -/// bizType : 2 -/// fullType : "TOTAL_FULL" -/// fullAmount : "0.00" -/// discountAmount : "0.00" -/// fullNumber : 2 -/// dateOrDay : true -/// startAfterDays : 0 -/// daysValidate : 3 -/// discountPercent : 68 -/// limitAmount : "0.00" -/// bizId : "" -/// publishStartTime : "2023-05-05" -/// publishEndTime : "2023-12-31" -/// useStartTime : "2023-12-02 16:30:28" -/// useEndTime : "2023-12-05 16:30:28" -/// doStartTime : "00:00" -/// doEndTime : "23:59" -/// promotionId : "0" -/// couponId : "1654409900576473088" -/// receiveTime : "2023-12-02" -/// useTime : null -/// status : 1 -/// tenantCode : "admin" -/// type : 2 -/// promotionName : "双杯优享6.8折(海峡姐妹)" -/// usable : false -/// usableReason : "不在可使用时间内,本券须在领取0天后,3天内使用" -/// allProduct : false -/// productSkuId : [] -/// productGroupIds : ["1433971071249285120","1433971071266062336","1433971071287033856","1433971071303811072","1433971071316393984","1433972467273039872","1435141914704740352","1524320958125441024","1552172579970613248","1668105881067192320","1668134716433235968","1668134867440762880","1668134955919605760","1668135085221609472","1668135269255086080","1425708380399337472","1426064940447301632","1426067376096411648","1426095795836289024","1522572290481455104","1522572604823568384","1524327158112059392","1601821884305899520","1668135150308818944","1678291351080271872"] -/// productList : null -/// isMaxCoupon : false -/// productGroupList : [] -/// remark : "

1.本券自领取日起3天有效。
2.本券仅用于海峡姐妹饮品,一次性购买满2杯使用。
3.本券不可与其他活动同享。

" -/// canUseBalance : true - -class UseableConponList { - UseableConponList({ - String id, - List storeIds, - List stores, - num bizType, - String fullType, - String fullAmount, - String discountAmount, - num fullNumber, - bool dateOrDay, - num startAfterDays, - num daysValidate, - num discountPercent, - String limitAmount, - String bizId, - String publishStartTime, - String publishEndTime, - String useStartTime, - String useEndTime, - String doStartTime, - String doEndTime, - String promotionId, - String couponId, - String receiveTime, - dynamic useTime, - num status, - String tenantCode, - num type, - String promotionName, - bool usable, - String usableReason, - bool allProduct, - List productSkuId, - List productGroupIds, - dynamic productList, - bool isMaxCoupon, - List productGroupList, - String remark, - bool canUseBalance,}){ - _id = id; - _storeIds = storeIds; - _stores = stores; - _bizType = bizType; - _fullType = fullType; - _fullAmount = fullAmount; - _discountAmount = discountAmount; - _fullNumber = fullNumber; - _dateOrDay = dateOrDay; - _startAfterDays = startAfterDays; - _daysValidate = daysValidate; - _discountPercent = discountPercent; - _limitAmount = limitAmount; - _bizId = bizId; - _publishStartTime = publishStartTime; - _publishEndTime = publishEndTime; - _useStartTime = useStartTime; - _useEndTime = useEndTime; - _doStartTime = doStartTime; - _doEndTime = doEndTime; - _promotionId = promotionId; - _couponId = couponId; - _receiveTime = receiveTime; - _useTime = useTime; - _status = status; - _tenantCode = tenantCode; - _type = type; - _promotionName = promotionName; - _usable = usable; - _usableReason = usableReason; - _allProduct = allProduct; - _productSkuId = productSkuId; - _productGroupIds = productGroupIds; - _productList = productList; - _isMaxCoupon = isMaxCoupon; - _productGroupList = productGroupList; - _remark = remark; - _canUseBalance = canUseBalance; -} - - UseableConponList.fromJson(dynamic json) { - _id = json['id']; - _storeIds = json['storeIds'] != null ? json['storeIds'].cast() : []; - // if (json['stores'] != null) { - // _stores = []; - // json['stores'].forEach((v) { - // _stores.add(Dynamic.fromJson(v)); - // }); - // } - _bizType = json['bizType']; - _fullType = json['fullType']; - _fullAmount = json['fullAmount']; - _discountAmount = json['discountAmount']; - _fullNumber = json['fullNumber']; - _dateOrDay = json['dateOrDay']; - _startAfterDays = json['startAfterDays']; - _daysValidate = json['daysValidate']; - _discountPercent = json['discountPercent']; - _limitAmount = json['limitAmount']; - _bizId = json['bizId']; - _publishStartTime = json['publishStartTime']; - _publishEndTime = json['publishEndTime']; - _useStartTime = json['useStartTime']; - _useEndTime = json['useEndTime']; - _doStartTime = json['doStartTime']; - _doEndTime = json['doEndTime']; - _promotionId = json['promotionId']; - _couponId = json['couponId']; - _receiveTime = json['receiveTime']; - _useTime = json['useTime']; - _status = json['status']; - _tenantCode = json['tenantCode']; - _type = json['type']; - _promotionName = json['promotionName']; - _usable = json['usable']; - _usableReason = json['usableReason']; - _allProduct = json['allProduct']; - if (json['productSkuId'] != null) { - _productSkuId = []; - // json['productSkuId'].forEach((v) { - // _productSkuId.add(Dynamic.fromJson(v)); - // }); - } - _productGroupIds = json['productGroupIds'] != null ? json['productGroupIds'].cast() : []; - _productList = json['productList']; - _isMaxCoupon = json['isMaxCoupon']; - if (json['productGroupList'] != null) { - _productGroupList = []; - // json['productGroupList'].forEach((v) { - // _productGroupList.add(Dynamic.fromJson(v)); - // }); - } - _remark = json['remark']; - _canUseBalance = json['canUseBalance']; - } - String _id; - List _storeIds; - List _stores; - num _bizType; - String _fullType; - String _fullAmount; - String _discountAmount; - num _fullNumber; - bool _dateOrDay; - num _startAfterDays; - num _daysValidate; - num _discountPercent; - String _limitAmount; - String _bizId; - String _publishStartTime; - String _publishEndTime; - String _useStartTime; - String _useEndTime; - String _doStartTime; - String _doEndTime; - String _promotionId; - String _couponId; - String _receiveTime; - dynamic _useTime; - num _status; - String _tenantCode; - num _type; - String _promotionName; - bool _usable; - String _usableReason; - bool _allProduct; - List _productSkuId; - List _productGroupIds; - dynamic _productList; - bool _isMaxCoupon; - List _productGroupList; - String _remark; - bool _canUseBalance; -UseableConponList copyWith({ String id, - List storeIds, - List stores, - num bizType, - String fullType, - String fullAmount, - String discountAmount, - num fullNumber, - bool dateOrDay, - num startAfterDays, - num daysValidate, - num discountPercent, - String limitAmount, - String bizId, - String publishStartTime, - String publishEndTime, - String useStartTime, - String useEndTime, - String doStartTime, - String doEndTime, - String promotionId, - String couponId, - String receiveTime, - dynamic useTime, - num status, - String tenantCode, - num type, - String promotionName, - bool usable, - String usableReason, - bool allProduct, - List productSkuId, - List productGroupIds, - dynamic productList, - bool isMaxCoupon, - List productGroupList, - String remark, - bool canUseBalance, -}) => UseableConponList( id: id ?? _id, - storeIds: storeIds ?? _storeIds, - stores: stores ?? _stores, - bizType: bizType ?? _bizType, - fullType: fullType ?? _fullType, - fullAmount: fullAmount ?? _fullAmount, - discountAmount: discountAmount ?? _discountAmount, - fullNumber: fullNumber ?? _fullNumber, - dateOrDay: dateOrDay ?? _dateOrDay, - startAfterDays: startAfterDays ?? _startAfterDays, - daysValidate: daysValidate ?? _daysValidate, - discountPercent: discountPercent ?? _discountPercent, - limitAmount: limitAmount ?? _limitAmount, - bizId: bizId ?? _bizId, - publishStartTime: publishStartTime ?? _publishStartTime, - publishEndTime: publishEndTime ?? _publishEndTime, - useStartTime: useStartTime ?? _useStartTime, - useEndTime: useEndTime ?? _useEndTime, - doStartTime: doStartTime ?? _doStartTime, - doEndTime: doEndTime ?? _doEndTime, - promotionId: promotionId ?? _promotionId, - couponId: couponId ?? _couponId, - receiveTime: receiveTime ?? _receiveTime, - useTime: useTime ?? _useTime, - status: status ?? _status, - tenantCode: tenantCode ?? _tenantCode, - type: type ?? _type, - promotionName: promotionName ?? _promotionName, - usable: usable ?? _usable, - usableReason: usableReason ?? _usableReason, - allProduct: allProduct ?? _allProduct, - productSkuId: productSkuId ?? _productSkuId, - productGroupIds: productGroupIds ?? _productGroupIds, - productList: productList ?? _productList, - isMaxCoupon: isMaxCoupon ?? _isMaxCoupon, - productGroupList: productGroupList ?? _productGroupList, - remark: remark ?? _remark, - canUseBalance: canUseBalance ?? _canUseBalance, -); - String get id => _id; - List get storeIds => _storeIds; - List get stores => _stores; - num get bizType => _bizType; - String get fullType => _fullType; - String get fullAmount => _fullAmount; - String get discountAmount => _discountAmount; - num get fullNumber => _fullNumber; - bool get dateOrDay => _dateOrDay; - num get startAfterDays => _startAfterDays; - num get daysValidate => _daysValidate; - num get discountPercent => _discountPercent; - String get limitAmount => _limitAmount; - String get bizId => _bizId; - String get publishStartTime => _publishStartTime; - String get publishEndTime => _publishEndTime; - String get useStartTime => _useStartTime; - String get useEndTime => _useEndTime; - String get doStartTime => _doStartTime; - String get doEndTime => _doEndTime; - String get promotionId => _promotionId; - String get couponId => _couponId; - String get receiveTime => _receiveTime; - dynamic get useTime => _useTime; - num get status => _status; - String get tenantCode => _tenantCode; - num get type => _type; - String get promotionName => _promotionName; - bool get usable => _usable; - String get usableReason => _usableReason; - bool get allProduct => _allProduct; - List get productSkuId => _productSkuId; - List get productGroupIds => _productGroupIds; - dynamic get productList => _productList; - bool get isMaxCoupon => _isMaxCoupon; - List get productGroupList => _productGroupList; - String get remark => _remark; - bool get canUseBalance => _canUseBalance; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['storeIds'] = _storeIds; - if (_stores != null) { - map['stores'] = _stores.map((v) => v.toJson()).toList(); - } - map['bizType'] = _bizType; - map['fullType'] = _fullType; - map['fullAmount'] = _fullAmount; - map['discountAmount'] = _discountAmount; - map['fullNumber'] = _fullNumber; - map['dateOrDay'] = _dateOrDay; - map['startAfterDays'] = _startAfterDays; - map['daysValidate'] = _daysValidate; - map['discountPercent'] = _discountPercent; - map['limitAmount'] = _limitAmount; - map['bizId'] = _bizId; - map['publishStartTime'] = _publishStartTime; - map['publishEndTime'] = _publishEndTime; - map['useStartTime'] = _useStartTime; - map['useEndTime'] = _useEndTime; - map['doStartTime'] = _doStartTime; - map['doEndTime'] = _doEndTime; - map['promotionId'] = _promotionId; - map['couponId'] = _couponId; - map['receiveTime'] = _receiveTime; - map['useTime'] = _useTime; - map['status'] = _status; - map['tenantCode'] = _tenantCode; - map['type'] = _type; - map['promotionName'] = _promotionName; - map['usable'] = _usable; - map['usableReason'] = _usableReason; - map['allProduct'] = _allProduct; - if (_productSkuId != null) { - map['productSkuId'] = _productSkuId.map((v) => v.toJson()).toList(); - } - map['productGroupIds'] = _productGroupIds; - map['productList'] = _productList; - map['isMaxCoupon'] = _isMaxCoupon; - if (_productGroupList != null) { - map['productGroupList'] = _productGroupList.map((v) => v.toJson()).toList(); - } - map['remark'] = _remark; - map['canUseBalance'] = _canUseBalance; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/pickup_type.dart b/lib/retrofit/data/pickup_type.dart deleted file mode 100644 index 36a7d860..00000000 --- a/lib/retrofit/data/pickup_type.dart +++ /dev/null @@ -1,42 +0,0 @@ -/// dineInTakeStatus : true -/// takeawayStatus : null -/// expressDeliveryStatus : null - -class PickupType { - PickupType({ - bool dineInTakeStatus, - dynamic takeawayStatus, - dynamic expressDeliveryStatus,}){ - _dineInTakeStatus = dineInTakeStatus; - _takeawayStatus = takeawayStatus; - _expressDeliveryStatus = expressDeliveryStatus; -} - - PickupType.fromJson(dynamic json) { - _dineInTakeStatus = json['dineInTakeStatus']; - _takeawayStatus = json['takeawayStatus']; - _expressDeliveryStatus = json['expressDeliveryStatus']; - } - bool _dineInTakeStatus; - dynamic _takeawayStatus; - dynamic _expressDeliveryStatus; -PickupType copyWith({ bool dineInTakeStatus, - dynamic takeawayStatus, - dynamic expressDeliveryStatus, -}) => PickupType( dineInTakeStatus: dineInTakeStatus ?? _dineInTakeStatus, - takeawayStatus: takeawayStatus ?? _takeawayStatus, - expressDeliveryStatus: expressDeliveryStatus ?? _expressDeliveryStatus, -); - bool get dineInTakeStatus => _dineInTakeStatus; - dynamic get takeawayStatus => _takeawayStatus; - dynamic get expressDeliveryStatus => _expressDeliveryStatus; - - Map toJson() { - final map = {}; - map['dineInTakeStatus'] = _dineInTakeStatus; - map['takeawayStatus'] = _takeawayStatus; - map['expressDeliveryStatus'] = _expressDeliveryStatus; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/placeOrderFirst.dart b/lib/retrofit/data/placeOrderFirst.dart deleted file mode 100644 index 404be2bf..00000000 --- a/lib/retrofit/data/placeOrderFirst.dart +++ /dev/null @@ -1,145 +0,0 @@ -import 'package:huixiang/retrofit/data/down_order.dart'; -import 'package:huixiang/retrofit/data/order_product_vo.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; - -class PlaceOrderFirst { - int cartNum; - dynamic cartSum; - dynamic addressId; - bool isSubscribe; - int isTakeOut; - dynamic notes; - dynamic id; - dynamic numberOfPeople; - int orderSource; - dynamic orderType; - int orderTypeId; - dynamic parentCode; - dynamic parentId; - int payChannel; - PromotionInfoDTOBean promotionInfoDTO; - String recMobile; - List orderProductVOList; - List shoppingCartSkuItemList; - List skuItemDTOList; - int source; - String storeId; - String subcribeTime; - String tableId; - - PlaceOrderFirst( - { - this.cartNum, - this.cartSum, - this.addressId, - this.isSubscribe, - this.isTakeOut, - this.notes, - this.id, - this.numberOfPeople, - this.orderSource, - this.orderType, - this.orderTypeId, - this.parentCode, - this.parentId, - this.payChannel, - this.promotionInfoDTO, - this.recMobile, - this.orderProductVOList, - this.shoppingCartSkuItemList, - this.skuItemDTOList, - this.source, - this.storeId, - this.subcribeTime, - this.tableId}); - - static PlaceOrderFirst fromJson(Map json) { - if (json == null) return null; - PlaceOrderFirst placeOrderFirst = PlaceOrderFirst(); - placeOrderFirst.cartNum = json['cartNum']; - placeOrderFirst.cartSum = json['cartSum']; - placeOrderFirst.addressId = json['addressId']; - placeOrderFirst.isSubscribe = json['isSubscribe']; - placeOrderFirst.isTakeOut = json['isTakeOut']; - placeOrderFirst.notes = json['notes']; - placeOrderFirst.id = json['id']; - placeOrderFirst.numberOfPeople = json['numberOfPeople']; - placeOrderFirst.orderSource = json['orderSource']; - placeOrderFirst.orderType = json['orderType']; - placeOrderFirst.orderTypeId = json['orderTypeId']; - placeOrderFirst.parentCode = json['parentCode']; - placeOrderFirst.parentId = json['parentId']; - placeOrderFirst.payChannel = json['payChannel']; - placeOrderFirst.promotionInfoDTO = - PromotionInfoDTOBean.fromJson(json['promotionInfoDTO']); - placeOrderFirst.recMobile = json['recMobile']; - placeOrderFirst.shoppingCartSkuItemList = []..addAll( - (json['shoppingCartSkuItemList'] as List ?? []) - .map((o) => OrderProductVOList.fromJson(o))); - placeOrderFirst.orderProductVOList = []..addAll( - (json['orderProductVOList'] as List ?? []) - .map((o) => OrderProductVOList.fromJson(o))); - placeOrderFirst.skuItemDTOList = json['skuItemDTOList']; - placeOrderFirst.source = json['source']; - placeOrderFirst.storeId = json['storeId']; - placeOrderFirst.subcribeTime = json['subcribeTime']; - placeOrderFirst.tableId = json['tableId']; - return placeOrderFirst; - } - - Map toJson() => { - "cartNum": cartNum, - "cartSum": cartSum, - "addressId": addressId, - "isSubscribe": isSubscribe, - "isTakeOut": isTakeOut, - "notes": notes, - "id": id, - "numberOfPeople": numberOfPeople, - "orderSource": orderSource, - "orderType": orderType, - "orderTypeId": orderTypeId, - "parentCode": parentCode, - "parentId": parentId, - "payChannel": payChannel, - "promotionInfoDTO": promotionInfoDTO == null ? null : promotionInfoDTO.toJson(), - "recMobile": recMobile, - "shoppingCartSkuItemList": shoppingCartSkuItemList == null ? null : shoppingCartSkuItemList.map((e) => e.toJson()).toList(), - "orderProductVOList": orderProductVOList == null ? null : orderProductVOList.map((e) => e.toJson()).toList(), - "skuItemDTOList": skuItemDTOList, - "source": source, - "storeId": storeId, - "subcribeTime": subcribeTime, - "tableId": tableId, - }; -} - -class PromotionInfoDTOBean { - String couponId; - String promotionId; - bool useVipPrice; - bool useBenefit; - String discountType; - - PromotionInfoDTOBean({this.couponId, this.promotionId,this.useVipPrice,this.useBenefit,this.discountType}); - - static PromotionInfoDTOBean fromJson(Map json) { - if (json == null) return null; - PromotionInfoDTOBean promotionInfoDTOBean = PromotionInfoDTOBean(); - promotionInfoDTOBean.couponId = json['couponId']; - promotionInfoDTOBean.promotionId = json['promotionId']; - promotionInfoDTOBean.useVipPrice = json['useVipPrice']; - promotionInfoDTOBean.useBenefit = json['useBenefit']; - promotionInfoDTOBean.discountType = json['discountType']; - return promotionInfoDTOBean; - } - - Map toJson() => { - "couponId": couponId, - "promotionId": promotionId, - "useVipPrice":useVipPrice, - "useBenefit": useBenefit, - "discountType":discountType, - }; -} diff --git a/lib/retrofit/data/popular_sales_list.dart b/lib/retrofit/data/popular_sales_list.dart deleted file mode 100644 index 37bebde4..00000000 --- a/lib/retrofit/data/popular_sales_list.dart +++ /dev/null @@ -1,311 +0,0 @@ -/// dashMemberList : [{"id":"1645357356843794432","name":"哈哈哈","phone":"15623342902","balance":"817.21"},{"id":"1688728183219683328","name":"","phone":"17612711844","balance":"470.00"},{"id":"1693535584301088768","name":"西瓜太郎","phone":"18716285488","balance":"104.00"},{"id":"1645691116772655104","name":"丙阳测试环境","phone":"15827991714","balance":"0.88"},{"id":"1645348000345620480","name":"璇","phone":"15871490290","balance":"0.02"},{"id":"1685233051375763456","name":"","phone":"18672789329","balance":"0.00"},{"id":"1696812803165257728","name":"","phone":"15723456545","balance":"0.00"},{"id":"1652214301991108608","name":"","phone":"18573164593","balance":"0.00"},{"id":"1646037740963233792","name":"","phone":"13517240850","balance":"0.00"},{"id":"1650818734501134336","name":"","phone":"15172398708","balance":"0.00"},{"id":"1652493162733633536","name":"","phone":"15013675571","balance":"0.00"},{"id":"1646067749123784704","name":"","phone":"13720233327","balance":"0.00"}] -/// saleProductList : [{"product_id":"1646055704735252480","saleNum":12,"product_name":"香蕉牛乳"},{"product_id":"1645714721178910720","saleNum":8,"product_name":"红薯牛乳"},{"product_id":"1645991124428390400","saleNum":3,"product_name":"南瓜牛乳"},{"product_id":"1645722834221137920","saleNum":3,"product_name":"原味豆腐"},{"product_id":"1645992331242897408","saleNum":3,"product_name":"炸鲜香菇"},{"product_id":"1646449156648075264","saleNum":2,"product_name":"桑葚牛乳"},{"product_id":"1645724097411284992","saleNum":2,"product_name":"泡菜"},{"product_id":"1646449942484484096","saleNum":1,"product_name":"芒果牛乳"},{"product_id":"1645667029320990720","saleNum":1,"product_name":"木瓜牛奶"},{"product_id":"1645732366896857088","saleNum":1,"product_name":"酱烤玉米"}] -/// avgPrice : "11.43" -/// orderNum : 21 -/// storeDailyStatistics : [] -/// orderSum : "259.04" -/// changeData : {"addCartChangeRate":0.0,"payCountChangeRate":0.0,"sumAddCartCount":"0","sumSettleCount":"0","sumPaySuccessCount":"0","sumPV":"0","totalChangeRate":0.0,"sumPayCount":"0","settleChangeRate":0.0,"paySuccessChangeRate":0.0} -/// paySum : "240.00" - -class PopularSalesList { - PopularSalesList({ - List dashMemberList, - List saleProductList, - String avgPrice, - num orderNum, - // List storeDailyStatistics, - String orderSum, - ChangeData changeData, - String paySum,}){ - _dashMemberList = dashMemberList; - _saleProductList = saleProductList; - _avgPrice = avgPrice; - _orderNum = orderNum; - // _storeDailyStatistics = storeDailyStatistics; - _orderSum = orderSum; - _changeData = changeData; - _paySum = paySum; -} - - PopularSalesList.fromJson(dynamic json) { - if (json['dashMemberList'] != null) { - _dashMemberList = []; - json['dashMemberList'].forEach((v) { - _dashMemberList.add(DashMemberList.fromJson(v)); - }); - } - if (json['saleProductList'] != null) { - _saleProductList = []; - json['saleProductList'].forEach((v) { - _saleProductList.add(SaleProductList.fromJson(v)); - }); - } - _avgPrice = json['avgPrice']; - _orderNum = json['orderNum']; - // if (json['storeDailyStatistics'] != null) { - // _storeDailyStatistics = []; - // json['storeDailyStatistics'].forEach((v) { - // _storeDailyStatistics.add(Dynamic.fromJson(v)); - // }); - // } - _orderSum = json['orderSum']; - _changeData = json['changeData'] != null ? ChangeData.fromJson(json['changeData']) : null; - _paySum = json['paySum']; - } - List _dashMemberList; - List _saleProductList; - String _avgPrice; - num _orderNum; - // List _storeDailyStatistics; - String _orderSum; - ChangeData _changeData; - String _paySum; -PopularSalesList copyWith({ List dashMemberList, - List saleProductList, - String avgPrice, - num orderNum, - // List storeDailyStatistics, - String orderSum, - ChangeData changeData, - String paySum, -}) => PopularSalesList( dashMemberList: dashMemberList ?? _dashMemberList, - saleProductList: saleProductList ?? _saleProductList, - avgPrice: avgPrice ?? _avgPrice, - orderNum: orderNum ?? _orderNum, - // storeDailyStatistics: storeDailyStatistics ?? _storeDailyStatistics, - orderSum: orderSum ?? _orderSum, - changeData: changeData ?? _changeData, - paySum: paySum ?? _paySum, -); - List get dashMemberList => _dashMemberList; - List get saleProductList => _saleProductList; - String get avgPrice => _avgPrice; - num get orderNum => _orderNum; - // List get storeDailyStatistics => _storeDailyStatistics; - String get orderSum => _orderSum; - ChangeData get changeData => _changeData; - String get paySum => _paySum; - - Map toJson() { - final map = {}; - if (_dashMemberList != null) { - map['dashMemberList'] = _dashMemberList.map((v) => v.toJson()).toList(); - } - if (_saleProductList != null) { - map['saleProductList'] = _saleProductList.map((v) => v.toJson()).toList(); - } - map['avgPrice'] = _avgPrice; - map['orderNum'] = _orderNum; - // if (_storeDailyStatistics != null) { - // map['storeDailyStatistics'] = _storeDailyStatistics.map((v) => v.toJson()).toList(); - // } - map['orderSum'] = _orderSum; - if (_changeData != null) { - map['changeData'] = _changeData.toJson(); - } - map['paySum'] = _paySum; - return map; - } - -} - -/// addCartChangeRate : 0.0 -/// payCountChangeRate : 0.0 -/// sumAddCartCount : "0" -/// sumSettleCount : "0" -/// sumPaySuccessCount : "0" -/// sumPV : "0" -/// totalChangeRate : 0.0 -/// sumPayCount : "0" -/// settleChangeRate : 0.0 -/// paySuccessChangeRate : 0.0 - -class ChangeData { - ChangeData({ - num addCartChangeRate, - num payCountChangeRate, - String sumAddCartCount, - String sumSettleCount, - String sumPaySuccessCount, - String sumPV, - num totalChangeRate, - String sumPayCount, - num settleChangeRate, - num paySuccessChangeRate,}){ - _addCartChangeRate = addCartChangeRate; - _payCountChangeRate = payCountChangeRate; - _sumAddCartCount = sumAddCartCount; - _sumSettleCount = sumSettleCount; - _sumPaySuccessCount = sumPaySuccessCount; - _sumPV = sumPV; - _totalChangeRate = totalChangeRate; - _sumPayCount = sumPayCount; - _settleChangeRate = settleChangeRate; - _paySuccessChangeRate = paySuccessChangeRate; -} - - ChangeData.fromJson(dynamic json) { - _addCartChangeRate = json['addCartChangeRate']; - _payCountChangeRate = json['payCountChangeRate']; - _sumAddCartCount = json['sumAddCartCount']; - _sumSettleCount = json['sumSettleCount']; - _sumPaySuccessCount = json['sumPaySuccessCount']; - _sumPV = json['sumPV']; - _totalChangeRate = json['totalChangeRate']; - _sumPayCount = json['sumPayCount']; - _settleChangeRate = json['settleChangeRate']; - _paySuccessChangeRate = json['paySuccessChangeRate']; - } - num _addCartChangeRate; - num _payCountChangeRate; - String _sumAddCartCount; - String _sumSettleCount; - String _sumPaySuccessCount; - String _sumPV; - num _totalChangeRate; - String _sumPayCount; - num _settleChangeRate; - num _paySuccessChangeRate; -ChangeData copyWith({ num addCartChangeRate, - num payCountChangeRate, - String sumAddCartCount, - String sumSettleCount, - String sumPaySuccessCount, - String sumPV, - num totalChangeRate, - String sumPayCount, - num settleChangeRate, - num paySuccessChangeRate, -}) => ChangeData( addCartChangeRate: addCartChangeRate ?? _addCartChangeRate, - payCountChangeRate: payCountChangeRate ?? _payCountChangeRate, - sumAddCartCount: sumAddCartCount ?? _sumAddCartCount, - sumSettleCount: sumSettleCount ?? _sumSettleCount, - sumPaySuccessCount: sumPaySuccessCount ?? _sumPaySuccessCount, - sumPV: sumPV ?? _sumPV, - totalChangeRate: totalChangeRate ?? _totalChangeRate, - sumPayCount: sumPayCount ?? _sumPayCount, - settleChangeRate: settleChangeRate ?? _settleChangeRate, - paySuccessChangeRate: paySuccessChangeRate ?? _paySuccessChangeRate, -); - num get addCartChangeRate => _addCartChangeRate; - num get payCountChangeRate => _payCountChangeRate; - String get sumAddCartCount => _sumAddCartCount; - String get sumSettleCount => _sumSettleCount; - String get sumPaySuccessCount => _sumPaySuccessCount; - String get sumPV => _sumPV; - num get totalChangeRate => _totalChangeRate; - String get sumPayCount => _sumPayCount; - num get settleChangeRate => _settleChangeRate; - num get paySuccessChangeRate => _paySuccessChangeRate; - - Map toJson() { - final map = {}; - map['addCartChangeRate'] = _addCartChangeRate; - map['payCountChangeRate'] = _payCountChangeRate; - map['sumAddCartCount'] = _sumAddCartCount; - map['sumSettleCount'] = _sumSettleCount; - map['sumPaySuccessCount'] = _sumPaySuccessCount; - map['sumPV'] = _sumPV; - map['totalChangeRate'] = _totalChangeRate; - map['sumPayCount'] = _sumPayCount; - map['settleChangeRate'] = _settleChangeRate; - map['paySuccessChangeRate'] = _paySuccessChangeRate; - return map; - } - -} - -/// product_id : "1646055704735252480" -/// saleNum : 12 -/// product_name : "香蕉牛乳" - -class SaleProductList { - SaleProductList({ - String productId, - num saleNum, - String productName,}){ - _productId = productId; - _saleNum = saleNum; - _productName = productName; -} - - SaleProductList.fromJson(dynamic json) { - _productId = json['product_id']; - _saleNum = json['saleNum']; - _productName = json['product_name']; - } - String _productId; - num _saleNum; - String _productName; -SaleProductList copyWith({ String productId, - num saleNum, - String productName, -}) => SaleProductList( productId: productId ?? _productId, - saleNum: saleNum ?? _saleNum, - productName: productName ?? _productName, -); - String get productId => _productId; - num get saleNum => _saleNum; - String get productName => _productName; - - Map toJson() { - final map = {}; - map['product_id'] = _productId; - map['saleNum'] = _saleNum; - map['product_name'] = _productName; - return map; - } - -} - -/// id : "1645357356843794432" -/// name : "哈哈哈" -/// phone : "15623342902" -/// balance : "817.21" - -class DashMemberList { - DashMemberList({ - String id, - String name, - String phone, - String balance,}){ - _id = id; - _name = name; - _phone = phone; - _balance = balance; -} - - DashMemberList.fromJson(dynamic json) { - _id = json['id']; - _name = json['name']; - _phone = json['phone']; - _balance = json['balance']; - } - String _id; - String _name; - String _phone; - String _balance; -DashMemberList copyWith({ String id, - String name, - String phone, - String balance, -}) => DashMemberList( id: id ?? _id, - name: name ?? _name, - phone: phone ?? _phone, - balance: balance ?? _balance, -); - String get id => _id; - String get name => _name; - String get phone => _phone; - String get balance => _balance; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['name'] = _name; - map['phone'] = _phone; - map['balance'] = _balance; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/product.dart b/lib/retrofit/data/product.dart deleted file mode 100644 index 093e9794..00000000 --- a/lib/retrofit/data/product.dart +++ /dev/null @@ -1,182 +0,0 @@ - -class ProductsList { - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - dynamic _tenantCode; - String _storeId; - String _orderId; - String _productId; - String _productName; - String _skuId; - String _skuNameStr; - String _skuImg; - int _buyNum; - int _refundNum; - double _weight; - String _applyPrice; - String _sellPrice; - String _postPay; - int _isDelete; - String _discountAmount; - int _discountPercent; - bool _status; - int _batch; - - String get id => _id; - - String get createTime => _createTime; - - String get createUser => _createUser; - - String get updateTime => _updateTime; - - String get updateUser => _updateUser; - - dynamic get tenantCode => _tenantCode; - - String get storeId => _storeId; - - String get orderId => _orderId; - - String get productId => _productId; - - String get productName => _productName; - - String get skuId => _skuId; - - String get skuNameStr => _skuNameStr; - - String get skuImg => _skuImg; - - int get buyNum => _buyNum; - - int get refundNum => _refundNum; - - double get weight => _weight; - - String get applyPrice => _applyPrice; - - String get sellPrice => _sellPrice; - - String get postPay => _postPay; - - int get isDelete => _isDelete; - - String get discountAmount => _discountAmount; - - int get discountPercent => _discountPercent; - - bool get status => _status; - - int get batch => _batch; - - ProductList( - {String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - dynamic tenantCode, - String storeId, - String orderId, - String productId, - String productName, - String skuId, - String skuNameStr, - String skuImg, - int buyNum, - int refundNum, - double weight, - String applyPrice, - String sellPrice, - String postPay, - int isDelete, - String discountAmount, - int discountPercent, - bool status, - int batch}) { - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _tenantCode = tenantCode; - _storeId = storeId; - _orderId = orderId; - _productId = productId; - _productName = productName; - _skuId = skuId; - _skuNameStr = skuNameStr; - _skuImg = skuImg; - _buyNum = buyNum; - _refundNum = refundNum; - _weight = weight; - _applyPrice = applyPrice; - _sellPrice = sellPrice; - _postPay = postPay; - _isDelete = isDelete; - _discountAmount = discountAmount; - _discountPercent = discountPercent; - _status = status; - _batch = batch; - } - - ProductsList.fromJson(dynamic json) { - _id = json["id"]; - _createTime = json["createTime"]; - _createUser = json["createUser"]; - _updateTime = json["updateTime"]; - _updateUser = json["updateUser"]; - _tenantCode = json["tenantCode"]; - _storeId = json["storeId"]; - _orderId = json["orderId"]; - _productId = json["productId"]; - _productName = json["productName"]; - _skuId = json["skuId"]; - _skuNameStr = json["skuNameStr"]; - _skuImg = json["skuImg"]; - _buyNum = json["buyNum"]; - _refundNum = json["refundNum"]; - _weight = json["weight"]; - _applyPrice = json["applyPrice"]; - _sellPrice = json["sellPrice"]; - _postPay = json["postPay"]; - _isDelete = json["isDelete"]; - _discountAmount = json["discountAmount"]; - _discountPercent = json["discountPercent"]; - _status = json["status"]; - _batch = json["batch"]; - } - - Map toJson() { - var map = {}; - map["id"] = _id; - map["createTime"] = _createTime; - map["createUser"] = _createUser; - map["updateTime"] = _updateTime; - map["updateUser"] = _updateUser; - map["tenantCode"] = _tenantCode; - map["storeId"] = _storeId; - map["orderId"] = _orderId; - map["productId"] = _productId; - map["productName"] = _productName; - map["skuId"] = _skuId; - map["skuNameStr"] = _skuNameStr; - map["skuImg"] = _skuImg; - map["buyNum"] = _buyNum; - map["refundNum"] = _refundNum; - map["weight"] = _weight; - map["applyPrice"] = _applyPrice; - map["sellPrice"] = _sellPrice; - map["postPay"] = _postPay; - map["isDelete"] = _isDelete; - map["discountAmount"] = _discountAmount; - map["discountPercent"] = _discountPercent; - map["status"] = _status; - map["batch"] = _batch; - return map; - } -} diff --git a/lib/retrofit/data/product_group_list.dart b/lib/retrofit/data/product_group_list.dart deleted file mode 100644 index 85585bc0..00000000 --- a/lib/retrofit/data/product_group_list.dart +++ /dev/null @@ -1,356 +0,0 @@ -/// records : [{"id":"1685938929007591424","createTime":"2023-07-31 17:02:19","createUser":"1640233401329909760","updateTime":"2023-07-31 17:02:19","updateUser":"1640233401329909760","storeId":"1645692156444147712","groupName":"便当","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1645718708355596288","createTime":"2023-04-11 17:21:31","createUser":"1640233401329909760","updateTime":"2023-07-31 16:46:52","updateUser":"1640233401329909760","storeId":"1645318527105630208","groupName":"锅烧意面","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685917127472578560","createTime":"2023-07-31 15:35:41","createUser":"1640233401329909760","updateTime":"2023-07-31 15:35:41","updateUser":"1640233401329909760","storeId":"1645319215739043840","groupName":"淡水阿给","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685917867804983296","createTime":"2023-07-31 15:38:37","createUser":"1640233401329909760","updateTime":"2023-07-31 15:38:37","updateUser":"1640233401329909760","storeId":"1645321493476802560","groupName":"筒仔米糕","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685918375135412224","createTime":"2023-07-31 15:40:38","createUser":"1640233401329909760","updateTime":"2023-07-31 15:40:38","updateUser":"1640233401329909760","storeId":"1645321493476802560","groupName":"高雄鱿鱼羹","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685919379851575296","createTime":"2023-07-31 15:44:38","createUser":"1640233401329909760","updateTime":"2023-07-31 15:44:38","updateUser":"1640233401329909760","storeId":"1645321493476802560","groupName":"担仔面","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685921537254752256","createTime":"2023-07-31 15:53:12","createUser":"1640233401329909760","updateTime":"2023-07-31 15:53:12","updateUser":"1640233401329909760","storeId":"1645325613776502784","groupName":"虎咬猪","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685931474504646656","createTime":"2023-07-31 16:32:41","createUser":"1640233401329909760","updateTime":"2023-07-31 16:32:41","updateUser":"1640233401329909760","storeId":"1645326136193843200","groupName":"蚵仔煎面线","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685933328525426688","createTime":"2023-07-31 16:40:03","createUser":"1640233401329909760","updateTime":"2023-07-31 16:40:03","updateUser":"1640233401329909760","storeId":"1645319318184919040","groupName":"排骨酥汤","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685934258952077312","createTime":"2023-07-31 16:43:45","createUser":"1640233401329909760","updateTime":"2023-07-31 16:43:45","updateUser":"1640233401329909760","storeId":"1645326403631054848","groupName":"米粉汤","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685935568791273472","createTime":"2023-07-31 16:48:57","createUser":"1640233401329909760","updateTime":"2023-07-31 16:48:57","updateUser":"1640233401329909760","storeId":"1645689802072260608","groupName":"小火锅","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685936516674617344","createTime":"2023-07-31 16:52:43","createUser":"1640233401329909760","updateTime":"2023-07-31 16:52:43","updateUser":"1640233401329909760","storeId":"1645691900562243584","groupName":"贡丸","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685916586545774592","createTime":"2023-07-31 15:33:32","createUser":"1640233401329909760","updateTime":"2023-07-31 15:33:32","updateUser":"1640233401329909760","storeId":"1645319131278344192","groupName":"牛肉面","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685940088141250560","createTime":"2023-07-31 17:06:55","createUser":"1640233401329909760","updateTime":"2023-07-31 17:06:55","updateUser":"1640233401329909760","storeId":"1645692262354518016","groupName":"鸡肉饭","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685941847945379840","createTime":"2023-07-31 17:13:54","createUser":"1640233401329909760","updateTime":"2023-07-31 17:13:54","updateUser":"1640233401329909760","storeId":"1645692486699450368","groupName":"焢肉饭","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685942132050755584","createTime":"2023-07-31 17:15:02","createUser":"1640233401329909760","updateTime":"2023-07-31 17:15:02","updateUser":"1640233401329909760","storeId":"1645701372395388928","groupName":"润饼卷","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685942456434032640","createTime":"2023-07-31 17:16:20","createUser":"1640233401329909760","updateTime":"2023-07-31 17:16:20","updateUser":"1640233401329909760","storeId":"1645701459838238720","groupName":"大肠小肠","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685942903517478912","createTime":"2023-07-31 17:18:06","createUser":"1640233401329909760","updateTime":"2023-07-31 17:18:06","updateUser":"1640233401329909760","storeId":"1645701593900777472","groupName":"盐酥鸡","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685947445382479872","createTime":"2023-07-31 17:36:09","createUser":"1640233401329909760","updateTime":"2023-07-31 17:36:09","updateUser":"1640233401329909760","storeId":"1645690919204159488","groupName":"农场煮意","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685949646188314624","createTime":"2023-07-31 17:44:54","createUser":"1640233401329909760","updateTime":"2023-08-05 11:34:59","updateUser":"1640233401329909760","storeId":"1645691756009750528","groupName":"鲜奶茶","groupImg":"","sort":1,"kitchenGroup":0,"printerId":["1687667928939364352"],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685954754749923328","createTime":"2023-07-31 18:05:12","createUser":"1640233401329909760","updateTime":"2023-08-07 13:32:33","updateUser":"1640233401329909760","storeId":"1645692068967743488","groupName":"洛神系列","groupImg":"","sort":1,"kitchenGroup":0,"printerId":["1688422819995582464"],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685960192186908672","createTime":"2023-07-31 18:26:48","createUser":"1640233401329909760","updateTime":"2023-07-31 18:26:48","updateUser":"1640233401329909760","storeId":"1645326338908749824","groupName":"披萨","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685961077201829888","createTime":"2023-07-31 18:30:19","createUser":"1640233401329909760","updateTime":"2023-07-31 18:30:19","updateUser":"1640233401329909760","storeId":"1645701646107279360","groupName":"炸蚵嗲","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1686220594867077120","createTime":"2023-08-01 11:41:33","createUser":"1640233401329909760","updateTime":"2023-08-01 11:41:33","updateUser":"1640233401329909760","storeId":"1645701540310155264","groupName":"夯肉","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685894696259289088","createTime":"2023-07-31 14:06:33","createUser":"1640233401329909760","updateTime":"2023-07-31 14:06:33","updateUser":"1640233401329909760","storeId":"1645324215450075136","groupName":"绵绵冰","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1645722496508362752","createTime":"2023-04-11 17:36:34","createUser":"1640233401329909760","updateTime":"2023-07-31 14:35:18","updateUser":"1640233401329909760","storeId":"1645317547899224064","groupName":"臭豆腐","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1645731996917301248","createTime":"2023-04-11 18:14:19","createUser":"1640233401329909760","updateTime":"2023-07-31 14:30:09","updateUser":"1640233401329909760","storeId":"1645317671987707904","groupName":"玉米","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1645979990757474304","createTime":"2023-04-12 10:39:45","createUser":"1640233401329909760","updateTime":"2023-07-31 14:33:36","updateUser":"1640233401329909760","storeId":"1645317921456521216","groupName":"铁板麻辣豆腐","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1645981112750571520","createTime":"2023-04-12 10:44:13","createUser":"1640233401329909760","updateTime":"2023-07-31 15:16:13","updateUser":"1640233401329909760","storeId":"1645318098540036096","groupName":"小食","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1645981713114857472","createTime":"2023-04-12 10:46:36","createUser":"1640233401329909760","updateTime":"2023-07-31 14:11:26","updateUser":"1640233401329909760","storeId":"1645318285786349568","groupName":"炸菇菇","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1645995597804601344","createTime":"2023-04-12 11:41:46","createUser":"1640233401329909760","updateTime":"2023-07-31 14:18:53","updateUser":"1640233401329909760","storeId":"1645318425783828480","groupName":"屏东剉冰","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1646698771456720896","createTime":"2023-04-14 10:15:56","createUser":"1640233401329909760","updateTime":"2023-04-14 10:15:56","updateUser":"1640233401329909760","storeId":"0","groupName":"周边","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1647050388576141312","createTime":"2023-04-15 09:33:08","createUser":"1640233401329909760","updateTime":"2023-07-31 17:30:51","updateUser":"1640233401329909760","storeId":"1645321921190952960","groupName":"奶酪包","groupImg":"","sort":1,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685891142316457984","createTime":"2023-07-31 13:52:25","createUser":"1640233401329909760","updateTime":"2023-07-31 13:52:25","updateUser":"1640233401329909760","storeId":"1645316356192600064","groupName":"士林牛乳","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":true,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685914119351304192","createTime":"2023-07-31 15:23:43","createUser":"1640233401329909760","updateTime":"2023-07-31 15:23:43","updateUser":"1640233401329909760","storeId":"1645318946187902976","groupName":"西餐厅","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685902297860669440","createTime":"2023-07-31 14:36:45","createUser":"1640233401329909760","updateTime":"2023-07-31 14:36:45","updateUser":"1640233401329909760","storeId":"1645694248827224064","groupName":"汤圆","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685902818411544576","createTime":"2023-07-31 14:38:49","createUser":"1640233401329909760","updateTime":"2023-07-31 14:38:49","updateUser":"1640233401329909760","storeId":"1645695120688807936","groupName":"杏仁油条","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685903759810494464","createTime":"2023-07-31 14:42:34","createUser":"1640233401329909760","updateTime":"2023-07-31 14:42:34","updateUser":"1640233401329909760","storeId":"1645695186774261760","groupName":"豆花","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685904520762097664","createTime":"2023-07-31 14:45:35","createUser":"1640233401329909760","updateTime":"2023-07-31 14:45:35","updateUser":"1640233401329909760","storeId":"1645695531587993600","groupName":"古早味红茶冰","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685907095293001728","createTime":"2023-07-31 14:55:49","createUser":"1640233401329909760","updateTime":"2023-07-31 14:55:49","updateUser":"1640233401329909760","storeId":"1645695622973489152","groupName":"蒸食","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685908791297572864","createTime":"2023-07-31 15:02:33","createUser":"1640233401329909760","updateTime":"2023-07-31 15:02:33","updateUser":"1640233401329909760","storeId":"1645698130097733632","groupName":"烤鹌鹑蛋","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685909513447669760","createTime":"2023-07-31 15:05:25","createUser":"1640233401329909760","updateTime":"2023-07-31 15:05:25","updateUser":"1640233401329909760","storeId":"1645698860804210688","groupName":"地瓜球","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685910344725168128","createTime":"2023-07-31 15:08:44","createUser":"1640233401329909760","updateTime":"2023-07-31 15:08:44","updateUser":"1640233401329909760","storeId":"1645698953653518336","groupName":"鸡蛋糕","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685910768324706304","createTime":"2023-07-31 15:10:25","createUser":"1640233401329909760","updateTime":"2023-07-31 15:10:25","updateUser":"1640233401329909760","storeId":"1645701214400151552","groupName":"炸元宝","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685911559768899584","createTime":"2023-07-31 15:13:33","createUser":"1640233401329909760","updateTime":"2023-07-31 15:13:33","updateUser":"1640233401329909760","storeId":"1645701282909913088","groupName":"红薯饼","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685912790373498880","createTime":"2023-07-31 15:18:27","createUser":"1640233401329909760","updateTime":"2023-07-31 15:18:27","updateUser":"1640233401329909760","storeId":"1645318745612091392","groupName":"羊肉炉","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685912906736074752","createTime":"2023-07-31 15:18:54","createUser":"1640233401329909760","updateTime":"2023-07-31 15:18:54","updateUser":"1640233401329909760","storeId":"1645318745612091392","groupName":"配菜","groupImg":"","sort":1,"kitchenGroup":0,"printerId":[],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1647050460307128320","createTime":"2023-04-15 09:33:25","createUser":"1640233401329909760","updateTime":"2023-07-31 17:30:57","updateUser":"1640233401329909760","storeId":"1645321921190952960","groupName":"吐司","groupImg":"","sort":2,"kitchenGroup":0,"printerId":null,"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685949748680327168","createTime":"2023-07-31 17:45:18","createUser":"1640233401329909760","updateTime":"2023-08-05 11:35:04","updateUser":"1640233401329909760","storeId":"1645691756009750528","groupName":"茗茶","groupImg":"","sort":2,"kitchenGroup":0,"printerId":["1687667928939364352"],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}},{"id":"1685949802304503808","createTime":"2023-07-31 17:45:31","createUser":"1640233401329909760","updateTime":"2023-08-05 11:35:09","updateUser":"1640233401329909760","storeId":"1645691756009750528","groupName":"养身茶","groupImg":"","sort":3,"kitchenGroup":0,"printerId":["1687667928939364352"],"attachPrinterIds":null,"isDelete":0,"isCharge":0,"useVipDiscount":null,"profitSharing":{"type":"manual","mchName":"","mchCode":"","ratio":0}}] -/// total : "50" -/// size : "50" -/// current : "1" -/// orders : [{"column":"sort","asc":true}] -/// hitCount : false -/// searchCount : true -/// pages : "1" - -class ProductGroupList { - ProductGroupList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - ProductGroupList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -ProductGroupList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => ProductGroupList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "sort" -/// asc : true - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1685938929007591424" -/// createTime : "2023-07-31 17:02:19" -/// createUser : "1640233401329909760" -/// updateTime : "2023-07-31 17:02:19" -/// updateUser : "1640233401329909760" -/// storeId : "1645692156444147712" -/// groupName : "便当" -/// groupImg : "" -/// sort : 1 -/// kitchenGroup : 0 -/// printerId : [] -/// attachPrinterIds : null -/// isDelete : 0 -/// isCharge : 0 -/// useVipDiscount : null -/// profitSharing : {"type":"manual","mchName":"","mchCode":"","ratio":0} - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String groupName, - String groupImg, - num sort, - num kitchenGroup, - List printerId, - dynamic attachPrinterIds, - num isDelete, - num isCharge, - dynamic useVipDiscount, - ProfitSharing profitSharing,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _groupName = groupName; - _groupImg = groupImg; - _sort = sort; - _kitchenGroup = kitchenGroup; - _printerId = printerId; - _attachPrinterIds = attachPrinterIds; - _isDelete = isDelete; - _isCharge = isCharge; - _useVipDiscount = useVipDiscount; - _profitSharing = profitSharing; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _groupName = json['groupName']; - _groupImg = json['groupImg']; - _sort = json['sort']; - _kitchenGroup = json['kitchenGroup']; - // if (json['printerId'] != null) { - // _printerId = []; - // json['printerId'].forEach((v) { - // _printerId.add(Dynamic.fromJson(v)); - // }); - // } - _attachPrinterIds = json['attachPrinterIds']; - _isDelete = json['isDelete']; - _isCharge = json['isCharge']; - _useVipDiscount = json['useVipDiscount']; - _profitSharing = json['profitSharing'] != null ? ProfitSharing.fromJson(json['profitSharing']) : null; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _groupName; - String _groupImg; - num _sort; - num _kitchenGroup; - List _printerId; - dynamic _attachPrinterIds; - num _isDelete; - num _isCharge; - dynamic _useVipDiscount; - ProfitSharing _profitSharing; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String groupName, - String groupImg, - num sort, - num kitchenGroup, - List printerId, - dynamic attachPrinterIds, - num isDelete, - num isCharge, - dynamic useVipDiscount, - ProfitSharing profitSharing, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - storeId: storeId ?? _storeId, - groupName: groupName ?? _groupName, - groupImg: groupImg ?? _groupImg, - sort: sort ?? _sort, - kitchenGroup: kitchenGroup ?? _kitchenGroup, - printerId: printerId ?? _printerId, - attachPrinterIds: attachPrinterIds ?? _attachPrinterIds, - isDelete: isDelete ?? _isDelete, - isCharge: isCharge ?? _isCharge, - useVipDiscount: useVipDiscount ?? _useVipDiscount, - profitSharing: profitSharing ?? _profitSharing, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get groupName => _groupName; - String get groupImg => _groupImg; - num get sort => _sort; - num get kitchenGroup => _kitchenGroup; - List get printerId => _printerId; - dynamic get attachPrinterIds => _attachPrinterIds; - num get isDelete => _isDelete; - num get isCharge => _isCharge; - dynamic get useVipDiscount => _useVipDiscount; - ProfitSharing get profitSharing => _profitSharing; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['groupName'] = _groupName; - map['groupImg'] = _groupImg; - map['sort'] = _sort; - map['kitchenGroup'] = _kitchenGroup; - if (_printerId != null) { - map['printerId'] = _printerId.map((v) => v.toJson()).toList(); - } - map['attachPrinterIds'] = _attachPrinterIds; - map['isDelete'] = _isDelete; - map['isCharge'] = _isCharge; - map['useVipDiscount'] = _useVipDiscount; - if (_profitSharing != null) { - map['profitSharing'] = _profitSharing.toJson(); - } - return map; - } - -} - -/// type : "manual" -/// mchName : "" -/// mchCode : "" -/// ratio : 0 - -class ProfitSharing { - ProfitSharing({ - String type, - String mchName, - String mchCode, - num ratio,}){ - _type = type; - _mchName = mchName; - _mchCode = mchCode; - _ratio = ratio; -} - - ProfitSharing.fromJson(dynamic json) { - _type = json['type']; - _mchName = json['mchName']; - _mchCode = json['mchCode']; - _ratio = json['ratio']; - } - String _type; - String _mchName; - String _mchCode; - num _ratio; -ProfitSharing copyWith({ String type, - String mchName, - String mchCode, - num ratio, -}) => ProfitSharing( type: type ?? _type, - mchName: mchName ?? _mchName, - mchCode: mchCode ?? _mchCode, - ratio: ratio ?? _ratio, -); - String get type => _type; - String get mchName => _mchName; - String get mchCode => _mchCode; - num get ratio => _ratio; - - Map toJson() { - final map = {}; - map['type'] = _type; - map['mchName'] = _mchName; - map['mchCode'] = _mchCode; - map['ratio'] = _ratio; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/product_show.dart b/lib/retrofit/data/product_show.dart deleted file mode 100644 index c97c438d..00000000 --- a/lib/retrofit/data/product_show.dart +++ /dev/null @@ -1,749 +0,0 @@ -/// id : "1484156758195699712" -/// createTime : "2022-01-20 21:32:00" -/// createUser : "1364043181062094848" -/// updateTime : "2022-01-21 18:27:02" -/// updateUser : "1364043181062094848" -/// supplierName : "海峡姐妹生态农场" -/// storeId : "1460885296764682240" -/// categoryId : "1460889654206136320" -/// groupId : "1484146679266410496" -/// shortName : "【海峡姐妹】三益米 筋道绵润、鲜稻尝鲜;自留种老品种,非转基因种子" -/// productName : "三益米1kg" -/// sellDesc : "" -/// productCode : "PRO202201202132000000000000001" -/// weight : "0" -/// applyPrice : "39.00" -/// price : "24.00" -/// vipPrice : null -/// stock : -13 -/// sellCount : 19 -/// needLogistics : 1 -/// oversold : 1 -/// organic : 0 -/// status : 1 -/// posShow : true -/// subscribeParam : null -/// isRaise : false -/// productType : 0 -/// productNumber : 1 -/// setMeal : 1 -/// attrStyle : 0 -/// detail : "" -/// isDelete : 0 -/// printerFlag : "DEFAULT" -/// materials : null -/// materialId : null -/// details : "" -/// thumbnailImg : "" -/// info : "" -/// buyCount : 12 -/// sellCountLimit : 0 -/// stockRecoveryTime : null -/// isAddPurchase : null -/// limitNum : 0 -/// rankId : "0" -/// happyBean : 0 -/// imgs : ["https://pos.upload.lotus-wallet.com/1179/2022/01/243f54db-2dc8-4a9b-9ccc-09fc7a4e2a2e.jpg"] -/// productSkuList : [{"id":"1484156758229254144","createTime":"2022-01-20 21:32:00","createUser":"1364043181062094848","updateTime":"2022-01-20 21:32:00","updateUser":"1364043181062094848","storeId":"1460885296764682240","skuCode":"P202201202132002","skuNameStr":"","productId":"1484156758195699712","skuPrice":"24.00","applyPrice":"39.00","vipPrice":"24.00","packagingFee":"0.00","skuImg":null,"skuStock":-13,"autoRenewSkuStock":0,"deliveries":0,"ticketType":"","ticketWipedTimeTemplateId":null,"takeType":null,"ticketDays":"0","ticketExpireTime":"23:59:59","sort":50,"setMeal":"","productSetMeals":null,"weight":0.0,"volume":0.0,"isDelete":0,"material":null,"version":0,"skuTickets":null,"ticketStyle":""}] - -class ProductShow { - ProductShow({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String supplierName, - String storeId, - String categoryId, - String groupId, - String shortName, - String productName, - String sellDesc, - String productCode, - String weight, - String applyPrice, - String price, - dynamic vipPrice, - num stock, - num sellCount, - num needLogistics, - num oversold, - num organic, - num status, - bool posShow, - dynamic subscribeParam, - bool isRaise, - num productType, - num productNumber, - num setMeal, - num attrStyle, - String detail, - num isDelete, - String printerFlag, - dynamic materials, - dynamic materialId, - String details, - String thumbnailImg, - String info, - num buyCount, - num sellCountLimit, - dynamic stockRecoveryTime, - dynamic isAddPurchase, - num limitNum, - String rankId, - num happyBean, - List imgs, - List productSkuList,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _supplierName = supplierName; - _storeId = storeId; - _categoryId = categoryId; - _groupId = groupId; - _shortName = shortName; - _productName = productName; - _sellDesc = sellDesc; - _productCode = productCode; - _weight = weight; - _applyPrice = applyPrice; - _price = price; - _vipPrice = vipPrice; - _stock = stock; - _sellCount = sellCount; - _needLogistics = needLogistics; - _oversold = oversold; - _organic = organic; - _status = status; - _posShow = posShow; - _subscribeParam = subscribeParam; - _isRaise = isRaise; - _productType = productType; - _productNumber = productNumber; - _setMeal = setMeal; - _attrStyle = attrStyle; - _detail = detail; - _isDelete = isDelete; - _printerFlag = printerFlag; - _materials = materials; - _materialId = materialId; - _details = details; - _thumbnailImg = thumbnailImg; - _info = info; - _buyCount = buyCount; - _sellCountLimit = sellCountLimit; - _stockRecoveryTime = stockRecoveryTime; - _isAddPurchase = isAddPurchase; - _limitNum = limitNum; - _rankId = rankId; - _happyBean = happyBean; - _imgs = imgs; - _productSkuList = productSkuList; -} - - ProductShow.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _supplierName = json['supplierName']; - _storeId = json['storeId']; - _categoryId = json['categoryId']; - _groupId = json['groupId']; - _shortName = json['shortName']; - _productName = json['productName']; - _sellDesc = json['sellDesc']; - _productCode = json['productCode']; - _weight = json['weight']; - _applyPrice = json['applyPrice']; - _price = json['price']; - _vipPrice = json['vipPrice']; - _stock = json['stock']; - _sellCount = json['sellCount']; - _needLogistics = json['needLogistics']; - _oversold = json['oversold']; - _organic = json['organic']; - _status = json['status']; - _posShow = json['posShow']; - _subscribeParam = json['subscribeParam']; - _isRaise = json['isRaise']; - _productType = json['productType']; - _productNumber = json['productNumber']; - _setMeal = json['setMeal']; - _attrStyle = json['attrStyle']; - _detail = json['detail']; - _isDelete = json['isDelete']; - _printerFlag = json['printerFlag']; - _materials = json['materials']; - _materialId = json['materialId']; - _details = json['details']; - _thumbnailImg = json['thumbnailImg']; - _info = json['info']; - _buyCount = json['buyCount']; - _sellCountLimit = json['sellCountLimit']; - _stockRecoveryTime = json['stockRecoveryTime']; - _isAddPurchase = json['isAddPurchase']; - _limitNum = json['limitNum']; - _rankId = json['rankId']; - _happyBean = json['happyBean']; - _imgs = json['imgs'] != null ? json['imgs'].cast() : []; - if (json['productSkuList'] != null) { - _productSkuList = []; - json['productSkuList'].forEach((v) { - _productSkuList.add(ProductSkuList.fromJson(v)); - }); - } - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _supplierName; - String _storeId; - String _categoryId; - String _groupId; - String _shortName; - String _productName; - String _sellDesc; - String _productCode; - String _weight; - String _applyPrice; - String _price; - dynamic _vipPrice; - num _stock; - num _sellCount; - num _needLogistics; - num _oversold; - num _organic; - num _status; - bool _posShow; - dynamic _subscribeParam; - bool _isRaise; - num _productType; - num _productNumber; - num _setMeal; - num _attrStyle; - String _detail; - num _isDelete; - String _printerFlag; - dynamic _materials; - dynamic _materialId; - String _details; - String _thumbnailImg; - String _info; - num _buyCount; - num _sellCountLimit; - dynamic _stockRecoveryTime; - dynamic _isAddPurchase; - num _limitNum; - String _rankId; - num _happyBean; - List _imgs; - List _productSkuList; -ProductShow copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String supplierName, - String storeId, - String categoryId, - String groupId, - String shortName, - String productName, - String sellDesc, - String productCode, - String weight, - String applyPrice, - String price, - dynamic vipPrice, - num stock, - num sellCount, - num needLogistics, - num oversold, - num organic, - num status, - bool posShow, - dynamic subscribeParam, - bool isRaise, - num productType, - num productNumber, - num setMeal, - num attrStyle, - String detail, - num isDelete, - String printerFlag, - dynamic materials, - dynamic materialId, - String details, - String thumbnailImg, - String info, - num buyCount, - num sellCountLimit, - dynamic stockRecoveryTime, - dynamic isAddPurchase, - num limitNum, - String rankId, - num happyBean, - List imgs, - List productSkuList, -}) => ProductShow( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - supplierName: supplierName ?? _supplierName, - storeId: storeId ?? _storeId, - categoryId: categoryId ?? _categoryId, - groupId: groupId ?? _groupId, - shortName: shortName ?? _shortName, - productName: productName ?? _productName, - sellDesc: sellDesc ?? _sellDesc, - productCode: productCode ?? _productCode, - weight: weight ?? _weight, - applyPrice: applyPrice ?? _applyPrice, - price: price ?? _price, - vipPrice: vipPrice ?? _vipPrice, - stock: stock ?? _stock, - sellCount: sellCount ?? _sellCount, - needLogistics: needLogistics ?? _needLogistics, - oversold: oversold ?? _oversold, - organic: organic ?? _organic, - status: status ?? _status, - posShow: posShow ?? _posShow, - subscribeParam: subscribeParam ?? _subscribeParam, - isRaise: isRaise ?? _isRaise, - productType: productType ?? _productType, - productNumber: productNumber ?? _productNumber, - setMeal: setMeal ?? _setMeal, - attrStyle: attrStyle ?? _attrStyle, - detail: detail ?? _detail, - isDelete: isDelete ?? _isDelete, - printerFlag: printerFlag ?? _printerFlag, - materials: materials ?? _materials, - materialId: materialId ?? _materialId, - details: details ?? _details, - thumbnailImg: thumbnailImg ?? _thumbnailImg, - info: info ?? _info, - buyCount: buyCount ?? _buyCount, - sellCountLimit: sellCountLimit ?? _sellCountLimit, - stockRecoveryTime: stockRecoveryTime ?? _stockRecoveryTime, - isAddPurchase: isAddPurchase ?? _isAddPurchase, - limitNum: limitNum ?? _limitNum, - rankId: rankId ?? _rankId, - happyBean: happyBean ?? _happyBean, - imgs: imgs ?? _imgs, - productSkuList: productSkuList ?? _productSkuList, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get supplierName => _supplierName; - String get storeId => _storeId; - String get categoryId => _categoryId; - String get groupId => _groupId; - String get shortName => _shortName; - String get productName => _productName; - String get sellDesc => _sellDesc; - String get productCode => _productCode; - String get weight => _weight; - String get applyPrice => _applyPrice; - String get price => _price; - dynamic get vipPrice => _vipPrice; - num get stock => _stock; - num get sellCount => _sellCount; - num get needLogistics => _needLogistics; - num get oversold => _oversold; - num get organic => _organic; - num get status => _status; - bool get posShow => _posShow; - dynamic get subscribeParam => _subscribeParam; - bool get isRaise => _isRaise; - num get productType => _productType; - num get productNumber => _productNumber; - num get setMeal => _setMeal; - num get attrStyle => _attrStyle; - String get detail => _detail; - num get isDelete => _isDelete; - String get printerFlag => _printerFlag; - dynamic get materials => _materials; - dynamic get materialId => _materialId; - String get details => _details; - String get thumbnailImg => _thumbnailImg; - String get info => _info; - num get buyCount => _buyCount; - num get sellCountLimit => _sellCountLimit; - dynamic get stockRecoveryTime => _stockRecoveryTime; - dynamic get isAddPurchase => _isAddPurchase; - num get limitNum => _limitNum; - String get rankId => _rankId; - num get happyBean => _happyBean; - List get imgs => _imgs; - List get productSkuList => _productSkuList; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['supplierName'] = _supplierName; - map['storeId'] = _storeId; - map['categoryId'] = _categoryId; - map['groupId'] = _groupId; - map['shortName'] = _shortName; - map['productName'] = _productName; - map['sellDesc'] = _sellDesc; - map['productCode'] = _productCode; - map['weight'] = _weight; - map['applyPrice'] = _applyPrice; - map['price'] = _price; - map['vipPrice'] = _vipPrice; - map['stock'] = _stock; - map['sellCount'] = _sellCount; - map['needLogistics'] = _needLogistics; - map['oversold'] = _oversold; - map['organic'] = _organic; - map['status'] = _status; - map['posShow'] = _posShow; - map['subscribeParam'] = _subscribeParam; - map['isRaise'] = _isRaise; - map['productType'] = _productType; - map['productNumber'] = _productNumber; - map['setMeal'] = _setMeal; - map['attrStyle'] = _attrStyle; - map['detail'] = _detail; - map['isDelete'] = _isDelete; - map['printerFlag'] = _printerFlag; - map['materials'] = _materials; - map['materialId'] = _materialId; - map['details'] = _details; - map['thumbnailImg'] = _thumbnailImg; - map['info'] = _info; - map['buyCount'] = _buyCount; - map['sellCountLimit'] = _sellCountLimit; - map['stockRecoveryTime'] = _stockRecoveryTime; - map['isAddPurchase'] = _isAddPurchase; - map['limitNum'] = _limitNum; - map['rankId'] = _rankId; - map['happyBean'] = _happyBean; - map['imgs'] = _imgs; - if (_productSkuList != null) { - map['productSkuList'] = _productSkuList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1484156758229254144" -/// createTime : "2022-01-20 21:32:00" -/// createUser : "1364043181062094848" -/// updateTime : "2022-01-20 21:32:00" -/// updateUser : "1364043181062094848" -/// storeId : "1460885296764682240" -/// skuCode : "P202201202132002" -/// skuNameStr : "" -/// productId : "1484156758195699712" -/// skuPrice : "24.00" -/// applyPrice : "39.00" -/// vipPrice : "24.00" -/// packagingFee : "0.00" -/// skuImg : null -/// skuStock : -13 -/// autoRenewSkuStock : 0 -/// deliveries : 0 -/// ticketType : "" -/// ticketWipedTimeTemplateId : null -/// takeType : null -/// ticketDays : "0" -/// ticketExpireTime : "23:59:59" -/// sort : 50 -/// setMeal : "" -/// productSetMeals : null -/// weight : 0.0 -/// volume : 0.0 -/// isDelete : 0 -/// material : null -/// version : 0 -/// skuTickets : null -/// ticketStyle : "" - -class ProductSkuList { - ProductSkuList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String skuCode, - String skuNameStr, - String productId, - String skuPrice, - String applyPrice, - String vipPrice, - String packagingFee, - dynamic skuImg, - num skuStock, - num autoRenewSkuStock, - num deliveries, - String ticketType, - dynamic ticketWipedTimeTemplateId, - dynamic takeType, - String ticketDays, - String ticketExpireTime, - num sort, - String setMeal, - dynamic productSetMeals, - num weight, - num volume, - num isDelete, - dynamic material, - num version, - dynamic skuTickets, - String ticketStyle,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _skuCode = skuCode; - _skuNameStr = skuNameStr; - _productId = productId; - _skuPrice = skuPrice; - _applyPrice = applyPrice; - _vipPrice = vipPrice; - _packagingFee = packagingFee; - _skuImg = skuImg; - _skuStock = skuStock; - _autoRenewSkuStock = autoRenewSkuStock; - _deliveries = deliveries; - _ticketType = ticketType; - _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; - _takeType = takeType; - _ticketDays = ticketDays; - _ticketExpireTime = ticketExpireTime; - _sort = sort; - _setMeal = setMeal; - _productSetMeals = productSetMeals; - _weight = weight; - _volume = volume; - _isDelete = isDelete; - _material = material; - _version = version; - _skuTickets = skuTickets; - _ticketStyle = ticketStyle; -} - - ProductSkuList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _skuCode = json['skuCode']; - _skuNameStr = json['skuNameStr']; - _productId = json['productId']; - _skuPrice = json['skuPrice']; - _applyPrice = json['applyPrice']; - _vipPrice = json['vipPrice']; - _packagingFee = json['packagingFee']; - _skuImg = json['skuImg']; - _skuStock = json['skuStock']; - _autoRenewSkuStock = json['autoRenewSkuStock']; - _deliveries = json['deliveries']; - _ticketType = json['ticketType']; - _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; - _takeType = json['takeType']; - _ticketDays = json['ticketDays']; - _ticketExpireTime = json['ticketExpireTime']; - _sort = json['sort']; - _setMeal = json['setMeal']; - _productSetMeals = json['productSetMeals']; - _weight = json['weight']; - _volume = json['volume']; - _isDelete = json['isDelete']; - _material = json['material']; - _version = json['version']; - _skuTickets = json['skuTickets']; - _ticketStyle = json['ticketStyle']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - String _skuCode; - String _skuNameStr; - String _productId; - String _skuPrice; - String _applyPrice; - String _vipPrice; - String _packagingFee; - dynamic _skuImg; - num _skuStock; - num _autoRenewSkuStock; - num _deliveries; - String _ticketType; - dynamic _ticketWipedTimeTemplateId; - dynamic _takeType; - String _ticketDays; - String _ticketExpireTime; - num _sort; - String _setMeal; - dynamic _productSetMeals; - num _weight; - num _volume; - num _isDelete; - dynamic _material; - num _version; - dynamic _skuTickets; - String _ticketStyle; -ProductSkuList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - String skuCode, - String skuNameStr, - String productId, - String skuPrice, - String applyPrice, - String vipPrice, - String packagingFee, - dynamic skuImg, - num skuStock, - num autoRenewSkuStock, - num deliveries, - String ticketType, - dynamic ticketWipedTimeTemplateId, - dynamic takeType, - String ticketDays, - String ticketExpireTime, - num sort, - String setMeal, - dynamic productSetMeals, - num weight, - num volume, - num isDelete, - dynamic material, - num version, - dynamic skuTickets, - String ticketStyle, -}) => ProductSkuList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - storeId: storeId ?? _storeId, - skuCode: skuCode ?? _skuCode, - skuNameStr: skuNameStr ?? _skuNameStr, - productId: productId ?? _productId, - skuPrice: skuPrice ?? _skuPrice, - applyPrice: applyPrice ?? _applyPrice, - vipPrice: vipPrice ?? _vipPrice, - packagingFee: packagingFee ?? _packagingFee, - skuImg: skuImg ?? _skuImg, - skuStock: skuStock ?? _skuStock, - autoRenewSkuStock: autoRenewSkuStock ?? _autoRenewSkuStock, - deliveries: deliveries ?? _deliveries, - ticketType: ticketType ?? _ticketType, - ticketWipedTimeTemplateId: ticketWipedTimeTemplateId ?? _ticketWipedTimeTemplateId, - takeType: takeType ?? _takeType, - ticketDays: ticketDays ?? _ticketDays, - ticketExpireTime: ticketExpireTime ?? _ticketExpireTime, - sort: sort ?? _sort, - setMeal: setMeal ?? _setMeal, - productSetMeals: productSetMeals ?? _productSetMeals, - weight: weight ?? _weight, - volume: volume ?? _volume, - isDelete: isDelete ?? _isDelete, - material: material ?? _material, - version: version ?? _version, - skuTickets: skuTickets ?? _skuTickets, - ticketStyle: ticketStyle ?? _ticketStyle, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - String get skuCode => _skuCode; - String get skuNameStr => _skuNameStr; - String get productId => _productId; - String get skuPrice => _skuPrice; - String get applyPrice => _applyPrice; - String get vipPrice => _vipPrice; - String get packagingFee => _packagingFee; - dynamic get skuImg => _skuImg; - num get skuStock => _skuStock; - num get autoRenewSkuStock => _autoRenewSkuStock; - num get deliveries => _deliveries; - String get ticketType => _ticketType; - dynamic get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; - dynamic get takeType => _takeType; - String get ticketDays => _ticketDays; - String get ticketExpireTime => _ticketExpireTime; - num get sort => _sort; - String get setMeal => _setMeal; - dynamic get productSetMeals => _productSetMeals; - num get weight => _weight; - num get volume => _volume; - num get isDelete => _isDelete; - dynamic get material => _material; - num get version => _version; - dynamic get skuTickets => _skuTickets; - String get ticketStyle => _ticketStyle; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['skuCode'] = _skuCode; - map['skuNameStr'] = _skuNameStr; - map['productId'] = _productId; - map['skuPrice'] = _skuPrice; - map['applyPrice'] = _applyPrice; - map['vipPrice'] = _vipPrice; - map['packagingFee'] = _packagingFee; - map['skuImg'] = _skuImg; - map['skuStock'] = _skuStock; - map['autoRenewSkuStock'] = _autoRenewSkuStock; - map['deliveries'] = _deliveries; - map['ticketType'] = _ticketType; - map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; - map['takeType'] = _takeType; - map['ticketDays'] = _ticketDays; - map['ticketExpireTime'] = _ticketExpireTime; - map['sort'] = _sort; - map['setMeal'] = _setMeal; - map['productSetMeals'] = _productSetMeals; - map['weight'] = _weight; - map['volume'] = _volume; - map['isDelete'] = _isDelete; - map['material'] = _material; - map['version'] = _version; - map['skuTickets'] = _skuTickets; - map['ticketStyle'] = _ticketStyle; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/promotion.dart b/lib/retrofit/data/promotion.dart deleted file mode 100644 index d4c2d8a1..00000000 --- a/lib/retrofit/data/promotion.dart +++ /dev/null @@ -1,85 +0,0 @@ - -class Promotion { - String activityEndTime; - String activityStartTime; - String applyEndTime; - String applyStartTime; - String createTime; - String createUser; - String description; - String id; - String image; - num isDelete; - num isNeedSecurityDeposit; - String name; - List promotionDetail; - num promotionPlan; - num promotionType; - String securityDeposit; - num status; - String tag; - String updateTime; - String updateUser; - - Promotion({this.activityEndTime, this.activityStartTime, this.applyEndTime, this.applyStartTime, this.createTime, this.createUser, this.description, this.id, this.image, this.isDelete, this.isNeedSecurityDeposit, this.name, this.promotionDetail, this.promotionPlan, this.promotionType, this.securityDeposit, this.status, this.tag, this.updateTime, this.updateUser}); - - factory Promotion.fromJson(Map json) => Promotion( - activityEndTime: json['activityEndTime'] as String, - activityStartTime: json['activityStartTime'] as String, - applyEndTime: json['applyEndTime'] as String, - applyStartTime: json['applyStartTime'] as String, - createTime: json['createTime'] as String, - createUser: json['createUser'] as String, - description: json['description'] as String, - id: json['id'] as String, - image: json['image'] as String, - isDelete: json['isDelete'] as num, - isNeedSecurityDeposit: json['isNeedSecurityDeposit'] as num, - name: json['name'] as String, - promotionDetail: (json['promotionDetail'] as List) - ?.map((e) => e == null - ? null - : PromotionDetailBean.fromJson(e as Map)) - ?.toList(), - promotionPlan: json['promotionPlan'] as num, - promotionType: json['promotionType'] as num, - securityDeposit: json['securityDeposit'] as String, - status: json['status'] as num, - tag: json['tag'] as String, - updateTime: json['updateTime'] as String, - updateUser: json['updateUser'] as String, - ); - - Map toJson() => { - 'activityEndTime': this.activityEndTime, - 'activityStartTime': this.activityStartTime, - 'applyEndTime': this.applyEndTime, - 'applyStartTime': this.applyStartTime, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'description': this.description, - 'id': this.id, - 'image': this.image, - 'isDelete': this.isDelete, - 'isNeedSecurityDeposit': this.isNeedSecurityDeposit, - 'name': this.name, - 'promotionDetail': this.promotionDetail, - 'promotionPlan': this.promotionPlan, - 'promotionType': this.promotionType, - 'securityDeposit': this.securityDeposit, - 'status': this.status, - 'tag': this.tag, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - }; -} - -class PromotionDetailBean { - - PromotionDetailBean(); - - factory PromotionDetailBean.fromJson(Map json) => PromotionDetailBean(); - - Map toJson() => {}; -} - diff --git a/lib/retrofit/data/rank.dart b/lib/retrofit/data/rank.dart deleted file mode 100644 index 0c1ab3b1..00000000 --- a/lib/retrofit/data/rank.dart +++ /dev/null @@ -1,117 +0,0 @@ -/// createTime : "" -/// createUser : 0 -/// id : 0 -/// rankContent : "" -/// rankImg : "" -/// rankName : "" -/// rankOrigin : 0 -/// status : true -/// updateTime : "" -/// updateUser : 0 - -class Rank { - String _createTime; - String _createUser; - String _id; - String _price; - String _rankContent; - String _rankImg; - String _rankName; - int _rankOrigin; - int _level; - bool _status; - String _updateTime; - String _updateUser; - String _color; - String _textColor; - int _originScore; - int _demotionScore; - - String get createTime => _createTime; - String get createUser => _createUser; - String get id => _id; - String get price => _price; - String get rankContent => _rankContent; - String get rankImg => _rankImg; - String get rankName => _rankName; - int get rankOrigin => _rankOrigin; - int get level => _level; - bool get status => _status; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get color => _color; - String get textColor => _textColor; - int get originScore => _originScore; - int get demotionScore => _demotionScore; - - Rank({ - String createTime, - String createUser, - String id, - String rankContent, - String rankImg, - String rankName, - int rankOrigin, - int level, - bool status, - String updateTime, - String updateUser}){ - _createTime = createTime; - _createUser = createUser; - _id = id; - _price = price; - _rankContent = rankContent; - _rankImg = rankImg; - _rankName = rankName; - _rankOrigin = rankOrigin; - _level = level; - _status = status; - _updateTime = updateTime; - _updateUser = updateUser; - _color = color; - _textColor = textColor; - _originScore = originScore; - _demotionScore = demotionScore; -} - - Rank.fromJson(dynamic json) { - _createTime = json["createTime"]; - _createUser = json["createUser"]; - _id = json["id"]; - _price = json["price"]; - _rankContent = json["rankContent"]; - _rankImg = json["rankImg"]; - _rankName = json["rankName"]; - _rankOrigin = json["rankOrigin"]; - _level = json["level"]; - _status = json["status"]; - _updateTime = json["updateTime"]; - _updateUser = json["updateUser"]; - _color = json["color"]; - _textColor = json["textColor"]; - _originScore = json["originScore"]; - _demotionScore = json["demotionScore"]; - } - - Map toJson() { - var map = {}; - map["createTime"] = _createTime; - map["createUser"] = _createUser; - map["id"] = _id; - map["price"] = _price; - map["rankContent"] = _rankContent; - map["rankImg"] = _rankImg; - map["rankName"] = _rankName; - map["rankOrigin"] = _rankOrigin; - map["level"] = _level; - map["status"] = _status; - map["updateTime"] = _updateTime; - map["updateUser"] = _updateUser; - map["color"] = _color; - map["textColor"] = _textColor; - map["originScore"] = _originScore; - map["demotionScore"] = _demotionScore; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/rechargeActLists.dart b/lib/retrofit/data/rechargeActLists.dart deleted file mode 100644 index 38ed6692..00000000 --- a/lib/retrofit/data/rechargeActLists.dart +++ /dev/null @@ -1,155 +0,0 @@ -/// preferentialList : [{"id":"1506553893994102784","rechargeMoney":"100.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-11 10:10:31","isDeleted":0,"rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。
储值活动不与其他活动同享

","sortValue":1},{"id":"1506553858271215616","rechargeMoney":"300.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-21 19:56:39","isDeleted":0,"rechargeType":0,"remark":"

平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。

","sortValue":2},{"id":"1506553832157478912","rechargeMoney":"500.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-21 19:56:48","isDeleted":0,"rechargeType":0,"remark":"

平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。

","sortValue":3},{"id":"1506553759084314624","rechargeMoney":"800.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-06-10 11:14:39","isDeleted":0,"rechargeType":0,"remark":"

平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。

","sortValue":4},{"id":"1506553705988620288","rechargeMoney":"1000.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-11-21 19:56:55","isDeleted":0,"rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。

","sortValue":5},{"id":"1506553668529291264","rechargeMoney":"1500.00","giftdMoney":"0.00","gitfdCouponId":null,"tenantCode":"admin","createTime":"2022-06-10 11:14:52","isDeleted":0,"rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。

","sortValue":6}] -/// channels : ["海峡","回乡","boom"] -/// isOpen : false - -class RechargeActLists { - RechargeActLists({ - List preferentialList, - List channels, - bool isOpen,}){ - _preferentialList = preferentialList; - _channels = channels; - _isOpen = isOpen; -} - - RechargeActLists.fromJson(dynamic json) { - if (json['preferentialList'] != null) { - _preferentialList = []; - json['preferentialList'].forEach((v) { - _preferentialList.add(PreferentialList.fromJson(v)); - }); - } - _channels = json['channels'] != null ? json['channels'].cast() : []; - _isOpen = json['isOpen']; - } - List _preferentialList; - List _channels; - bool _isOpen; -RechargeActLists copyWith({ List preferentialList, - List channels, - bool isOpen, -}) => RechargeActLists( preferentialList: preferentialList ?? _preferentialList, - channels: channels ?? _channels, - isOpen: isOpen ?? _isOpen, -); - List get preferentialList => _preferentialList; - List get channels => _channels; - bool get isOpen => _isOpen; - - Map toJson() { - final map = {}; - if (_preferentialList != null) { - map['preferentialList'] = _preferentialList.map((v) => v.toJson()).toList(); - } - map['channels'] = _channels; - map['isOpen'] = _isOpen; - return map; - } - -} - -/// id : "1506553893994102784" -/// rechargeMoney : "100.00" -/// giftdMoney : "0.00" -/// gitfdCouponId : null -/// tenantCode : "admin" -/// createTime : "2022-11-11 10:10:31" -/// isDeleted : 0 -/// rechargeType : 0 -/// remark : "

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、海峡姐妹生态农场等。
储值活动不与其他活动同享

" -/// sortValue : 1 - -class PreferentialList { - PreferentialList({ - String id, - String rechargeMoney, - String giftdMoney, - dynamic gitfdCouponId, - String tenantCode, - String createTime, - num isDeleted, - num rechargeType, - String remark, - num sortValue,}){ - _id = id; - _rechargeMoney = rechargeMoney; - _giftdMoney = giftdMoney; - _gitfdCouponId = gitfdCouponId; - _tenantCode = tenantCode; - _createTime = createTime; - _isDeleted = isDeleted; - _rechargeType = rechargeType; - _remark = remark; - _sortValue = sortValue; -} - - PreferentialList.fromJson(dynamic json) { - _id = json['id']; - _rechargeMoney = json['rechargeMoney']; - _giftdMoney = json['giftdMoney']; - _gitfdCouponId = json['gitfdCouponId']; - _tenantCode = json['tenantCode']; - _createTime = json['createTime']; - _isDeleted = json['isDeleted']; - _rechargeType = json['rechargeType']; - _remark = json['remark']; - _sortValue = json['sortValue']; - } - String _id; - String _rechargeMoney; - String _giftdMoney; - dynamic _gitfdCouponId; - String _tenantCode; - String _createTime; - num _isDeleted; - num _rechargeType; - String _remark; - num _sortValue; -PreferentialList copyWith({ String id, - String rechargeMoney, - String giftdMoney, - dynamic gitfdCouponId, - String tenantCode, - String createTime, - num isDeleted, - num rechargeType, - String remark, - num sortValue, -}) => PreferentialList( id: id ?? _id, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - giftdMoney: giftdMoney ?? _giftdMoney, - gitfdCouponId: gitfdCouponId ?? _gitfdCouponId, - tenantCode: tenantCode ?? _tenantCode, - createTime: createTime ?? _createTime, - isDeleted: isDeleted ?? _isDeleted, - rechargeType: rechargeType ?? _rechargeType, - remark: remark ?? _remark, - sortValue: sortValue ?? _sortValue, -); - String get id => _id; - String get rechargeMoney => _rechargeMoney; - String get giftdMoney => _giftdMoney; - dynamic get gitfdCouponId => _gitfdCouponId; - String get tenantCode => _tenantCode; - String get createTime => _createTime; - num get isDeleted => _isDeleted; - num get rechargeType => _rechargeType; - String get remark => _remark; - num get sortValue => _sortValue; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['rechargeMoney'] = _rechargeMoney; - map['giftdMoney'] = _giftdMoney; - map['gitfdCouponId'] = _gitfdCouponId; - map['tenantCode'] = _tenantCode; - map['createTime'] = _createTime; - map['isDeleted'] = _isDeleted; - map['rechargeType'] = _rechargeType; - map['remark'] = _remark; - map['sortValue'] = _sortValue; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/recharge_flow_list.dart b/lib/retrofit/data/recharge_flow_list.dart deleted file mode 100644 index e156149d..00000000 --- a/lib/retrofit/data/recharge_flow_list.dart +++ /dev/null @@ -1,329 +0,0 @@ -/// records : [{"id":"1726114100938801152","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-19 13:44:06","createTimeFormat":null,"createPerson":"","phone":"18537827823","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"0.00","realRecharge":"0.00"},{"id":"1726114054612713472","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-19 13:43:55","createTimeFormat":null,"createPerson":"","phone":"18537827823","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"0.00","realRecharge":"0.00"},{"id":"1726113414083772416","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-19 13:41:22","createTimeFormat":null,"createPerson":"","phone":"18537827823","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"0.00","realRecharge":"0.00"},{"id":"1726113338053623808","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-19 13:41:04","createTimeFormat":null,"createPerson":"","phone":"18537827823","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"0.00","realRecharge":"0.00"},{"id":"1726113287562592256","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-19 13:40:52","createTimeFormat":null,"createPerson":"","phone":"18537827823","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"0.00","realRecharge":"0.00"},{"id":"1725756687412887552","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-18 14:03:52","createTimeFormat":null,"createPerson":"","phone":"17813120251","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"27.00","realRecharge":"27.00"},{"id":"1725730560917110784","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-18 12:20:03","createTimeFormat":null,"createPerson":"","phone":"15837166590","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"39.60","realRecharge":"39.60"},{"id":"1724976129296564224","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-16 10:22:12","createTimeFormat":null,"createPerson":"","phone":"15836615333","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"58.00","realRecharge":"50.00"},{"id":"1723958918691946496","rechargeType":2,"rechargeName":"微信","source":0,"createTime":"2023-11-13 15:00:10","createTimeFormat":null,"createPerson":"","phone":"17813120251","tenantCode":"1195","storeName":"","rechargeMoney":"50.00","giftdMoney":"20.00","sumMoney":"70.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"27.00","realRecharge":"27.00"},{"id":"1723682257861869568","rechargeType":1,"rechargeName":"现金","source":1,"createTime":"2023-11-12 20:40:49","createTimeFormat":null,"createPerson":"","phone":"13253333210","tenantCode":"1195","storeName":"台北牛肉面","rechargeMoney":"0.00","giftdMoney":"500.00","sumMoney":"500.00","createMemberId":null,"rechargePreferentialId":null,"rechargeStatus":0,"refuseReason":null,"balance":"1000.00","realRecharge":"0.00"}] -/// total : "21" -/// size : "10" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "3" - -class RechargeFlowList { - RechargeFlowList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - RechargeFlowList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -RechargeFlowList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => RechargeFlowList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1726114100938801152" -/// rechargeType : 2 -/// rechargeName : "微信" -/// source : 0 -/// createTime : "2023-11-19 13:44:06" -/// createTimeFormat : null -/// createPerson : "" -/// phone : "18537827823" -/// tenantCode : "1195" -/// storeName : "" -/// rechargeMoney : "50.00" -/// giftdMoney : "20.00" -/// sumMoney : "70.00" -/// createMemberId : null -/// rechargePreferentialId : null -/// rechargeStatus : 0 -/// refuseReason : null -/// balance : "0.00" -/// realRecharge : "0.00" - -class Records { - Records({ - String id, - num rechargeType, - String rechargeName, - num source, - String createTime, - dynamic createTimeFormat, - String createPerson, - String phone, - String tenantCode, - String storeName, - String rechargeMoney, - String giftdMoney, - String sumMoney, - dynamic createMemberId, - dynamic rechargePreferentialId, - num rechargeStatus, - dynamic refuseReason, - String balance, - String realRecharge,}){ - _id = id; - _rechargeType = rechargeType; - _rechargeName = rechargeName; - _source = source; - _createTime = createTime; - _createTimeFormat = createTimeFormat; - _createPerson = createPerson; - _phone = phone; - _tenantCode = tenantCode; - _storeName = storeName; - _rechargeMoney = rechargeMoney; - _giftdMoney = giftdMoney; - _sumMoney = sumMoney; - _createMemberId = createMemberId; - _rechargePreferentialId = rechargePreferentialId; - _rechargeStatus = rechargeStatus; - _refuseReason = refuseReason; - _balance = balance; - _realRecharge = realRecharge; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _rechargeType = json['rechargeType']; - _rechargeName = json['rechargeName']; - _source = json['source']; - _createTime = json['createTime']; - _createTimeFormat = json['createTimeFormat']; - _createPerson = json['createPerson']; - _phone = json['phone']; - _tenantCode = json['tenantCode']; - _storeName = json['storeName']; - _rechargeMoney = json['rechargeMoney']; - _giftdMoney = json['giftdMoney']; - _sumMoney = json['sumMoney']; - _createMemberId = json['createMemberId']; - _rechargePreferentialId = json['rechargePreferentialId']; - _rechargeStatus = json['rechargeStatus']; - _refuseReason = json['refuseReason']; - _balance = json['balance']; - _realRecharge = json['realRecharge']; - } - String _id; - num _rechargeType; - String _rechargeName; - num _source; - String _createTime; - dynamic _createTimeFormat; - String _createPerson; - String _phone; - String _tenantCode; - String _storeName; - String _rechargeMoney; - String _giftdMoney; - String _sumMoney; - dynamic _createMemberId; - dynamic _rechargePreferentialId; - num _rechargeStatus; - dynamic _refuseReason; - String _balance; - String _realRecharge; -Records copyWith({ String id, - num rechargeType, - String rechargeName, - num source, - String createTime, - dynamic createTimeFormat, - String createPerson, - String phone, - String tenantCode, - String storeName, - String rechargeMoney, - String giftdMoney, - String sumMoney, - dynamic createMemberId, - dynamic rechargePreferentialId, - num rechargeStatus, - dynamic refuseReason, - String balance, - String realRecharge, -}) => Records( id: id ?? _id, - rechargeType: rechargeType ?? _rechargeType, - rechargeName: rechargeName ?? _rechargeName, - source: source ?? _source, - createTime: createTime ?? _createTime, - createTimeFormat: createTimeFormat ?? _createTimeFormat, - createPerson: createPerson ?? _createPerson, - phone: phone ?? _phone, - tenantCode: tenantCode ?? _tenantCode, - storeName: storeName ?? _storeName, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - giftdMoney: giftdMoney ?? _giftdMoney, - sumMoney: sumMoney ?? _sumMoney, - createMemberId: createMemberId ?? _createMemberId, - rechargePreferentialId: rechargePreferentialId ?? _rechargePreferentialId, - rechargeStatus: rechargeStatus ?? _rechargeStatus, - refuseReason: refuseReason ?? _refuseReason, - balance: balance ?? _balance, - realRecharge: realRecharge ?? _realRecharge, -); - String get id => _id; - num get rechargeType => _rechargeType; - String get rechargeName => _rechargeName; - num get source => _source; - String get createTime => _createTime; - dynamic get createTimeFormat => _createTimeFormat; - String get createPerson => _createPerson; - String get phone => _phone; - String get tenantCode => _tenantCode; - String get storeName => _storeName; - String get rechargeMoney => _rechargeMoney; - String get giftdMoney => _giftdMoney; - String get sumMoney => _sumMoney; - dynamic get createMemberId => _createMemberId; - dynamic get rechargePreferentialId => _rechargePreferentialId; - num get rechargeStatus => _rechargeStatus; - dynamic get refuseReason => _refuseReason; - String get balance => _balance; - String get realRecharge => _realRecharge; - bool _isShow = false; - - bool get isShow => _isShow; - - set isShow(bool value) { - _isShow = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['rechargeType'] = _rechargeType; - map['rechargeName'] = _rechargeName; - map['source'] = _source; - map['createTime'] = _createTime; - map['createTimeFormat'] = _createTimeFormat; - map['createPerson'] = _createPerson; - map['phone'] = _phone; - map['tenantCode'] = _tenantCode; - map['storeName'] = _storeName; - map['rechargeMoney'] = _rechargeMoney; - map['giftdMoney'] = _giftdMoney; - map['sumMoney'] = _sumMoney; - map['createMemberId'] = _createMemberId; - map['rechargePreferentialId'] = _rechargePreferentialId; - map['rechargeStatus'] = _rechargeStatus; - map['refuseReason'] = _refuseReason; - map['balance'] = _balance; - map['realRecharge'] = _realRecharge; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/recharge_list.dart b/lib/retrofit/data/recharge_list.dart deleted file mode 100644 index 4e6c5d71..00000000 --- a/lib/retrofit/data/recharge_list.dart +++ /dev/null @@ -1,78 +0,0 @@ -/// id : "1494622230208839681" -/// rechargeMoney : "100.00" -/// giftdMoney : "0.00" -/// gitfdCouponId : null -/// tenantCode : "admin" -/// createTime : "2022-03-23 10:53:37" -/// isDeleted : 0 -/// rechargeType : 0 -/// remark : "充充充" - -class RechargeList { - RechargeList({ - String id, - String rechargeMoney, - String giftdMoney, - dynamic gitfdCouponId, - String tenantCode, - String createTime, - int isDeleted, - int rechargeType, - String remark,}){ - _id = id; - _rechargeMoney = rechargeMoney; - _giftdMoney = giftdMoney; - _gitfdCouponId = gitfdCouponId; - _tenantCode = tenantCode; - _createTime = createTime; - _isDeleted = isDeleted; - _rechargeType = rechargeType; - _remark = remark; -} - - RechargeList.fromJson(dynamic json) { - _id = json['id']; - _rechargeMoney = json['rechargeMoney']; - _giftdMoney = json['giftdMoney']; - _gitfdCouponId = json['gitfdCouponId']; - _tenantCode = json['tenantCode']; - _createTime = json['createTime']; - _isDeleted = json['isDeleted']; - _rechargeType = json['rechargeType']; - _remark = json['remark']; - } - String _id; - String _rechargeMoney; - String _giftdMoney; - dynamic _gitfdCouponId; - String _tenantCode; - String _createTime; - int _isDeleted; - int _rechargeType; - String _remark; - - String get id => _id; - String get rechargeMoney => _rechargeMoney; - String get giftdMoney => _giftdMoney; - dynamic get gitfdCouponId => _gitfdCouponId; - String get tenantCode => _tenantCode; - String get createTime => _createTime; - int get isDeleted => _isDeleted; - int get rechargeType => _rechargeType; - String get remark => _remark; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['rechargeMoney'] = _rechargeMoney; - map['giftdMoney'] = _giftdMoney; - map['gitfdCouponId'] = _gitfdCouponId; - map['tenantCode'] = _tenantCode; - map['createTime'] = _createTime; - map['isDeleted'] = _isDeleted; - map['rechargeType'] = _rechargeType; - map['remark'] = _remark; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/refund_reason_list.dart b/lib/retrofit/data/refund_reason_list.dart deleted file mode 100644 index e2d6938e..00000000 --- a/lib/retrofit/data/refund_reason_list.dart +++ /dev/null @@ -1,232 +0,0 @@ -/// records : [{"id":"1701507861319778304","createTime":"2023-09-12 16:07:41","createUser":"1640233401329909760","updateTime":"2023-09-12 16:07:41","updateUser":"1640233401329909760","storeId":"0","type":3,"reason":"测试退款","isDelete":0},{"id":"1689577561031442432","createTime":"2023-08-10 18:00:56","createUser":"1640233401329909760","updateTime":"2023-08-10 18:01:09","updateUser":"1640233401329909760","storeId":"1645316356192600064","type":3,"reason":"错误下单","isDelete":0},{"id":"1685119824058908672","createTime":"2023-07-29 10:47:29","createUser":"1640233401329909760","updateTime":"2023-07-29 10:47:29","updateUser":"1640233401329909760","storeId":"0","type":3,"reason":"客户取消","isDelete":0}] -/// total : "3" -/// size : "999" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "1" - -class RefundReasonList { - RefundReasonList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - RefundReasonList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -RefundReasonList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => RefundReasonList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1701507861319778304" -/// createTime : "2023-09-12 16:07:41" -/// createUser : "1640233401329909760" -/// updateTime : "2023-09-12 16:07:41" -/// updateUser : "1640233401329909760" -/// storeId : "0" -/// type : 3 -/// reason : "测试退款" -/// isDelete : 0 - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - num type, - String reason, - num isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _storeId = storeId; - _type = type; - _reason = reason; - _isDelete = isDelete; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _storeId = json['storeId']; - _type = json['type']; - _reason = json['reason']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _storeId; - num _type; - String _reason; - num _isDelete; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String storeId, - num type, - String reason, - num isDelete, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - storeId: storeId ?? _storeId, - type: type ?? _type, - reason: reason ?? _reason, - isDelete: isDelete ?? _isDelete, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get storeId => _storeId; - num get type => _type; - String get reason => _reason; - num get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['storeId'] = _storeId; - map['type'] = _type; - map['reason'] = _reason; - map['isDelete'] = _isDelete; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/second_card_list.dart b/lib/retrofit/data/second_card_list.dart deleted file mode 100644 index 7bdc5682..00000000 --- a/lib/retrofit/data/second_card_list.dart +++ /dev/null @@ -1,73 +0,0 @@ -/// id : "1438426197401796608" -/// phone : "18672306891" -/// nickname : "冬天的秘密" -/// headimg : "" - -class SecondCardList { - SecondCardList({ - String id, - String phone, - String nickname, - String headimg, - bool isAdd, - }) { - _id = id; - _phone = phone; - _nickname = nickname; - _headimg = headimg; - _isAdd = isAdd; - } - - SecondCardList.fromJson(dynamic json) { - _id = json['id']; - _phone = json['phone']; - _nickname = json['nickname']; - _headimg = json['headimg']; - } - - String _id; - String _phone; - String _nickname; - String _headimg; - bool _isAdd; - - String get id => _id; - - String get phone => _phone; - - String get nickname => _nickname; - - String get headimg => _headimg; - - bool get isAdd => _isAdd; - - set id(String value) { - _id = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['phone'] = _phone; - map['nickname'] = _nickname; - map['headimg'] = _headimg; - return map; - } - - set phone(String value) { - _phone = value; - } - - set nickname(String value) { - _nickname = value; - } - - set headimg(String value) { - _headimg = value; - } - - set isAdd(bool value) { - _isAdd = value; - } - -} diff --git a/lib/retrofit/data/service_bug_list.dart b/lib/retrofit/data/service_bug_list.dart deleted file mode 100644 index 5b59a119..00000000 --- a/lib/retrofit/data/service_bug_list.dart +++ /dev/null @@ -1,313 +0,0 @@ -/// records : [{"id":"1745006589485514752","createTime":"2024-01-10 16:56:06","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:48","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1743090505270427648","oldPackageId":"1742842291845857280","packagePrice":"0.01","packageNum":1,"packageDiscount":100,"expirationTime":"2025-01-10 16:56:06","upgradeTime":null,"status":0,"payChannel":1,"isDelete":0,"packageName":"品牌商户"},{"id":"1745002175626477568","createTime":"2024-01-10 16:38:34","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:47","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1742842291845857280","oldPackageId":null,"packagePrice":"200.00","packageNum":10,"packageDiscount":100,"expirationTime":"2049-09-11 15:39:12","upgradeTime":null,"status":0,"payChannel":1,"isDelete":0,"packageName":"普通商户"},{"id":"1744984806560628736","createTime":"2024-01-10 15:29:33","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:46","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1743090505270427648","oldPackageId":null,"packagePrice":"0.01","packageNum":2,"packageDiscount":100,"expirationTime":"2030-01-10 14:23:37","upgradeTime":null,"status":1,"payChannel":1,"isDelete":0,"packageName":"品牌商户"},{"id":"1744983525037178880","createTime":"2024-01-10 15:24:27","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:46","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1743090505270427648","oldPackageId":null,"packagePrice":"0.01","packageNum":3,"packageDiscount":100,"expirationTime":"2028-01-10 14:23:37","upgradeTime":null,"status":1,"payChannel":1,"isDelete":0,"packageName":"品牌商户"},{"id":"1744968216842600448","createTime":"2024-01-10 14:23:37","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:45","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1743090505270427648","oldPackageId":"1742842291845857280","packagePrice":"0.01","packageNum":1,"packageDiscount":100,"expirationTime":"2025-01-10 14:23:37","upgradeTime":null,"status":1,"payChannel":1,"isDelete":0,"packageName":"品牌商户"},{"id":"1744965441966571520","createTime":"2024-01-10 14:12:36","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:44","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1742842291845857280","oldPackageId":null,"packagePrice":"0.01","packageNum":10,"packageDiscount":100,"expirationTime":"2030-01-10 18:00:00","upgradeTime":"2024-01-10 16:56:05","status":3,"payChannel":1,"isDelete":0,"packageName":"普通商户"},{"id":"1744965184633438208","createTime":"2024-01-10 14:11:35","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:44","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1742842291845857280","oldPackageId":null,"packagePrice":"0.01","packageNum":5,"packageDiscount":100,"expirationTime":"2027-01-10 18:00:00","upgradeTime":"2024-01-10 16:38:57","status":3,"payChannel":1,"isDelete":0,"packageName":"普通商户"},{"id":"1744965083273887744","createTime":"2024-01-10 14:11:10","createUser":"1739884285034233856","updateTime":"2024-01-11 07:51:43","updateUser":"1739884285034233856","tenantId":"1739884282001752064","tenantCode":"1197","packageId":"1742842291845857280","oldPackageId":null,"packagePrice":"0.01","packageNum":1,"packageDiscount":100,"expirationTime":"2025-01-10 18:00:00","upgradeTime":"2024-05-10 18:00:00","status":3,"payChannel":1,"isDelete":0,"packageName":"普通商户"}] -/// total : "8" -/// size : "10" -/// current : "1" -/// orders : [{"column":"create_time","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "1" - -class ServiceBugList { - ServiceBugList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - ServiceBugList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -ServiceBugList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => ServiceBugList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "create_time" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1745006589485514752" -/// createTime : "2024-01-10 16:56:06" -/// createUser : "1739884285034233856" -/// updateTime : "2024-01-11 07:51:48" -/// updateUser : "1739884285034233856" -/// tenantId : "1739884282001752064" -/// tenantCode : "1197" -/// packageId : "1743090505270427648" -/// oldPackageId : "1742842291845857280" -/// packagePrice : "0.01" -/// packageNum : 1 -/// packageDiscount : 100 -/// expirationTime : "2025-01-10 16:56:06" -/// upgradeTime : null -/// status : 0 -/// payChannel : 1 -/// isDelete : 0 -/// packageName : "品牌商户" - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantId, - String tenantCode, - String packageId, - String oldPackageId, - String packagePrice, - num packageNum, - num packageDiscount, - String expirationTime, - dynamic upgradeTime, - num status, - num payChannel, - num isDelete, - String packageName,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _tenantId = tenantId; - _tenantCode = tenantCode; - _packageId = packageId; - _oldPackageId = oldPackageId; - _packagePrice = packagePrice; - _packageNum = packageNum; - _packageDiscount = packageDiscount; - _expirationTime = expirationTime; - _upgradeTime = upgradeTime; - _status = status; - _payChannel = payChannel; - _isDelete = isDelete; - _packageName = packageName; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _tenantId = json['tenantId']; - _tenantCode = json['tenantCode']; - _packageId = json['packageId']; - _oldPackageId = json['oldPackageId']; - _packagePrice = json['packagePrice']; - _packageNum = json['packageNum']; - _packageDiscount = json['packageDiscount']; - _expirationTime = json['expirationTime']; - _upgradeTime = json['upgradeTime']; - _status = json['status']; - _payChannel = json['payChannel']; - _isDelete = json['isDelete']; - _packageName = json['packageName']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _tenantId; - String _tenantCode; - String _packageId; - String _oldPackageId; - String _packagePrice; - num _packageNum; - num _packageDiscount; - String _expirationTime; - dynamic _upgradeTime; - num _status; - num _payChannel; - num _isDelete; - String _packageName; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String tenantId, - String tenantCode, - String packageId, - String oldPackageId, - String packagePrice, - num packageNum, - num packageDiscount, - String expirationTime, - dynamic upgradeTime, - num status, - num payChannel, - num isDelete, - String packageName, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - tenantId: tenantId ?? _tenantId, - tenantCode: tenantCode ?? _tenantCode, - packageId: packageId ?? _packageId, - oldPackageId: oldPackageId ?? _oldPackageId, - packagePrice: packagePrice ?? _packagePrice, - packageNum: packageNum ?? _packageNum, - packageDiscount: packageDiscount ?? _packageDiscount, - expirationTime: expirationTime ?? _expirationTime, - upgradeTime: upgradeTime ?? _upgradeTime, - status: status ?? _status, - payChannel: payChannel ?? _payChannel, - isDelete: isDelete ?? _isDelete, - packageName: packageName ?? _packageName, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get tenantId => _tenantId; - String get tenantCode => _tenantCode; - String get packageId => _packageId; - String get oldPackageId => _oldPackageId; - String get packagePrice => _packagePrice; - num get packageNum => _packageNum; - num get packageDiscount => _packageDiscount; - String get expirationTime => _expirationTime; - dynamic get upgradeTime => _upgradeTime; - num get status => _status; - num get payChannel => _payChannel; - num get isDelete => _isDelete; - String get packageName => _packageName; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['tenantId'] = _tenantId; - map['tenantCode'] = _tenantCode; - map['packageId'] = _packageId; - map['oldPackageId'] = _oldPackageId; - map['packagePrice'] = _packagePrice; - map['packageNum'] = _packageNum; - map['packageDiscount'] = _packageDiscount; - map['expirationTime'] = _expirationTime; - map['upgradeTime'] = _upgradeTime; - map['status'] = _status; - map['payChannel'] = _payChannel; - map['isDelete'] = _isDelete; - map['packageName'] = _packageName; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/set_specs_list.dart b/lib/retrofit/data/set_specs_list.dart deleted file mode 100644 index f5dd0b6e..00000000 --- a/lib/retrofit/data/set_specs_list.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; - -@Deprecated("更换为:ProductSkuAttr") -class SetSpecsList { - TextEditingController _specsNameController; - List _specsValues = []; - String _specsCode = ""; - TextEditingController get specsNameController => _specsNameController; - - List get specsValues => _specsValues; - String get specsCode => _specsCode; - - set specsValues(List value) { - _specsValues = value; - } - set specsCode(String value) { - _specsCode = value; - } - - SetSpecsList(){ - _specsNameController = TextEditingController(); - } -} \ No newline at end of file diff --git a/lib/retrofit/data/set_specs_meal_list.dart b/lib/retrofit/data/set_specs_meal_list.dart deleted file mode 100644 index 2041a639..00000000 --- a/lib/retrofit/data/set_specs_meal_list.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter/cupertino.dart'; - -class SetSpecsMealList { - TextEditingController _groupsNameController; - List> _goodsMeal = []; - num _groupsTotal = 1; - num _optionalNum = 1; - - TextEditingController get groupsNameController => _groupsNameController; - - - List> get goodsMeal => _goodsMeal; - - set goodsMeal(List> value) { - _goodsMeal = value; - } - - num get groupsTotal => _groupsTotal; - - set groupsTotal(num value) { - _groupsTotal = value; - } - - SetSpecsMealList(){ - _groupsNameController = TextEditingController(); - } - - num get optionalNum => _optionalNum; - - set optionalNum(num value) { - _optionalNum = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/set_specs_value_list.dart b/lib/retrofit/data/set_specs_value_list.dart deleted file mode 100644 index bcf213cb..00000000 --- a/lib/retrofit/data/set_specs_value_list.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/cupertino.dart'; - -@Deprecated("更换为:ProductSkuAttrValue") -class SetSpecsValueList { - TextEditingController _specsValueNameController; - - TextEditingController get specsValueNameController => _specsValueNameController; - SetSpecsValueList(){ - _specsValueNameController = TextEditingController(); - } -} \ No newline at end of file diff --git a/lib/retrofit/data/settleOrderInfo.dart b/lib/retrofit/data/settleOrderInfo.dart deleted file mode 100644 index 817e3b08..00000000 --- a/lib/retrofit/data/settleOrderInfo.dart +++ /dev/null @@ -1,940 +0,0 @@ - -import 'package:huixiang/retrofit/data/order_product_vo.dart'; - -class SettleOrderInfo { - int orderNum; - int productNum; - int mins; - MemberVo memberVO; - String postAge; - String price; - String benefitDiscountAmount; - String orderSum; - String discountAmount; - List promotionInfoList; - List couponList; - String threshold; - String freePostAge; - List orderProductList; - String promotionId; - String memberCouponId; - bool usePlateMoney; - bool isRaise; - bool isVipDay; - int selectDiscount; - bool useVipPriceSelect = false; - String vipDiscountAmount; - String totalDiscountAmount; - String vipDayDiscountAmount; - String discountType; - String totalPackagingFee; - - - static SettleOrderInfo fromJson(Map map) { - if (map == null) return null; - SettleOrderInfo settleOrderInfoBean = SettleOrderInfo(); - settleOrderInfoBean.orderNum = map['orderNum']; - settleOrderInfoBean.productNum = map['productNum']; - settleOrderInfoBean.mins = map['mins']; - settleOrderInfoBean.memberVO = MemberVo.fromJson(map['memberVO']); - settleOrderInfoBean.postAge = map['postAge']; - settleOrderInfoBean.price = map['price']; - settleOrderInfoBean.benefitDiscountAmount = map['benefitDiscountAmount']; - settleOrderInfoBean.orderSum = map['orderSum']; - settleOrderInfoBean.discountAmount = map['discountAmount']; - settleOrderInfoBean.promotionInfoList = List()..addAll( - (map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBean.fromJson(o)) - ); - settleOrderInfoBean.couponList = List()..addAll( - (map['couponList'] as List ?? []).map((o) => CouponListBean.fromJson(o)) - ); - settleOrderInfoBean.threshold = map['threshold']; - settleOrderInfoBean.freePostAge = map['freePostAge']; - settleOrderInfoBean.orderProductList = List()..addAll( - (map['orderProductList'] as List ?? []).map((o) => OrderProductVOList.fromJson(o)) - ); - settleOrderInfoBean.promotionId = map['promotionId']; - settleOrderInfoBean.memberCouponId = map['memberCouponId']; - settleOrderInfoBean.usePlateMoney = map['usePlateMoney']; - settleOrderInfoBean.isRaise = map['isRaise']; - settleOrderInfoBean.isVipDay = map['isVipDay']; - settleOrderInfoBean.selectDiscount = map['selectDiscount']; - settleOrderInfoBean.vipDiscountAmount = map['vipDiscountAmount']; - settleOrderInfoBean.totalDiscountAmount = map['totalDiscountAmount']; - settleOrderInfoBean.vipDayDiscountAmount = map['vipDayDiscountAmount']; - settleOrderInfoBean.discountType = map['discountType']; - settleOrderInfoBean.totalPackagingFee = map['totalPackagingFee']; - return settleOrderInfoBean; - } - - Map toJson() => { - "orderNum": orderNum, - "productNum": productNum, - "mins": mins, - "memberVO": memberVO, - "postAge": postAge, - "price": price, - "benefitDiscountAmount": benefitDiscountAmount, - "orderSum": orderSum, - "discountAmount": discountAmount, - "promotionInfoList": promotionInfoList, - "couponList": couponList, - "threshold": threshold, - "freePostAge": freePostAge, - "orderProductList": orderProductList, - "promotionId": promotionId, - "memberCouponId": memberCouponId, - "usePlateMoney":usePlateMoney, - "isVipDay":isVipDay, - "selectDiscount":selectDiscount, - "vipDiscountAmount":vipDiscountAmount, - "totalDiscountAmount": totalDiscountAmount, - "vipDayDiscountAmount": vipDayDiscountAmount, - "discountType":discountType, - "packagingFee" : totalPackagingFee, - }; - - -} - -/// id : null -/// createTime : null -/// createUser : null -/// updateTime : null -/// updateUser : null -/// tenantCode : null -/// storeId : null -/// orderId : null -/// actInfo : null -/// productId : "1426095718614958080" -/// productName : "ɣ�������̸�" -/// skuId : "1426095718740787200" -/// skuNameStr : "ɳ�� ������ 700ml" -/// skuImg : null -/// buyNum : 1 -/// refundNum : null -/// type : null -/// reason : null -/// weight : 0.0 -/// applyPrice : "28.00" -/// sellPrice : "28.00" -/// postPay : null -/// isDelete : null -/// discountAmount : null -/// discountPercent : null -/// status : null -/// batch : null - -// class OrderProductListBean { -// dynamic id; -// dynamic createTime; -// dynamic createUser; -// dynamic updateTime; -// dynamic updateUser; -// dynamic tenantCode; -// dynamic storeId; -// dynamic orderId; -// dynamic actInfo; -// String productId; -// String productName; -// String skuId; -// String skuNameStr; -// dynamic skuImg; -// int buyNum; -// dynamic refundNum; -// dynamic type; -// dynamic reason; -// double weight; -// String applyPrice; -// String sellPrice; -// dynamic postPay; -// dynamic isDelete; -// dynamic discountAmount; -// dynamic discountPercent; -// dynamic status; -// dynamic batch; -// -// static OrderProductListBean fromJson(Map map) { -// if (map == null) return null; -// OrderProductListBean orderProductListBean = OrderProductListBean(); -// orderProductListBean.id = map['id']; -// orderProductListBean.createTime = map['createTime']; -// orderProductListBean.createUser = map['createUser']; -// orderProductListBean.updateTime = map['updateTime']; -// orderProductListBean.updateUser = map['updateUser']; -// orderProductListBean.tenantCode = map['tenantCode']; -// orderProductListBean.storeId = map['storeId']; -// orderProductListBean.orderId = map['orderId']; -// orderProductListBean.actInfo = map['actInfo']; -// orderProductListBean.productId = map['productId']; -// orderProductListBean.productName = map['productName']; -// orderProductListBean.skuId = map['skuId']; -// orderProductListBean.skuNameStr = map['skuNameStr']; -// orderProductListBean.skuImg = map['skuImg']; -// orderProductListBean.buyNum = map['buyNum']; -// orderProductListBean.refundNum = map['refundNum']; -// orderProductListBean.type = map['type']; -// orderProductListBean.reason = map['reason']; -// orderProductListBean.weight = map['weight']; -// orderProductListBean.applyPrice = map['applyPrice']; -// orderProductListBean.sellPrice = map['sellPrice']; -// orderProductListBean.postPay = map['postPay']; -// orderProductListBean.isDelete = map['isDelete']; -// orderProductListBean.discountAmount = map['discountAmount']; -// orderProductListBean.discountPercent = map['discountPercent']; -// orderProductListBean.status = map['status']; -// orderProductListBean.batch = map['batch']; -// return orderProductListBean; -// } -// -// Map toJson() => { -// "id": id, -// "createTime": createTime, -// "createUser": createUser, -// "updateTime": updateTime, -// "updateUser": updateUser, -// "tenantCode": tenantCode, -// "storeId": storeId, -// "orderId": orderId, -// "actInfo": actInfo, -// "productId": productId, -// "productName": productName, -// "skuId": skuId, -// "skuNameStr": skuNameStr, -// "skuImg": skuImg, -// "buyNum": buyNum, -// "refundNum": refundNum, -// "type": type, -// "reason": reason, -// "weight": weight, -// "applyPrice": applyPrice, -// "sellPrice": sellPrice, -// "postPay": postPay, -// "isDelete": isDelete, -// "discountAmount": discountAmount, -// "discountPercent": discountPercent, -// "status": status, -// "batch": batch, -// }; -// } - -/// id : "1448907890034212864" -/// storeId : "1333246101343436800" -/// bizType : 1 -/// fullAmount : "10.00" -/// discountAmount : "8.00" -/// fullNumber : 1 -/// discountPercent : 100 -/// bizId : "" -/// publishStartTime : "2021-10-01" -/// publishEndTime : "2021-10-29" -/// useStartTime : "2021-10-02" -/// useEndTime : "2021-10-31" -/// promotionId : "0" -/// mid : "1438443365845696512" -/// couponId : "1448902034085380096" -/// receiveTime : "2021-10-15" -/// useTime : null -/// status : 1 -/// tenantCode : "1175" -/// type : 1 -/// promotionName : "��10-8" -/// usable : true -/// allProduct : true -/// isMaxCoupon:true -/// productList : null - -class CouponListBean { - String id; - String storeId; - int bizType; - String fullAmount; - String discountAmount; - int fullNumber; - int discountPercent; - String bizId; - String limitAmount; - String publishStartTime; - String publishEndTime; - String useStartTime; - String useEndTime; - String promotionId; - dynamic mid; - String couponId; - String receiveTime; - dynamic useTime; - int status; - String tenantCode; - int type; - String promotionName; - bool usable; - bool allProduct; - bool isMaxCoupon; - dynamic productList; - bool isEx; - String usableReason; - - - static CouponListBean fromJson(Map map) { - if (map == null) return null; - CouponListBean couponListBean = CouponListBean(); - couponListBean.id = map['id']; - couponListBean.storeId = map['storeId']; - couponListBean.bizType = map['bizType']; - couponListBean.fullAmount = map['fullAmount']; - couponListBean.discountAmount = map['discountAmount']; - couponListBean.fullNumber = map['fullNumber']; - couponListBean.discountPercent = map['discountPercent']; - couponListBean.bizId = map['bizId']; - couponListBean.limitAmount = map['limitAmount']; - couponListBean.publishStartTime = map['publishStartTime']; - couponListBean.publishEndTime = map['publishEndTime']; - couponListBean.useStartTime = map['useStartTime']; - couponListBean.useEndTime = map['useEndTime']; - couponListBean.promotionId = map['promotionId']; - couponListBean.mid = map['mid']; - couponListBean.couponId = map['couponId']; - couponListBean.receiveTime = map['receiveTime']; - couponListBean.useTime = map['useTime']; - couponListBean.status = map['status']; - couponListBean.tenantCode = map['tenantCode']; - couponListBean.type = map['type']; - couponListBean.promotionName = map['promotionName']; - couponListBean.usable = map['usable']; - couponListBean.allProduct = map['allProduct']; - couponListBean.isMaxCoupon = map['isMaxCoupon']; - couponListBean.productList = map['productList']; - couponListBean.usableReason = map['usableReason']; - return couponListBean; - } - - Map toJson() => { - "id": id, - "storeId": storeId, - "bizType": bizType, - "fullAmount": fullAmount, - "discountAmount": discountAmount, - "fullNumber": fullNumber, - "discountPercent": discountPercent, - "bizId": bizId, - "limitAmount":limitAmount, - "publishStartTime": publishStartTime, - "publishEndTime": publishEndTime, - "useStartTime": useStartTime, - "useEndTime": useEndTime, - "promotionId": promotionId, - "mid": mid, - "couponId": couponId, - "receiveTime": receiveTime, - "useTime": useTime, - "status": status, - "tenantCode": tenantCode, - "type": type, - "promotionName": promotionName, - "usable": usable, - "allProduct": allProduct, - "isMaxCoupon": isMaxCoupon, - "productList": productList, - "usableReason":usableReason, - - }; -} - -/// id : "1437254523520286720" -/// createTime : "2021-09-13 11:19:16" -/// createUser : "1333246101196636160" -/// updateTime : "2021-09-13 17:30:00" -/// updateUser : "0" -/// storeId : "1433719074906439680" -/// name : "�����ŵ�" -/// image : "https://pos.upload.gznl.top/1175/2021/09/44d60dab-0ae3-4d07-b624-50b8ab99d0fc.jpg" -/// description : "1" -/// status : 4 -/// applyStartTime : "2021-09-13 11:19:16" -/// applyEndTime : "2021-09-13 11:19:16" -/// activityStartTime : "2021-09-01 00:00:00" -/// activityEndTime : "2021-10-30 00:00:00" -/// doStartTime : null -/// doEndTime : null -/// isNeedSecurityDeposit : 0 -/// securityDeposit : "0" -/// tag : "11" -/// promotionType : 1 -/// promotionPlan : 0 -/// promotionDetail : [{"limitTime":"0","discountRate":"0","discountAmount":"0","fullAmount":"0","collageNumber":"0","fullNumber":"1"}] -/// channels : ["MINI","POS"] -/// isVip : false -/// isDelete : 0 -/// tenantCode : "1175" -/// canPartake : true -/// isMaxPromotion : true -/// promotionProuctList : null - -class PromotionInfoListBean { - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String storeId; - String name; - String image; - String description; - int status; - String applyStartTime; - String applyEndTime; - String activityStartTime; - String activityEndTime; - dynamic doStartTime; - dynamic doEndTime; - int isNeedSecurityDeposit; - String securityDeposit; - String tag; - int promotionType; - int promotionPlan; - List promotionDetail; - List channels; - bool isVip; - int isDelete; - String tenantCode; - bool canPartake; - bool isMaxPromotion; - dynamic promotionProuctList; - - static PromotionInfoListBean fromJson(Map map) { - if (map == null) return null; - PromotionInfoListBean promotionInfoListBean = PromotionInfoListBean(); - promotionInfoListBean.id = map['id']; - promotionInfoListBean.createTime = map['createTime']; - promotionInfoListBean.createUser = map['createUser']; - promotionInfoListBean.updateTime = map['updateTime']; - promotionInfoListBean.updateUser = map['updateUser']; - promotionInfoListBean.storeId = map['storeId']; - promotionInfoListBean.name = map['name']; - promotionInfoListBean.image = map['image']; - promotionInfoListBean.description = map['description']; - promotionInfoListBean.status = map['status']; - promotionInfoListBean.applyStartTime = map['applyStartTime']; - promotionInfoListBean.applyEndTime = map['applyEndTime']; - promotionInfoListBean.activityStartTime = map['activityStartTime']; - promotionInfoListBean.activityEndTime = map['activityEndTime']; - promotionInfoListBean.doStartTime = map['doStartTime']; - promotionInfoListBean.doEndTime = map['doEndTime']; - promotionInfoListBean.isNeedSecurityDeposit = map['isNeedSecurityDeposit']; - promotionInfoListBean.securityDeposit = map['securityDeposit']; - promotionInfoListBean.tag = map['tag']; - promotionInfoListBean.promotionType = map['promotionType']; - promotionInfoListBean.promotionPlan = map['promotionPlan']; - promotionInfoListBean.promotionDetail = List()..addAll( - (map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o)) - ); - promotionInfoListBean.channels = List()..addAll( - (map['channels'] as List ?? []).map((o) => o.toString()) - ); - promotionInfoListBean.isVip = map['isVip']; - promotionInfoListBean.isDelete = map['isDelete']; - promotionInfoListBean.tenantCode = map['tenantCode']; - promotionInfoListBean.canPartake = map['canPartake']; - promotionInfoListBean.isMaxPromotion = map['isMaxPromotion']; - promotionInfoListBean.promotionProuctList = map['promotionProuctList']; - return promotionInfoListBean; - } - - Map toJson() => { - "id": id, - "createTime": createTime, - "createUser": createUser, - "updateTime": updateTime, - "updateUser": updateUser, - "storeId": storeId, - "name": name, - "image": image, - "description": description, - "status": status, - "applyStartTime": applyStartTime, - "applyEndTime": applyEndTime, - "activityStartTime": activityStartTime, - "activityEndTime": activityEndTime, - "doStartTime": doStartTime, - "doEndTime": doEndTime, - "isNeedSecurityDeposit": isNeedSecurityDeposit, - "securityDeposit": securityDeposit, - "tag": tag, - "promotionType": promotionType, - "promotionPlan": promotionPlan, - "promotionDetail": promotionDetail, - "channels": channels, - "isVip": isVip, - "isDelete": isDelete, - "tenantCode": tenantCode, - "canPartake": canPartake, - "isMaxPromotion": isMaxPromotion, - "promotionProuctList": promotionProuctList, - }; -} - -/// limitTime : "0" -/// discountRate : "0" -/// discountAmount : "0" -/// fullAmount : "0" -/// collageNumber : "0" -/// fullNumber : "1" - -class PromotionDetailBean { - String limitTime; - String discountRate; - String discountAmount; - String fullAmount; - String collageNumber; - String fullNumber; - - static PromotionDetailBean fromJson(Map map) { - if (map == null) return null; - PromotionDetailBean promotionDetailBean = PromotionDetailBean(); - promotionDetailBean.limitTime = map['limitTime']; - promotionDetailBean.discountRate = map['discountRate']; - promotionDetailBean.discountAmount = map['discountAmount']; - promotionDetailBean.fullAmount = map['fullAmount']; - promotionDetailBean.collageNumber = map['collageNumber']; - promotionDetailBean.fullNumber = map['fullNumber']; - return promotionDetailBean; - } - - Map toJson() => { - "limitTime": limitTime, - "discountRate": discountRate, - "discountAmount": discountAmount, - "fullAmount": fullAmount, - "collageNumber": collageNumber, - "fullNumber": fullNumber, - }; -} - -/// masterId : null -/// masterCardRankName : null -/// vipNo : "1379254113602109440" -/// nickname : "soon" -/// headimg : "https://thirdwx.qlogo.cn/mmopen/vi_32/TVpH76S7l3fOMZdErn7XeyWvib7bodcfBfQiaZqSDiaia9KVkC1cKmO8EL1kdLDPREacyoND9ZbJib7ZyCxzz1fQmVA/132" -/// userType : true -/// sex : "2" -/// level : 1 -/// addressId : null -/// remark : null -/// phone : "13052919193" -/// createTime : "2021-08-20 15:19:48" -/// birth : "1998-09-17" -/// balance : "10.50" -/// money : "31.12" -/// activityMoney : "0.00" -/// greenMoney : "4872.00" -/// expendAmount : "202.01" -/// organic : null -/// points : "745" -/// isBind : true -/// memberRankVo : {"id":"1462684050274648064","rankName":"白银会员","rankOrigin":69,"rankContent":"","rankImg":"https://pos.upload.lotus-wallet.com/MDAwMA==/2021/11/7453eb74-661e-42b7-b575-8accc00fcbf5.png","status":true,"nextId":"1462684471177248768","nextName":"黄金会员","nextOrigin":20000} -/// age : 24 -/// inviteCode : null -/// inviteNumber : null -/// todayInviteNumber : null -/// signature : null -/// background : null -/// certification : false -/// hasPayPassword : null -/// isVip : null -/// vipExpire : null -/// isVipSubscribe : null -/// vipDuration : null - -class MemberVo { - MemberVo({ - dynamic masterId, - dynamic masterCardRankName, - String vipNo, - String nickname, - String headimg, - bool userType, - String sex, - num level, - dynamic addressId, - dynamic remark, - String phone, - String createTime, - String birth, - String balance, - String money, - String activityMoney, - String greenMoney, - String raiseMoney, - String expendAmount, - dynamic organic, - String points, - bool isBind, - MemberRankVo memberRankVo, - num age, - dynamic inviteCode, - dynamic inviteNumber, - dynamic todayInviteNumber, - dynamic signature, - dynamic background, - bool certification, - dynamic hasPayPassword, - dynamic isVip, - dynamic vipExpire, - dynamic isVipSubscribe, - dynamic vipDuration,}){ - _masterId = masterId; - _masterCardRankName = masterCardRankName; - _vipNo = vipNo; - _nickname = nickname; - _headimg = headimg; - _userType = userType; - _sex = sex; - _level = level; - _addressId = addressId; - _remark = remark; - _phone = phone; - _createTime = createTime; - _birth = birth; - _balance = balance; - _money = money; - _activityMoney = activityMoney; - _greenMoney = greenMoney; - _raiseMoney = raiseMoney; - _expendAmount = expendAmount; - _organic = organic; - _points = points; - _isBind = isBind; - _memberRankVo = memberRankVo; - _age = age; - _inviteCode = inviteCode; - _inviteNumber = inviteNumber; - _todayInviteNumber = todayInviteNumber; - _signature = signature; - _background = background; - _certification = certification; - _hasPayPassword = hasPayPassword; - _isVip = isVip; - _vipExpire = vipExpire; - _isVipSubscribe = isVipSubscribe; - _vipDuration = vipDuration; - } - - MemberVo.fromJson(dynamic json) { - _masterId = json['masterId']; - _masterCardRankName = json['masterCardRankName']; - _vipNo = json['vipNo']; - _nickname = json['nickname']; - _headimg = json['headimg']; - _userType = json['userType']; - _sex = json['sex']; - _level = json['level']; - _addressId = json['addressId']; - _remark = json['remark']; - _phone = json['phone']; - _createTime = json['createTime']; - _birth = json['birth']; - _balance = json['balance']; - _money = json['money']; - _activityMoney = json['activityMoney']; - _greenMoney = json['greenMoney']; - _raiseMoney = json['raiseMoney']; - _expendAmount = json['expendAmount']; - _organic = json['organic']; - _points = json['points']; - _isBind = json['isBind']; - _memberRankVo = json['memberRankVo'] != null ? MemberRankVo.fromJson(json['memberRankVo']) : null; - _age = json['age']; - _inviteCode = json['inviteCode']; - _inviteNumber = json['inviteNumber']; - _todayInviteNumber = json['todayInviteNumber']; - _signature = json['signature']; - _background = json['background']; - _certification = json['certification']; - _hasPayPassword = json['hasPayPassword']; - _isVip = json['isVip']; - _vipExpire = json['vipExpire']; - _isVipSubscribe = json['isVipSubscribe']; - _vipDuration = json['vipDuration']; - } - dynamic _masterId; - dynamic _masterCardRankName; - String _vipNo; - String _nickname; - String _headimg; - bool _userType; - String _sex; - num _level; - dynamic _addressId; - dynamic _remark; - String _phone; - String _createTime; - String _birth; - String _balance; - String _money; - String _activityMoney; - String _greenMoney; - String _raiseMoney; - String _expendAmount; - dynamic _organic; - String _points; - bool _isBind; - MemberRankVo _memberRankVo; - num _age; - dynamic _inviteCode; - dynamic _inviteNumber; - dynamic _todayInviteNumber; - dynamic _signature; - dynamic _background; - bool _certification; - dynamic _hasPayPassword; - dynamic _isVip; - dynamic _vipExpire; - dynamic _isVipSubscribe; - dynamic _vipDuration; - MemberVo copyWith({ dynamic masterId, - dynamic masterCardRankName, - String vipNo, - String nickname, - String headimg, - bool userType, - String sex, - num level, - dynamic addressId, - dynamic remark, - String phone, - String createTime, - String birth, - String balance, - String money, - String activityMoney, - String greenMoney, - String raiseMoney, - String expendAmount, - dynamic organic, - String points, - bool isBind, - MemberRankVo memberRankVo, - num age, - dynamic inviteCode, - dynamic inviteNumber, - dynamic todayInviteNumber, - dynamic signature, - dynamic background, - bool certification, - dynamic hasPayPassword, - dynamic isVip, - dynamic vipExpire, - dynamic isVipSubscribe, - dynamic vipDuration, - }) => MemberVo( masterId: masterId ?? _masterId, - masterCardRankName: masterCardRankName ?? _masterCardRankName, - vipNo: vipNo ?? _vipNo, - nickname: nickname ?? _nickname, - headimg: headimg ?? _headimg, - userType: userType ?? _userType, - sex: sex ?? _sex, - level: level ?? _level, - addressId: addressId ?? _addressId, - remark: remark ?? _remark, - phone: phone ?? _phone, - createTime: createTime ?? _createTime, - birth: birth ?? _birth, - balance: balance ?? _balance, - money: money ?? _money, - activityMoney: activityMoney ?? _activityMoney, - greenMoney: greenMoney ?? _greenMoney, - raiseMoney: raiseMoney ?? _raiseMoney, - expendAmount: expendAmount ?? _expendAmount, - organic: organic ?? _organic, - points: points ?? _points, - isBind: isBind ?? _isBind, - memberRankVo: memberRankVo ?? _memberRankVo, - age: age ?? _age, - inviteCode: inviteCode ?? _inviteCode, - inviteNumber: inviteNumber ?? _inviteNumber, - todayInviteNumber: todayInviteNumber ?? _todayInviteNumber, - signature: signature ?? _signature, - background: background ?? _background, - certification: certification ?? _certification, - hasPayPassword: hasPayPassword ?? _hasPayPassword, - isVip: isVip ?? _isVip, - vipExpire: vipExpire ?? _vipExpire, - isVipSubscribe: isVipSubscribe ?? _isVipSubscribe, - vipDuration: vipDuration ?? _vipDuration, - ); - dynamic get masterId => _masterId; - dynamic get masterCardRankName => _masterCardRankName; - String get vipNo => _vipNo; - String get nickname => _nickname; - String get headimg => _headimg; - bool get userType => _userType; - String get sex => _sex; - num get level => _level; - dynamic get addressId => _addressId; - dynamic get remark => _remark; - String get phone => _phone; - String get createTime => _createTime; - String get birth => _birth; - String get balance => _balance; - String get money => _money; - String get activityMoney => _activityMoney; - String get greenMoney => _greenMoney; - String get raiseMoney => _raiseMoney; - String get expendAmount => _expendAmount; - dynamic get organic => _organic; - String get points => _points; - bool get isBind => _isBind; - MemberRankVo get memberRankVo => _memberRankVo; - num get age => _age; - dynamic get inviteCode => _inviteCode; - dynamic get inviteNumber => _inviteNumber; - dynamic get todayInviteNumber => _todayInviteNumber; - dynamic get signature => _signature; - dynamic get background => _background; - bool get certification => _certification; - dynamic get hasPayPassword => _hasPayPassword; - dynamic get isVip => _isVip; - dynamic get vipExpire => _vipExpire; - dynamic get isVipSubscribe => _isVipSubscribe; - dynamic get vipDuration => _vipDuration; - - Map toJson() { - final map = {}; - map['masterId'] = _masterId; - map['masterCardRankName'] = _masterCardRankName; - map['vipNo'] = _vipNo; - map['nickname'] = _nickname; - map['headimg'] = _headimg; - map['userType'] = _userType; - map['sex'] = _sex; - map['level'] = _level; - map['addressId'] = _addressId; - map['remark'] = _remark; - map['phone'] = _phone; - map['createTime'] = _createTime; - map['birth'] = _birth; - map['balance'] = _balance; - map['money'] = _money; - map['activityMoney'] = _activityMoney; - map['greenMoney'] = _greenMoney; - map['raiseMoney'] = _raiseMoney; - map['expendAmount'] = _expendAmount; - map['organic'] = _organic; - map['points'] = _points; - map['isBind'] = _isBind; - if (_memberRankVo != null) { - map['memberRankVo'] = _memberRankVo.toJson(); - } - map['age'] = _age; - map['inviteCode'] = _inviteCode; - map['inviteNumber'] = _inviteNumber; - map['todayInviteNumber'] = _todayInviteNumber; - map['signature'] = _signature; - map['background'] = _background; - map['certification'] = _certification; - map['hasPayPassword'] = _hasPayPassword; - map['isVip'] = _isVip; - map['vipExpire'] = _vipExpire; - map['isVipSubscribe'] = _isVipSubscribe; - map['vipDuration'] = _vipDuration; - return map; - } - -} - -/// id : "1462684050274648064" -/// rankName : "白银会员" -/// rankOrigin : 69 -/// rankContent : "" -/// rankImg : "https://pos.upload.lotus-wallet.com/MDAwMA==/2021/11/7453eb74-661e-42b7-b575-8accc00fcbf5.png" -/// status : true -/// nextId : "1462684471177248768" -/// nextName : "黄金会员" -/// nextOrigin : 20000 - -class MemberRankVo { - MemberRankVo({ - String id, - String rankName, - num rankOrigin, - String rankContent, - String rankImg, - bool status, - String nextId, - String nextName, - num nextOrigin,}){ - _id = id; - _rankName = rankName; - _rankOrigin = rankOrigin; - _rankContent = rankContent; - _rankImg = rankImg; - _status = status; - _nextId = nextId; - _nextName = nextName; - _nextOrigin = nextOrigin; - } - - MemberRankVo.fromJson(dynamic json) { - _id = json['id']; - _rankName = json['rankName']; - _rankOrigin = json['rankOrigin']; - _rankContent = json['rankContent']; - _rankImg = json['rankImg']; - _status = json['status']; - _nextId = json['nextId']; - _nextName = json['nextName']; - _nextOrigin = json['nextOrigin']; - } - String _id; - String _rankName; - num _rankOrigin; - String _rankContent; - String _rankImg; - bool _status; - String _nextId; - String _nextName; - num _nextOrigin; - MemberRankVo copyWith({ String id, - String rankName, - num rankOrigin, - String rankContent, - String rankImg, - bool status, - String nextId, - String nextName, - num nextOrigin, - }) => MemberRankVo( id: id ?? _id, - rankName: rankName ?? _rankName, - rankOrigin: rankOrigin ?? _rankOrigin, - rankContent: rankContent ?? _rankContent, - rankImg: rankImg ?? _rankImg, - status: status ?? _status, - nextId: nextId ?? _nextId, - nextName: nextName ?? _nextName, - nextOrigin: nextOrigin ?? _nextOrigin, - ); - String get id => _id; - String get rankName => _rankName; - num get rankOrigin => _rankOrigin; - String get rankContent => _rankContent; - String get rankImg => _rankImg; - bool get status => _status; - String get nextId => _nextId; - String get nextName => _nextName; - num get nextOrigin => _nextOrigin; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['rankName'] = _rankName; - map['rankOrigin'] = _rankOrigin; - map['rankContent'] = _rankContent; - map['rankImg'] = _rankImg; - map['status'] = _status; - map['nextId'] = _nextId; - map['nextName'] = _nextName; - map['nextOrigin'] = _nextOrigin; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/settlement_bean.dart b/lib/retrofit/data/settlement_bean.dart deleted file mode 100644 index c932fbe7..00000000 --- a/lib/retrofit/data/settlement_bean.dart +++ /dev/null @@ -1,143 +0,0 @@ -import 'package:huixiang/retrofit/data/order_product_vo.dart'; - -/// addressId : 0 -/// buyNum : 0 -/// id : 0 -/// is_logistics : true -/// orderProductVOList : [{"actInfo":{"couponDiscountAmount":0,"couponDiscountRate":0,"couponId":0,"couponType":0,"discountAmount":0,"discountRate":0,"promotionId":0,"promotionType":0},"additionalComment":{"bizType":0,"commentImgs":"","commentImgsFlag":true,"commentStar":0,"commentText":"","descStar":0,"hideFlag":true,"id":0,"isDelete":true,"likeNum":0,"logisticsStar":0,"mid":0,"orderProductId":0,"parentId":0,"productId":0,"sensitiveFlag":true,"serviceStar":0,"storeId":0},"buyNum":0,"canApplyIntervention":0,"comment":{"bizType":0,"commentImgs":"","commentImgsFlag":true,"commentStar":0,"commentText":"","descStar":0,"hideFlag":true,"id":0,"isDelete":true,"likeNum":0,"logisticsStar":0,"mid":0,"orderProductId":0,"parentId":0,"productId":0,"sensitiveFlag":true,"serviceStar":0,"storeId":0},"commentStatus":0,"discountAmount":0,"id":0,"productId":0,"productName":"","returnCode":"","returnStatus":0,"returnType":0,"sellPrice":0,"skuId":0,"skuImg":"","skuNameStr":""}] -/// payChannel : 0 -/// promotionInfoDTO : {"couponId":0,"promotionId":0} - -class SettlementBean { - - SettlementBean({ - int addressId, - int buyNum, - int id, - bool isLogistics, - List orderProductVOList, - int payChannel, - PromotionInfoDTO promotionInfoDTO,}){ - _addressId = addressId; - _buyNum = buyNum; - _id = id; - _isLogistics = isLogistics; - _orderProductVOList = orderProductVOList; - _payChannel = payChannel; - _promotionInfoDTO = promotionInfoDTO; -} - - SettlementBean.fromJson(dynamic json) { - _addressId = json['addressId']; - _buyNum = json['buyNum']; - _id = json['id']; - _isLogistics = json['is_logistics']; - if (json['orderProductVOList'] != null) { - _orderProductVOList = []; - json['orderProductVOList'].forEach((v) { - _orderProductVOList.add(OrderProductVOList.fromJson(v)); - }); - } - _payChannel = json['payChannel']; - _promotionInfoDTO = json['promotionInfoDTO'] != null ? PromotionInfoDTO.fromJson(json['promotionInfoDTO']) : null; - } - int _addressId; - int _buyNum; - int _id; - bool _isLogistics; - List _orderProductVOList; - int _payChannel; - PromotionInfoDTO _promotionInfoDTO; - - int get addressId => _addressId; - int get buyNum => _buyNum; - int get id => _id; - bool get isLogistics => _isLogistics; - List get orderProductVOList => _orderProductVOList; - int get payChannel => _payChannel; - PromotionInfoDTO get promotionInfoDTO => _promotionInfoDTO; - - - Map toJson() { - final map = {}; - map['addressId'] = _addressId; - map['buyNum'] = _buyNum; - map['id'] = _id; - map['is_logistics'] = _isLogistics; - if (_orderProductVOList != null) { - map['orderProductVOList'] = _orderProductVOList.map((v) => v.toJson()).toList(); - } - map['payChannel'] = _payChannel; - if (_promotionInfoDTO != null) { - map['promotionInfoDTO'] = _promotionInfoDTO.toJson(); - } - return map; - } - - set addressId(int value) { - _addressId = value; - } - - set buyNum(int value) { - _buyNum = value; - } - - set id(int value) { - _id = value; - } - - set isLogistics(bool value) { - _isLogistics = value; - } - - set orderProductVOList(List value) { - _orderProductVOList = value; - } - - set payChannel(int value) { - _payChannel = value; - } - - set promotionInfoDTO(PromotionInfoDTO value) { - _promotionInfoDTO = value; - } -} - -/// couponId : 0 -/// promotionId : 0 - -class PromotionInfoDTO { - PromotionInfoDTO({ - int couponId, - int promotionId,}){ - _couponId = couponId; - _promotionId = promotionId; -} - - PromotionInfoDTO.fromJson(dynamic json) { - _couponId = json['couponId']; - _promotionId = json['promotionId']; - } - int _couponId; - int _promotionId; - - int get couponId => _couponId; - int get promotionId => _promotionId; - - - set couponId(int value) { - _couponId = value; - } - - Map toJson() { - final map = {}; - map['couponId'] = _couponId; - map['promotionId'] = _promotionId; - return map; - } - - set promotionId(int value) { - _promotionId = value; - } -} - diff --git a/lib/retrofit/data/shoppingCart.dart b/lib/retrofit/data/shoppingCart.dart deleted file mode 100644 index 489fd961..00000000 --- a/lib/retrofit/data/shoppingCart.dart +++ /dev/null @@ -1,528 +0,0 @@ -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; - -/// cartSum : 0 -/// selectDiscount:2 -/// numberOfPeople : 0 -/// selected : 0 -/// shoppingCartSkuItemList : [{"buyNum":0,"createTime":"","groupId":0,"id":0,"platterList":[{"deleted":true,"id":0,"productId":0,"required":true,"skuId":0}],"productId":0,"productName":"","selected":0,"skuImg":"","skuName":"","skuPrice":0,"skuStock":0,"storeId":0,"tableId":0}] -/// storeId : 0 -/// storeName : "" -/// tableId : 0 - -class ShoppingCart { - String cartSum; - int numberOfPeople; - int selected; - List shoppingCartSkuItemList; - String storeId; - int selectDiscount; - String storeName; - String tableId; - List promotionInfoList; - List couponList; - - static ShoppingCart fromJson(Map map) { - if (map == null) return null; - ShoppingCart shoppingCartBean = ShoppingCart(); - shoppingCartBean.cartSum = map['cartSum']; - shoppingCartBean.numberOfPeople = map['numberOfPeople']; - shoppingCartBean.selected = map['selected']; - shoppingCartBean.shoppingCartSkuItemList = []..addAll( - (map['shoppingCartSkuItemList'] as List ?? []).map((o) => ShoppingCartSkuItemListBean.fromJson(o)) - ); - shoppingCartBean.storeId = map['storeId']; - shoppingCartBean.storeName = map['storeName']; - shoppingCartBean.selectDiscount = map['selectDiscount']; - shoppingCartBean.tableId = map['tableId']; - shoppingCartBean.promotionInfoList = List()..addAll( - (map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBeans.fromJson(o)) - ); - shoppingCartBean.couponList = List()..addAll( - (map['couponList'] as List ?? []).map((o) => CouponListBeans.fromJson(o)) - ); - return shoppingCartBean; - } - - Map toJson() => { - "cartSum": cartSum, - "numberOfPeople": numberOfPeople, - "selected": selected, - "shoppingCartSkuItemList": shoppingCartSkuItemList == null ? null : shoppingCartSkuItemList.map((e) => e.toJson()).toList(), - "storeId": storeId, - "storeName": storeName, - "selectDiscount" : selectDiscount, - "tableId": tableId, - "promotionInfoList": promotionInfoList, - }; -} - -/// buyNum : 0 -/// createTime : "" -/// groupId : 0 -/// id : 0 -/// platterList : [{"deleted":true,"id":0,"productId":0,"required":true,"skuId":0}] -/// productId : 0 -/// productName : "" -/// selected : 0 -/// skuImg : "" -/// skuName : "" -/// skuPrice : 0 -/// skuStock : 0 -/// storeId : 0 -/// tableId : 0 - -class ShoppingCartSkuItemListBean { - int buyNum; - String createTime; - String groupId; - String id; - List platterList; - List setMealDataList; - String productId; - String productName; - String skuId; - int selected; - String skuImg; - String skuName; - String skuPrice; - int skuStock; - String storeId; - String tableId; - - static ShoppingCartSkuItemListBean fromJson(Map map) { - if (map == null) return null; - ShoppingCartSkuItemListBean shoppingCartSkuItemListBean = ShoppingCartSkuItemListBean(); - shoppingCartSkuItemListBean.buyNum = map['buyNum']; - shoppingCartSkuItemListBean.createTime = map['createTime']; - shoppingCartSkuItemListBean.groupId = map['groupId']; - shoppingCartSkuItemListBean.id = map['id']; - shoppingCartSkuItemListBean.platterList = []..addAll( - (map['platterList'] as List ?? []).map((o) => PlatterListBean.fromJson(o)) - ); - shoppingCartSkuItemListBean.setMealDataList = []..addAll( - (map['setMealDataList'] as List ?? []).map((o) => SetMealDataList.fromJson(o)) - ); - shoppingCartSkuItemListBean.productId = map['productId']; - shoppingCartSkuItemListBean.skuId = map['skuId']; - shoppingCartSkuItemListBean.productName = map['productName']; - shoppingCartSkuItemListBean.selected = map['selected']; - shoppingCartSkuItemListBean.skuImg = map['skuImg']; - shoppingCartSkuItemListBean.skuName = map['skuName']; - shoppingCartSkuItemListBean.skuPrice = map['skuPrice']; - shoppingCartSkuItemListBean.skuStock = map['skuStock']; - shoppingCartSkuItemListBean.storeId = map['storeId']; - shoppingCartSkuItemListBean.tableId = map['tableId']; - return shoppingCartSkuItemListBean; - } - - Map toJson() => { - "buyNum": buyNum, - "createTime": createTime, - "groupId": groupId, - "id": id, - "platterList": platterList, - "setMealDataList":setMealDataList, - "productId": productId, - "skuId": skuId, - "productName": productName, - "selected": selected, - "skuImg": skuImg, - "skuName": skuName, - "skuPrice": skuPrice, - "skuStock": skuStock, - "storeId": storeId, - "tableId": tableId, - }; -} - -/// deleted : true -/// id : 0 -/// productId : 0 -/// required : true -/// skuId : 0 - -class PlatterListBean { - bool deleted; - int id; - int productId; - bool required; - String skuId; - - static PlatterListBean fromJson(Map map) { - if (map == null) return null; - PlatterListBean platterListBean = PlatterListBean(); - platterListBean.deleted = map['deleted']; - platterListBean.id = map['id']; - platterListBean.productId = map['productId']; - platterListBean.required = map['required']; - platterListBean.skuId = map['skuId']; - return platterListBean; - } - - Map toJson() => { - "deleted": deleted, - "id": id, - "productId": productId, - "required": required, - "skuId": skuId, - }; -} -/// groupName : "锅底2选1" -/// productInfoList : [{"skuId":"1491652895857180672","skuName":"中辣","buyNumber":1,"productId":"1315903449707053056","sellPrice":48.0,"productName":"牛棒骨汤鸳鸯锅"}] - -class SetMealDataList { - SetMealDataList({ - String groupName, - List productInfoList,}){ - _groupName = groupName; - _productInfoList = productInfoList; - } - - SetMealDataList.fromJson(dynamic json) { - _groupName = json['groupName']; - if (json['productInfoList'] != null) { - _productInfoList = []; - json['productInfoList'].forEach((v) { - _productInfoList.add(ProductInfoList.fromJson(v)); - }); - } - } - String _groupName; - List _productInfoList; - SetMealDataList copyWith({ String groupName, - List productInfoList, - }) => SetMealDataList( groupName: groupName ?? _groupName, - productInfoList: productInfoList ?? _productInfoList, - ); - String get groupName => _groupName; - List get productInfoList => _productInfoList; - - Map toJson() { - final map = {}; - map['groupName'] = _groupName; - if (_productInfoList != null) { - map['productInfoList'] = _productInfoList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// skuId : "1491652895857180672" -/// skuName : "中辣" -/// buyNumber : 1 -/// productId : "1315903449707053056" -/// sellPrice : 48.0 -/// productName : "牛棒骨汤鸳鸯锅" - -class ProductInfoList { - ProductInfoList({ - String skuId, - String skuName, - int buyNumber, - String productId, - dynamic sellPrice, - String productName,}){ - _skuId = skuId; - _skuName = skuName; - _buyNumber = buyNumber; - _productId = productId; - _sellPrice = sellPrice; - _productName = productName; - } - - ProductInfoList.fromJson(dynamic json) { - _skuId = json['skuId']; - _skuName = json['skuName']; - _buyNumber = json['buyNumber']; - _productId = json['productId']; - _sellPrice = json['sellPrice']; - _productName = json['productName']; - } - String _skuId; - String _skuName; - int _buyNumber; - String _productId; - dynamic _sellPrice; - String _productName; - ProductInfoList copyWith({ String skuId, - String skuName, - int buyNumber, - String productId, - dynamic sellPrice, - String productName, - }) => ProductInfoList( skuId: skuId ?? _skuId, - skuName: skuName ?? _skuName, - buyNumber: buyNumber ?? _buyNumber, - productId: productId ?? _productId, - sellPrice: sellPrice ?? _sellPrice, - productName: productName ?? _productName, - ); - String get skuId => _skuId; - String get skuName => _skuName; - int get buyNumber => _buyNumber; - String get productId => _productId; - dynamic get sellPrice => _sellPrice; - String get productName => _productName; - - Map toJson() { - final map = {}; - map['skuId'] = _skuId; - map['skuName'] = _skuName; - map['buyNumber'] = _buyNumber; - map['productId'] = _productId; - map['sellPrice'] = _sellPrice; - map['productName'] = _productName; - return map; - } - -} - -/// id : "1437254523520286720" -/// createTime : "2021-09-13 11:19:16" -/// createUser : "1333246101196636160" -/// updateTime : "2021-09-13 17:30:00" -/// updateUser : "0" -/// storeId : "1433719074906439680" -/// name : "�����ŵ�" -/// image : "https://pos.upload.gznl.top/1175/2021/09/44d60dab-0ae3-4d07-b624-50b8ab99d0fc.jpg" -/// description : "1" -/// status : 4 -/// applyStartTime : "2021-09-13 11:19:16" -/// applyEndTime : "2021-09-13 11:19:16" -/// activityStartTime : "2021-09-01 00:00:00" -/// activityEndTime : "2021-10-30 00:00:00" -/// doStartTime : null -/// doEndTime : null -/// isNeedSecurityDeposit : 0 -/// securityDeposit : "0" -/// tag : "11" -/// promotionType : 1 -/// promotionPlan : 0 -/// promotionDetail : [{"limitTime":"0","discountRate":"0","discountAmount":"0","fullAmount":"0","collageNumber":"0","fullNumber":"1"}] -/// channels : ["MINI","POS"] -/// isVip : false -/// isDelete : 0 -/// tenantCode : "1175" -/// canPartake : true -/// isMaxPromotion : true -/// promotionProuctList : null - -class PromotionInfoListBeans { - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String storeId; - String name; - String image; - String description; - int status; - String applyStartTime; - String applyEndTime; - String activityStartTime; - String activityEndTime; - dynamic doStartTime; - dynamic doEndTime; - int isNeedSecurityDeposit; - String securityDeposit; - String tag; - int promotionType; - int promotionPlan; - List promotionDetail; - List channels; - bool isVip; - int isDelete; - String tenantCode; - bool canPartake; - bool isMaxPromotion; - dynamic promotionProuctList; - - static PromotionInfoListBeans fromJson(Map map) { - if (map == null) return null; - PromotionInfoListBeans promotionInfoListBeans = PromotionInfoListBeans(); - promotionInfoListBeans.id = map['id']; - promotionInfoListBeans.createTime = map['createTime']; - promotionInfoListBeans.createUser = map['createUser']; - promotionInfoListBeans.updateTime = map['updateTime']; - promotionInfoListBeans.updateUser = map['updateUser']; - promotionInfoListBeans.storeId = map['storeId']; - promotionInfoListBeans.name = map['name']; - promotionInfoListBeans.image = map['image']; - promotionInfoListBeans.description = map['description']; - promotionInfoListBeans.status = map['status']; - promotionInfoListBeans.applyStartTime = map['applyStartTime']; - promotionInfoListBeans.applyEndTime = map['applyEndTime']; - promotionInfoListBeans.activityStartTime = map['activityStartTime']; - promotionInfoListBeans.activityEndTime = map['activityEndTime']; - promotionInfoListBeans.doStartTime = map['doStartTime']; - promotionInfoListBeans.doEndTime = map['doEndTime']; - promotionInfoListBeans.isNeedSecurityDeposit = map['isNeedSecurityDeposit']; - promotionInfoListBeans.securityDeposit = map['securityDeposit']; - promotionInfoListBeans.tag = map['tag']; - promotionInfoListBeans.promotionType = map['promotionType']; - promotionInfoListBeans.promotionPlan = map['promotionPlan']; - promotionInfoListBeans.promotionDetail = List()..addAll( - (map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o)) - ); - promotionInfoListBeans.channels = List()..addAll( - (map['channels'] as List ?? []).map((o) => o.toString()) - ); - promotionInfoListBeans.isVip = map['isVip']; - promotionInfoListBeans.isDelete = map['isDelete']; - promotionInfoListBeans.tenantCode = map['tenantCode']; - promotionInfoListBeans.canPartake = map['canPartake']; - promotionInfoListBeans.isMaxPromotion = map['isMaxPromotion']; - promotionInfoListBeans.promotionProuctList = map['promotionProuctList']; - return promotionInfoListBeans; - } - - Map toJson() => { - "id": id, - "createTime": createTime, - "createUser": createUser, - "updateTime": updateTime, - "updateUser": updateUser, - "storeId": storeId, - "name": name, - "image": image, - "description": description, - "status": status, - "applyStartTime": applyStartTime, - "applyEndTime": applyEndTime, - "activityStartTime": activityStartTime, - "activityEndTime": activityEndTime, - "doStartTime": doStartTime, - "doEndTime": doEndTime, - "isNeedSecurityDeposit": isNeedSecurityDeposit, - "securityDeposit": securityDeposit, - "tag": tag, - "promotionType": promotionType, - "promotionPlan": promotionPlan, - "promotionDetail": promotionDetail, - "channels": channels, - "isVip": isVip, - "isDelete": isDelete, - "tenantCode": tenantCode, - "canPartake": canPartake, - "isMaxPromotion": isMaxPromotion, - "promotionProuctList": promotionProuctList, - }; -} - -/// id : "1448907890034212864" -/// storeId : "1333246101343436800" -/// bizType : 1 -/// fullAmount : "10.00" -/// discountAmount : "8.00" -/// fullNumber : 1 -/// discountPercent : 100 -/// bizId : "" -/// publishStartTime : "2021-10-01" -/// publishEndTime : "2021-10-29" -/// useStartTime : "2021-10-02" -/// useEndTime : "2021-10-31" -/// promotionId : "0" -/// mid : "1438443365845696512" -/// couponId : "1448902034085380096" -/// receiveTime : "2021-10-15" -/// useTime : null -/// status : 1 -/// tenantCode : "1175" -/// type : 1 -/// promotionName : "��10-8" -/// usable : true -/// allProduct : true -/// isMaxCoupon:true -/// productList : null - -class CouponListBeans { - String id; - String storeId; - int bizType; - String fullAmount; - String discountAmount; - int fullNumber; - int discountPercent; - String bizId; - String publishStartTime; - String publishEndTime; - String useStartTime; - String useEndTime; - String promotionId; - dynamic mid; - String couponId; - String receiveTime; - dynamic useTime; - int status; - String tenantCode; - int type; - String promotionName; - bool usable; - bool allProduct; - bool isMaxCoupon; - dynamic productList; - bool isEx; - - - static CouponListBeans fromJson(Map map) { - if (map == null) return null; - CouponListBeans couponListBeans = CouponListBeans(); - couponListBeans.id = map['id']; - couponListBeans.storeId = map['storeId']; - couponListBeans.bizType = map['bizType']; - couponListBeans.fullAmount = map['fullAmount']; - couponListBeans.discountAmount = map['discountAmount']; - couponListBeans.fullNumber = map['fullNumber']; - couponListBeans.discountPercent = map['discountPercent']; - couponListBeans.bizId = map['bizId']; - couponListBeans.publishStartTime = map['publishStartTime']; - couponListBeans.publishEndTime = map['publishEndTime']; - couponListBeans.useStartTime = map['useStartTime']; - couponListBeans.useEndTime = map['useEndTime']; - couponListBeans.promotionId = map['promotionId']; - couponListBeans.mid = map['mid']; - couponListBeans.couponId = map['couponId']; - couponListBeans.receiveTime = map['receiveTime']; - couponListBeans.useTime = map['useTime']; - couponListBeans.status = map['status']; - couponListBeans.tenantCode = map['tenantCode']; - couponListBeans.type = map['type']; - couponListBeans.promotionName = map['promotionName']; - couponListBeans.usable = map['usable']; - couponListBeans.allProduct = map['allProduct']; - couponListBeans.isMaxCoupon = map['isMaxCoupon']; - couponListBeans.productList = map['productList']; - return couponListBeans; - } - - Map toJson() => { - "id": id, - "storeId": storeId, - "bizType": bizType, - "fullAmount": fullAmount, - "discountAmount": discountAmount, - "fullNumber": fullNumber, - "discountPercent": discountPercent, - "bizId": bizId, - "publishStartTime": publishStartTime, - "publishEndTime": publishEndTime, - "useStartTime": useStartTime, - "useEndTime": useEndTime, - "promotionId": promotionId, - "mid": mid, - "couponId": couponId, - "receiveTime": receiveTime, - "useTime": useTime, - "status": status, - "tenantCode": tenantCode, - "type": type, - "promotionName": promotionName, - "usable": usable, - "allProduct": allProduct, - "isMaxCoupon": isMaxCoupon, - "productList": productList, - - }; -} \ No newline at end of file diff --git a/lib/retrofit/data/shopping_home_config.dart b/lib/retrofit/data/shopping_home_config.dart deleted file mode 100644 index 7ebb21ad..00000000 --- a/lib/retrofit/data/shopping_home_config.dart +++ /dev/null @@ -1,740 +0,0 @@ -/// specialArea : [{"img":"https://pos.upload.gznl.top/1179/2021/12/fe209ded-a504-4319-9c8d-6d8478785e78.jpg","id":"1064355492","productList":[{"productImg":"https://pos.upload.gznl.top/1179/2021/12/755b69d6-0047-44fe-9593-edac72fb9982.png","productSkuVOList":[{"productId":"1473532887297949696","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"25.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:56:32","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888409440256","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532887918706688","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:56:32","attrId":"1473532887704797184","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888619155456","skuId":"1473532888409440256"}],"skuCode":"P202112221356324"}],"productName":"有机草莓干","posShow":true,"attrList":[{"productId":"1473532887297949696","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532887704797184","id":"1473532887918706688","attrValue":"","attrValueImg":""}],"id":"1473532887704797184","attrName":""}],"price":"25.00","sellCount":0,"id":"1473532887297949696","applyPrice":"0.00","stock":0,"status":1},{"productImg":"https://pos.upload.gznl.top/1179/2021/12/c24dbb2c-91b9-47be-85c5-d9f05ffa4d59.png","productSkuVOList":[{"productId":"1473532682649468928","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"35.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:55:44","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:55:44","createUser":"1364043181062094848","id":"1473532684721455104","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532683257643008","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:55:44","attrId":"1473532683052122112","createTime":"2021-12-22 13:55:44","createUser":"1364043181062094848","id":"1473532684935364608","skuId":"1473532684721455104"}],"skuCode":"P202112221355432"}],"productName":"有机午餐一顿","posShow":true,"attrList":[{"productId":"1473532682649468928","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532683052122112","id":"1473532683257643008","attrValue":"","attrValueImg":""}],"id":"1473532683052122112","attrName":""}],"price":"35.00","sellCount":0,"id":"1473532682649468928","applyPrice":"0.00","stock":0,"status":1}]},{"img":"https://pos.upload.gznl.top/1179/2021/12/24fe72c9-8a2b-4a9d-968f-2037d71a1705.jpg","id":"8828438334","productList":[{"productImg":"https://pos.upload.gznl.top/1179/2021/12/755b69d6-0047-44fe-9593-edac72fb9982.png","productSkuVOList":[{"productId":"1473532887297949696","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"25.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:56:32","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888409440256","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532887918706688","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:56:32","attrId":"1473532887704797184","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888619155456","skuId":"1473532888409440256"}],"skuCode":"P202112221356324"}],"productName":"有机草莓干","posShow":true,"attrList":[{"productId":"1473532887297949696","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532887704797184","id":"1473532887918706688","attrValue":"","attrValueImg":""}],"id":"1473532887704797184","attrName":""}],"price":"25.00","sellCount":0,"id":"1473532887297949696","applyPrice":"0.00","stock":0,"status":1},{"productImg":"https://pos.upload.gznl.top/1179/2021/12/c24dbb2c-91b9-47be-85c5-d9f05ffa4d59.png","productSkuVOList":[{"productId":"1473532682649468928","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"35.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:55:44","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:55:44","createUser":"1364043181062094848","id":"1473532684721455104","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532683257643008","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:55:44","attrId":"1473532683052122112","createTime":"2021-12-22 13:55:44","createUser":"1364043181062094848","id":"1473532684935364608","skuId":"1473532684721455104"}],"skuCode":"P202112221355432"}],"productName":"有机午餐一顿","posShow":true,"attrList":[{"productId":"1473532682649468928","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532683052122112","id":"1473532683257643008","attrValue":"","attrValueImg":""}],"id":"1473532683052122112","attrName":""}],"price":"35.00","sellCount":0,"id":"1473532682649468928","applyPrice":"0.00","stock":0,"status":1},{"productImg":"https://pos.upload.gznl.top/1179/2021/12/1bff0936-f2a2-401e-befd-e00b416763ad.png","productSkuVOList":[{"productId":"1473532263365869568","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"49.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:54:03","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:54:03","createUser":"1364043181062094848","id":"1473532264519303168","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532264032763904","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:54:03","attrId":"1473532263827243008","createTime":"2021-12-22 13:54:03","createUser":"1364043181062094848","id":"1473532264716435456","skuId":"1473532264519303168"}],"skuCode":"P202112221354035"}],"productName":"回乡牛公仔","posShow":true,"attrList":[{"productId":"1473532263365869568","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532263827243008","id":"1473532264032763904","attrValue":"","attrValueImg":""}],"id":"1473532263827243008","attrName":""}],"price":"49.00","sellCount":0,"id":"1473532263365869568","applyPrice":"0.00","stock":0,"status":1},{"productImg":"https://pos.upload.gznl.top/1179/2021/12/eff19bf8-8986-4b14-aa3a-b39dd7df70ab.png","productSkuVOList":[{"productId":"1473532108914819072","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"66.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:53:27","storeId":"1364043181120815104","volume":0,"skuNameStr":"箱装5000g","createTime":"2021-12-22 13:53:27","createUser":"1364043181062094848","id":"1473532110689009664","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532109816594432","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:53:27","attrId":"1473532109514604544","createTime":"2021-12-22 13:53:27","createUser":"1364043181062094848","id":"1473532110915502080","skuId":"1473532110689009664"}],"skuCode":"P202112221353262"},{"productId":"1473532108914819072","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"15.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:53:27","storeId":"1364043181120815104","volume":0,"skuNameStr":"袋装1000g","createTime":"2021-12-22 13:53:27","createUser":"1364043181062094848","id":"1473532111414624256","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532110051475456","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:53:27","attrId":"1473532109514604544","createTime":"2021-12-22 13:53:27","createUser":"1364043181062094848","id":"1473532111624339456","skuId":"1473532111414624256"}],"skuCode":"P202112221353263"}],"productName":"正宗芒果干","posShow":true,"attrList":[{"productId":"1473532108914819072","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532109514604544","id":"1473532109816594432","attrValue":"箱装5000g","attrValueImg":""},{"isDelete":0,"attrId":"1473532109514604544","id":"1473532110051475456","attrValue":"袋装1000g","attrValueImg":""}],"id":"1473532109514604544","attrName":"规格"}],"price":"15.00","sellCount":0,"id":"1473532108914819072","applyPrice":"0.00","stock":0,"status":1}]}] -/// quickEntry : [{"img":"https://pos.upload.gznl.top/1179/2021/12/df9db6ba-4ef8-4962-8ae0-57a7d8140462.png","url":"/router/activity_prefecture_details?type=1","id":"4072162773"},{"img":"https://pos.upload.gznl.top/1179/2021/12/56d86c69-4044-4b08-818f-7cda2ae384d0.png","url":"/router/activity_prefecture_details?type=2","id":"4166165221"},{"img":"https://pos.upload.gznl.top/1179/2021/12/ef7da2a6-d501-424e-bc45-4d9f3f315f36.png","url":"/router/activity_prefecture_d3tails?type=3","id":"2717561527"}] -/// hotSearch : ["好","可以","verygod ","ssad","asda"] -/// categoryGroup : [{"groupList":[{"isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:50:12","groupImg":"https://pos.upload.gznl.top/1179/2021/12/4ff84bf7-1fca-4034-94e7-1c657917716f.png","sort":1,"storeId":"1364043181120815104","groupName":"回乡水果","createTime":"2021-12-22 13:50:12","kitchenGroup":0,"printerId":"1473531135496552448","createUser":"1364043181062094848","isCharge":0,"id":"1473531295907708928"},{"isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:51:41","groupImg":"https://pos.upload.gznl.top/1179/2021/12/506f72e7-86b8-4bcb-a55b-b48572675d2f.png","sort":1,"storeId":"1364043181120815104","groupName":"回乡周边","createTime":"2021-12-22 13:51:41","kitchenGroup":0,"printerId":"1473531135496552448","createUser":"1364043181062094848","isCharge":0,"id":"1473531667711787008"},{"isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:55:04","groupImg":"https://pos.upload.gznl.top/1179/2021/12/9864e0ba-dbb2-4bfd-935e-7fc4c0580760.png","sort":1,"storeId":"1364043181120815104","groupName":"回乡门票","createTime":"2021-12-22 13:55:04","kitchenGroup":0,"printerId":"1473531135496552448","createUser":"1364043181062094848","isCharge":0,"id":"1473532517066735616"}],"groupCommodityName":"22","name":"22"},{"groupList":[],"groupCommodityName":"2244","name":"2244"},{"groupList":[],"groupCommodityName":"224455","name":"224455"},{"groupList":[],"groupCommodityName":"22445566","name":"22445566"}] - -class ShoppingHomeConfig { - ShoppingHomeConfig({ - List specialArea, - List quickEntry, - List hotSearch, - List categoryGroup,}){ - _specialArea = specialArea; - _quickEntry = quickEntry; - _hotSearch = hotSearch; - _categoryGroup = categoryGroup; -} - - ShoppingHomeConfig.fromJson(dynamic json) { - if (json['specialArea'] != null) { - _specialArea = []; - json['specialArea'].forEach((v) { - _specialArea.add(SpecialArea.fromJson(v)); - }); - } - if (json['quickEntry'] != null) { - _quickEntry = []; - json['quickEntry'].forEach((v) { - _quickEntry.add(QuickEntry.fromJson(v)); - }); - } - _hotSearch = json['hotSearch'] != null ? json['hotSearch'].cast() : []; - if (json['categoryGroup'] != null) { - _categoryGroup = []; - json['categoryGroup'].forEach((v) { - _categoryGroup.add(CategoryGroup.fromJson(v)); - }); - } - } - List _specialArea; - List _quickEntry; - List _hotSearch; - List _categoryGroup; - - List get specialArea => _specialArea; - List get quickEntry => _quickEntry; - List get hotSearch => _hotSearch; - List get categoryGroup => _categoryGroup; - - Map toJson() { - final map = {}; - if (_specialArea != null) { - map['specialArea'] = _specialArea.map((v) => v.toJson()).toList(); - } - if (_quickEntry != null) { - map['quickEntry'] = _quickEntry.map((v) => v.toJson()).toList(); - } - map['hotSearch'] = _hotSearch; - if (_categoryGroup != null) { - map['categoryGroup'] = _categoryGroup.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// groupList : [{"isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:50:12","groupImg":"https://pos.upload.gznl.top/1179/2021/12/4ff84bf7-1fca-4034-94e7-1c657917716f.png","sort":1,"storeId":"1364043181120815104","groupName":"回乡水果","createTime":"2021-12-22 13:50:12","kitchenGroup":0,"printerId":"1473531135496552448","createUser":"1364043181062094848","isCharge":0,"id":"1473531295907708928"},{"isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:51:41","groupImg":"https://pos.upload.gznl.top/1179/2021/12/506f72e7-86b8-4bcb-a55b-b48572675d2f.png","sort":1,"storeId":"1364043181120815104","groupName":"回乡周边","createTime":"2021-12-22 13:51:41","kitchenGroup":0,"printerId":"1473531135496552448","createUser":"1364043181062094848","isCharge":0,"id":"1473531667711787008"},{"isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:55:04","groupImg":"https://pos.upload.gznl.top/1179/2021/12/9864e0ba-dbb2-4bfd-935e-7fc4c0580760.png","sort":1,"storeId":"1364043181120815104","groupName":"回乡门票","createTime":"2021-12-22 13:55:04","kitchenGroup":0,"printerId":"1473531135496552448","createUser":"1364043181062094848","isCharge":0,"id":"1473532517066735616"}] -/// groupCommodityName : "22" -/// name : "22" - -class CategoryGroup { - CategoryGroup({ - List groupList, - String groupCommodityName, - String name,}){ - _groupList = groupList; - _groupCommodityName = groupCommodityName; - _name = name; -} - - CategoryGroup.fromJson(dynamic json) { - if (json['groupList'] != null) { - _groupList = []; - json['groupList'].forEach((v) { - _groupList.add(GroupList.fromJson(v)); - }); - } - _groupCommodityName = json['groupCommodityName']; - _name = json['name']; - } - List _groupList; - String _groupCommodityName; - String _name; - - List get groupList => _groupList; - String get groupCommodityName => _groupCommodityName; - String get name => _name; - - Map toJson() { - final map = {}; - if (_groupList != null) { - map['groupList'] = _groupList.map((v) => v.toJson()).toList(); - } - map['groupCommodityName'] = _groupCommodityName; - map['name'] = _name; - return map; - } - -} - -/// isDelete : 0 -/// updateUser : "1364043181062094848" -/// updateTime : "2021-12-22 13:50:12" -/// groupImg : "https://pos.upload.gznl.top/1179/2021/12/4ff84bf7-1fca-4034-94e7-1c657917716f.png" -/// sort : 1 -/// storeId : "1364043181120815104" -/// groupName : "回乡水果" -/// createTime : "2021-12-22 13:50:12" -/// kitchenGroup : 0 -/// printerId : "1473531135496552448" -/// createUser : "1364043181062094848" -/// isCharge : 0 -/// id : "1473531295907708928" - -class GroupList { - GroupList({ - int isDelete, - String updateUser, - String updateTime, - String groupImg, - int sort, - String storeId, - String groupName, - String createTime, - int kitchenGroup, - String printerId, - String createUser, - int isCharge, - String id,}){ - _isDelete = isDelete; - _updateUser = updateUser; - _updateTime = updateTime; - _groupImg = groupImg; - _sort = sort; - _storeId = storeId; - _groupName = groupName; - _createTime = createTime; - _kitchenGroup = kitchenGroup; - _printerId = printerId; - _createUser = createUser; - _isCharge = isCharge; - _id = id; -} - - GroupList.fromJson(dynamic json) { - _isDelete = json['isDelete']; - _updateUser = json['updateUser']; - _updateTime = json['updateTime']; - _groupImg = json['groupImg']; - _sort = json['sort']; - _storeId = json['storeId']; - _groupName = json['groupName']; - _createTime = json['createTime']; - _kitchenGroup = json['kitchenGroup']; - _printerId = json['printerId']; - _createUser = json['createUser']; - _isCharge = json['isCharge']; - _id = json['id']; - } - int _isDelete; - String _updateUser; - String _updateTime; - String _groupImg; - int _sort; - String _storeId; - String _groupName; - String _createTime; - int _kitchenGroup; - String _printerId; - String _createUser; - int _isCharge; - String _id; - - int get isDelete => _isDelete; - String get updateUser => _updateUser; - String get updateTime => _updateTime; - String get groupImg => _groupImg; - int get sort => _sort; - String get storeId => _storeId; - String get groupName => _groupName; - String get createTime => _createTime; - int get kitchenGroup => _kitchenGroup; - String get printerId => _printerId; - String get createUser => _createUser; - int get isCharge => _isCharge; - String get id => _id; - - Map toJson() { - final map = {}; - map['isDelete'] = _isDelete; - map['updateUser'] = _updateUser; - map['updateTime'] = _updateTime; - map['groupImg'] = _groupImg; - map['sort'] = _sort; - map['storeId'] = _storeId; - map['groupName'] = _groupName; - map['createTime'] = _createTime; - map['kitchenGroup'] = _kitchenGroup; - map['printerId'] = _printerId; - map['createUser'] = _createUser; - map['isCharge'] = _isCharge; - map['id'] = _id; - return map; - } - -} - -/// img : "https://pos.upload.gznl.top/1179/2021/12/df9db6ba-4ef8-4962-8ae0-57a7d8140462.png" -/// url : "/router/activity_prefecture_details?type=1" -/// id : "4072162773" - -class QuickEntry { - QuickEntry({ - String img, - String url, - String id,}){ - _img = img; - _url = url; - _id = id; -} - - QuickEntry.fromJson(dynamic json) { - _img = json['img']; - _url = json['url']; - _id = json['id']; - } - String _img; - String _url; - String _id; - - String get img => _img; - String get url => _url; - String get id => _id; - - Map toJson() { - final map = {}; - map['img'] = _img; - map['url'] = _url; - map['id'] = _id; - return map; - } - -} - -/// img : "https://pos.upload.gznl.top/1179/2021/12/fe209ded-a504-4319-9c8d-6d8478785e78.jpg" -/// id : "1064355492" -/// productList : [{"productImg":"https://pos.upload.gznl.top/1179/2021/12/755b69d6-0047-44fe-9593-edac72fb9982.png","productSkuVOList":[{"productId":"1473532887297949696","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"25.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:56:32","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888409440256","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532887918706688","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:56:32","attrId":"1473532887704797184","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888619155456","skuId":"1473532888409440256"}],"skuCode":"P202112221356324"}],"productName":"有机草莓干","posShow":true,"attrList":[{"productId":"1473532887297949696","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532887704797184","id":"1473532887918706688","attrValue":"","attrValueImg":""}],"id":"1473532887704797184","attrName":""}],"price":"25.00","sellCount":0,"id":"1473532887297949696","applyPrice":"0.00","stock":0,"status":1},{"productImg":"https://pos.upload.gznl.top/1179/2021/12/c24dbb2c-91b9-47be-85c5-d9f05ffa4d59.png","productSkuVOList":[{"productId":"1473532682649468928","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"35.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:55:44","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:55:44","createUser":"1364043181062094848","id":"1473532684721455104","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532683257643008","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:55:44","attrId":"1473532683052122112","createTime":"2021-12-22 13:55:44","createUser":"1364043181062094848","id":"1473532684935364608","skuId":"1473532684721455104"}],"skuCode":"P202112221355432"}],"productName":"有机午餐一顿","posShow":true,"attrList":[{"productId":"1473532682649468928","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532683052122112","id":"1473532683257643008","attrValue":"","attrValueImg":""}],"id":"1473532683052122112","attrName":""}],"price":"35.00","sellCount":0,"id":"1473532682649468928","applyPrice":"0.00","stock":0,"status":1}] - -class SpecialArea { - SpecialArea({ - String img, - String id, - List productList,}){ - _img = img; - _id = id; - _productList = productList; -} - - SpecialArea.fromJson(dynamic json) { - _img = json['img']; - _id = json['id']; - if (json['productList'] != null) { - _productList = []; - json['productList'].forEach((v) { - _productList.add(ProductList.fromJson(v)); - }); - } - } - String _img; - String _id; - List _productList; - - String get img => _img; - String get id => _id; - List get productList => _productList; - - Map toJson() { - final map = {}; - map['img'] = _img; - map['id'] = _id; - if (_productList != null) { - map['productList'] = _productList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// productImg : "https://pos.upload.gznl.top/1179/2021/12/755b69d6-0047-44fe-9593-edac72fb9982.png" -/// productSkuVOList : [{"productId":"1473532887297949696","isDelete":0,"setMeal":"","updateUser":"1364043181062094848","skuPrice":"25.00","skuStock":0,"weight":0,"updateTime":"2021-12-22 13:56:32","storeId":"1364043181120815104","volume":0,"skuNameStr":"","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888409440256","applyPrice":"0.00","skuAttrList":[{"attrValueId":"1473532887918706688","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:56:32","attrId":"1473532887704797184","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888619155456","skuId":"1473532888409440256"}],"skuCode":"P202112221356324"}] -/// productName : "有机草莓干" -/// posShow : true -/// attrList : [{"productId":"1473532887297949696","isDelete":0,"needImg":false,"attrValueList":[{"isDelete":0,"attrId":"1473532887704797184","id":"1473532887918706688","attrValue":"","attrValueImg":""}],"id":"1473532887704797184","attrName":""}] -/// price : "25.00" -/// sellCount : 0 -/// id : "1473532887297949696" -/// applyPrice : "0.00" -/// stock : 0 -/// status : 1 - -class ProductList { - ProductList({ - String productImg, - List productSkuVOList, - String productName, - bool posShow, - List attrList, - String price, - int sellCount, - String id, - String applyPrice, - int stock, - int status,}){ - _productImg = productImg; - _productSkuVOList = productSkuVOList; - _productName = productName; - _posShow = posShow; - _attrList = attrList; - _price = price; - _sellCount = sellCount; - _id = id; - _applyPrice = applyPrice; - _stock = stock; - _status = status; -} - - ProductList.fromJson(dynamic json) { - _productImg = json['productImg']; - if (json['productSkuVOList'] != null) { - _productSkuVOList = []; - json['productSkuVOList'].forEach((v) { - _productSkuVOList.add(ProductSkuVOList.fromJson(v)); - }); - } - _productName = json['productName']; - _posShow = json['posShow']; - if (json['attrList'] != null) { - _attrList = []; - json['attrList'].forEach((v) { - _attrList.add(AttrList.fromJson(v)); - }); - } - _price = json['price']; - _sellCount = json['sellCount']; - _id = json['id']; - _applyPrice = json['applyPrice']; - _stock = json['stock']; - _status = json['status']; - } - String _productImg; - List _productSkuVOList; - String _productName; - bool _posShow; - List _attrList; - String _price; - int _sellCount; - String _id; - String _applyPrice; - int _stock; - int _status; - - String get productImg => _productImg; - List get productSkuVOList => _productSkuVOList; - String get productName => _productName; - bool get posShow => _posShow; - List get attrList => _attrList; - String get price => _price; - int get sellCount => _sellCount; - String get id => _id; - String get applyPrice => _applyPrice; - int get stock => _stock; - int get status => _status; - - Map toJson() { - final map = {}; - map['productImg'] = _productImg; - if (_productSkuVOList != null) { - map['productSkuVOList'] = _productSkuVOList.map((v) => v.toJson()).toList(); - } - map['productName'] = _productName; - map['posShow'] = _posShow; - if (_attrList != null) { - map['attrList'] = _attrList.map((v) => v.toJson()).toList(); - } - map['price'] = _price; - map['sellCount'] = _sellCount; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - map['stock'] = _stock; - map['status'] = _status; - return map; - } - -} - -/// productId : "1473532887297949696" -/// isDelete : 0 -/// needImg : false -/// attrValueList : [{"isDelete":0,"attrId":"1473532887704797184","id":"1473532887918706688","attrValue":"","attrValueImg":""}] -/// id : "1473532887704797184" -/// attrName : "" - -class AttrList { - AttrList({ - String productId, - int isDelete, - bool needImg, - List attrValueList, - String id, - String attrName,}){ - _productId = productId; - _isDelete = isDelete; - _needImg = needImg; - _attrValueList = attrValueList; - _id = id; - _attrName = attrName; -} - - AttrList.fromJson(dynamic json) { - _productId = json['productId']; - _isDelete = json['isDelete']; - _needImg = json['needImg']; - if (json['attrValueList'] != null) { - _attrValueList = []; - json['attrValueList'].forEach((v) { - _attrValueList.add(AttrValueList.fromJson(v)); - }); - } - _id = json['id']; - _attrName = json['attrName']; - } - String _productId; - int _isDelete; - bool _needImg; - List _attrValueList; - String _id; - String _attrName; - - String get productId => _productId; - int get isDelete => _isDelete; - bool get needImg => _needImg; - List get attrValueList => _attrValueList; - String get id => _id; - String get attrName => _attrName; - - Map toJson() { - final map = {}; - map['productId'] = _productId; - map['isDelete'] = _isDelete; - map['needImg'] = _needImg; - if (_attrValueList != null) { - map['attrValueList'] = _attrValueList.map((v) => v.toJson()).toList(); - } - map['id'] = _id; - map['attrName'] = _attrName; - return map; - } - -} - -/// isDelete : 0 -/// attrId : "1473532887704797184" -/// id : "1473532887918706688" -/// attrValue : "" -/// attrValueImg : "" - -class AttrValueList { - AttrValueList({ - int isDelete, - String attrId, - String id, - String attrValue, - String attrValueImg,}){ - _isDelete = isDelete; - _attrId = attrId; - _id = id; - _attrValue = attrValue; - _attrValueImg = attrValueImg; -} - - AttrValueList.fromJson(dynamic json) { - _isDelete = json['isDelete']; - _attrId = json['attrId']; - _id = json['id']; - _attrValue = json['attrValue']; - _attrValueImg = json['attrValueImg']; - } - int _isDelete; - String _attrId; - String _id; - String _attrValue; - String _attrValueImg; - - int get isDelete => _isDelete; - String get attrId => _attrId; - String get id => _id; - String get attrValue => _attrValue; - String get attrValueImg => _attrValueImg; - - Map toJson() { - final map = {}; - map['isDelete'] = _isDelete; - map['attrId'] = _attrId; - map['id'] = _id; - map['attrValue'] = _attrValue; - map['attrValueImg'] = _attrValueImg; - return map; - } - -} - -/// productId : "1473532887297949696" -/// isDelete : 0 -/// setMeal : "" -/// updateUser : "1364043181062094848" -/// skuPrice : "25.00" -/// skuStock : 0 -/// weight : 0 -/// updateTime : "2021-12-22 13:56:32" -/// storeId : "1364043181120815104" -/// volume : 0 -/// skuNameStr : "" -/// createTime : "2021-12-22 13:56:32" -/// createUser : "1364043181062094848" -/// id : "1473532888409440256" -/// applyPrice : "0.00" -/// skuAttrList : [{"attrValueId":"1473532887918706688","isDelete":0,"updateUser":"1364043181062094848","updateTime":"2021-12-22 13:56:32","attrId":"1473532887704797184","createTime":"2021-12-22 13:56:32","createUser":"1364043181062094848","id":"1473532888619155456","skuId":"1473532888409440256"}] -/// skuCode : "P202112221356324" - -class ProductSkuVOList { - ProductSkuVOList({ - String productId, - int isDelete, - String setMeal, - String updateUser, - String skuPrice, - int skuStock, - int weight, - String updateTime, - String storeId, - int volume, - String skuNameStr, - String createTime, - String createUser, - String id, - String applyPrice, - List skuAttrList, - String skuCode,}){ - _productId = productId; - _isDelete = isDelete; - _setMeal = setMeal; - _updateUser = updateUser; - _skuPrice = skuPrice; - _skuStock = skuStock; - _weight = weight; - _updateTime = updateTime; - _storeId = storeId; - _volume = volume; - _skuNameStr = skuNameStr; - _createTime = createTime; - _createUser = createUser; - _id = id; - _applyPrice = applyPrice; - _skuAttrList = skuAttrList; - _skuCode = skuCode; -} - - ProductSkuVOList.fromJson(dynamic json) { - _productId = json['productId']; - _isDelete = json['isDelete']; - _setMeal = json['setMeal']; - _updateUser = json['updateUser']; - _skuPrice = json['skuPrice']; - _skuStock = json['skuStock']; - _weight = json['weight']; - _updateTime = json['updateTime']; - _storeId = json['storeId']; - _volume = json['volume']; - _skuNameStr = json['skuNameStr']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _applyPrice = json['applyPrice']; - if (json['skuAttrList'] != null) { - _skuAttrList = []; - json['skuAttrList'].forEach((v) { - _skuAttrList.add(SkuAttrList.fromJson(v)); - }); - } - _skuCode = json['skuCode']; - } - String _productId; - int _isDelete; - String _setMeal; - String _updateUser; - String _skuPrice; - int _skuStock; - int _weight; - String _updateTime; - String _storeId; - int _volume; - String _skuNameStr; - String _createTime; - String _createUser; - String _id; - String _applyPrice; - List _skuAttrList; - String _skuCode; - - String get productId => _productId; - int get isDelete => _isDelete; - String get setMeal => _setMeal; - String get updateUser => _updateUser; - String get skuPrice => _skuPrice; - int get skuStock => _skuStock; - int get weight => _weight; - String get updateTime => _updateTime; - String get storeId => _storeId; - int get volume => _volume; - String get skuNameStr => _skuNameStr; - String get createTime => _createTime; - String get createUser => _createUser; - String get id => _id; - String get applyPrice => _applyPrice; - List get skuAttrList => _skuAttrList; - String get skuCode => _skuCode; - - Map toJson() { - final map = {}; - map['productId'] = _productId; - map['isDelete'] = _isDelete; - map['setMeal'] = _setMeal; - map['updateUser'] = _updateUser; - map['skuPrice'] = _skuPrice; - map['skuStock'] = _skuStock; - map['weight'] = _weight; - map['updateTime'] = _updateTime; - map['storeId'] = _storeId; - map['volume'] = _volume; - map['skuNameStr'] = _skuNameStr; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['applyPrice'] = _applyPrice; - if (_skuAttrList != null) { - map['skuAttrList'] = _skuAttrList.map((v) => v.toJson()).toList(); - } - map['skuCode'] = _skuCode; - return map; - } - -} - -/// attrValueId : "1473532887918706688" -/// isDelete : 0 -/// updateUser : "1364043181062094848" -/// updateTime : "2021-12-22 13:56:32" -/// attrId : "1473532887704797184" -/// createTime : "2021-12-22 13:56:32" -/// createUser : "1364043181062094848" -/// id : "1473532888619155456" -/// skuId : "1473532888409440256" - -class SkuAttrList { - SkuAttrList({ - String attrValueId, - int isDelete, - String updateUser, - String updateTime, - String attrId, - String createTime, - String createUser, - String id, - String skuId,}){ - _attrValueId = attrValueId; - _isDelete = isDelete; - _updateUser = updateUser; - _updateTime = updateTime; - _attrId = attrId; - _createTime = createTime; - _createUser = createUser; - _id = id; - _skuId = skuId; -} - - SkuAttrList.fromJson(dynamic json) { - _attrValueId = json['attrValueId']; - _isDelete = json['isDelete']; - _updateUser = json['updateUser']; - _updateTime = json['updateTime']; - _attrId = json['attrId']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _id = json['id']; - _skuId = json['skuId']; - } - String _attrValueId; - int _isDelete; - String _updateUser; - String _updateTime; - String _attrId; - String _createTime; - String _createUser; - String _id; - String _skuId; - - String get attrValueId => _attrValueId; - int get isDelete => _isDelete; - String get updateUser => _updateUser; - String get updateTime => _updateTime; - String get attrId => _attrId; - String get createTime => _createTime; - String get createUser => _createUser; - String get id => _id; - String get skuId => _skuId; - - Map toJson() { - final map = {}; - map['attrValueId'] = _attrValueId; - map['isDelete'] = _isDelete; - map['updateUser'] = _updateUser; - map['updateTime'] = _updateTime; - map['attrId'] = _attrId; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['id'] = _id; - map['skuId'] = _skuId; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/sign_in.dart b/lib/retrofit/data/sign_in.dart deleted file mode 100644 index 785073c8..00000000 --- a/lib/retrofit/data/sign_in.dart +++ /dev/null @@ -1,57 +0,0 @@ - -class SignIn { - SignIn(); - String balance; - String category; - String createTime; - String createUser; - String id; - bool isDeleted; - String linkId; - String mark; - String mid; - String number; - int pm; - bool status; - String title; - String type; - String updateTime; - String updateUser; - - factory SignIn.fromJson(Map json) => SignIn() - ..balance = json['balance'] as String - ..category = json['category'] as String - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..id = json['id'] as String - ..isDeleted = json['isDeleted'] as bool - ..linkId = json['linkId'] as String - ..mark = json['mark'] as String - ..mid = json['mid'] as String - ..number = json['number'] as String - ..pm = json['pm'] as int - ..status = json['status'] as bool - ..title = json['title'] as String - ..type = json['type'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String; - Map toJson() => { - 'balance': this.balance, - 'category': this.category, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'id': this.id, - 'isDeleted': this.isDeleted, - 'linkId': this.linkId, - 'mark': this.mark, - 'mid': this.mid, - 'number': this.number, - 'pm': this.pm, - 'status': this.status, - 'title': this.title, - 'type': this.type, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - }; - -} \ No newline at end of file diff --git a/lib/retrofit/data/sign_info.dart b/lib/retrofit/data/sign_info.dart deleted file mode 100644 index 678a8ff2..00000000 --- a/lib/retrofit/data/sign_info.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'package:huixiang/retrofit/data/member_rank.dart'; -import 'package:huixiang/retrofit/data/sign_in.dart'; -import 'package:huixiang/retrofit/data/task.dart'; - -class SignInfo { - SignInfo(); - String point; - bool todayHasSignin; - MemberRank rank; - List signInList; - List taskList; - List rewardList; - - factory SignInfo.fromJson(Map json) => SignInfo() - ..point = json['point'] as String - ..todayHasSignin = json['todayHasSignin'] as bool - ..rank = json['rank'] == null - ? null - : MemberRank.fromJson(json['rank'] as Map) - ..signInList = (json['signInList'] as List) - ?.map((e) => - e == null ? null : SignIn.fromJson(e as Map)) - ?.toList() - ..taskList = (json['taskList'] as List) - ?.map( - (e) => e == null ? null : Task.fromJson(e as Map)) - ?.toList() - ..rewardList = (json['rewardList'] as List)?.map((e) => e as int)?.toList(); - Map toJson() => { - 'point': this.point, - 'todayHasSignin': this.todayHasSignin, - 'rank': this.rank, - 'signInList': this.signInList, - 'taskList': this.taskList, - 'rewardList': this.rewardList, - }; - - -} diff --git a/lib/retrofit/data/single_sales_list.dart b/lib/retrofit/data/single_sales_list.dart deleted file mode 100644 index 776baa58..00000000 --- a/lib/retrofit/data/single_sales_list.dart +++ /dev/null @@ -1,141 +0,0 @@ -/// productId : null -/// saleNum : 16 -/// productName : "米粉汤" -/// productType : null -/// productGroupName : "米粉汤" -/// sumPrice : "256.00" -/// sellPrict : "16.00" -/// productSkuName : "" -/// productSkuList : null -/// platterLsit : null -/// giveNum : 0 -/// refundNum : 0 -/// productCountPercent : 0.11 -/// productSellPricePercent : 0.11 - -class SingleSalesList { - SingleSalesList({ - dynamic productId, - num saleNum, - String productName, - dynamic productType, - String productGroupName, - String sumPrice, - String sellPrict, - String productSkuName, - dynamic productSkuList, - dynamic platterLsit, - num giveNum, - num refundNum, - num productCountPercent, - num productSellPricePercent,}){ - _productId = productId; - _saleNum = saleNum; - _productName = productName; - _productType = productType; - _productGroupName = productGroupName; - _sumPrice = sumPrice; - _sellPrict = sellPrict; - _productSkuName = productSkuName; - _productSkuList = productSkuList; - _platterLsit = platterLsit; - _giveNum = giveNum; - _refundNum = refundNum; - _productCountPercent = productCountPercent; - _productSellPricePercent = productSellPricePercent; -} - - SingleSalesList.fromJson(dynamic json) { - _productId = json['productId']; - _saleNum = json['saleNum']; - _productName = json['productName']; - _productType = json['productType']; - _productGroupName = json['productGroupName']; - _sumPrice = json['sumPrice']; - _sellPrict = json['sellPrict']; - _productSkuName = json['productSkuName']; - _productSkuList = json['productSkuList']; - _platterLsit = json['platterLsit']; - _giveNum = json['giveNum']; - _refundNum = json['refundNum']; - _productCountPercent = json['productCountPercent']; - _productSellPricePercent = json['productSellPricePercent']; - } - dynamic _productId; - num _saleNum; - String _productName; - dynamic _productType; - String _productGroupName; - String _sumPrice; - String _sellPrict; - String _productSkuName; - dynamic _productSkuList; - dynamic _platterLsit; - num _giveNum; - num _refundNum; - num _productCountPercent; - num _productSellPricePercent; -SingleSalesList copyWith({ dynamic productId, - num saleNum, - String productName, - dynamic productType, - String productGroupName, - String sumPrice, - String sellPrict, - String productSkuName, - dynamic productSkuList, - dynamic platterLsit, - num giveNum, - num refundNum, - num productCountPercent, - num productSellPricePercent, -}) => SingleSalesList( productId: productId ?? _productId, - saleNum: saleNum ?? _saleNum, - productName: productName ?? _productName, - productType: productType ?? _productType, - productGroupName: productGroupName ?? _productGroupName, - sumPrice: sumPrice ?? _sumPrice, - sellPrict: sellPrict ?? _sellPrict, - productSkuName: productSkuName ?? _productSkuName, - productSkuList: productSkuList ?? _productSkuList, - platterLsit: platterLsit ?? _platterLsit, - giveNum: giveNum ?? _giveNum, - refundNum: refundNum ?? _refundNum, - productCountPercent: productCountPercent ?? _productCountPercent, - productSellPricePercent: productSellPricePercent ?? _productSellPricePercent, -); - dynamic get productId => _productId; - num get saleNum => _saleNum; - String get productName => _productName; - dynamic get productType => _productType; - String get productGroupName => _productGroupName; - String get sumPrice => _sumPrice; - String get sellPrict => _sellPrict; - String get productSkuName => _productSkuName; - dynamic get productSkuList => _productSkuList; - dynamic get platterLsit => _platterLsit; - num get giveNum => _giveNum; - num get refundNum => _refundNum; - num get productCountPercent => _productCountPercent; - num get productSellPricePercent => _productSellPricePercent; - - Map toJson() { - final map = {}; - map['productId'] = _productId; - map['saleNum'] = _saleNum; - map['productName'] = _productName; - map['productType'] = _productType; - map['productGroupName'] = _productGroupName; - map['sumPrice'] = _sumPrice; - map['sellPrict'] = _sellPrict; - map['productSkuName'] = _productSkuName; - map['productSkuList'] = _productSkuList; - map['platterLsit'] = _platterLsit; - map['giveNum'] = _giveNum; - map['refundNum'] = _refundNum; - map['productCountPercent'] = _productCountPercent; - map['productSellPricePercent'] = _productSellPricePercent; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/social_info.dart b/lib/retrofit/data/social_info.dart deleted file mode 100644 index cffbc3d4..00000000 --- a/lib/retrofit/data/social_info.dart +++ /dev/null @@ -1,47 +0,0 @@ -/// fans : 0 -/// follow : 0 - -class SocialInfo { - SocialInfo({ - dynamic fans, - dynamic follow, - dynamic achievementNumber}){ - _fans = fans; - _follow = follow; - _achievementNumber = achievementNumber; -} - - SocialInfo.fromJson(dynamic json) { - _fans = json['fans']; - _follow = json['follow']; - _achievementNumber = json['achievementNumber']; - } - dynamic _fans; - dynamic _follow; - dynamic _achievementNumber; - - dynamic get fans => _fans; - dynamic get follow => _follow; - dynamic get achievementNumber => _achievementNumber; - - - set fans(int value) { - _fans = value; - } - - Map toJson() { - final map = {}; - map['fans'] = _fans; - map['follow'] = _follow; - map['achievementNumber'] = _achievementNumber; - return map; - } - - set follow(int value) { - _follow = value; - } - - set achievementNumber(int value) { - _achievementNumber = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/store.dart b/lib/retrofit/data/store.dart deleted file mode 100644 index e94cc87a..00000000 --- a/lib/retrofit/data/store.dart +++ /dev/null @@ -1,130 +0,0 @@ -import 'package:huixiang/retrofit/data/coupon_vo.dart'; -import 'package:huixiang/retrofit/data/product_show.dart'; -import 'package:huixiang/retrofit/data/store_type.dart'; - -class Store { - Store(); - - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String tenantCode; - bool useErp; - String openStartTime; - String openEndTime; - String perCapitaConsumption; - String storeName; - double distance; - String logo; - String facade; - String shipAddress; - dynamic remark; - String mobile; - String longitude; - String latitude; - dynamic refundAddress; - dynamic refundTel; - dynamic refundContact; - int isAutoSendRefundAddress; - String province; - String city; - String district; - String address; - String headName; - String headMobile; - CouponVo couponVO; - dynamic deliveryInfo; - String businessType; - String businessService; - List productShow; - StoreType posType; - - factory Store.fromJson(Map json) => - Store() - ..id = json['id'] as String - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String - ..tenantCode = json['tenantCode'] as String - ..useErp = json['useErp'] as bool - ..openStartTime = json['openStartTime'] as String - ..openEndTime = json['openEndTime'] as String - ..perCapitaConsumption = json['perCapitaConsumption'] as String - ..storeName = json['storeName'] as String - ..distance = (json['distance'] as num)?.toDouble() - ..logo = json['logo'] as String - ..facade = json['facade'] as String - ..shipAddress = json['shipAddress'] as String - ..remark = json['remark'] - ..mobile = json['mobile'] as String - ..longitude = json['longitude'] as String - ..latitude = json['latitude'] as String - ..refundAddress = json['refundAddress'] - ..refundTel = json['refundTel'] - ..refundContact = json['refundContact'] - ..isAutoSendRefundAddress = json['isAutoSendRefundAddress'] as int - ..province = json['province'] as String - ..city = json['city'] as String - ..district = json['district'] as String - ..address = json['address'] as String - ..headName = json['headName'] as String - ..headMobile = json['headMobile'] as String - ..deliveryInfo = json['deliveryInfo'] - ..businessType = json['businessType'] as String - ..businessService = json['businessService'] as String - ..couponVO = json['couponVO'] == null ? null : CouponVo.fromJson( - json['couponVO']) - ..productShow = (json['productShow'] as List) - ?.map((e) => - e == null ? null : ProductShow.fromJson(e as Map)) - ?.toList() - ..posType = json['posType'] == null - ? null - : StoreType.fromJson(json['posType'] as Map); - - Map toJson() => - { - 'id': this.id, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'tenantCode': this.tenantCode, - 'useErp': this.useErp, - 'openStartTime': this.openStartTime, - 'openEndTime': this.openEndTime, - 'perCapitaConsumption': this.perCapitaConsumption, - 'storeName': this.storeName, - 'distance': this.distance, - 'logo': this.logo, - 'facade': this.facade, - 'shipAddress': this.shipAddress, - 'remark': this.remark, - 'mobile': this.mobile, - 'longitude': this.longitude, - 'latitude': this.latitude, - 'refundAddress': this.refundAddress, - 'refundTel': this.refundTel, - 'refundContact': this.refundContact, - 'isAutoSendRefundAddress': this.isAutoSendRefundAddress, - 'province': this.province, - 'city': this.city, - 'district': this.district, - 'address': this.address, - 'headName': this.headName, - 'headMobile': this.headMobile, - 'deliveryInfo': this.deliveryInfo, - 'businessType': this.businessType, - 'businessService': this.businessService, - 'couponVO': this.couponVO != null ? this.couponVO.toJson() : null, - 'productShow': this.productShow.map((e) => e.toJson()).toList(), - 'posType': this.posType, - }; -} - - - - diff --git a/lib/retrofit/data/store_info.dart b/lib/retrofit/data/store_info.dart deleted file mode 100644 index ed58193d..00000000 --- a/lib/retrofit/data/store_info.dart +++ /dev/null @@ -1,214 +0,0 @@ -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/coupon_vo.dart'; -import 'package:huixiang/retrofit/data/delivery_info.dart'; -import 'package:huixiang/retrofit/data/member_source.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/pickup_type.dart'; -import 'package:huixiang/retrofit/data/promotion.dart'; -import 'package:huixiang/retrofit/data/store_type.dart'; -import 'package:huixiang/retrofit/data/mini.dart'; - -class StoreInfo { - String address; - List bannerList; - String city; - List couponVOList; - String createTime; - String createUser; - DeliveryInfo deliveryInfo; - PickupType pickupType; - String district; - String headMobile; - String tel; - String headName; - String id; - num isAutoSendRefundAddress; - String latitude; - String logo; - bool isVip; - String longitude; - String mobile; - String openEndTime; - String openStartTime; - String perCapitaConsumption; - StoreType posType; - List promotionList; - String province; - String refundAddress; - String refundContact; - String refundTel; - String remark; - String shipAddress; - String storeName; - StoreTable storeTable; - String tenantCode; - String updateTime; - String updateUser; - String businessService; - Mini mini; - bool useErp; - bool usePlatformVip; - bool usePlatformPay; - String expireTime; - String vipFee; - MemberSource memberSource; - PageInfo informationVOPageVO; - StoreInfo(); - - factory StoreInfo.fromJson(Map json) => StoreInfo() - ..address = json['address'] as String - ..bannerList = (json['bannerList'] as List) - ?.map((e) => - e == null ? null : BannerData.fromJson(e as Map)) - ?.toList() - ..city = json['city'] as String - ..couponVOList = (json['couponVOList'] as List) - ?.map((e) => - e == null ? null : CouponVo.fromJson(e as Map)) - ?.toList() - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..deliveryInfo = json['deliveryInfo'] == null - ? null - : DeliveryInfo.fromJson(json['deliveryInfo'] as Map) - ..pickupType = json['pickupType'] == null - ? null - : PickupType.fromJson(json['pickupType'] as Map) - ..district = json['district'] as String - ..headMobile = json['headMobile'] as String - ..tel = json['tel'] as String - ..headName = json['headName'] as String - ..id = json['id'] as String - ..isVip = json['isVip'] - ..isAutoSendRefundAddress = json['isAutoSendRefundAddress'] as num - ..latitude = json['latitude'] as String - ..logo = json['logo'] as String - ..longitude = json['longitude'] as String - ..mobile = json['mobile'] as String - ..openEndTime = json['openEndTime'] as String - ..openStartTime = json['openStartTime'] as String - ..perCapitaConsumption = json['perCapitaConsumption'] as String - ..posType = json['posType'] == null - ? null - : StoreType.fromJson(json['posType'] as Map) - ..promotionList = (json['promotionList'] as List) - ?.map((e) => - e == null ? null : Promotion.fromJson(e as Map)) - ?.toList() - ..province = json['province'] as String - ..refundAddress = json['refundAddress'] as String - ..refundContact = json['refundContact'] as String - ..refundTel = json['refundTel'] as String - ..remark = json['remark'] as String - ..shipAddress = json['shipAddress'] as String - ..storeName = json['storeName'] as String - ..storeTable = json['storeTable'] != null ? StoreTable.fromJson(json['storeTable']) : null - ..tenantCode = json['tenantCode'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String - ..businessService = json['businessService'] as String - ..mini = json['mini'] == null ? null : Mini.fromJson(json['mini']) - ..useErp = json['useErp'] as bool - ..usePlatformVip = json['usePlatformVip'] as bool - ..usePlatformPay = json['usePlatformPay'] as bool - ..expireTime = json['expireTime'] as String - ..vipFee = json['vipFee'] as String - ..memberSource = json['memberSource'] != null ? MemberSource.fromJson(json['memberSource']) : null - ..informationVOPageVO = json['informationVOPageVO'] != null ? PageInfo.fromJson(json['informationVOPageVO'], (value){ - return value; - }) : null; - - Map toJson() => { - 'address': this.address, - 'bannerList': this.bannerList.map((e) => e.toJson()).toList(), - 'city': this.city, - 'couponVOList': this.couponVOList, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'deliveryInfo': this.deliveryInfo.toJson(), - 'pickupType':this.pickupType.toJson(), - 'district': this.district, - 'headMobile': this.headMobile, - 'tel': this.tel, - 'headName': this.headName, - 'id': this.id, - 'isAutoSendRefundAddress': this.isAutoSendRefundAddress, - 'latitude': this.latitude, - 'logo': this.logo, - 'longitude': this.longitude, - 'mobile': this.mobile, - 'isVip': this.isVip, - 'openEndTime': this.openEndTime, - 'openStartTime': this.openStartTime, - 'perCapitaConsumption': this.perCapitaConsumption, - 'posType': this.posType.toJson(), - 'promotionList': this.promotionList.map((e) => e.toJson()).toList(), - 'province': this.province, - 'refundAddress': this.refundAddress, - 'refundContact': this.refundContact, - 'refundTel': this.refundTel, - 'remark': this.remark, - 'shipAddress': this.shipAddress, - 'storeName': this.storeName, - 'storeTable': this.storeTable.toJson(), - 'tenantCode': this.tenantCode, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'businessService': this.businessService, - 'mini': this.mini.toJson(), - 'useErp': this.useErp, - 'usePlatformVip': this.usePlatformVip, - 'usePlatformPay': this.usePlatformPay, - 'expireTime': this.expireTime, - 'vipFee': this.vipFee, - 'memberSource': this.memberSource.toJson(), - 'informationVOPageVO': this.informationVOPageVO, - }; - -} - -class StoreTable { - - StoreTable(); - - String areaId; - String id; - int isDelete; - int numberOfPeople; - String remark; - String storeId; - int tableCapacity; - String tableName; - int tableSort; - int tableType; - String tenantCode; - - factory StoreTable.fromJson(Map json) => StoreTable() - ..areaId = json["areaId"] - ..id = json["id"] - ..isDelete = json["isDelete"] - ..numberOfPeople = json["numberOfPeople"] - ..remark = json["remark"] - ..storeId = json["storeId"] - ..tableCapacity = json["tableCapacity"] - ..tableName = json["tableName"] - ..tableSort = json["tableSort"] - ..tableType = json["tableType"] - ..tenantCode = json["tenantCode"]; - - Map toJson() => { - "areaId": this.areaId, - "id": this.id, - "isDelete": this.isDelete, - "numberOfPeople": this.numberOfPeople, - "remark": this.remark, - "storeId": this.storeId, - "tableCapacity": this.tableCapacity, - "tableName": this.tableName, - "tableSort": this.tableSort, - "tableType": this.tableType, - "tenantCode": this.tenantCode, - }; - -} - diff --git a/lib/retrofit/data/store_time_info_list.dart b/lib/retrofit/data/store_time_info_list.dart deleted file mode 100644 index 080398c8..00000000 --- a/lib/retrofit/data/store_time_info_list.dart +++ /dev/null @@ -1,42 +0,0 @@ -/// openEndTime : "20:30:00" -/// openStartTime : "09:00:00" -/// posType : "FAST_SERVICE" - -class StoreTimeInfoList { - StoreTimeInfoList({ - String openEndTime, - String openStartTime, - String posType,}){ - _openEndTime = openEndTime; - _openStartTime = openStartTime; - _posType = posType; -} - - StoreTimeInfoList.fromJson(dynamic json) { - _openEndTime = json['openEndTime']; - _openStartTime = json['openStartTime']; - _posType = json['posType']; - } - String _openEndTime; - String _openStartTime; - String _posType; -StoreTimeInfoList copyWith({ String openEndTime, - String openStartTime, - String posType, -}) => StoreTimeInfoList( openEndTime: openEndTime ?? _openEndTime, - openStartTime: openStartTime ?? _openStartTime, - posType: posType ?? _posType, -); - String get openEndTime => _openEndTime; - String get openStartTime => _openStartTime; - String get posType => _posType; - - Map toJson() { - final map = {}; - map['openEndTime'] = _openEndTime; - map['openStartTime'] = _openStartTime; - map['posType'] = _posType; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/store_total_money_info.dart b/lib/retrofit/data/store_total_money_info.dart deleted file mode 100644 index 5f332dc0..00000000 --- a/lib/retrofit/data/store_total_money_info.dart +++ /dev/null @@ -1,51 +0,0 @@ -/// storeTotalMoney : "117.00" -/// paySumCount : 2 -/// memberCount : 9385 -/// memberTotalBalance : "42236.77" - -class StoreTotalMoneyInfo { - StoreTotalMoneyInfo({ - String storeTotalMoney, - num paySumCount, - num memberCount, - String memberTotalBalance,}){ - _storeTotalMoney = storeTotalMoney; - _paySumCount = paySumCount; - _memberCount = memberCount; - _memberTotalBalance = memberTotalBalance; -} - - StoreTotalMoneyInfo.fromJson(dynamic json) { - _storeTotalMoney = json['storeTotalMoney']; - _paySumCount = json['paySumCount']; - _memberCount = json['memberCount']; - _memberTotalBalance = json['memberTotalBalance']; - } - String _storeTotalMoney; - num _paySumCount; - num _memberCount; - String _memberTotalBalance; -StoreTotalMoneyInfo copyWith({ String storeTotalMoney, - num paySumCount, - num memberCount, - String memberTotalBalance, -}) => StoreTotalMoneyInfo( storeTotalMoney: storeTotalMoney ?? _storeTotalMoney, - paySumCount: paySumCount ?? _paySumCount, - memberCount: memberCount ?? _memberCount, - memberTotalBalance: memberTotalBalance ?? _memberTotalBalance, -); - String get storeTotalMoney => _storeTotalMoney; - num get paySumCount => _paySumCount; - num get memberCount => _memberCount; - String get memberTotalBalance => _memberTotalBalance; - - Map toJson() { - final map = {}; - map['storeTotalMoney'] = _storeTotalMoney; - map['paySumCount'] = _paySumCount; - map['memberCount'] = _memberCount; - map['memberTotalBalance'] = _memberTotalBalance; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/store_type.dart b/lib/retrofit/data/store_type.dart deleted file mode 100644 index 5e18bc8e..00000000 --- a/lib/retrofit/data/store_type.dart +++ /dev/null @@ -1,16 +0,0 @@ - -class StoreType { - StoreType(); - - String desc; - String code; - - factory StoreType.fromJson(Map json) => StoreType() - ..desc = json['desc'] as String - ..code = json['code'] as String; - Map toJson() => { - 'desc': this.desc, - 'code': this.code, - }; - -} \ No newline at end of file diff --git a/lib/retrofit/data/task.dart b/lib/retrofit/data/task.dart deleted file mode 100644 index c7f471b3..00000000 --- a/lib/retrofit/data/task.dart +++ /dev/null @@ -1,51 +0,0 @@ - -class Task { - Task(); - String aspects; - int complateNum; - int conplateNum; - String createTime; - String createUser; - String id; - int limitDay; - String name; - int rewardType; - String rewardValue; - bool status; - String type; - String updateTime; - String updateUser; - - factory Task.fromJson(Map json) => Task() - ..aspects = json['aspects'] as String - ..complateNum = json['complateNum'] as int - ..conplateNum = json['conplateNum'] as int - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..id = json['id'] as String - ..limitDay = json['limitDay'] as int - ..name = json['name'] as String - ..rewardType = json['rewardType'] as int - ..rewardValue = json['rewardValue'] as String - ..status = json['status'] as bool - ..type = json['type'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String; - Map toJson() => { - 'aspects': this.aspects, - 'complateNum': this.complateNum, - 'conplateNum': this.conplateNum, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'id': this.id, - 'limitDay': this.limitDay, - 'name': this.name, - 'rewardType': this.rewardType, - 'rewardValue': this.rewardValue, - 'status': this.status, - 'type': this.type, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - }; - -} \ No newline at end of file diff --git a/lib/retrofit/data/tenant_info.dart b/lib/retrofit/data/tenant_info.dart deleted file mode 100644 index 7677c04d..00000000 --- a/lib/retrofit/data/tenant_info.dart +++ /dev/null @@ -1,375 +0,0 @@ -/// id : "1739884282001752064" -/// createTime : "2023-12-27 13:41:53" -/// createUser : "1" -/// updateTime : "2023-12-27 13:41:53" -/// updateUser : "1" -/// code : "1197" -/// name : "fff" -/// type : {"desc":"创建","code":"CREATE"} -/// status : {"desc":"正常","code":"NORMAL"} -/// readonly : false -/// usePlatformPay : false -/// usePlatformVip : false -/// money : "0" -/// duty : "fxz" -/// address : "洪山区光谷一路天成美景" -/// expireLimitYear : 12 -/// startTime : "2023-12-27 13:41:53" -/// expirationTime : "2039-09-11 15:39:12" -/// contactTel : "15827991715" -/// logo : "" -/// describe : "" -/// account : null -/// dianwodaId : "" -/// dadaId : "" -/// showVipCard : true -/// packageId : "1742842291845857280" -/// packageName : "测试啊" -/// posType : {"desc":"普通餐饮","code":"NORMALSTORE"} - -class TenantInfo { - TenantInfo({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String code, - String name, - Type type, - Status status, - bool readonly, - bool usePlatformPay, - bool usePlatformVip, - String money, - String duty, - String address, - num expireLimitYear, - String startTime, - String expirationTime, - String contactTel, - String logo, - String describe, - dynamic account, - String dianwodaId, - String dadaId, - bool showVipCard, - String packageId, - String packageName, - PosType posType,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _code = code; - _name = name; - _type = type; - _status = status; - _readonly = readonly; - _usePlatformPay = usePlatformPay; - _usePlatformVip = usePlatformVip; - _money = money; - _duty = duty; - _address = address; - _expireLimitYear = expireLimitYear; - _startTime = startTime; - _expirationTime = expirationTime; - _contactTel = contactTel; - _logo = logo; - _describe = describe; - _account = account; - _dianwodaId = dianwodaId; - _dadaId = dadaId; - _showVipCard = showVipCard; - _packageId = packageId; - _packageName = packageName; - _posType = posType; -} - - TenantInfo.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _code = json['code']; - _name = json['name']; - _type = json['type'] != null ? Type.fromJson(json['type']) : null; - _status = json['status'] != null ? Status.fromJson(json['status']) : null; - _readonly = json['readonly']; - _usePlatformPay = json['usePlatformPay']; - _usePlatformVip = json['usePlatformVip']; - _money = json['money']; - _duty = json['duty']; - _address = json['address']; - _expireLimitYear = json['expireLimitYear']; - _startTime = json['startTime']; - _expirationTime = json['expirationTime']; - _contactTel = json['contactTel']; - _logo = json['logo']; - _describe = json['describe']; - _account = json['account']; - _dianwodaId = json['dianwodaId']; - _dadaId = json['dadaId']; - _showVipCard = json['showVipCard']; - _packageId = json['packageId']; - _packageName = json['packageName']; - _posType = json['posType'] != null ? PosType.fromJson(json['posType']) : null; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _code; - String _name; - Type _type; - Status _status; - bool _readonly; - bool _usePlatformPay; - bool _usePlatformVip; - String _money; - String _duty; - String _address; - num _expireLimitYear; - String _startTime; - String _expirationTime; - String _contactTel; - String _logo; - String _describe; - dynamic _account; - String _dianwodaId; - String _dadaId; - bool _showVipCard; - String _packageId; - String _packageName; - PosType _posType; -TenantInfo copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String code, - String name, - Type type, - Status status, - bool readonly, - bool usePlatformPay, - bool usePlatformVip, - String money, - String duty, - String address, - num expireLimitYear, - String startTime, - String expirationTime, - String contactTel, - String logo, - String describe, - dynamic account, - String dianwodaId, - String dadaId, - bool showVipCard, - String packageId, - String packageName, - PosType posType, -}) => TenantInfo( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - code: code ?? _code, - name: name ?? _name, - type: type ?? _type, - status: status ?? _status, - readonly: readonly ?? _readonly, - usePlatformPay: usePlatformPay ?? _usePlatformPay, - usePlatformVip: usePlatformVip ?? _usePlatformVip, - money: money ?? _money, - duty: duty ?? _duty, - address: address ?? _address, - expireLimitYear: expireLimitYear ?? _expireLimitYear, - startTime: startTime ?? _startTime, - expirationTime: expirationTime ?? _expirationTime, - contactTel: contactTel ?? _contactTel, - logo: logo ?? _logo, - describe: describe ?? _describe, - account: account ?? _account, - dianwodaId: dianwodaId ?? _dianwodaId, - dadaId: dadaId ?? _dadaId, - showVipCard: showVipCard ?? _showVipCard, - packageId: packageId ?? _packageId, - packageName: packageName ?? _packageName, - posType: posType ?? _posType, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get code => _code; - String get name => _name; - Type get type => _type; - Status get status => _status; - bool get readonly => _readonly; - bool get usePlatformPay => _usePlatformPay; - bool get usePlatformVip => _usePlatformVip; - String get money => _money; - String get duty => _duty; - String get address => _address; - num get expireLimitYear => _expireLimitYear; - String get startTime => _startTime; - String get expirationTime => _expirationTime; - String get contactTel => _contactTel; - String get logo => _logo; - String get describe => _describe; - dynamic get account => _account; - String get dianwodaId => _dianwodaId; - String get dadaId => _dadaId; - bool get showVipCard => _showVipCard; - String get packageId => _packageId; - String get packageName => _packageName; - PosType get posType => _posType; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['code'] = _code; - map['name'] = _name; - if (_type != null) { - map['type'] = _type.toJson(); - } - if (_status != null) { - map['status'] = _status.toJson(); - } - map['readonly'] = _readonly; - map['usePlatformPay'] = _usePlatformPay; - map['usePlatformVip'] = _usePlatformVip; - map['money'] = _money; - map['duty'] = _duty; - map['address'] = _address; - map['expireLimitYear'] = _expireLimitYear; - map['startTime'] = _startTime; - map['expirationTime'] = _expirationTime; - map['contactTel'] = _contactTel; - map['logo'] = _logo; - map['describe'] = _describe; - map['account'] = _account; - map['dianwodaId'] = _dianwodaId; - map['dadaId'] = _dadaId; - map['showVipCard'] = _showVipCard; - map['packageId'] = _packageId; - map['packageName'] = _packageName; - if (_posType != null) { - map['posType'] = _posType.toJson(); - } - return map; - } - -} - -/// desc : "普通餐饮" -/// code : "NORMALSTORE" - -class PosType { - PosType({ - String desc, - String code,}){ - _desc = desc; - _code = code; -} - - PosType.fromJson(dynamic json) { - _desc = json['desc']; - _code = json['code']; - } - String _desc; - String _code; -PosType copyWith({ String desc, - String code, -}) => PosType( desc: desc ?? _desc, - code: code ?? _code, -); - String get desc => _desc; - String get code => _code; - - Map toJson() { - final map = {}; - map['desc'] = _desc; - map['code'] = _code; - return map; - } - -} - -/// desc : "正常" -/// code : "NORMAL" - -class Status { - Status({ - String desc, - String code,}){ - _desc = desc; - _code = code; -} - - Status.fromJson(dynamic json) { - _desc = json['desc']; - _code = json['code']; - } - String _desc; - String _code; -Status copyWith({ String desc, - String code, -}) => Status( desc: desc ?? _desc, - code: code ?? _code, -); - String get desc => _desc; - String get code => _code; - - Map toJson() { - final map = {}; - map['desc'] = _desc; - map['code'] = _code; - return map; - } - -} - -/// desc : "创建" -/// code : "CREATE" - -class Type { - Type({ - String desc, - String code,}){ - _desc = desc; - _code = code; -} - - Type.fromJson(dynamic json) { - _desc = json['desc']; - _code = json['code']; - } - String _desc; - String _code; -Type copyWith({ String desc, - String code, -}) => Type( desc: desc ?? _desc, - code: code ?? _code, -); - String get desc => _desc; - String get code => _code; - - Map toJson() { - final map = {}; - map['desc'] = _desc; - map['code'] = _code; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/tenant_package_calculate_details.dart b/lib/retrofit/data/tenant_package_calculate_details.dart deleted file mode 100644 index f550a138..00000000 --- a/lib/retrofit/data/tenant_package_calculate_details.dart +++ /dev/null @@ -1,51 +0,0 @@ -/// totalFee : "100" -/// expirationTime : "2034-01-05 11:16:07" -/// duration : 10 -/// packageId : "1742842291845857280" - -class TenantPackageCalculateDetails { - TenantPackageCalculateDetails({ - String totalFee, - String expirationTime, - num duration, - String packageId,}){ - _totalFee = totalFee; - _expirationTime = expirationTime; - _duration = duration; - _packageId = packageId; -} - - TenantPackageCalculateDetails.fromJson(dynamic json) { - _totalFee = json['totalFee']; - _expirationTime = json['expirationTime']; - _duration = json['duration']; - _packageId = json['packageId']; - } - String _totalFee; - String _expirationTime; - num _duration; - String _packageId; -TenantPackageCalculateDetails copyWith({ String totalFee, - String expirationTime, - num duration, - String packageId, -}) => TenantPackageCalculateDetails( totalFee: totalFee ?? _totalFee, - expirationTime: expirationTime ?? _expirationTime, - duration: duration ?? _duration, - packageId: packageId ?? _packageId, -); - String get totalFee => _totalFee; - String get expirationTime => _expirationTime; - num get duration => _duration; - String get packageId => _packageId; - - Map toJson() { - final map = {}; - map['totalFee'] = _totalFee; - map['expirationTime'] = _expirationTime; - map['duration'] = _duration; - map['packageId'] = _packageId; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/tenant_package_list.dart b/lib/retrofit/data/tenant_package_list.dart deleted file mode 100644 index f41708ff..00000000 --- a/lib/retrofit/data/tenant_package_list.dart +++ /dev/null @@ -1,245 +0,0 @@ -/// id : "1742842291845857280" -/// createTime : "2024-01-04 17:35:57" -/// createUser : "1" -/// updateTime : "2024-01-04 17:35:57" -/// updateUser : "1" -/// name : "测试啊" -/// status : 1 -/// remark : "" -/// packagePrice : null -/// packageDiscount : null -/// duration : null -/// enableSale : true -/// sort : 1 -/// isDefault : false -/// isDelete : 0 -/// tenantPackageSale : [{"packagePrice":"100","originalPackagePrice":"200","duration":10,"packageDiscount":50,"isRecommend":false,"saleName":"销售套餐1","canDiscount":true},{"packagePrice":"300","originalPackagePrice":"600","duration":5,"packageDiscount":50,"isRecommend":true,"saleName":"销售套餐2","canDiscount":true}] - -class TenantPackageList { - TenantPackageList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - num status, - String remark, - dynamic packagePrice, - dynamic packageDiscount, - dynamic duration, - bool enableSale, - num sort, - bool isDefault, - num isDelete, - List tenantPackageSale,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _name = name; - _status = status; - _remark = remark; - _packagePrice = packagePrice; - _packageDiscount = packageDiscount; - _duration = duration; - _enableSale = enableSale; - _sort = sort; - _isDefault = isDefault; - _isDelete = isDelete; - _tenantPackageSale = tenantPackageSale; -} - - TenantPackageList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _name = json['name']; - _status = json['status']; - _remark = json['remark']; - _packagePrice = json['packagePrice']; - _packageDiscount = json['packageDiscount']; - _duration = json['duration']; - _enableSale = json['enableSale']; - _sort = json['sort']; - _isDefault = json['isDefault']; - _isDelete = json['isDelete']; - if (json['tenantPackageSale'] != null) { - _tenantPackageSale = []; - json['tenantPackageSale'].forEach((v) { - _tenantPackageSale.add(TenantPackageSale.fromJson(v)); - }); - } - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _name; - num _status; - String _remark; - dynamic _packagePrice; - dynamic _packageDiscount; - dynamic _duration; - bool _enableSale; - num _sort; - bool _isDefault; - num _isDelete; - List _tenantPackageSale; -TenantPackageList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - num status, - String remark, - dynamic packagePrice, - dynamic packageDiscount, - dynamic duration, - bool enableSale, - num sort, - bool isDefault, - num isDelete, - List tenantPackageSale, -}) => TenantPackageList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - name: name ?? _name, - status: status ?? _status, - remark: remark ?? _remark, - packagePrice: packagePrice ?? _packagePrice, - packageDiscount: packageDiscount ?? _packageDiscount, - duration: duration ?? _duration, - enableSale: enableSale ?? _enableSale, - sort: sort ?? _sort, - isDefault: isDefault ?? _isDefault, - isDelete: isDelete ?? _isDelete, - tenantPackageSale: tenantPackageSale ?? _tenantPackageSale, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get name => _name; - num get status => _status; - String get remark => _remark; - dynamic get packagePrice => _packagePrice; - dynamic get packageDiscount => _packageDiscount; - dynamic get duration => _duration; - bool get enableSale => _enableSale; - num get sort => _sort; - bool get isDefault => _isDefault; - num get isDelete => _isDelete; - List get tenantPackageSale => _tenantPackageSale; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['name'] = _name; - map['status'] = _status; - map['remark'] = _remark; - map['packagePrice'] = _packagePrice; - map['packageDiscount'] = _packageDiscount; - map['duration'] = _duration; - map['enableSale'] = _enableSale; - map['sort'] = _sort; - map['isDefault'] = _isDefault; - map['isDelete'] = _isDelete; - if (_tenantPackageSale != null) { - map['tenantPackageSale'] = _tenantPackageSale.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// packagePrice : "100" -/// originalPackagePrice : "200" -/// duration : 10 -/// packageDiscount : 50 -/// isRecommend : false -/// saleName : "销售套餐1" -/// canDiscount : true - -class TenantPackageSale { - TenantPackageSale({ - String packagePrice, - String originalPackagePrice, - num duration, - num packageDiscount, - bool isRecommend, - String saleName, - bool canDiscount,}){ - _packagePrice = packagePrice; - _originalPackagePrice = originalPackagePrice; - _duration = duration; - _packageDiscount = packageDiscount; - _isRecommend = isRecommend; - _saleName = saleName; - _canDiscount = canDiscount; -} - - TenantPackageSale.fromJson(dynamic json) { - _packagePrice = json['packagePrice']; - _originalPackagePrice = json['originalPackagePrice']; - _duration = json['duration']; - _packageDiscount = json['packageDiscount']; - _isRecommend = json['isRecommend']; - _saleName = json['saleName']; - _canDiscount = json['canDiscount']; - } - String _packagePrice; - String _originalPackagePrice; - num _duration; - num _packageDiscount; - bool _isRecommend; - String _saleName; - bool _canDiscount; -TenantPackageSale copyWith({ String packagePrice, - String originalPackagePrice, - num duration, - num packageDiscount, - bool isRecommend, - String saleName, - bool canDiscount, -}) => TenantPackageSale( packagePrice: packagePrice ?? _packagePrice, - originalPackagePrice: originalPackagePrice ?? _originalPackagePrice, - duration: duration ?? _duration, - packageDiscount: packageDiscount ?? _packageDiscount, - isRecommend: isRecommend ?? _isRecommend, - saleName: saleName ?? _saleName, - canDiscount: canDiscount ?? _canDiscount, -); - String get packagePrice => _packagePrice; - String get originalPackagePrice => _originalPackagePrice; - num get duration => _duration; - num get packageDiscount => _packageDiscount; - bool get isRecommend => _isRecommend; - String get saleName => _saleName; - bool get canDiscount => _canDiscount; - - Map toJson() { - final map = {}; - map['packagePrice'] = _packagePrice; - map['originalPackagePrice'] = _originalPackagePrice; - map['duration'] = _duration; - map['packageDiscount'] = _packageDiscount; - map['isRecommend'] = _isRecommend; - map['saleName'] = _saleName; - map['canDiscount'] = _canDiscount; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/ticket_details.dart b/lib/retrofit/data/ticket_details.dart deleted file mode 100644 index c1d775f7..00000000 --- a/lib/retrofit/data/ticket_details.dart +++ /dev/null @@ -1,477 +0,0 @@ -/// id : "1720379729141301248" -/// createTime : "2023-11-03 17:57:45" -/// createUser : "0" -/// updateTime : "2023-11-03 17:57:45" -/// updateUser : "0" -/// mid : "1379254113602109440" -/// storeId : "1645318098540036096" -/// orderId : "1720379636644315136" -/// orderProductId : "1720379636782727168" -/// productId : "1645714128276291584" -/// productSkuId : "1645714128343400448" -/// ticketWipedTimeTemplateId : "0" -/// amount : "0.01" -/// name : "四神汤 " -/// code : "T202311031757452621760001" -/// useStartTime : "2023-11-03 00:00:00" -/// useEndTime : "2023-12-02 17:57:45" -/// finishTime : null -/// type : "NORMAL" -/// source : null -/// takeType : null -/// style : "" -/// state : 1 -/// canSettlement : true -/// canSubscribe : true -/// isDelete : 0 -/// tenantCode : "1195" -/// ticketItemList : [{"id":"1720379729216798720","createTime":"2023-11-03 17:57:45","createUser":"0","updateTime":"2023-11-03 17:57:45","updateUser":"0","ticketId":"1720379729141301248","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195","canWipedNumber":1},{"id":"1720379729195827200","createTime":"2023-11-03 17:57:45","createUser":"0","updateTime":"2023-11-03 17:57:45","updateUser":"0","ticketId":"1720379729141301248","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195","canWipedNumber":1}] -/// userName : "" -/// userAvatar : "" -/// isogenyNumber : 1 -/// businessStartDate : null -/// businessEndDate : null - -class TicketDetails { - TicketDetails({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - String ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - dynamic finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode, - List ticketItemList, - String userName, - String userAvatar, - num isogenyNumber, - dynamic businessStartDate, - dynamic businessEndDate,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _storeId = storeId; - _orderId = orderId; - _orderProductId = orderProductId; - _productId = productId; - _productSkuId = productSkuId; - _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; - _amount = amount; - _name = name; - _code = code; - _useStartTime = useStartTime; - _useEndTime = useEndTime; - _finishTime = finishTime; - _type = type; - _source = source; - _takeType = takeType; - _style = style; - _state = state; - _canSettlement = canSettlement; - _canSubscribe = canSubscribe; - _isDelete = isDelete; - _tenantCode = tenantCode; - _ticketItemList = ticketItemList; - _userName = userName; - _userAvatar = userAvatar; - _isogenyNumber = isogenyNumber; - _businessStartDate = businessStartDate; - _businessEndDate = businessEndDate; -} - - TicketDetails.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _storeId = json['storeId']; - _orderId = json['orderId']; - _orderProductId = json['orderProductId']; - _productId = json['productId']; - _productSkuId = json['productSkuId']; - _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; - _amount = json['amount']; - _name = json['name']; - _code = json['code']; - _useStartTime = json['useStartTime']; - _useEndTime = json['useEndTime']; - _finishTime = json['finishTime']; - _type = json['type']; - _source = json['source']; - _takeType = json['takeType']; - _style = json['style']; - _state = json['state']; - _canSettlement = json['canSettlement']; - _canSubscribe = json['canSubscribe']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - if (json['ticketItemList'] != null) { - _ticketItemList = []; - json['ticketItemList'].forEach((v) { - _ticketItemList.add(TicketItemList.fromJson(v)); - }); - } - _userName = json['userName']; - _userAvatar = json['userAvatar']; - _isogenyNumber = json['isogenyNumber']; - _businessStartDate = json['businessStartDate']; - _businessEndDate = json['businessEndDate']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _storeId; - String _orderId; - String _orderProductId; - String _productId; - String _productSkuId; - String _ticketWipedTimeTemplateId; - String _amount; - String _name; - String _code; - String _useStartTime; - String _useEndTime; - dynamic _finishTime; - String _type; - dynamic _source; - dynamic _takeType; - String _style; - num _state; - bool _canSettlement; - bool _canSubscribe; - num _isDelete; - String _tenantCode; - List _ticketItemList; - String _userName; - String _userAvatar; - num _isogenyNumber; - dynamic _businessStartDate; - dynamic _businessEndDate; -TicketDetails copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - String ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - dynamic finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode, - List ticketItemList, - String userName, - String userAvatar, - num isogenyNumber, - dynamic businessStartDate, - dynamic businessEndDate, -}) => TicketDetails( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - storeId: storeId ?? _storeId, - orderId: orderId ?? _orderId, - orderProductId: orderProductId ?? _orderProductId, - productId: productId ?? _productId, - productSkuId: productSkuId ?? _productSkuId, - ticketWipedTimeTemplateId: ticketWipedTimeTemplateId ?? _ticketWipedTimeTemplateId, - amount: amount ?? _amount, - name: name ?? _name, - code: code ?? _code, - useStartTime: useStartTime ?? _useStartTime, - useEndTime: useEndTime ?? _useEndTime, - finishTime: finishTime ?? _finishTime, - type: type ?? _type, - source: source ?? _source, - takeType: takeType ?? _takeType, - style: style ?? _style, - state: state ?? _state, - canSettlement: canSettlement ?? _canSettlement, - canSubscribe: canSubscribe ?? _canSubscribe, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, - ticketItemList: ticketItemList ?? _ticketItemList, - userName: userName ?? _userName, - userAvatar: userAvatar ?? _userAvatar, - isogenyNumber: isogenyNumber ?? _isogenyNumber, - businessStartDate: businessStartDate ?? _businessStartDate, - businessEndDate: businessEndDate ?? _businessEndDate, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get storeId => _storeId; - String get orderId => _orderId; - String get orderProductId => _orderProductId; - String get productId => _productId; - String get productSkuId => _productSkuId; - String get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; - String get amount => _amount; - String get name => _name; - String get code => _code; - String get useStartTime => _useStartTime; - String get useEndTime => _useEndTime; - dynamic get finishTime => _finishTime; - String get type => _type; - dynamic get source => _source; - dynamic get takeType => _takeType; - String get style => _style; - num get state => _state; - bool get canSettlement => _canSettlement; - bool get canSubscribe => _canSubscribe; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - List get ticketItemList => _ticketItemList; - String get userName => _userName; - String get userAvatar => _userAvatar; - num get isogenyNumber => _isogenyNumber; - dynamic get businessStartDate => _businessStartDate; - dynamic get businessEndDate => _businessEndDate; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['storeId'] = _storeId; - map['orderId'] = _orderId; - map['orderProductId'] = _orderProductId; - map['productId'] = _productId; - map['productSkuId'] = _productSkuId; - map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; - map['amount'] = _amount; - map['name'] = _name; - map['code'] = _code; - map['useStartTime'] = _useStartTime; - map['useEndTime'] = _useEndTime; - map['finishTime'] = _finishTime; - map['type'] = _type; - map['source'] = _source; - map['takeType'] = _takeType; - map['style'] = _style; - map['state'] = _state; - map['canSettlement'] = _canSettlement; - map['canSubscribe'] = _canSubscribe; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - if (_ticketItemList != null) { - map['ticketItemList'] = _ticketItemList.map((v) => v.toJson()).toList(); - } - map['userName'] = _userName; - map['userAvatar'] = _userAvatar; - map['isogenyNumber'] = _isogenyNumber; - map['businessStartDate'] = _businessStartDate; - map['businessEndDate'] = _businessEndDate; - return map; - } - -} - -/// id : "1720379729216798720" -/// createTime : "2023-11-03 17:57:45" -/// createUser : "0" -/// updateTime : "2023-11-03 17:57:45" -/// updateUser : "0" -/// ticketId : "1720379729141301248" -/// relationType : "PRODUCT" -/// relationId : "1645714128343400448" -/// name : "测试规格222" -/// showImage : "" -/// state : 1 -/// finishTime : null -/// isDelete : 0 -/// tenantCode : "1195" -/// canWipedNumber : 1 - -class TicketItemList { - TicketItemList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String relationType, - String relationId, - String name, - String showImage, - num state, - dynamic finishTime, - num isDelete, - String tenantCode, - num canWipedNumber,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _ticketId = ticketId; - _relationType = relationType; - _relationId = relationId; - _name = name; - _showImage = showImage; - _state = state; - _finishTime = finishTime; - _isDelete = isDelete; - _tenantCode = tenantCode; - _canWipedNumber = canWipedNumber; -} - - TicketItemList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _ticketId = json['ticketId']; - _relationType = json['relationType']; - _relationId = json['relationId']; - _name = json['name']; - _showImage = json['showImage']; - _state = json['state']; - _finishTime = json['finishTime']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - _canWipedNumber = json['canWipedNumber']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _ticketId; - String _relationType; - String _relationId; - String _name; - String _showImage; - num _state; - dynamic _finishTime; - num _isDelete; - String _tenantCode; - num _canWipedNumber; -TicketItemList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String relationType, - String relationId, - String name, - String showImage, - num state, - dynamic finishTime, - num isDelete, - String tenantCode, - num canWipedNumber, -}) => TicketItemList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - ticketId: ticketId ?? _ticketId, - relationType: relationType ?? _relationType, - relationId: relationId ?? _relationId, - name: name ?? _name, - showImage: showImage ?? _showImage, - state: state ?? _state, - finishTime: finishTime ?? _finishTime, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, - canWipedNumber: canWipedNumber ?? _canWipedNumber, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get ticketId => _ticketId; - String get relationType => _relationType; - String get relationId => _relationId; - String get name => _name; - String get showImage => _showImage; - num get state => _state; - dynamic get finishTime => _finishTime; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - num get canWipedNumber => _canWipedNumber; - bool _isSelect = false; - - bool get isSelect => _isSelect; - - set isSelect(bool value) { - _isSelect = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['ticketId'] = _ticketId; - map['relationType'] = _relationType; - map['relationId'] = _relationId; - map['name'] = _name; - map['showImage'] = _showImage; - map['state'] = _state; - map['finishTime'] = _finishTime; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - map['canWipedNumber'] = _canWipedNumber; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/ticket_record.dart b/lib/retrofit/data/ticket_record.dart deleted file mode 100644 index ebb83c15..00000000 --- a/lib/retrofit/data/ticket_record.dart +++ /dev/null @@ -1,709 +0,0 @@ -/// pageNum : 1 -/// pageSize : 10 -/// size : 10 -/// pages : 9 -/// hasPreviousPage : false -/// hasNextPage : true -/// total : "89" -/// list : [{"id":"1724705264982032384","createTime":"2023-11-15 16:25:53","createUser":"1640233401329909760","updateTime":"2023-11-15 16:25:53","updateUser":"1640233401329909760","ticketId":"1724374425798705152","ticketCode":"T202311141831153237860001","ticketName":"四神汤 ","ticketItemIds":["1724374425903562752"],"finishTime":"2023-11-15 16:25:53","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724374425798705152","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724374364566061056","orderProductId":"1724374364817719296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141831153237860001","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 18:31:15","finishTime":"2023-11-15 16:25:54","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724374425903562752","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","ticketId":"1724374425798705152","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":9,"finishTime":"2023-11-15 16:25:53","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724704390121521152","createTime":"2023-11-15 16:22:25","createUser":"1640233401329909760","updateTime":"2023-11-15 16:22:25","updateUser":"1640233401329909760","ticketId":"1724348609991802880","ticketCode":"T202311141648406370470003","ticketName":"台湾粽 ","ticketItemIds":["1724348610033745920"],"finishTime":"2023-11-15 16:22:25","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724348609991802880","createTime":"2023-11-14 16:48:40","createUser":"0","updateTime":"2023-11-14 16:48:40","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348544648740864","orderProductId":"1724348544715849728","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141648406370470003","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:48:40","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724348610033745920","createTime":"2023-11-14 16:48:40","createUser":"0","updateTime":"2023-11-14 16:48:40","updateUser":"0","ticketId":"1724348609991802880","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":9,"finishTime":"2023-11-15 16:22:25","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724704299910430720","createTime":"2023-11-15 16:22:03","createUser":"1640233401329909760","updateTime":"2023-11-15 16:22:03","updateUser":"1640233401329909760","ticketId":"1724348609991802880","ticketCode":"T202311141648406370470003","ticketName":"台湾粽 ","ticketItemIds":["1724348610037940224"],"finishTime":"2023-11-15 16:22:03","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724348609991802880","createTime":"2023-11-14 16:48:40","createUser":"0","updateTime":"2023-11-14 16:48:40","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348544648740864","orderProductId":"1724348544715849728","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141648406370470003","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:48:40","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724348610037940224","createTime":"2023-11-14 16:48:40","createUser":"0","updateTime":"2023-11-14 16:48:40","updateUser":"0","ticketId":"1724348609991802880","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目33","showImage":"","state":9,"finishTime":"2023-11-15 16:22:03","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724610506108436480","createTime":"2023-11-15 10:09:21","createUser":"1640233401329909760","updateTime":"2023-11-15 10:09:21","updateUser":"1640233401329909760","ticketId":"1724348845887848448","ticketCode":"T202311141649367069660005","ticketName":"四神汤 ","ticketItemIds":["1724348845933985792"],"finishTime":"2023-11-15 10:09:21","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724348845887848448","createTime":"2023-11-14 16:49:36","createUser":"0","updateTime":"2023-11-14 16:49:36","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348797322002432","orderProductId":"1724348797389111296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141649367069660005","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:49:36","finishTime":"2023-11-15 10:09:22","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724348845933985792","createTime":"2023-11-14 16:49:36","createUser":"0","updateTime":"2023-11-14 16:49:36","updateUser":"0","ticketId":"1724348845887848448","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":9,"finishTime":"2023-11-15 10:09:21","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724608421967167488","createTime":"2023-11-15 10:01:04","createUser":"1640233401329909760","updateTime":"2023-11-15 10:01:04","updateUser":"1640233401329909760","ticketId":"1724358600903622656","ticketCode":"T202311141728226409980002","ticketName":"四神汤 ","ticketItemIds":["1724358600987508736"],"finishTime":"2023-11-15 10:01:04","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724358600903622656","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724358540404981760","orderProductId":"1724358540778274816","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141728226409980002","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 17:28:22","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724358600987508736","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","ticketId":"1724358600903622656","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":9,"finishTime":"2023-11-15 10:01:04","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724607895644930048","createTime":"2023-11-15 09:58:59","createUser":"1640233401329909760","updateTime":"2023-11-15 09:58:59","updateUser":"1640233401329909760","ticketId":"1724358600836513792","ticketCode":"T202311141728222105430001","ticketName":"台湾粽 ","ticketItemIds":["1724358600970731520"],"finishTime":"2023-11-15 09:58:59","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724358600836513792","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724358540404981760","orderProductId":"1724358540723748864","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141728222105430001","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 17:28:22","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724358600970731520","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","ticketId":"1724358600836513792","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":9,"finishTime":"2023-11-15 09:58:59","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724375348973404160","createTime":"2023-11-14 18:34:55","createUser":"1640233401329909760","updateTime":"2023-11-14 18:34:55","updateUser":"1640233401329909760","ticketId":"1724358600836513792","ticketCode":"T202311141728222105430001","ticketName":"台湾粽 ","ticketItemIds":["1724358600945565696"],"finishTime":"2023-11-14 18:34:55","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724358600836513792","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724358540404981760","orderProductId":"1724358540723748864","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141728222105430001","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 17:28:22","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724358600945565696","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","ticketId":"1724358600836513792","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目11","showImage":"","state":9,"finishTime":"2023-11-14 18:34:55","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724374711074291712","createTime":"2023-11-14 18:32:23","createUser":"1640233401329909760","updateTime":"2023-11-14 18:32:23","updateUser":"1640233401329909760","ticketId":"1724374425798705152","ticketCode":"T202311141831153237860001","ticketName":"四神汤 ","ticketItemIds":["1724374425882591232"],"finishTime":"2023-11-14 18:32:23","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724374425798705152","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724374364566061056","orderProductId":"1724374364817719296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141831153237860001","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 18:31:15","finishTime":"2023-11-15 16:25:54","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724374425882591232","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","ticketId":"1724374425798705152","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":9,"finishTime":"2023-11-14 18:32:23","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724354767272017920","createTime":"2023-11-14 17:13:08","createUser":"1640233401329909760","updateTime":"2023-11-14 17:13:08","updateUser":"1640233401329909760","ticketId":"1724348845887848448","ticketCode":"T202311141649367069660005","ticketName":"四神汤 ","ticketItemIds":["1724348845913014272"],"finishTime":"2023-11-14 17:13:08","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724348845887848448","createTime":"2023-11-14 16:49:36","createUser":"0","updateTime":"2023-11-14 16:49:36","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348797322002432","orderProductId":"1724348797389111296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141649367069660005","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:49:36","finishTime":"2023-11-15 10:09:22","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724348845913014272","createTime":"2023-11-14 16:49:36","createUser":"0","updateTime":"2023-11-14 16:49:36","updateUser":"0","ticketId":"1724348845887848448","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":9,"finishTime":"2023-11-14 17:13:08","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null},{"id":"1724352764873539584","createTime":"2023-11-14 17:05:11","createUser":"1640233401329909760","updateTime":"2023-11-14 17:05:11","updateUser":"1640233401329909760","ticketId":"1724348917321039872","ticketCode":"T202311141649539811200006","ticketName":"台湾粽 ","ticketItemIds":["1724348917371371520"],"finishTime":"2023-11-14 17:05:11","wipedUserId":"1640233401329909760","wipedUserName":"郑州小吃街","wipedStoreId":"0","isDelete":0,"tenantCode":"1195","ticket":{"id":"1724348917321039872","createTime":"2023-11-14 16:49:53","createUser":"0","updateTime":"2023-11-14 16:49:53","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348875256365056","orderProductId":"1724348875348639744","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141649539811200006","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:49:53","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"},"ticketItems":[{"id":"1724348917371371520","createTime":"2023-11-14 16:49:53","createUser":"0","updateTime":"2023-11-14 16:49:53","updateUser":"0","ticketId":"1724348917321039872","relationType":"PRODUCT","relationId":"1645981572102356992","name":"测试票券项目22","showImage":"","state":9,"finishTime":"2023-11-14 17:05:11","isDelete":0,"tenantCode":"1195","canWipedNumber":1}],"userName":null,"userAvatar":null,"userPhone":null}] - -class TicketRecord { - TicketRecord({ - num pageNum, - num pageSize, - num size, - num pages, - bool hasPreviousPage, - bool hasNextPage, - String total, - List list,}){ - _pageNum = pageNum; - _pageSize = pageSize; - _size = size; - _pages = pages; - _hasPreviousPage = hasPreviousPage; - _hasNextPage = hasNextPage; - _total = total; - _list = list; -} - - TicketRecord.fromJson(dynamic json) { - _pageNum = json['pageNum']; - _pageSize = json['pageSize']; - _size = json['size']; - _pages = json['pages']; - _hasPreviousPage = json['hasPreviousPage']; - _hasNextPage = json['hasNextPage']; - _total = json['total']; - if (json['list'] != null) { - _list = []; - json['list'].forEach((v) { - _list.add(TicketRecordList.fromJson(v)); - }); - } - } - num _pageNum; - num _pageSize; - num _size; - num _pages; - bool _hasPreviousPage; - bool _hasNextPage; - String _total; - List _list; -TicketRecord copyWith({ num pageNum, - num pageSize, - num size, - num pages, - bool hasPreviousPage, - bool hasNextPage, - String total, - List list, -}) => TicketRecord( pageNum: pageNum ?? _pageNum, - pageSize: pageSize ?? _pageSize, - size: size ?? _size, - pages: pages ?? _pages, - hasPreviousPage: hasPreviousPage ?? _hasPreviousPage, - hasNextPage: hasNextPage ?? _hasNextPage, - total: total ?? _total, - list: list ?? _list, -); - num get pageNum => _pageNum; - num get pageSize => _pageSize; - num get size => _size; - num get pages => _pages; - bool get hasPreviousPage => _hasPreviousPage; - bool get hasNextPage => _hasNextPage; - String get total => _total; - List get list => _list; - - Map toJson() { - final map = {}; - map['pageNum'] = _pageNum; - map['pageSize'] = _pageSize; - map['size'] = _size; - map['pages'] = _pages; - map['hasPreviousPage'] = _hasPreviousPage; - map['hasNextPage'] = _hasNextPage; - map['total'] = _total; - if (_list != null) { - map['list'] = _list.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1724705264982032384" -/// createTime : "2023-11-15 16:25:53" -/// createUser : "1640233401329909760" -/// updateTime : "2023-11-15 16:25:53" -/// updateUser : "1640233401329909760" -/// ticketId : "1724374425798705152" -/// ticketCode : "T202311141831153237860001" -/// ticketName : "四神汤 " -/// ticketItemIds : ["1724374425903562752"] -/// finishTime : "2023-11-15 16:25:53" -/// wipedUserId : "1640233401329909760" -/// wipedUserName : "郑州小吃街" -/// wipedStoreId : "0" -/// isDelete : 0 -/// tenantCode : "1195" -/// ticket : {"id":"1724374425798705152","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724374364566061056","orderProductId":"1724374364817719296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141831153237860001","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 18:31:15","finishTime":"2023-11-15 16:25:54","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195"} -/// ticketItems : [{"id":"1724374425903562752","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","ticketId":"1724374425798705152","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":9,"finishTime":"2023-11-15 16:25:53","isDelete":0,"tenantCode":"1195","canWipedNumber":1}] -/// userName : null -/// userAvatar : null -/// userPhone : null - -class TicketRecordList { - TicketRecordList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String ticketCode, - String ticketName, - List ticketItemIds, - String finishTime, - String wipedUserId, - String wipedUserName, - String wipedStoreId, - num isDelete, - String tenantCode, - Ticket ticket, - List ticketItems, - dynamic userName, - dynamic userAvatar, - dynamic userPhone,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _ticketId = ticketId; - _ticketCode = ticketCode; - _ticketName = ticketName; - _ticketItemIds = ticketItemIds; - _finishTime = finishTime; - _wipedUserId = wipedUserId; - _wipedUserName = wipedUserName; - _wipedStoreId = wipedStoreId; - _isDelete = isDelete; - _tenantCode = tenantCode; - _ticket = ticket; - _ticketItems = ticketItems; - _userName = userName; - _userAvatar = userAvatar; - _userPhone = userPhone; -} - - TicketRecordList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _ticketId = json['ticketId']; - _ticketCode = json['ticketCode']; - _ticketName = json['ticketName']; - _ticketItemIds = json['ticketItemIds'] != null ? json['ticketItemIds'].cast() : []; - _finishTime = json['finishTime']; - _wipedUserId = json['wipedUserId']; - _wipedUserName = json['wipedUserName']; - _wipedStoreId = json['wipedStoreId']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - _ticket = json['ticket'] != null ? Ticket.fromJson(json['ticket']) : null; - if (json['ticketItems'] != null) { - _ticketItems = []; - json['ticketItems'].forEach((v) { - _ticketItems.add(TicketItems.fromJson(v)); - }); - } - _userName = json['userName']; - _userAvatar = json['userAvatar']; - _userPhone = json['userPhone']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _ticketId; - String _ticketCode; - String _ticketName; - List _ticketItemIds; - String _finishTime; - String _wipedUserId; - String _wipedUserName; - String _wipedStoreId; - num _isDelete; - String _tenantCode; - Ticket _ticket; - List _ticketItems; - dynamic _userName; - dynamic _userAvatar; - dynamic _userPhone; - TicketRecordList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String ticketCode, - String ticketName, - List ticketItemIds, - String finishTime, - String wipedUserId, - String wipedUserName, - String wipedStoreId, - num isDelete, - String tenantCode, - Ticket ticket, - List ticketItems, - dynamic userName, - dynamic userAvatar, - dynamic userPhone, -}) => TicketRecordList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - ticketId: ticketId ?? _ticketId, - ticketCode: ticketCode ?? _ticketCode, - ticketName: ticketName ?? _ticketName, - ticketItemIds: ticketItemIds ?? _ticketItemIds, - finishTime: finishTime ?? _finishTime, - wipedUserId: wipedUserId ?? _wipedUserId, - wipedUserName: wipedUserName ?? _wipedUserName, - wipedStoreId: wipedStoreId ?? _wipedStoreId, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, - ticket: ticket ?? _ticket, - ticketItems: ticketItems ?? _ticketItems, - userName: userName ?? _userName, - userAvatar: userAvatar ?? _userAvatar, - userPhone: userPhone ?? _userPhone, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get ticketId => _ticketId; - String get ticketCode => _ticketCode; - String get ticketName => _ticketName; - List get ticketItemIds => _ticketItemIds; - String get finishTime => _finishTime; - String get wipedUserId => _wipedUserId; - String get wipedUserName => _wipedUserName; - String get wipedStoreId => _wipedStoreId; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - Ticket get ticket => _ticket; - List get ticketItems => _ticketItems; - dynamic get userName => _userName; - dynamic get userAvatar => _userAvatar; - dynamic get userPhone => _userPhone; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['ticketId'] = _ticketId; - map['ticketCode'] = _ticketCode; - map['ticketName'] = _ticketName; - map['ticketItemIds'] = _ticketItemIds; - map['finishTime'] = _finishTime; - map['wipedUserId'] = _wipedUserId; - map['wipedUserName'] = _wipedUserName; - map['wipedStoreId'] = _wipedStoreId; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - if (_ticket != null) { - map['ticket'] = _ticket.toJson(); - } - if (_ticketItems != null) { - map['ticketItems'] = _ticketItems.map((v) => v.toJson()).toList(); - } - map['userName'] = _userName; - map['userAvatar'] = _userAvatar; - map['userPhone'] = _userPhone; - return map; - } - -} - -/// id : "1724374425903562752" -/// createTime : "2023-11-14 18:31:15" -/// createUser : "0" -/// updateTime : "2023-11-14 18:31:15" -/// updateUser : "0" -/// ticketId : "1724374425798705152" -/// relationType : "PRODUCT" -/// relationId : "1645714128343400448" -/// name : "测试规格222" -/// showImage : "" -/// state : 9 -/// finishTime : "2023-11-15 16:25:53" -/// isDelete : 0 -/// tenantCode : "1195" -/// canWipedNumber : 1 - -class TicketItems { - TicketItems({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String relationType, - String relationId, - String name, - String showImage, - num state, - String finishTime, - num isDelete, - String tenantCode, - num canWipedNumber,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _ticketId = ticketId; - _relationType = relationType; - _relationId = relationId; - _name = name; - _showImage = showImage; - _state = state; - _finishTime = finishTime; - _isDelete = isDelete; - _tenantCode = tenantCode; - _canWipedNumber = canWipedNumber; -} - - TicketItems.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _ticketId = json['ticketId']; - _relationType = json['relationType']; - _relationId = json['relationId']; - _name = json['name']; - _showImage = json['showImage']; - _state = json['state']; - _finishTime = json['finishTime']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - _canWipedNumber = json['canWipedNumber']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _ticketId; - String _relationType; - String _relationId; - String _name; - String _showImage; - num _state; - String _finishTime; - num _isDelete; - String _tenantCode; - num _canWipedNumber; -TicketItems copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String ticketId, - String relationType, - String relationId, - String name, - String showImage, - num state, - String finishTime, - num isDelete, - String tenantCode, - num canWipedNumber, -}) => TicketItems( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - ticketId: ticketId ?? _ticketId, - relationType: relationType ?? _relationType, - relationId: relationId ?? _relationId, - name: name ?? _name, - showImage: showImage ?? _showImage, - state: state ?? _state, - finishTime: finishTime ?? _finishTime, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, - canWipedNumber: canWipedNumber ?? _canWipedNumber, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get ticketId => _ticketId; - String get relationType => _relationType; - String get relationId => _relationId; - String get name => _name; - String get showImage => _showImage; - num get state => _state; - String get finishTime => _finishTime; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - num get canWipedNumber => _canWipedNumber; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['ticketId'] = _ticketId; - map['relationType'] = _relationType; - map['relationId'] = _relationId; - map['name'] = _name; - map['showImage'] = _showImage; - map['state'] = _state; - map['finishTime'] = _finishTime; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - map['canWipedNumber'] = _canWipedNumber; - return map; - } - -} - -/// id : "1724374425798705152" -/// createTime : "2023-11-14 18:31:15" -/// createUser : "0" -/// updateTime : "2023-11-14 18:31:15" -/// updateUser : "0" -/// mid : "1379254113602109440" -/// storeId : "1645318098540036096" -/// orderId : "1724374364566061056" -/// orderProductId : "1724374364817719296" -/// productId : "1645714128276291584" -/// productSkuId : "1645714128343400448" -/// ticketWipedTimeTemplateId : "0" -/// amount : "0.01" -/// name : "四神汤 " -/// code : "T202311141831153237860001" -/// useStartTime : "2023-11-14 00:00:00" -/// useEndTime : "2023-12-13 18:31:15" -/// finishTime : "2023-11-15 16:25:54" -/// type : "NORMAL" -/// source : null -/// takeType : null -/// style : "" -/// state : 9 -/// canSettlement : true -/// canSubscribe : true -/// isDelete : 0 -/// tenantCode : "1195" - -class Ticket { - Ticket({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - String ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - String finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _storeId = storeId; - _orderId = orderId; - _orderProductId = orderProductId; - _productId = productId; - _productSkuId = productSkuId; - _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; - _amount = amount; - _name = name; - _code = code; - _useStartTime = useStartTime; - _useEndTime = useEndTime; - _finishTime = finishTime; - _type = type; - _source = source; - _takeType = takeType; - _style = style; - _state = state; - _canSettlement = canSettlement; - _canSubscribe = canSubscribe; - _isDelete = isDelete; - _tenantCode = tenantCode; -} - - Ticket.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _storeId = json['storeId']; - _orderId = json['orderId']; - _orderProductId = json['orderProductId']; - _productId = json['productId']; - _productSkuId = json['productSkuId']; - _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; - _amount = json['amount']; - _name = json['name']; - _code = json['code']; - _useStartTime = json['useStartTime']; - _useEndTime = json['useEndTime']; - _finishTime = json['finishTime']; - _type = json['type']; - _source = json['source']; - _takeType = json['takeType']; - _style = json['style']; - _state = json['state']; - _canSettlement = json['canSettlement']; - _canSubscribe = json['canSubscribe']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _storeId; - String _orderId; - String _orderProductId; - String _productId; - String _productSkuId; - String _ticketWipedTimeTemplateId; - String _amount; - String _name; - String _code; - String _useStartTime; - String _useEndTime; - String _finishTime; - String _type; - dynamic _source; - dynamic _takeType; - String _style; - num _state; - bool _canSettlement; - bool _canSubscribe; - num _isDelete; - String _tenantCode; -Ticket copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - String ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - String finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode, -}) => Ticket( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - storeId: storeId ?? _storeId, - orderId: orderId ?? _orderId, - orderProductId: orderProductId ?? _orderProductId, - productId: productId ?? _productId, - productSkuId: productSkuId ?? _productSkuId, - ticketWipedTimeTemplateId: ticketWipedTimeTemplateId ?? _ticketWipedTimeTemplateId, - amount: amount ?? _amount, - name: name ?? _name, - code: code ?? _code, - useStartTime: useStartTime ?? _useStartTime, - useEndTime: useEndTime ?? _useEndTime, - finishTime: finishTime ?? _finishTime, - type: type ?? _type, - source: source ?? _source, - takeType: takeType ?? _takeType, - style: style ?? _style, - state: state ?? _state, - canSettlement: canSettlement ?? _canSettlement, - canSubscribe: canSubscribe ?? _canSubscribe, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get storeId => _storeId; - String get orderId => _orderId; - String get orderProductId => _orderProductId; - String get productId => _productId; - String get productSkuId => _productSkuId; - String get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; - String get amount => _amount; - String get name => _name; - String get code => _code; - String get useStartTime => _useStartTime; - String get useEndTime => _useEndTime; - String get finishTime => _finishTime; - String get type => _type; - dynamic get source => _source; - dynamic get takeType => _takeType; - String get style => _style; - num get state => _state; - bool get canSettlement => _canSettlement; - bool get canSubscribe => _canSubscribe; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['storeId'] = _storeId; - map['orderId'] = _orderId; - map['orderProductId'] = _orderProductId; - map['productId'] = _productId; - map['productSkuId'] = _productSkuId; - map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; - map['amount'] = _amount; - map['name'] = _name; - map['code'] = _code; - map['useStartTime'] = _useStartTime; - map['useEndTime'] = _useEndTime; - map['finishTime'] = _finishTime; - map['type'] = _type; - map['source'] = _source; - map['takeType'] = _takeType; - map['style'] = _style; - map['state'] = _state; - map['canSettlement'] = _canSettlement; - map['canSubscribe'] = _canSubscribe; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/ticket_show.dart b/lib/retrofit/data/ticket_show.dart deleted file mode 100644 index 83ae281c..00000000 --- a/lib/retrofit/data/ticket_show.dart +++ /dev/null @@ -1,380 +0,0 @@ -/// pageNum : 1 -/// pageSize : 10 -/// size : 10 -/// pages : 15 -/// hasPreviousPage : false -/// hasNextPage : true -/// total : "141" -/// list : [{"id":"1726808185014059008","createTime":"2023-11-21 11:42:09","createUser":"0","updateTime":"2023-11-21 11:42:09","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1726808134187483136","orderProductId":"1726808134355255296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311211142080717340001","useStartTime":"2023-11-21 00:00:00","useEndTime":"2023-12-20 11:42:08","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724374425849036800","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724374364566061056","orderProductId":"1724374364817719296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141831155981340002","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 18:31:15","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724374425798705152","createTime":"2023-11-14 18:31:15","createUser":"0","updateTime":"2023-11-14 18:31:15","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724374364566061056","orderProductId":"1724374364817719296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141831153237860001","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 18:31:15","finishTime":"2023-11-15 16:25:54","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724358600903622656","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724358540404981760","orderProductId":"1724358540778274816","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141728226409980002","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 17:28:22","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724358600836513792","createTime":"2023-11-14 17:28:22","createUser":"0","updateTime":"2023-11-14 17:28:22","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724358540404981760","orderProductId":"1724358540723748864","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141728222105430001","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 17:28:22","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724349046040035328","createTime":"2023-11-14 16:50:24","createUser":"0","updateTime":"2023-11-14 16:50:24","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724349002641571840","orderProductId":"1724349002704486400","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141650240387860007","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:50:24","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724348917321039872","createTime":"2023-11-14 16:49:53","createUser":"0","updateTime":"2023-11-14 16:49:53","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348875256365056","orderProductId":"1724348875348639744","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141649539811200006","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:49:53","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724348845887848448","createTime":"2023-11-14 16:49:36","createUser":"0","updateTime":"2023-11-14 16:49:36","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348797322002432","orderProductId":"1724348797389111296","productId":"1645714128276291584","productSkuId":"1645714128343400448","ticketWipedTimeTemplateId":"0","amount":"0.01","name":"四神汤 ","code":"T202311141649367069660005","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:49:36","finishTime":"2023-11-15 10:09:22","type":"NORMAL","source":null,"takeType":null,"style":"","state":9,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724348766061854720","createTime":"2023-11-14 16:49:17","createUser":"0","updateTime":"2023-11-14 16:49:17","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348724877983744","orderProductId":"1724348724940898304","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141649173932870004","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:49:17","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":1,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null},{"id":"1724348609991802880","createTime":"2023-11-14 16:48:40","createUser":"0","updateTime":"2023-11-14 16:48:40","updateUser":"0","mid":"1379254113602109440","storeId":"1645318098540036096","orderId":"1724348544648740864","orderProductId":"1724348544715849728","productId":"1645981572022665216","productSkuId":"1645981572102356992","ticketWipedTimeTemplateId":null,"amount":"10.00","name":"台湾粽 ","code":"T202311141648406370470003","useStartTime":"2023-11-14 00:00:00","useEndTime":"2023-12-13 16:48:40","finishTime":null,"type":"NORMAL","source":null,"takeType":null,"style":"","state":2,"canSettlement":true,"canSubscribe":true,"isDelete":0,"tenantCode":"1195","nickName":null,"userAvatar":null,"userPhone":null}] - -class TicketShow { - TicketShow({ - num pageNum, - num pageSize, - num size, - num pages, - bool hasPreviousPage, - bool hasNextPage, - String total, - List list,}){ - _pageNum = pageNum; - _pageSize = pageSize; - _size = size; - _pages = pages; - _hasPreviousPage = hasPreviousPage; - _hasNextPage = hasNextPage; - _total = total; - _list = list; -} - - TicketShow.fromJson(dynamic json) { - _pageNum = json['pageNum']; - _pageSize = json['pageSize']; - _size = json['size']; - _pages = json['pages']; - _hasPreviousPage = json['hasPreviousPage']; - _hasNextPage = json['hasNextPage']; - _total = json['total']; - if (json['list'] != null) { - _list = []; - json['list'].forEach((v) { - _list.add(TicketShowList.fromJson(v)); - }); - } - } - num _pageNum; - num _pageSize; - num _size; - num _pages; - bool _hasPreviousPage; - bool _hasNextPage; - String _total; - List _list; -TicketShow copyWith({ num pageNum, - num pageSize, - num size, - num pages, - bool hasPreviousPage, - bool hasNextPage, - String total, - List list, -}) => TicketShow( pageNum: pageNum ?? _pageNum, - pageSize: pageSize ?? _pageSize, - size: size ?? _size, - pages: pages ?? _pages, - hasPreviousPage: hasPreviousPage ?? _hasPreviousPage, - hasNextPage: hasNextPage ?? _hasNextPage, - total: total ?? _total, - list: list ?? _list, -); - num get pageNum => _pageNum; - num get pageSize => _pageSize; - num get size => _size; - num get pages => _pages; - bool get hasPreviousPage => _hasPreviousPage; - bool get hasNextPage => _hasNextPage; - String get total => _total; - List get list => _list; - - Map toJson() { - final map = {}; - map['pageNum'] = _pageNum; - map['pageSize'] = _pageSize; - map['size'] = _size; - map['pages'] = _pages; - map['hasPreviousPage'] = _hasPreviousPage; - map['hasNextPage'] = _hasNextPage; - map['total'] = _total; - if (_list != null) { - map['list'] = _list.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1726808185014059008" -/// createTime : "2023-11-21 11:42:09" -/// createUser : "0" -/// updateTime : "2023-11-21 11:42:09" -/// updateUser : "0" -/// mid : "1379254113602109440" -/// storeId : "1645318098540036096" -/// orderId : "1726808134187483136" -/// orderProductId : "1726808134355255296" -/// productId : "1645714128276291584" -/// productSkuId : "1645714128343400448" -/// ticketWipedTimeTemplateId : "0" -/// amount : "0.01" -/// name : "四神汤 " -/// code : "T202311211142080717340001" -/// useStartTime : "2023-11-21 00:00:00" -/// useEndTime : "2023-12-20 11:42:08" -/// finishTime : null -/// type : "NORMAL" -/// source : null -/// takeType : null -/// style : "" -/// state : 1 -/// canSettlement : true -/// canSubscribe : true -/// isDelete : 0 -/// tenantCode : "1195" -/// nickName : null -/// userAvatar : null -/// userPhone : null - -class TicketShowList { - TicketShowList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - String ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - dynamic finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode, - dynamic nickName, - dynamic userAvatar, - dynamic userPhone,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _storeId = storeId; - _orderId = orderId; - _orderProductId = orderProductId; - _productId = productId; - _productSkuId = productSkuId; - _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; - _amount = amount; - _name = name; - _code = code; - _useStartTime = useStartTime; - _useEndTime = useEndTime; - _finishTime = finishTime; - _type = type; - _source = source; - _takeType = takeType; - _style = style; - _state = state; - _canSettlement = canSettlement; - _canSubscribe = canSubscribe; - _isDelete = isDelete; - _tenantCode = tenantCode; - _nickName = nickName; - _userAvatar = userAvatar; - _userPhone = userPhone; -} - - TicketShowList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _storeId = json['storeId']; - _orderId = json['orderId']; - _orderProductId = json['orderProductId']; - _productId = json['productId']; - _productSkuId = json['productSkuId']; - _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; - _amount = json['amount']; - _name = json['name']; - _code = json['code']; - _useStartTime = json['useStartTime']; - _useEndTime = json['useEndTime']; - _finishTime = json['finishTime']; - _type = json['type']; - _source = json['source']; - _takeType = json['takeType']; - _style = json['style']; - _state = json['state']; - _canSettlement = json['canSettlement']; - _canSubscribe = json['canSubscribe']; - _isDelete = json['isDelete']; - _tenantCode = json['tenantCode']; - _nickName = json['nickName']; - _userAvatar = json['userAvatar']; - _userPhone = json['userPhone']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _storeId; - String _orderId; - String _orderProductId; - String _productId; - String _productSkuId; - String _ticketWipedTimeTemplateId; - String _amount; - String _name; - String _code; - String _useStartTime; - String _useEndTime; - dynamic _finishTime; - String _type; - dynamic _source; - dynamic _takeType; - String _style; - num _state; - bool _canSettlement; - bool _canSubscribe; - num _isDelete; - String _tenantCode; - dynamic _nickName; - dynamic _userAvatar; - dynamic _userPhone; - TicketShowList copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String storeId, - String orderId, - String orderProductId, - String productId, - String productSkuId, - String ticketWipedTimeTemplateId, - String amount, - String name, - String code, - String useStartTime, - String useEndTime, - dynamic finishTime, - String type, - dynamic source, - dynamic takeType, - String style, - num state, - bool canSettlement, - bool canSubscribe, - num isDelete, - String tenantCode, - dynamic nickName, - dynamic userAvatar, - dynamic userPhone, -}) => TicketShowList( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - storeId: storeId ?? _storeId, - orderId: orderId ?? _orderId, - orderProductId: orderProductId ?? _orderProductId, - productId: productId ?? _productId, - productSkuId: productSkuId ?? _productSkuId, - ticketWipedTimeTemplateId: ticketWipedTimeTemplateId ?? _ticketWipedTimeTemplateId, - amount: amount ?? _amount, - name: name ?? _name, - code: code ?? _code, - useStartTime: useStartTime ?? _useStartTime, - useEndTime: useEndTime ?? _useEndTime, - finishTime: finishTime ?? _finishTime, - type: type ?? _type, - source: source ?? _source, - takeType: takeType ?? _takeType, - style: style ?? _style, - state: state ?? _state, - canSettlement: canSettlement ?? _canSettlement, - canSubscribe: canSubscribe ?? _canSubscribe, - isDelete: isDelete ?? _isDelete, - tenantCode: tenantCode ?? _tenantCode, - nickName: nickName ?? _nickName, - userAvatar: userAvatar ?? _userAvatar, - userPhone: userPhone ?? _userPhone, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get storeId => _storeId; - String get orderId => _orderId; - String get orderProductId => _orderProductId; - String get productId => _productId; - String get productSkuId => _productSkuId; - String get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; - String get amount => _amount; - String get name => _name; - String get code => _code; - String get useStartTime => _useStartTime; - String get useEndTime => _useEndTime; - dynamic get finishTime => _finishTime; - String get type => _type; - dynamic get source => _source; - dynamic get takeType => _takeType; - String get style => _style; - num get state => _state; - bool get canSettlement => _canSettlement; - bool get canSubscribe => _canSubscribe; - num get isDelete => _isDelete; - String get tenantCode => _tenantCode; - dynamic get nickName => _nickName; - dynamic get userAvatar => _userAvatar; - dynamic get userPhone => _userPhone; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['storeId'] = _storeId; - map['orderId'] = _orderId; - map['orderProductId'] = _orderProductId; - map['productId'] = _productId; - map['productSkuId'] = _productSkuId; - map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; - map['amount'] = _amount; - map['name'] = _name; - map['code'] = _code; - map['useStartTime'] = _useStartTime; - map['useEndTime'] = _useEndTime; - map['finishTime'] = _finishTime; - map['type'] = _type; - map['source'] = _source; - map['takeType'] = _takeType; - map['style'] = _style; - map['state'] = _state; - map['canSettlement'] = _canSettlement; - map['canSubscribe'] = _canSubscribe; - map['isDelete'] = _isDelete; - map['tenantCode'] = _tenantCode; - map['nickName'] = _nickName; - map['userAvatar'] = _userAvatar; - map['userPhone'] = _userPhone; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/ticket_stats_list.dart b/lib/retrofit/data/ticket_stats_list.dart deleted file mode 100644 index 77cf9ee2..00000000 --- a/lib/retrofit/data/ticket_stats_list.dart +++ /dev/null @@ -1,90 +0,0 @@ -/// wipedDate : "2023-11-10" -/// infoList : [{"ticketName":"四神汤 ","ticketItemName":"测试规格222","wipedNumber":1},{"ticketName":"四神汤 ","ticketItemName":"测试规格","wipedNumber":1}] - -class TicketStatsList { - TicketStatsList({ - String wipedDate, - List infoList,}){ - _wipedDate = wipedDate; - _infoList = infoList; -} - - TicketStatsList.fromJson(dynamic json) { - _wipedDate = json['wipedDate']; - if (json['infoList'] != null) { - _infoList = []; - json['infoList'].forEach((v) { - _infoList.add(InfoList.fromJson(v)); - }); - } - } - String _wipedDate; - List _infoList; -TicketStatsList copyWith({ String wipedDate, - List infoList, -}) => TicketStatsList( wipedDate: wipedDate ?? _wipedDate, - infoList: infoList ?? _infoList, -); - String get wipedDate => _wipedDate; - List get infoList => _infoList; - - Map toJson() { - final map = {}; - map['wipedDate'] = _wipedDate; - if (_infoList != null) { - map['infoList'] = _infoList.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// ticketName : "四神汤 " -/// ticketItemName : "测试规格222" -/// wipedNumber : 1 - -class InfoList { - InfoList({ - String ticketName, - String ticketItemName, - num wipedNumber,}){ - _ticketName = ticketName; - _ticketItemName = ticketItemName; - _wipedNumber = wipedNumber; -} - - InfoList.fromJson(dynamic json) { - _ticketName = json['ticketName']; - _ticketItemName = json['ticketItemName']; - _wipedNumber = json['wipedNumber']; - } - String _ticketName; - String _ticketItemName; - num _wipedNumber; - String _wipedDate; -InfoList copyWith({ String ticketName, - String ticketItemName, - num wipedNumber, -}) => InfoList( ticketName: ticketName ?? _ticketName, - ticketItemName: ticketItemName ?? _ticketItemName, - wipedNumber: wipedNumber ?? _wipedNumber, -); - String get ticketName => _ticketName; - String get ticketItemName => _ticketItemName; - num get wipedNumber => _wipedNumber; - - String get wipedDate => _wipedDate; - - set wipedDate(String value) { - _wipedDate = value; - } - - Map toJson() { - final map = {}; - map['ticketName'] = _ticketName; - map['ticketItemName'] = _ticketItemName; - map['wipedNumber'] = _wipedNumber; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/trade_summary_list.dart b/lib/retrofit/data/trade_summary_list.dart deleted file mode 100644 index 92c9a851..00000000 --- a/lib/retrofit/data/trade_summary_list.dart +++ /dev/null @@ -1,110 +0,0 @@ -/// saleBusinessAnalysisVOS : [{"localDateTime":"2023-08-29 00:00:00","localDateBigDecimal":"22.00","localDateCount":"1"},{"localDateTime":"2023-08-13 00:00:00","localDateBigDecimal":"12.00","localDateCount":"1"},{"localDateTime":"2023-08-12 00:00:00","localDateBigDecimal":"485.00","localDateCount":"23"},{"localDateTime":"2023-08-11 00:00:00","localDateBigDecimal":"1105.00","localDateCount":"40"},{"localDateTime":"2023-08-10 00:00:00","localDateBigDecimal":"720.00","localDateCount":"28"},{"localDateTime":"2023-08-09 00:00:00","localDateBigDecimal":"311.50","localDateCount":"26"},{"localDateTime":"2023-08-08 00:00:00","localDateBigDecimal":"273.50","localDateCount":"18"},{"localDateTime":"2023-08-07 00:00:00","localDateBigDecimal":"411.00","localDateCount":"19"},{"localDateTime":"2023-08-06 00:00:00","localDateBigDecimal":"26.00","localDateCount":"4"},{"localDateTime":"2023-08-05 00:00:00","localDateBigDecimal":"131.00","localDateCount":"6"},{"localDateTime":"2023-08-04 00:00:00","localDateBigDecimal":"53.00","localDateCount":"4"},{"localDateTime":"2023-08-01 00:00:00","localDateBigDecimal":"442.00","localDateCount":"3"}] -/// collectionAmount : "2816.00" -/// collectionCount : 173 -/// refundAmount : "0" -/// refundCount : 0 - -class TradeSummaryList { - TradeSummaryList({ - List saleBusinessAnalysisVOS, - String collectionAmount, - num collectionCount, - String refundAmount, - num refundCount,}){ - _saleBusinessAnalysisVOS = saleBusinessAnalysisVOS; - _collectionAmount = collectionAmount; - _collectionCount = collectionCount; - _refundAmount = refundAmount; - _refundCount = refundCount; -} - - TradeSummaryList.fromJson(dynamic json) { - if (json['saleBusinessAnalysisVOS'] != null) { - _saleBusinessAnalysisVOS = []; - json['saleBusinessAnalysisVOS'].forEach((v) { - _saleBusinessAnalysisVOS.add(SaleBusinessAnalysisVos.fromJson(v)); - }); - } - _collectionAmount = json['collectionAmount']; - _collectionCount = json['collectionCount']; - _refundAmount = json['refundAmount']; - _refundCount = json['refundCount']; - } - List _saleBusinessAnalysisVOS; - String _collectionAmount; - num _collectionCount; - String _refundAmount; - num _refundCount; -TradeSummaryList copyWith({ List saleBusinessAnalysisVOS, - String collectionAmount, - num collectionCount, - String refundAmount, - num refundCount, -}) => TradeSummaryList( saleBusinessAnalysisVOS: saleBusinessAnalysisVOS ?? _saleBusinessAnalysisVOS, - collectionAmount: collectionAmount ?? _collectionAmount, - collectionCount: collectionCount ?? _collectionCount, - refundAmount: refundAmount ?? _refundAmount, - refundCount: refundCount ?? _refundCount, -); - List get saleBusinessAnalysisVOS => _saleBusinessAnalysisVOS; - String get collectionAmount => _collectionAmount; - num get collectionCount => _collectionCount; - String get refundAmount => _refundAmount; - num get refundCount => _refundCount; - - Map toJson() { - final map = {}; - if (_saleBusinessAnalysisVOS != null) { - map['saleBusinessAnalysisVOS'] = _saleBusinessAnalysisVOS.map((v) => v.toJson()).toList(); - } - map['collectionAmount'] = _collectionAmount; - map['collectionCount'] = _collectionCount; - map['refundAmount'] = _refundAmount; - map['refundCount'] = _refundCount; - return map; - } - -} - -/// localDateTime : "2023-08-29 00:00:00" -/// localDateBigDecimal : "22.00" -/// localDateCount : "1" - -class SaleBusinessAnalysisVos { - SaleBusinessAnalysisVos({ - String localDateTime, - String localDateBigDecimal, - String localDateCount,}){ - _localDateTime = localDateTime; - _localDateBigDecimal = localDateBigDecimal; - _localDateCount = localDateCount; -} - - SaleBusinessAnalysisVos.fromJson(dynamic json) { - _localDateTime = json['localDateTime']; - _localDateBigDecimal = json['localDateBigDecimal']; - _localDateCount = json['localDateCount']; - } - String _localDateTime; - String _localDateBigDecimal; - String _localDateCount; -SaleBusinessAnalysisVos copyWith({ String localDateTime, - String localDateBigDecimal, - String localDateCount, -}) => SaleBusinessAnalysisVos( localDateTime: localDateTime ?? _localDateTime, - localDateBigDecimal: localDateBigDecimal ?? _localDateBigDecimal, - localDateCount: localDateCount ?? _localDateCount, -); - String get localDateTime => _localDateTime; - String get localDateBigDecimal => _localDateBigDecimal; - String get localDateCount => _localDateCount; - - Map toJson() { - final map = {}; - map['localDateTime'] = _localDateTime; - map['localDateBigDecimal'] = _localDateBigDecimal; - map['localDateCount'] = _localDateCount; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/upload_result.dart b/lib/retrofit/data/upload_result.dart deleted file mode 100644 index e2f883ed..00000000 --- a/lib/retrofit/data/upload_result.dart +++ /dev/null @@ -1,87 +0,0 @@ -import 'package:huixiang/retrofit/data/data_type.dart'; - -class UploadResult { - UploadResult(); - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - DataType dataType; - String submittedFileName; - String treePath; - int grade; - bool isDelete; - String folderId; - String url; - String size; - String folderName; - dynamic group; - String path; - String relativePath; - dynamic fileMd5; - String contextType; - String filename; - String ext; - String icon; - String createMonth; - String createWeek; - String createDay; - - factory UploadResult.fromJson(Map json) => UploadResult() - ..id = json['id'] as String - ..createTime = json['createTime'] as String - ..createUser = json['createUser'] as String - ..updateTime = json['updateTime'] as String - ..updateUser = json['updateUser'] as String - ..dataType = json['dataType'] == null - ? null - : DataType.fromJson(json['dataType'] as Map) - ..submittedFileName = json['submittedFileName'] as String - ..treePath = json['treePath'] as String - ..grade = json['grade'] as int - ..isDelete = json['isDelete'] as bool - ..folderId = json['folderId'] as String - ..url = json['url'] as String - ..size = json['size'] as String - ..folderName = json['folderName'] as String - ..group = json['group'] - ..path = json['path'] as String - ..relativePath = json['relativePath'] as String - ..fileMd5 = json['fileMd5'] - ..contextType = json['contextType'] as String - ..filename = json['filename'] as String - ..ext = json['ext'] as String - ..icon = json['icon'] as String - ..createMonth = json['createMonth'] as String - ..createWeek = json['createWeek'] as String - ..createDay = json['createDay'] as String; - Map toJson() => { - 'id': this.id, - 'createTime': this.createTime, - 'createUser': this.createUser, - 'updateTime': this.updateTime, - 'updateUser': this.updateUser, - 'dataType': this.dataType.toJson(), - 'submittedFileName': this.submittedFileName, - 'treePath': this.treePath, - 'grade': this.grade, - 'isDelete': this.isDelete, - 'folderId': this.folderId, - 'url': this.url, - 'size': this.size, - 'folderName': this.folderName, - 'group': this.group, - 'path': this.path, - 'relativePath': this.relativePath, - 'fileMd5': this.fileMd5, - 'contextType': this.contextType, - 'filename': this.filename, - 'ext': this.ext, - 'icon': this.icon, - 'createMonth': this.createMonth, - 'createWeek': this.createWeek, - 'createDay': this.createDay, - }; - -} diff --git a/lib/retrofit/data/user_bill.dart b/lib/retrofit/data/user_bill.dart deleted file mode 100644 index 173de5bb..00000000 --- a/lib/retrofit/data/user_bill.dart +++ /dev/null @@ -1,216 +0,0 @@ -import 'dart:convert'; -/// id : "1557965116232695808" -/// createTime : "2022-08-12 13:40:04" -/// createUser : "1333246101196636160" -/// updateTime : "2022-08-12 13:40:04" -/// updateUser : "1333246101196636160" -/// mid : "1330775037745037312" -/// linkId : "202208121339050002" -/// pm : 0 -/// title : "bill_title_balance" -/// category : "bill_cate_buy" -/// type : "bill_type_zswpay" -/// number : "0.01" -/// realNumber : "0.00" -/// activityMoney : "0.00" -/// surplusActivityMoney : "0.00" -/// greenMoney : "0.00" -/// surplusGreenMoney : "0.00" -/// balance : "218.51" -/// mark : "" -/// status : true -/// isDeleted : false -/// name : "平台会员余额支付" - -UserBill userBillFromJson(String str) => UserBill.fromJson(json.decode(str)); -String userBillToJson(UserBill data) => json.encode(data.toJson()); -class UserBill { - UserBill({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String linkId, - int pm, - String title, - String category, - String type, - String number, - String realNumber, - String activityMoney, - String surplusActivityMoney, - String greenMoney, - String surplusGreenMoney, - String balance, - String mark, - bool status, - bool isDeleted, - String name,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _linkId = linkId; - _pm = pm; - _title = title; - _category = category; - _type = type; - _number = number; - _realNumber = realNumber; - _activityMoney = activityMoney; - _surplusActivityMoney = surplusActivityMoney; - _greenMoney = greenMoney; - _surplusGreenMoney = surplusGreenMoney; - _balance = balance; - _mark = mark; - _status = status; - _isDeleted = isDeleted; - _name = name; -} - - UserBill.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _linkId = json['linkId']; - _pm = json['pm']; - _title = json['title']; - _category = json['category']; - _type = json['type']; - _number = json['number']; - _realNumber = json['realNumber']; - _activityMoney = json['activityMoney']; - _surplusActivityMoney = json['surplusActivityMoney']; - _greenMoney = json['greenMoney']; - _surplusGreenMoney = json['surplusGreenMoney']; - _balance = json['balance']; - _mark = json['mark']; - _status = json['status']; - _isDeleted = json['isDeleted']; - _name = json['name']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _linkId; - int _pm; - String _title; - String _category; - String _type; - String _number; - String _realNumber; - String _activityMoney; - String _surplusActivityMoney; - String _greenMoney; - String _surplusGreenMoney; - String _balance; - String _mark; - bool _status; - bool _isDeleted; - String _name; -UserBill copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String linkId, - int pm, - String title, - String category, - String type, - String number, - String realNumber, - String activityMoney, - String surplusActivityMoney, - String greenMoney, - String surplusGreenMoney, - String balance, - String mark, - bool status, - bool isDeleted, - String name, -}) => UserBill( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - linkId: linkId ?? _linkId, - pm: pm ?? _pm, - title: title ?? _title, - category: category ?? _category, - type: type ?? _type, - number: number ?? _number, - realNumber: realNumber ?? _realNumber, - activityMoney: activityMoney ?? _activityMoney, - surplusActivityMoney: surplusActivityMoney ?? _surplusActivityMoney, - greenMoney: greenMoney ?? _greenMoney, - surplusGreenMoney: surplusGreenMoney ?? _surplusGreenMoney, - balance: balance ?? _balance, - mark: mark ?? _mark, - status: status ?? _status, - isDeleted: isDeleted ?? _isDeleted, - name: name ?? _name, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get linkId => _linkId; - int get pm => _pm; - String get title => _title; - String get category => _category; - String get type => _type; - String get number => _number; - String get realNumber => _realNumber; - String get activityMoney => _activityMoney; - String get surplusActivityMoney => _surplusActivityMoney; - String get greenMoney => _greenMoney; - String get surplusGreenMoney => _surplusGreenMoney; - String get balance => _balance; - String get mark => _mark; - bool get status => _status; - bool get isDeleted => _isDeleted; - String get name => _name; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['linkId'] = _linkId; - map['pm'] = _pm; - map['title'] = _title; - map['category'] = _category; - map['type'] = _type; - map['number'] = _number; - map['realNumber'] = _realNumber; - map['activityMoney'] = _activityMoney; - map['surplusActivityMoney'] = _surplusActivityMoney; - map['greenMoney'] = _greenMoney; - map['surplusGreenMoney'] = _surplusGreenMoney; - map['balance'] = _balance; - map['mark'] = _mark; - map['status'] = _status; - map['isDeleted'] = _isDeleted; - map['name'] = _name; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/user_entity.dart b/lib/retrofit/data/user_entity.dart deleted file mode 100644 index b0734dac..00000000 --- a/lib/retrofit/data/user_entity.dart +++ /dev/null @@ -1,47 +0,0 @@ - -class UserEntity { - UserEntity(); - - String account; - String avatar; - String expiration; - String expire; - String mobile; - String name; - String refreshToken; - String token; - String tokenType; - String userId; - String userType; - String workDescribe; - - - factory UserEntity.fromJson(Map json) => UserEntity() - ..account = json['account'] as String - ..avatar = json['avatar'] as String - ..expiration = json['expiration'] as String - ..expire = json['expire'] as String - ..mobile = json['mobile'] as String - ..name = json['name'] as String - ..refreshToken = json['refreshToken'] as String - ..token = json['token'] as String - ..tokenType = json['tokenType'] as String - ..userId = json['userId'] as String - ..userType = json['userType'] as String - ..workDescribe = json['workDescribe'] as String; - Map toJson() => { - 'account': this.account, - 'avatar': this.avatar, - 'expiration': this.expiration, - 'expire': this.expire, - 'mobile': this.mobile, - 'name': this.name, - 'refreshToken': this.refreshToken, - 'token': this.token, - 'tokenType': this.tokenType, - 'userId': this.userId, - 'userType': this.userType, - 'workDescribe': this.workDescribe, - }; - -} diff --git a/lib/retrofit/data/user_info.dart b/lib/retrofit/data/user_info.dart deleted file mode 100644 index ed70e0cd..00000000 --- a/lib/retrofit/data/user_info.dart +++ /dev/null @@ -1,126 +0,0 @@ -/// vipNo : null -/// nickname : "回乡_019921" -/// headimg : "" -/// userType : true -/// sex : "" -/// level : 1 -/// addressId : "0" -/// remark : "" -/// phone : "15827991714" -/// createTime : "2021-06-21 15:40:38" -/// birth : "" -/// balance : null -/// money : "0.00" -/// points : "0" -/// isBind : null -/// memberRankVo : null -import 'package:huixiang/retrofit/data/member_rank.dart'; - -class UserInfo { - UserInfo(); - - String vipNo; - String vipScanNo; - String nickname; - String headimg; - bool userType; - String sex; - int level; - String addressId; - String remark; - String phone; - String createTime; - String birth; - dynamic balance; - String money; - String activityMoney; - String expendAmount; - String points; - String greenMoney; - String raiseMoney; - String raiseExpireTime; - bool isBind; - String masterId; - dynamic inviteNumber; - dynamic todayInviteNumber; - String masterCardRankName; - MemberRank memberRankVo; - String inviteCode; - String signature; - String background; - bool hasPayPassword; - String happyBean; - bool isVip; - - factory UserInfo.fromJson(Map json) => - UserInfo() - ..vipNo = json['vipNo'] as String - ..vipScanNo =json['vipScanNo'] as String - ..nickname = json['nickname'] as String - ..headimg = json['headimg'] as String - ..userType = json['userType'] as bool - ..sex = json['sex'] as String - ..level = json['level'] as int - ..addressId = json['addressId'] as String - ..remark = json['remark'] as String - ..phone = json['phone'] as String - ..createTime = json['createTime'] as String - ..birth = json['birth'] as String - ..balance = json['balance'] - ..money = json['money'] as String - ..activityMoney = json['activityMoney'] as String - ..expendAmount = json['expendAmount'] as String - ..points = json['points'] as String - ..greenMoney = json['greenMoney'] as String - ..raiseMoney = json['raiseMoney'] as String - ..raiseExpireTime = json['raiseExpireTime'] as String - ..isBind = json['isBind'] as bool - ..masterId = json['masterId'] as String - ..inviteNumber = json['inviteNumber'] as dynamic - ..todayInviteNumber = json['todayInviteNumber'] as dynamic - ..masterCardRankName = json['masterCardRankName'] as String - ..inviteCode = json['inviteCode'] as String - ..signature = json['signature'] as String - ..background = json['background'] as String - ..hasPayPassword = json['hasPayPassword'] as bool - ..happyBean = json['happyBean'] as String - ..isVip = json['isVip'] as bool - ..memberRankVo = json['memberRankVo'] == null - ? null - : MemberRank.fromJson(json['memberRankVo'] as Map); - - Map toJson() => { - 'vipNo': this.vipNo, - 'vipScanNo':this.vipScanNo, - 'nickname': this.nickname, - 'headimg': this.headimg, - 'userType': this.userType, - 'sex': this.sex, - 'level': this.level, - 'addressId': this.addressId, - 'remark': this.remark, - 'phone': this.phone, - 'createTime': this.createTime, - 'birth': this.birth, - 'balance': this.balance, - 'money': this.money, - 'activityMoney': this.activityMoney, - 'expendAmount': this.expendAmount, - 'points': this.points, - 'greenMoney': this.greenMoney, - 'raiseMoney': this.raiseMoney, - 'raiseExpireTime': this.raiseExpireTime, - 'isBind': this.isBind, - 'masterId': this.masterId, - "inviteNumber": this.inviteNumber, - "todayInviteNumber": this.todayInviteNumber, - 'masterCardRankName': this.masterCardRankName, - 'inviteCode' : this.inviteCode, - 'signature' : this.signature, - 'background' : this.background, - 'hasPayPassword' : this.hasPayPassword, - 'happyBean':this.happyBean, - 'isVip':this.isVip, - 'memberRankVo': this.memberRankVo == null ? "" : this.memberRankVo.toJson(), - }; -} diff --git a/lib/retrofit/data/user_info_edit.dart b/lib/retrofit/data/user_info_edit.dart deleted file mode 100644 index 82899a5f..00000000 --- a/lib/retrofit/data/user_info_edit.dart +++ /dev/null @@ -1,267 +0,0 @@ -/// id : "1738082396969893888" -/// createTime : "2023-12-22 14:21:50" -/// createUser : "1640233401329909760" -/// updateTime : "2023-12-22 14:21:50" -/// updateUser : "1640233401329909760" -/// account : "13052919193" -/// name : "wu" -/// org : null -/// station : null -/// type : null -/// email : null -/// mobile : null -/// sex : {"desc":"未知","code":"N"} -/// status : null -/// avatar : null -/// nation : null -/// education : null -/// positionStatus : null -/// workDescribe : null -/// passwordErrorLastTime : null -/// passwordErrorNum : 0 -/// passwordExpireTime : null -/// password : "e10adc3949ba59abbe56e057f20f883e" -/// lastLoginTime : null - -class UserInfoEdit { - UserInfoEdit({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String account, - String name, - dynamic org, - dynamic station, - dynamic type, - dynamic email, - dynamic mobile, - Sex sex, - dynamic status, - dynamic avatar, - dynamic nation, - dynamic education, - dynamic positionStatus, - dynamic workDescribe, - dynamic passwordErrorLastTime, - num passwordErrorNum, - dynamic passwordExpireTime, - String password, - dynamic lastLoginTime,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _account = account; - _name = name; - _org = org; - _station = station; - _type = type; - _email = email; - _mobile = mobile; - _sex = sex; - _status = status; - _avatar = avatar; - _nation = nation; - _education = education; - _positionStatus = positionStatus; - _workDescribe = workDescribe; - _passwordErrorLastTime = passwordErrorLastTime; - _passwordErrorNum = passwordErrorNum; - _passwordExpireTime = passwordExpireTime; - _password = password; - _lastLoginTime = lastLoginTime; -} - - UserInfoEdit.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _account = json['account']; - _name = json['name']; - _org = json['org']; - _station = json['station']; - _type = json['type']; - _email = json['email']; - _mobile = json['mobile']; - _sex = json['sex'] != null ? Sex.fromJson(json['sex']) : null; - _status = json['status']; - _avatar = json['avatar']; - _nation = json['nation']; - _education = json['education']; - _positionStatus = json['positionStatus']; - _workDescribe = json['workDescribe']; - _passwordErrorLastTime = json['passwordErrorLastTime']; - _passwordErrorNum = json['passwordErrorNum']; - _passwordExpireTime = json['passwordExpireTime']; - _password = json['password']; - _lastLoginTime = json['lastLoginTime']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _account; - String _name; - dynamic _org; - dynamic _station; - dynamic _type; - dynamic _email; - dynamic _mobile; - Sex _sex; - dynamic _status; - dynamic _avatar; - dynamic _nation; - dynamic _education; - dynamic _positionStatus; - dynamic _workDescribe; - dynamic _passwordErrorLastTime; - num _passwordErrorNum; - dynamic _passwordExpireTime; - String _password; - dynamic _lastLoginTime; -UserInfoEdit copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String account, - String name, - dynamic org, - dynamic station, - dynamic type, - dynamic email, - dynamic mobile, - Sex sex, - dynamic status, - dynamic avatar, - dynamic nation, - dynamic education, - dynamic positionStatus, - dynamic workDescribe, - dynamic passwordErrorLastTime, - num passwordErrorNum, - dynamic passwordExpireTime, - String password, - dynamic lastLoginTime, -}) => UserInfoEdit( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - account: account ?? _account, - name: name ?? _name, - org: org ?? _org, - station: station ?? _station, - type: type ?? _type, - email: email ?? _email, - mobile: mobile ?? _mobile, - sex: sex ?? _sex, - status: status ?? _status, - avatar: avatar ?? _avatar, - nation: nation ?? _nation, - education: education ?? _education, - positionStatus: positionStatus ?? _positionStatus, - workDescribe: workDescribe ?? _workDescribe, - passwordErrorLastTime: passwordErrorLastTime ?? _passwordErrorLastTime, - passwordErrorNum: passwordErrorNum ?? _passwordErrorNum, - passwordExpireTime: passwordExpireTime ?? _passwordExpireTime, - password: password ?? _password, - lastLoginTime: lastLoginTime ?? _lastLoginTime, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get account => _account; - String get name => _name; - dynamic get org => _org; - dynamic get station => _station; - dynamic get type => _type; - dynamic get email => _email; - dynamic get mobile => _mobile; - Sex get sex => _sex; - dynamic get status => _status; - dynamic get avatar => _avatar; - dynamic get nation => _nation; - dynamic get education => _education; - dynamic get positionStatus => _positionStatus; - dynamic get workDescribe => _workDescribe; - dynamic get passwordErrorLastTime => _passwordErrorLastTime; - num get passwordErrorNum => _passwordErrorNum; - dynamic get passwordExpireTime => _passwordExpireTime; - String get password => _password; - dynamic get lastLoginTime => _lastLoginTime; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['account'] = _account; - map['name'] = _name; - map['org'] = _org; - map['station'] = _station; - map['type'] = _type; - map['email'] = _email; - map['mobile'] = _mobile; - if (_sex != null) { - map['sex'] = _sex.toJson(); - } - map['status'] = _status; - map['avatar'] = _avatar; - map['nation'] = _nation; - map['education'] = _education; - map['positionStatus'] = _positionStatus; - map['workDescribe'] = _workDescribe; - map['passwordErrorLastTime'] = _passwordErrorLastTime; - map['passwordErrorNum'] = _passwordErrorNum; - map['passwordExpireTime'] = _passwordExpireTime; - map['password'] = _password; - map['lastLoginTime'] = _lastLoginTime; - return map; - } - -} - -/// desc : "未知" -/// code : "N" - -class Sex { - Sex({ - String desc, - String code,}){ - _desc = desc; - _code = code; -} - - Sex.fromJson(dynamic json) { - _desc = json['desc']; - _code = json['code']; - } - String _desc; - String _code; -Sex copyWith({ String desc, - String code, -}) => Sex( desc: desc ?? _desc, - code: code ?? _code, -); - String get desc => _desc; - String get code => _code; - - Map toJson() { - final map = {}; - map['desc'] = _desc; - map['code'] = _code; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/verify_code.dart b/lib/retrofit/data/verify_code.dart deleted file mode 100644 index d2bc1773..00000000 --- a/lib/retrofit/data/verify_code.dart +++ /dev/null @@ -1,42 +0,0 @@ - -class VerifyCode { - VerifyCode(); - int code; - Map data; - BaseDataExtra extra; - bool isError; - bool isSuccess; - String msg; - String path; - String timestamp; - - factory VerifyCode.fromJson(Map json) => VerifyCode() - ..code = json['code'] as int - ..data = json['data'] as Map - ..extra = json['extra'] == null - ? null - : BaseDataExtra.fromJson(json['extra'] as Map) - ..isError = json['isError'] as bool - ..isSuccess = json['isSuccess'] as bool - ..msg = json['msg'] as String - ..path = json['path'] as String - ..timestamp = json['timestamp'] as String; - Map toJson() => { - 'code': this.code, - 'data': this.data, - 'extra': this.extra, - 'isError': this.isError, - 'isSuccess': this.isSuccess, - 'msg': this.msg, - 'path': this.path, - 'timestamp': this.timestamp, - }; -} - -class BaseDataExtra { - BaseDataExtra(); - - factory BaseDataExtra.fromJson(Map json) => BaseDataExtra(); - Map toJson() => {}; - -} \ No newline at end of file diff --git a/lib/retrofit/data/vip_badges_list.dart b/lib/retrofit/data/vip_badges_list.dart deleted file mode 100644 index 56cc0c32..00000000 --- a/lib/retrofit/data/vip_badges_list.dart +++ /dev/null @@ -1,147 +0,0 @@ -/// id : "1460164746211753984" -/// createTime : "2021-11-15 16:36:19" -/// createUser : "1" -/// updateTime : "2021-11-17 11:39:54" -/// updateUser : "1" -/// name : "签到" -/// eachReward : 8 -/// code : "SIGN" -/// icon : "https://pos.upload.gznl.top/admin/2021/11/93853f8d-ca0e-4c75-855b-d6245e4f6743.jpg" -/// actived : true -/// sort : 0 -/// isDelete : 0 - -class VipBadgesList { - VipBadgesList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - int eachReward, - String code, - String icon, - bool actived, - int sort, - int isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _name = name; - _eachReward = eachReward; - _code = code; - _icon = icon; - _actived = actived; - _sort = sort; - _isDelete = isDelete; -} - - VipBadgesList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _name = json['name']; - _eachReward = json['eachReward']; - _code = json['code']; - _icon = json['icon']; - _actived = json['actived']; - _sort = json['sort']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _name; - int _eachReward; - String _code; - String _icon; - bool _actived; - int _sort; - int _isDelete; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get name => _name; - int get eachReward => _eachReward; - String get code => _code; - String get icon => _icon; - bool get actived => _actived; - int get sort => _sort; - int get isDelete => _isDelete; - - - set id(String value) { - _id = value; - } - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['name'] = _name; - map['eachReward'] = _eachReward; - map['code'] = _code; - map['icon'] = _icon; - map['actived'] = _actived; - map['sort'] = _sort; - map['isDelete'] = _isDelete; - return map; - } - - set createTime(String value) { - _createTime = value; - } - - set createUser(String value) { - _createUser = value; - } - - set updateTime(String value) { - _updateTime = value; - } - - set updateUser(String value) { - _updateUser = value; - } - - set name(String value) { - _name = value; - } - - set eachReward(int value) { - _eachReward = value; - } - - set code(String value) { - _code = value; - } - - set icon(String value) { - _icon = value; - } - - set actived(bool value) { - _actived = value; - } - - set sort(int value) { - _sort = value; - } - - set isDelete(int value) { - _isDelete = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/vip_benefit_list.dart b/lib/retrofit/data/vip_benefit_list.dart deleted file mode 100644 index 5e8bee85..00000000 --- a/lib/retrofit/data/vip_benefit_list.dart +++ /dev/null @@ -1,127 +0,0 @@ -/// id : "5" -/// createTime : "2021-11-18 14:11:34" -/// createUser : "1" -/// updateTime : "2021-11-24 14:37:30" -/// updateUser : "1" -/// code : "DEPUTY" -/// name : "副卡" -/// icon : "https://pos.upload.gznl.top/MDAwMA==/2021/11/fb1e46d2-6213-4164-abbc-9aa24da24faf.webp" -/// iconGrey : "https://pos.upload.gznl.top/MDAwMA==/2021/11/f50d211a-3d52-4663-bf8a-c4dff4f79310.webp" -/// introduce : "

用户在成为金卡会员/共创会员之后, 即可经行副卡绑定。点击添加新副卡,输入需要绑定的用户手机号,输入需要绑定用户的手机号,输入验证码,验证通过后,即可绑定成功。点击头像右下方的解除,出现提示弹窗,点击确认即可解除绑定。

" -/// describes : "
    \n
  • 副卡用户必须为平台注册用户
  • \n
  • 每位主卡用户只可绑定5位副卡用户,同时,只能解绑3次
  • \n
  • 副卡享受主卡的部分权益,主卡会员失效之后,副卡也失效
  • \n
  • 副卡成为金卡会员后,自动与主卡解绑
  • \n
" -/// actived : false -/// sort : 4 -/// isDelete : 0 -/// have : true -/// config : "5" - -class VipBenefitList { - VipBenefitList({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String code, - String name, - String icon, - String iconGrey, - String introduce, - String describes, - bool actived, - int sort, - int isDelete, - bool have, - String config,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _code = code; - _name = name; - _icon = icon; - _iconGrey = iconGrey; - _introduce = introduce; - _describes = describes; - _actived = actived; - _sort = sort; - _isDelete = isDelete; - _have = have; - _config = config; -} - - VipBenefitList.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _code = json['code']; - _name = json['name']; - _icon = json['icon']; - _iconGrey = json['iconGrey']; - _introduce = json['introduce']; - _describes = json['describes']; - _actived = json['actived']; - _sort = json['sort']; - _isDelete = json['isDelete']; - _have = json['have']; - _config = json['config']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _code; - String _name; - String _icon; - String _iconGrey; - String _introduce; - String _describes; - bool _actived; - int _sort; - int _isDelete; - bool _have; - String _config; - - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get code => _code; - String get name => _name; - String get icon => _icon; - String get iconGrey => _iconGrey; - String get introduce => _introduce; - String get describes => _describes; - bool get actived => _actived; - int get sort => _sort; - int get isDelete => _isDelete; - bool get have => _have; - String get config => _config; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['code'] = _code; - map['name'] = _name; - map['icon'] = _icon; - map['iconGrey'] = _iconGrey; - map['introduce'] = _introduce; - map['describes'] = _describes; - map['actived'] = _actived; - map['sort'] = _sort; - map['isDelete'] = _isDelete; - map['have'] = _have; - map['config'] = _config; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/vip_card.dart b/lib/retrofit/data/vip_card.dart deleted file mode 100644 index aec7f59b..00000000 --- a/lib/retrofit/data/vip_card.dart +++ /dev/null @@ -1,301 +0,0 @@ - -/// id : "1393457755217461248" -/// createTime : "2021-05-15 14:46:33" -/// createUser : null -/// updateTime : "2021-05-15 14:46:33" -/// updateUser : "1393457755217461248" -/// mid : "1394132265126068224" -/// openid : "o3DjK5P66kDzkeW3biAx1LQSMLn4" -/// nickname : "斯基仔" -/// headimg : "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83erTf2Lbo2ztbicMtreEdr7xtrnvtTL5Qr31cicZVoKicdN3EEej13sRMLxLlq3qHThI4V8Pmau5Rps8A/132" -/// balance : "0.00" -/// realRecharge : "0.00" -/// sex : "0" -/// status : true -/// onCredit : false -/// loginTime : "2021-05-20 13:48:03" -/// loginNum : 9 -/// tenantCode : "1180" -/// source : 1 -/// expendAmount : "0.00" -/// buyTimes : 0 -/// lastBuyTime : null -/// vip_no : null -/// expireTime : null -/// integral : 0 -/// level : 1 -/// vipRegStore : null -/// tenantName : "稻田里的书店" -/// tenantLogo : "" -/// storeList : [{"id":"1381798825072525312","createTime":"2021-04-13 10:38:07","createUser":"1","updateTime":"2021-06-12 21:20:22","updateUser":"1381798824988639232","tenantCode":"1\nI/flutter ( 6658): 180","useErp":false,"openStartTime":"09:30:00","openEndTime":"18:30:00","storeName":"稻田里的书店","nickName":"","logo":"https://pos.upload.gznl.top/1180/2021/07/574aaeff-df3c-451a-b34f-67f9b3552427.webp","shipAddress":"上海市崇明区东风农场东风公路833弄1-22号C2-C3","remark":"","mobile":"13554204268","longitude":"121.4789730000","latitude":"31.7092220000","refundAddress":null,"refundTel":null,"refundContact":null,"isAutoSendRefundAddress":1,"province":"上海市","city":"上海市","district":"崇明区","address":"上海市崇明区稻田里的书店咖啡茶饮区东平镇东风公路833号东风农场C2","headName":"","headMobile":"18672789329","businessService":"WIFI,免费停车","businessType":"书","deliveryInfo":null,"miniParam":null,"is_delete":0,"posType":{"desc":"快消餐饮","code":"FASTSTORE"}}] - -class VipCard { - String id; - String createTime; - dynamic createUser; - String updateTime; - String updateUser; - String mid; - String openid; - String nickname; - String headimg; - String balance; - String realRecharge; - String sex; - bool status; - bool onCredit; - String loginTime; - int loginNum; - String tenantCode; - int source; - String expendAmount; - int buyTimes; - dynamic lastBuyTime; - dynamic vipNo; - dynamic expireTime; - int integral; - int level; - dynamic vipRegStore; - String tenantName; - String tenantLogo; - List storeList; - - static VipCard fromJson(Map map) { - if (map == null) return null; - VipCard vipCardBean = VipCard(); - vipCardBean.id = map['id']; - vipCardBean.createTime = map['createTime']; - vipCardBean.createUser = map['createUser']; - vipCardBean.updateTime = map['updateTime']; - vipCardBean.updateUser = map['updateUser']; - vipCardBean.mid = map['mid']; - vipCardBean.openid = map['openid']; - vipCardBean.nickname = map['nickname']; - vipCardBean.headimg = map['headimg']; - vipCardBean.balance = map['balance']; - vipCardBean.realRecharge = map['realRecharge']; - vipCardBean.sex = map['sex']; - vipCardBean.status = map['status']; - vipCardBean.onCredit = map['onCredit']; - vipCardBean.loginTime = map['loginTime']; - vipCardBean.loginNum = map['loginNum']; - vipCardBean.tenantCode = map['tenantCode']; - vipCardBean.source = map['source']; - vipCardBean.expendAmount = map['expendAmount']; - vipCardBean.buyTimes = map['buyTimes']; - vipCardBean.lastBuyTime = map['lastBuyTime']; - vipCardBean.vipNo = map['vip_no']; - vipCardBean.expireTime = map['expireTime']; - vipCardBean.integral = map['integral']; - vipCardBean.level = map['level']; - vipCardBean.vipRegStore = map['vipRegStore']; - vipCardBean.tenantName = map['tenantName']; - vipCardBean.tenantLogo = map['tenantLogo']; - vipCardBean.storeList = []..addAll( - (map['storeList'] as List ?? []).map((o) => StoreListBean.fromMap(o)) - ); - return vipCardBean; - } - - Map toJson() => { - "id": id, - "createTime": createTime, - "createUser": createUser, - "updateTime": updateTime, - "updateUser": updateUser, - "mid": mid, - "openid": openid, - "nickname": nickname, - "headimg": headimg, - "balance": balance, - "realRecharge": realRecharge, - "sex": sex, - "status": status, - "onCredit": onCredit, - "loginTime": loginTime, - "loginNum": loginNum, - "tenantCode": tenantCode, - "source": source, - "expendAmount": expendAmount, - "buyTimes": buyTimes, - "lastBuyTime": lastBuyTime, - "vip_no": vipNo, - "expireTime": expireTime, - "integral": integral, - "level": level, - "vipRegStore": vipRegStore, - "tenantName": tenantName, - "tenantLogo": tenantLogo, - "storeList": storeList, - }; -} - -/// id : "1381798825072525312" -/// createTime : "2021-04-13 10:38:07" -/// createUser : "1" -/// updateTime : "2021-06-12 21:20:22" -/// updateUser : "1381798824988639232" -/// tenantCode : "1\nI/flutter ( 6658): 180" -/// useErp : false -/// openStartTime : "09:30:00" -/// openEndTime : "18:30:00" -/// storeName : "稻田里的书店" -/// nickName : "" -/// logo : "https://pos.upload.gznl.top/1180/2021/07/574aaeff-df3c-451a-b34f-67f9b3552427.webp" -/// shipAddress : "上海市崇明区东风农场东风公路833弄1-22号C2-C3" -/// remark : "" -/// mobile : "13554204268" -/// longitude : "121.4789730000" -/// latitude : "31.7092220000" -/// refundAddress : null -/// refundTel : null -/// refundContact : null -/// isAutoSendRefundAddress : 1 -/// province : "上海市" -/// city : "上海市" -/// district : "崇明区" -/// address : "上海市崇明区稻田里的书店咖啡茶饮区东平镇东风公路833号东风农场C2" -/// headName : "" -/// headMobile : "18672789329" -/// businessService : "WIFI,免费停车" -/// businessType : "书" -/// deliveryInfo : null -/// miniParam : null -/// is_delete : 0 -/// posType : {"desc":"快消餐饮","code":"FASTSTORE"} - -class StoreListBean { - String id; - String createTime; - String createUser; - String updateTime; - String updateUser; - String tenantCode; - bool useErp; - String openStartTime; - String openEndTime; - String storeName; - String nickName; - String logo; - String shipAddress; - String remark; - String mobile; - String longitude; - String latitude; - dynamic refundAddress; - dynamic refundTel; - dynamic refundContact; - int isAutoSendRefundAddress; - String province; - String city; - String district; - String address; - String headName; - String headMobile; - String businessService; - String businessType; - dynamic deliveryInfo; - dynamic miniParam; - dynamic distance; - int isDelete; - PosTypeBean posType; - - static StoreListBean fromMap(Map map) { - if (map == null) return null; - StoreListBean storeListBean = StoreListBean(); - storeListBean.id = map['id']; - storeListBean.createTime = map['createTime']; - storeListBean.createUser = map['createUser']; - storeListBean.updateTime = map['updateTime']; - storeListBean.updateUser = map['updateUser']; - storeListBean.tenantCode = map['tenantCode']; - storeListBean.useErp = map['useErp']; - storeListBean.openStartTime = map['openStartTime']; - storeListBean.openEndTime = map['openEndTime']; - storeListBean.storeName = map['storeName']; - storeListBean.nickName = map['nickName']; - storeListBean.logo = map['logo']; - storeListBean.shipAddress = map['shipAddress']; - storeListBean.remark = map['remark']; - storeListBean.mobile = map['mobile']; - storeListBean.longitude = map['longitude']; - storeListBean.latitude = map['latitude']; - storeListBean.refundAddress = map['refundAddress']; - storeListBean.refundTel = map['refundTel']; - storeListBean.refundContact = map['refundContact']; - storeListBean.isAutoSendRefundAddress = map['isAutoSendRefundAddress']; - storeListBean.province = map['province']; - storeListBean.city = map['city']; - storeListBean.district = map['district']; - storeListBean.address = map['address']; - storeListBean.headName = map['headName']; - storeListBean.headMobile = map['headMobile']; - storeListBean.businessService = map['businessService']; - storeListBean.businessType = map['businessType']; - storeListBean.deliveryInfo = map['deliveryInfo']; - storeListBean.miniParam = map['miniParam']; - storeListBean.distance = map['distance']; - storeListBean.isDelete = map['is_delete']; - storeListBean.posType = PosTypeBean.fromMap(map['posType']); - return storeListBean; - } - - Map toJson() => { - "id": id, - "createTime": createTime, - "createUser": createUser, - "updateTime": updateTime, - "updateUser": updateUser, - "tenantCode": tenantCode, - "useErp": useErp, - "openStartTime": openStartTime, - "openEndTime": openEndTime, - "storeName": storeName, - "nickName": nickName, - "logo": logo, - "shipAddress": shipAddress, - "remark": remark, - "mobile": mobile, - "longitude": longitude, - "latitude": latitude, - "refundAddress": refundAddress, - "refundTel": refundTel, - "refundContact": refundContact, - "isAutoSendRefundAddress": isAutoSendRefundAddress, - "province": province, - "city": city, - "district": district, - "address": address, - "headName": headName, - "headMobile": headMobile, - "businessService": businessService, - "businessType": businessType, - "deliveryInfo": deliveryInfo, - "miniParam": miniParam, - "distance": distance, - "is_delete": isDelete, - "posType": posType, - }; -} - - -/// code : "NORMALSTORE" -/// desc : "" - -class PosTypeBean { - String code; - String desc; - - static PosTypeBean fromMap(Map map) { - if (map == null) return null; - PosTypeBean posTypeBean = PosTypeBean(); - posTypeBean.code = map['code']; - posTypeBean.desc = map['desc']; - return posTypeBean; - } - - Map toJson() => { - "code": code, - "desc": desc, - }; -} \ No newline at end of file diff --git a/lib/retrofit/data/vip_card_home.dart b/lib/retrofit/data/vip_card_home.dart deleted file mode 100644 index 96c026fd..00000000 --- a/lib/retrofit/data/vip_card_home.dart +++ /dev/null @@ -1,984 +0,0 @@ -/// member : {"masterId":"0","masterCardRankName":null,"vipNo":"1379254113602109440","nickname":"哈哈哈","headimg":"https://pos.upload.lotus-wallet.com/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg","userType":true,"sex":"0","level":1,"addressId":"0","remark":"","phone":"13052919193","createTime":"2021-04-06 10:06:21","birth":"1998-09-17","balance":null,"money":"31.12","activityMoney":"0.00","greenMoney":"4872.00","expendAmount":"180.02","organic":0,"points":"741","isBind":true,"memberRankVo":{"id":"1462684050274648064","rankName":"白银会员","rankOrigin":69,"rankContent":"","rankImg":"https://pos.upload.lotus-wallet.com/MDAwMA==/2021/11/7453eb74-661e-42b7-b575-8accc00fcbf5.png","status":true,"nextId":"1462684471177248768","nextName":"黄金会员","nextOrigin":20000},"age":24,"inviteCode":"MFZPXU","inviteNumber":4,"todayInviteNumber":0,"signature":"","background":"https://pos.upload.gznl.top/admin/2022/03/dd0af83c-1f2b-4217-bf0c-cdb7a809caca.jpeg","certification":null,"hasPayPassword":true,"isVip":false,"vipExpire":null,"isVipSubscribe":false,"vipDuration":33} -/// cards : [{"id":"1579679485240803328","createTime":"2022-10-11 11:45:13","createUser":"1","updateTime":"2022-10-11 11:48:48","updateUser":"1","name":"888绿卡","duration":30,"price":"188.00","autoSubscribe":true,"isDelete":true},{"id":"1579731753377988608","createTime":"2022-10-11 15:12:55","createUser":"1","updateTime":"2022-10-11 15:12:55","updateUser":"1","name":"一分钱订阅","duration":90,"price":"0.01","autoSubscribe":true,"isDelete":true}] -/// coupons : [] -/// productVips : [{"id":"1580078947226353664","createTime":"2022-10-12 14:12:32","createUser":"1310841663890915328","updateTime":"2022-10-12 14:12:32","updateUser":"1310841663890915328","supplierName":"58","storeId":"1300372027722432512","categoryId":"1300687829071822848","groupId":"1307148205753892864","shortName":"会员商品原价100 会员价6","productName":"会员商品","sellDesc":"","productCode":"PRO202210121412320000000000001","weight":"0","applyPrice":"100.00","price":"101.00","vipPrice":"6.00","stock":882,"sellCount":6,"needLogistics":0,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

1534

","thumbnailImg":"","info":"会员商品原价100 会员价6","buyCount":0,"sellCountLimit":0,"vipDiscount":"95.00"},{"id":"1578663655623360512","createTime":"2022-10-08 16:28:40","createUser":"1336877238389309440","updateTime":"2022-10-10 10:59:39","updateUser":"1336877238389309440","supplierName":"一杯奶茶","storeId":"1328618782985289728","categoryId":"1300688133322440704","groupId":"1391204546956492800","shortName":"一杯奶茶","productName":"一杯奶茶","sellDesc":"","productCode":"PRO202210081628400000000000001","weight":"0","applyPrice":"100.00","price":"61.00","vipPrice":"8.00","stock":-39,"sellCount":38,"needLogistics":0,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

一杯奶茶

","thumbnailImg":"","info":"一杯奶茶","buyCount":-1,"sellCountLimit":0,"vipDiscount":"53.00"},{"id":"1567029160059076608","createTime":"2022-09-06 13:57:20","createUser":"1333246101196636160","updateTime":"2022-10-10 14:37:40","updateUser":"1333246101196636160","supplierName":"海峡姐妹茶","storeId":"1333246101343436800","categoryId":"1300688133322440704","groupId":"1524327158112059392","shortName":"使用茉莉雪芽为茶底,用自有农场有机洛神花熬制的洛神花汁,洛神花中含有丰富的蛋白质,维生素,氨基酸,花青素,可以排毒养颜,清热祛火,降压,搭配新鲜红石榴,入口石榴的清甜中带着微酸,尾段是茶香。","productName":"霸气红宝石","sellDesc":"","productCode":"PRO202209061357200000000000001","weight":"0","applyPrice":"23.00","price":"23.00","vipPrice":"10.00","stock":99905,"sellCount":67,"needLogistics":0,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":1,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"https://pos.upload.lotus-wallet.com/1175/2022/09/b3b773a3-ea3e-4696-bd89-eece441144f1.jpg","info":"","buyCount":-38,"sellCountLimit":0,"vipDiscount":"13.00"},{"id":"1557552263126319104","createTime":"2022-08-11 10:19:32","createUser":"1333246101196636160","updateTime":"2022-08-11 10:19:32","updateUser":"1333246101196636160","supplierName":"前进麦味烘焙","storeId":"1432164681279078400","categoryId":"1343391656220557312","groupId":"1535192671235080192","shortName":"减糖布丁塔壳,加入低温烘烤农场有机南瓜内陷和布丁液,甜而不腻。","productName":"南瓜布丁塔(2入装)","sellDesc":"","productCode":"PRO202208111019320000000000001","weight":"0","applyPrice":"12.00","price":"12.00","vipPrice":null,"stock":990,"sellCount":6,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"https://pos.upload.lotus-wallet.com/1175/2022/08/8db6c09b-c403-4ae7-aa20-07843d292048.png","info":"","buyCount":-4,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555068186037059584","createTime":"2022-08-04 13:48:42","createUser":"1509798398956404736","updateTime":"2022-08-04 14:19:46","updateUser":"1509798398956404736","supplierName":"海峡姐妹","storeId":"1511895265261387776","categoryId":"1460889654206136320","groupId":"1555011116692668416","shortName":"分销","productName":"SIS小酒馆精致单人套餐","sellDesc":"","productCode":"PRO202208041348410000000000001","weight":"0","applyPrice":"118.00","price":"118.00","vipPrice":null,"stock":998,"sellCount":2,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

1.饮品任选一桶(含啤酒,1.5L装).
2.精选冷卤味时令拼盘一份.
3.精选小吃拼盘一份.

","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555070675176128512","createTime":"2022-08-04 13:58:35","createUser":"1509798398956404736","updateTime":"2022-08-15 17:27:07","updateUser":"1509798398956404736","supplierName":"海峡姐妹","storeId":"1511895265261387776","categoryId":"1460889654206136320","groupId":"1555011116692668416","shortName":"分销","productName":"家庭游玩套餐一","sellDesc":"","productCode":"PRO202208041358350000000000003","weight":"0","applyPrice":"318.00","price":"318.00","vipPrice":null,"stock":999,"sellCount":1,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

① 饮品任选4杯(含啤酒).
② 小吃任选4份.
③ 特色冰棒4根.
④ 小酒馆体验票2张
⑤ 玩具兑换券1张(水枪/飞盘二选一

","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555071062826287104","createTime":"2022-08-04 14:00:08","createUser":"1509798398956404736","updateTime":"2022-08-04 14:19:23","updateUser":"1509798398956404736","supplierName":"海峡姐妹","storeId":"1511895265261387776","categoryId":"1460889654206136320","groupId":"1555011116692668416","shortName":"分销","productName":"家庭游玩套餐二","sellDesc":"","productCode":"PRO202208041400070000000000001","weight":"0","applyPrice":"128.00","price":"128.00","vipPrice":null,"stock":998,"sellCount":2,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

1.提供小帐篷一顶,全家不限时使用.
2.园区内餐车在售饮品任选两杯(含啤酒).
3.台湾小吃街摊位在售小吃任选一份.
4.古桑园特色桑椹冰棍两根.

","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555071811366944768","createTime":"2022-08-04 14:03:06","createUser":"1509798398956404736","updateTime":"2022-08-15 17:27:55","updateUser":"1509798398956404736","supplierName":"海峡姐妹","storeId":"1511895265261387776","categoryId":"1460889654206136320","groupId":"1555011116692668416","shortName":"分销","productName":"一家三口.家庭套餐一 (儿童1.2m以下)","sellDesc":"","productCode":"PRO202208041403060000000000001","weight":"0","applyPrice":"80.00","price":"80.00","vipPrice":null,"stock":998,"sellCount":3,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

园区大门

\n

1.成人公园门票两张.
2.儿童身高1.2米以下免票一张.

\n

儿童水上乐园

\n

1.儿童水上乐园,一名儿童不限时畅玩.

","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555072466726944768","createTime":"2022-08-04 14:05:43","createUser":"1509798398956404736","updateTime":"2022-08-15 17:28:22","updateUser":"1509798398956404736","supplierName":"海峡姐妹","storeId":"1511895265261387776","categoryId":"1460889654206136320","groupId":"1555011116692668416","shortName":"分销","productName":"一家三口.家庭套餐二 (儿童1.2m以上)","sellDesc":"","productCode":"PRO202208041405420000000000003","weight":"0","applyPrice":"120.00","price":"120.00","vipPrice":null,"stock":999,"sellCount":1,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

园区大门

\n

1.成人公园门票两张.
2.儿童身高1.2米以上门票一张.

\n

儿童水上乐园

\n

1.儿童水上乐园,一名儿童不限时畅玩.

","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555072974883651584","createTime":"2022-08-04 14:07:44","createUser":"1509798398956404736","updateTime":"2022-08-15 17:28:47","updateUser":"1509798398956404736","supplierName":"海峡姐妹","storeId":"1511895265261387776","categoryId":"1460889654206136320","groupId":"1555011116692668416","shortName":"分销","productName":"一家三口.家庭套餐三 (儿童1.2m以上)","sellDesc":"","productCode":"PRO202208041407430000000000001","weight":"0","applyPrice":"258.00","price":"258.00","vipPrice":null,"stock":994,"sellCount":6,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

园区大门

\n

1.成人公园门票两张.
2.儿童身高1.2米以上门票一张.

\n

三角帐篷/水上乐园

\n

1.提供三角帐篷一顶,全家不限时使用.
2.儿童水上乐园,一名儿童不限时畅玩.
3.古桑园特色桑椹冰棍两根.
4.园区内餐车在售饮品任选两杯+回乡精酿啤酒一杯.
5.台湾小吃街摊位在售小吃任选一份.

","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555075594444603392","createTime":"2022-08-04 14:18:08","createUser":"1509798398956404736","updateTime":"2022-08-04 14:18:08","updateUser":"1509798398956404736","supplierName":"海峡姐妹","storeId":"1511895265261387776","categoryId":"1460889654206136320","groupId":"1555011116692668416","shortName":"分销","productName":"小酒馆体验券","sellDesc":"","productCode":"PRO202208041418080000000000001","weight":"0","applyPrice":"20.00","price":"20.00","vipPrice":null,"stock":991,"sellCount":9,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"

小酒馆体验券

","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1555519619937075200","createTime":"2022-08-05 19:42:32","createUser":"1347839370706550784","updateTime":"2022-08-05 19:42:40","updateUser":"1347839370706550784","supplierName":"回乡农场火锅","storeId":"1347853925696405504","categoryId":"1300687829071822848","groupId":"1305419452992455656","shortName":"赠送","productName":"锅底赠送卷卷菜","sellDesc":"","productCode":"PRO202208051942320000000000001","weight":"0","applyPrice":"0.00","price":"0.00","vipPrice":null,"stock":0,"sellCount":0,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":false,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":1,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1557551663693168640","createTime":"2022-08-11 10:17:09","createUser":"1333246101196636160","updateTime":"2022-09-07 10:19:00","updateUser":"1333246101196636160","supplierName":"前进麦味烘焙","storeId":"1432164681279078400","categoryId":"1343391656220557312","groupId":"1433972467260456960","shortName":"低糖低油南瓜吐司面团,搭配纯天然农场有机南瓜和纯燕麦,南瓜低温烘烤保留营养元素,加入燕麦提升人体膳食纤维,更注重健康营养搭配","productName":"燕麦南瓜吐司","sellDesc":"","productCode":"PRO202208111017090000000000001","weight":"0","applyPrice":"18.00","price":"18.00","vipPrice":null,"stock":956,"sellCount":30,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":false,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"https://pos.upload.lotus-wallet.com/1175/2022/08/2e0c14fd-2717-4812-a355-a24fbef9a78a.png","info":"","buyCount":-18,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1561985460165672960","createTime":"2022-08-23 15:55:29","createUser":"1347820292432461824","updateTime":"2022-09-04 21:53:26","updateUser":"1347820292432461824","supplierName":"百年川椒","storeId":"1300372027722432512","categoryId":"1300687829071822848","groupId":"1318729689669304320","shortName":"3-4人餐","productName":"虎年暴富晚市套餐","sellDesc":"","productCode":"PRO202208231555280000000000001","weight":"0","applyPrice":"401.00","price":"401.00","vipPrice":null,"stock":-16,"sellCount":16,"needLogistics":0,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1560106924941246464","createTime":"2022-08-18 11:30:51","createUser":"1347839370706550784","updateTime":"2022-09-19 19:24:09","updateUser":"1347839370706550784","supplierName":"央厨","storeId":"1347853925696405504","categoryId":"1300687829071822848","groupId":"1315891390147724264","shortName":"","productName":"农场南瓜饼","sellDesc":"","productCode":"PRO202208181130500000000000001","weight":"0","applyPrice":"12.00","price":"12.00","vipPrice":null,"stock":-18,"sellCount":15,"needLogistics":1,"oversold":1,"organic":0,"status":1,"posShow":true,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"https://pos.upload.lotus-wallet.com/1178/2022/08/e6bbd456-b542-4cfd-ac21-996341756da8.jpg","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"},{"id":"1560107415041474560","createTime":"2022-08-18 11:32:48","createUser":"1347839370706550784","updateTime":"2022-09-19 19:25:02","updateUser":"1347839370706550784","supplierName":"央厨","storeId":"1347853925696405504","categoryId":"1300687829071822848","groupId":"1315891390147724264","shortName":"","productName":"南瓜椰奶糕 ","sellDesc":"","productCode":"PRO202208181132470000000000001","weight":"0","applyPrice":"28.00","price":"28.00","vipPrice":null,"stock":-5,"sellCount":-7,"needLogistics":1,"oversold":1,"organic":0,"status":0,"posShow":false,"productType":0,"productNumber":1,"setMeal":1,"attrStyle":0,"detail":"","isDelete":0,"printerFlag":"DEFAULT","materials":null,"materialId":null,"details":"","thumbnailImg":"https://pos.upload.lotus-wallet.com/1178/2022/08/a27093c5-6774-441f-9347-6e1a0abd0b87.jpg","info":"","buyCount":0,"sellCountLimit":0,"vipDiscount":"0.00"}] - -class VipCardHome { - VipCardHome({ - Member member, - List cards, - List coupons, - List productVips,}){ - _member = member; - _cards = cards; - _coupons = coupons; - _productVips = productVips; -} - - VipCardHome.fromJson(dynamic json) { - _member = json['member'] != null ? Member.fromJson(json['member']) : null; - if (json['cards'] != null) { - _cards = []; - json['cards'].forEach((v) { - _cards.add(Cards.fromJson(v)); - }); - } - // if (json['coupons'] != null) { - // _coupons = []; - // json['coupons'].forEach((v) { - // _coupons.add(Dynamic.fromJson(v)); - // }); - // } - if (json['productVips'] != null) { - _productVips = []; - json['productVips'].forEach((v) { - _productVips.add(ProductVips.fromJson(v)); - }); - } - } - Member _member; - List _cards; - List _coupons; - List _productVips; -VipCardHome copyWith({ Member member, - List cards, - List coupons, - List productVips, -}) => VipCardHome( member: member ?? _member, - cards: cards ?? _cards, - coupons: coupons ?? _coupons, - productVips: productVips ?? _productVips, -); - Member get member => _member; - List get cards => _cards; - List get coupons => _coupons; - List get productVips => _productVips; - - Map toJson() { - final map = {}; - if (_member != null) { - map['member'] = _member.toJson(); - } - if (_cards != null) { - map['cards'] = _cards.map((v) => v.toJson()).toList(); - } - if (_coupons != null) { - map['coupons'] = _coupons.map((v) => v.toJson()).toList(); - } - if (_productVips != null) { - map['productVips'] = _productVips.map((v) => v.toJson()).toList(); - } - return map; - } - -} - -/// id : "1580078947226353664" -/// createTime : "2022-10-12 14:12:32" -/// createUser : "1310841663890915328" -/// updateTime : "2022-10-12 14:12:32" -/// updateUser : "1310841663890915328" -/// supplierName : "58" -/// storeId : "1300372027722432512" -/// categoryId : "1300687829071822848" -/// groupId : "1307148205753892864" -/// shortName : "会员商品原价100 会员价6" -/// productName : "会员商品" -/// sellDesc : "" -/// productCode : "PRO202210121412320000000000001" -/// weight : "0" -/// applyPrice : "100.00" -/// price : "101.00" -/// vipPrice : "6.00" -/// stock : 882 -/// sellCount : 6 -/// needLogistics : 0 -/// oversold : 1 -/// organic : 0 -/// status : 1 -/// posShow : true -/// productType : 0 -/// productNumber : 1 -/// setMeal : 1 -/// attrStyle : 0 -/// detail : "" -/// isDelete : 0 -/// printerFlag : "DEFAULT" -/// materials : null -/// materialId : null -/// details : "

1534

" -/// thumbnailImg : "" -/// info : "会员商品原价100 会员价6" -/// buyCount : 0 -/// sellCountLimit : 0 -/// vipDiscount : "95.00" - -class ProductVips { - ProductVips({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String supplierName, - String storeId, - String categoryId, - String groupId, - String shortName, - String productName, - String sellDesc, - String productCode, - String weight, - String applyPrice, - String price, - String vipPrice, - num stock, - num sellCount, - num needLogistics, - num oversold, - num organic, - num status, - bool posShow, - num productType, - num productNumber, - num setMeal, - num attrStyle, - String detail, - num isDelete, - String printerFlag, - dynamic materials, - dynamic materialId, - String details, - String thumbnailImg, - String image, - String info, - num buyCount, - num sellCountLimit, - String vipDiscount, - String tenantCode}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _supplierName = supplierName; - _storeId = storeId; - _categoryId = categoryId; - _groupId = groupId; - _shortName = shortName; - _productName = productName; - _sellDesc = sellDesc; - _productCode = productCode; - _weight = weight; - _applyPrice = applyPrice; - _price = price; - _vipPrice = vipPrice; - _stock = stock; - _sellCount = sellCount; - _needLogistics = needLogistics; - _oversold = oversold; - _organic = organic; - _status = status; - _posShow = posShow; - _productType = productType; - _productNumber = productNumber; - _setMeal = setMeal; - _attrStyle = attrStyle; - _detail = detail; - _isDelete = isDelete; - _printerFlag = printerFlag; - _materials = materials; - _materialId = materialId; - _details = details; - _thumbnailImg = thumbnailImg; - _image = image; - _info = info; - _buyCount = buyCount; - _sellCountLimit = sellCountLimit; - _vipDiscount = vipDiscount; - _tenantCode = tenantCode; -} - - ProductVips.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _supplierName = json['supplierName']; - _storeId = json['storeId']; - _categoryId = json['categoryId']; - _groupId = json['groupId']; - _shortName = json['shortName']; - _productName = json['productName']; - _sellDesc = json['sellDesc']; - _productCode = json['productCode']; - _weight = json['weight']; - _applyPrice = json['applyPrice']; - _price = json['price']; - _vipPrice = json['vipPrice']; - _stock = json['stock']; - _sellCount = json['sellCount']; - _needLogistics = json['needLogistics']; - _oversold = json['oversold']; - _organic = json['organic']; - _status = json['status']; - _posShow = json['posShow']; - _productType = json['productType']; - _productNumber = json['productNumber']; - _setMeal = json['setMeal']; - _attrStyle = json['attrStyle']; - _detail = json['detail']; - _isDelete = json['isDelete']; - _printerFlag = json['printerFlag']; - _materials = json['materials']; - _materialId = json['materialId']; - _details = json['details']; - _thumbnailImg = json['thumbnailImg']; - _image = json['image']; - _info = json['info']; - _buyCount = json['buyCount']; - _sellCountLimit = json['sellCountLimit']; - _vipDiscount = json['vipDiscount']; - _tenantCode =json['tenantCode']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _supplierName; - String _storeId; - String _categoryId; - String _groupId; - String _shortName; - String _productName; - String _sellDesc; - String _productCode; - String _weight; - String _applyPrice; - String _price; - String _vipPrice; - num _stock; - num _sellCount; - num _needLogistics; - num _oversold; - num _organic; - num _status; - bool _posShow; - num _productType; - num _productNumber; - num _setMeal; - num _attrStyle; - String _detail; - num _isDelete; - String _printerFlag; - dynamic _materials; - dynamic _materialId; - String _details; - String _thumbnailImg; - String _image; - String _info; - num _buyCount; - num _sellCountLimit; - String _vipDiscount; - String _tenantCode; -ProductVips copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String supplierName, - String storeId, - String categoryId, - String groupId, - String shortName, - String productName, - String sellDesc, - String productCode, - String weight, - String applyPrice, - String price, - String vipPrice, - num stock, - num sellCount, - num needLogistics, - num oversold, - num organic, - num status, - bool posShow, - num productType, - num productNumber, - num setMeal, - num attrStyle, - String detail, - num isDelete, - String printerFlag, - dynamic materials, - dynamic materialId, - String details, - String thumbnailImg, - String image, - String info, - num buyCount, - num sellCountLimit, - String vipDiscount, - String tenantCode, -}) => ProductVips( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - supplierName: supplierName ?? _supplierName, - storeId: storeId ?? _storeId, - categoryId: categoryId ?? _categoryId, - groupId: groupId ?? _groupId, - shortName: shortName ?? _shortName, - productName: productName ?? _productName, - sellDesc: sellDesc ?? _sellDesc, - productCode: productCode ?? _productCode, - weight: weight ?? _weight, - applyPrice: applyPrice ?? _applyPrice, - price: price ?? _price, - vipPrice: vipPrice ?? _vipPrice, - stock: stock ?? _stock, - sellCount: sellCount ?? _sellCount, - needLogistics: needLogistics ?? _needLogistics, - oversold: oversold ?? _oversold, - organic: organic ?? _organic, - status: status ?? _status, - posShow: posShow ?? _posShow, - productType: productType ?? _productType, - productNumber: productNumber ?? _productNumber, - setMeal: setMeal ?? _setMeal, - attrStyle: attrStyle ?? _attrStyle, - detail: detail ?? _detail, - isDelete: isDelete ?? _isDelete, - printerFlag: printerFlag ?? _printerFlag, - materials: materials ?? _materials, - materialId: materialId ?? _materialId, - details: details ?? _details, - thumbnailImg: thumbnailImg ?? _thumbnailImg, - image:image ?? _image, - info: info ?? _info, - buyCount: buyCount ?? _buyCount, - sellCountLimit: sellCountLimit ?? _sellCountLimit, - vipDiscount: vipDiscount ?? _vipDiscount, - tenantCode:tenantCode ?? _tenantCode, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get supplierName => _supplierName; - String get storeId => _storeId; - String get categoryId => _categoryId; - String get groupId => _groupId; - String get shortName => _shortName; - String get productName => _productName; - String get sellDesc => _sellDesc; - String get productCode => _productCode; - String get weight => _weight; - String get applyPrice => _applyPrice; - String get price => _price; - String get vipPrice => _vipPrice; - num get stock => _stock; - num get sellCount => _sellCount; - num get needLogistics => _needLogistics; - num get oversold => _oversold; - num get organic => _organic; - num get status => _status; - bool get posShow => _posShow; - num get productType => _productType; - num get productNumber => _productNumber; - num get setMeal => _setMeal; - num get attrStyle => _attrStyle; - String get detail => _detail; - num get isDelete => _isDelete; - String get printerFlag => _printerFlag; - dynamic get materials => _materials; - dynamic get materialId => _materialId; - String get details => _details; - String get thumbnailImg => _thumbnailImg; - String get image => _image; - String get info => _info; - num get buyCount => _buyCount; - num get sellCountLimit => _sellCountLimit; - String get vipDiscount => _vipDiscount; - String get tenantCode => _tenantCode; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['supplierName'] = _supplierName; - map['storeId'] = _storeId; - map['categoryId'] = _categoryId; - map['groupId'] = _groupId; - map['shortName'] = _shortName; - map['productName'] = _productName; - map['sellDesc'] = _sellDesc; - map['productCode'] = _productCode; - map['weight'] = _weight; - map['applyPrice'] = _applyPrice; - map['price'] = _price; - map['vipPrice'] = _vipPrice; - map['stock'] = _stock; - map['sellCount'] = _sellCount; - map['needLogistics'] = _needLogistics; - map['oversold'] = _oversold; - map['organic'] = _organic; - map['status'] = _status; - map['posShow'] = _posShow; - map['productType'] = _productType; - map['productNumber'] = _productNumber; - map['setMeal'] = _setMeal; - map['attrStyle'] = _attrStyle; - map['detail'] = _detail; - map['isDelete'] = _isDelete; - map['printerFlag'] = _printerFlag; - map['materials'] = _materials; - map['materialId'] = _materialId; - map['details'] = _details; - map['thumbnailImg'] = _thumbnailImg; - map['image'] = _image; - map['info'] = _info; - map['buyCount'] = _buyCount; - map['sellCountLimit'] = _sellCountLimit; - map['vipDiscount'] = _vipDiscount; - map['tenantCode'] = _tenantCode; - return map; - } - -} - -/// id : "1579679485240803328" -/// createTime : "2022-10-11 11:45:13" -/// createUser : "1" -/// updateTime : "2022-10-11 11:48:48" -/// updateUser : "1" -/// name : "888绿卡" -/// duration : 30 -/// price : "188.00" -/// autoSubscribe : true -/// isDelete : true - -class Cards { - Cards({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - num duration, - String price, - bool autoSubscribe, - bool isDelete,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _name = name; - _duration = duration; - _price = price; - _autoSubscribe = autoSubscribe; - _isDelete = isDelete; -} - - Cards.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _name = json['name']; - _duration = json['duration']; - _price = json['price']; - _autoSubscribe = json['autoSubscribe']; - _isDelete = json['isDelete']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _name; - num _duration; - String _price; - bool _autoSubscribe; - bool _isDelete; -Cards copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String name, - num duration, - String price, - bool autoSubscribe, - bool isDelete, -}) => Cards( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - name: name ?? _name, - duration: duration ?? _duration, - price: price ?? _price, - autoSubscribe: autoSubscribe ?? _autoSubscribe, - isDelete: isDelete ?? _isDelete, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get name => _name; - num get duration => _duration; - String get price => _price; - bool get autoSubscribe => _autoSubscribe; - bool get isDelete => _isDelete; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['name'] = _name; - map['duration'] = _duration; - map['price'] = _price; - map['autoSubscribe'] = _autoSubscribe; - map['isDelete'] = _isDelete; - return map; - } - -} - -/// masterId : "0" -/// masterCardRankName : null -/// vipNo : "1379254113602109440" -/// nickname : "哈哈哈" -/// headimg : "https://pos.upload.lotus-wallet.com/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg" -/// userType : true -/// sex : "0" -/// level : 1 -/// addressId : "0" -/// remark : "" -/// phone : "13052919193" -/// createTime : "2021-04-06 10:06:21" -/// birth : "1998-09-17" -/// balance : null -/// money : "31.12" -/// activityMoney : "0.00" -/// greenMoney : "4872.00" -/// expendAmount : "180.02" -/// organic : 0 -/// points : "741" -/// isBind : true -/// memberRankVo : {"id":"1462684050274648064","rankName":"白银会员","rankOrigin":69,"rankContent":"","rankImg":"https://pos.upload.lotus-wallet.com/MDAwMA==/2021/11/7453eb74-661e-42b7-b575-8accc00fcbf5.png","status":true,"nextId":"1462684471177248768","nextName":"黄金会员","nextOrigin":20000} -/// age : 24 -/// inviteCode : "MFZPXU" -/// inviteNumber : 4 -/// todayInviteNumber : 0 -/// signature : "" -/// background : "https://pos.upload.gznl.top/admin/2022/03/dd0af83c-1f2b-4217-bf0c-cdb7a809caca.jpeg" -/// certification : null -/// hasPayPassword : true -/// isVip : false -/// vipExpire : null -/// isVipSubscribe : false -/// vipDuration : 33 - -class Member { - Member({ - String masterId, - dynamic masterCardRankName, - String vipNo, - String nickname, - String headimg, - bool userType, - String sex, - num level, - String addressId, - String remark, - String phone, - String createTime, - String birth, - dynamic balance, - String money, - String activityMoney, - String greenMoney, - String expendAmount, - num organic, - String points, - bool isBind, - MemberRankVo memberRankVo, - num age, - String inviteCode, - num inviteNumber, - num todayInviteNumber, - String signature, - String background, - dynamic certification, - bool hasPayPassword, - bool isVip, - dynamic vipExpire, - bool isVipSubscribe, - num vipDuration,}){ - _masterId = masterId; - _masterCardRankName = masterCardRankName; - _vipNo = vipNo; - _nickname = nickname; - _headimg = headimg; - _userType = userType; - _sex = sex; - _level = level; - _addressId = addressId; - _remark = remark; - _phone = phone; - _createTime = createTime; - _birth = birth; - _balance = balance; - _money = money; - _activityMoney = activityMoney; - _greenMoney = greenMoney; - _expendAmount = expendAmount; - _organic = organic; - _points = points; - _isBind = isBind; - _memberRankVo = memberRankVo; - _age = age; - _inviteCode = inviteCode; - _inviteNumber = inviteNumber; - _todayInviteNumber = todayInviteNumber; - _signature = signature; - _background = background; - _certification = certification; - _hasPayPassword = hasPayPassword; - _isVip = isVip; - _vipExpire = vipExpire; - _isVipSubscribe = isVipSubscribe; - _vipDuration = vipDuration; -} - - Member.fromJson(dynamic json) { - _masterId = json['masterId']; - _masterCardRankName = json['masterCardRankName']; - _vipNo = json['vipNo']; - _nickname = json['nickname']; - _headimg = json['headimg']; - _userType = json['userType']; - _sex = json['sex']; - _level = json['level']; - _addressId = json['addressId']; - _remark = json['remark']; - _phone = json['phone']; - _createTime = json['createTime']; - _birth = json['birth']; - _balance = json['balance']; - _money = json['money']; - _activityMoney = json['activityMoney']; - _greenMoney = json['greenMoney']; - _expendAmount = json['expendAmount']; - _organic = json['organic']; - _points = json['points']; - _isBind = json['isBind']; - _memberRankVo = json['memberRankVo'] != null ? MemberRankVo.fromJson(json['memberRankVo']) : null; - _age = json['age']; - _inviteCode = json['inviteCode']; - _inviteNumber = json['inviteNumber']; - _todayInviteNumber = json['todayInviteNumber']; - _signature = json['signature']; - _background = json['background']; - _certification = json['certification']; - _hasPayPassword = json['hasPayPassword']; - _isVip = json['isVip']; - _vipExpire = json['vipExpire']; - _isVipSubscribe = json['isVipSubscribe']; - _vipDuration = json['vipDuration']; - } - String _masterId; - dynamic _masterCardRankName; - String _vipNo; - String _nickname; - String _headimg; - bool _userType; - String _sex; - num _level; - String _addressId; - String _remark; - String _phone; - String _createTime; - String _birth; - dynamic _balance; - String _money; - String _activityMoney; - String _greenMoney; - String _expendAmount; - num _organic; - String _points; - bool _isBind; - MemberRankVo _memberRankVo; - num _age; - String _inviteCode; - num _inviteNumber; - num _todayInviteNumber; - String _signature; - String _background; - dynamic _certification; - bool _hasPayPassword; - bool _isVip; - dynamic _vipExpire; - bool _isVipSubscribe; - num _vipDuration; -Member copyWith({ String masterId, - dynamic masterCardRankName, - String vipNo, - String nickname, - String headimg, - bool userType, - String sex, - num level, - String addressId, - String remark, - String phone, - String createTime, - String birth, - dynamic balance, - String money, - String activityMoney, - String greenMoney, - String expendAmount, - num organic, - String points, - bool isBind, - MemberRankVo memberRankVo, - num age, - String inviteCode, - num inviteNumber, - num todayInviteNumber, - String signature, - String background, - dynamic certification, - bool hasPayPassword, - bool isVip, - dynamic vipExpire, - bool isVipSubscribe, - num vipDuration, -}) => Member( masterId: masterId ?? _masterId, - masterCardRankName: masterCardRankName ?? _masterCardRankName, - vipNo: vipNo ?? _vipNo, - nickname: nickname ?? _nickname, - headimg: headimg ?? _headimg, - userType: userType ?? _userType, - sex: sex ?? _sex, - level: level ?? _level, - addressId: addressId ?? _addressId, - remark: remark ?? _remark, - phone: phone ?? _phone, - createTime: createTime ?? _createTime, - birth: birth ?? _birth, - balance: balance ?? _balance, - money: money ?? _money, - activityMoney: activityMoney ?? _activityMoney, - greenMoney: greenMoney ?? _greenMoney, - expendAmount: expendAmount ?? _expendAmount, - organic: organic ?? _organic, - points: points ?? _points, - isBind: isBind ?? _isBind, - memberRankVo: memberRankVo ?? _memberRankVo, - age: age ?? _age, - inviteCode: inviteCode ?? _inviteCode, - inviteNumber: inviteNumber ?? _inviteNumber, - todayInviteNumber: todayInviteNumber ?? _todayInviteNumber, - signature: signature ?? _signature, - background: background ?? _background, - certification: certification ?? _certification, - hasPayPassword: hasPayPassword ?? _hasPayPassword, - isVip: isVip ?? _isVip, - vipExpire: vipExpire ?? _vipExpire, - isVipSubscribe: isVipSubscribe ?? _isVipSubscribe, - vipDuration: vipDuration ?? _vipDuration, -); - String get masterId => _masterId; - dynamic get masterCardRankName => _masterCardRankName; - String get vipNo => _vipNo; - String get nickname => _nickname; - String get headimg => _headimg; - bool get userType => _userType; - String get sex => _sex; - num get level => _level; - String get addressId => _addressId; - String get remark => _remark; - String get phone => _phone; - String get createTime => _createTime; - String get birth => _birth; - dynamic get balance => _balance; - String get money => _money; - String get activityMoney => _activityMoney; - String get greenMoney => _greenMoney; - String get expendAmount => _expendAmount; - num get organic => _organic; - String get points => _points; - bool get isBind => _isBind; - MemberRankVo get memberRankVo => _memberRankVo; - num get age => _age; - String get inviteCode => _inviteCode; - num get inviteNumber => _inviteNumber; - num get todayInviteNumber => _todayInviteNumber; - String get signature => _signature; - String get background => _background; - dynamic get certification => _certification; - bool get hasPayPassword => _hasPayPassword; - bool get isVip => _isVip; - dynamic get vipExpire => _vipExpire; - bool get isVipSubscribe => _isVipSubscribe; - num get vipDuration => _vipDuration; - - Map toJson() { - final map = {}; - map['masterId'] = _masterId; - map['masterCardRankName'] = _masterCardRankName; - map['vipNo'] = _vipNo; - map['nickname'] = _nickname; - map['headimg'] = _headimg; - map['userType'] = _userType; - map['sex'] = _sex; - map['level'] = _level; - map['addressId'] = _addressId; - map['remark'] = _remark; - map['phone'] = _phone; - map['createTime'] = _createTime; - map['birth'] = _birth; - map['balance'] = _balance; - map['money'] = _money; - map['activityMoney'] = _activityMoney; - map['greenMoney'] = _greenMoney; - map['expendAmount'] = _expendAmount; - map['organic'] = _organic; - map['points'] = _points; - map['isBind'] = _isBind; - if (_memberRankVo != null) { - map['memberRankVo'] = _memberRankVo.toJson(); - } - map['age'] = _age; - map['inviteCode'] = _inviteCode; - map['inviteNumber'] = _inviteNumber; - map['todayInviteNumber'] = _todayInviteNumber; - map['signature'] = _signature; - map['background'] = _background; - map['certification'] = _certification; - map['hasPayPassword'] = _hasPayPassword; - map['isVip'] = _isVip; - map['vipExpire'] = _vipExpire; - map['isVipSubscribe'] = _isVipSubscribe; - map['vipDuration'] = _vipDuration; - return map; - } - -} - -/// id : "1462684050274648064" -/// rankName : "白银会员" -/// rankOrigin : 69 -/// rankContent : "" -/// rankImg : "https://pos.upload.lotus-wallet.com/MDAwMA==/2021/11/7453eb74-661e-42b7-b575-8accc00fcbf5.png" -/// status : true -/// nextId : "1462684471177248768" -/// nextName : "黄金会员" -/// nextOrigin : 20000 - -class MemberRankVo { - MemberRankVo({ - String id, - String rankName, - num rankOrigin, - String rankContent, - String rankImg, - bool status, - String nextId, - String nextName, - num nextOrigin,}){ - _id = id; - _rankName = rankName; - _rankOrigin = rankOrigin; - _rankContent = rankContent; - _rankImg = rankImg; - _status = status; - _nextId = nextId; - _nextName = nextName; - _nextOrigin = nextOrigin; -} - - MemberRankVo.fromJson(dynamic json) { - _id = json['id']; - _rankName = json['rankName']; - _rankOrigin = json['rankOrigin']; - _rankContent = json['rankContent']; - _rankImg = json['rankImg']; - _status = json['status']; - _nextId = json['nextId']; - _nextName = json['nextName']; - _nextOrigin = json['nextOrigin']; - } - String _id; - String _rankName; - num _rankOrigin; - String _rankContent; - String _rankImg; - bool _status; - String _nextId; - String _nextName; - num _nextOrigin; -MemberRankVo copyWith({ String id, - String rankName, - num rankOrigin, - String rankContent, - String rankImg, - bool status, - String nextId, - String nextName, - num nextOrigin, -}) => MemberRankVo( id: id ?? _id, - rankName: rankName ?? _rankName, - rankOrigin: rankOrigin ?? _rankOrigin, - rankContent: rankContent ?? _rankContent, - rankImg: rankImg ?? _rankImg, - status: status ?? _status, - nextId: nextId ?? _nextId, - nextName: nextName ?? _nextName, - nextOrigin: nextOrigin ?? _nextOrigin, -); - String get id => _id; - String get rankName => _rankName; - num get rankOrigin => _rankOrigin; - String get rankContent => _rankContent; - String get rankImg => _rankImg; - bool get status => _status; - String get nextId => _nextId; - String get nextName => _nextName; - num get nextOrigin => _nextOrigin; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['rankName'] = _rankName; - map['rankOrigin'] = _rankOrigin; - map['rankContent'] = _rankContent; - map['rankImg'] = _rankImg; - map['status'] = _status; - map['nextId'] = _nextId; - map['nextName'] = _nextName; - map['nextOrigin'] = _nextOrigin; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/vip_counts_info.dart b/lib/retrofit/data/vip_counts_info.dart deleted file mode 100644 index 48dc0af0..00000000 --- a/lib/retrofit/data/vip_counts_info.dart +++ /dev/null @@ -1,141 +0,0 @@ -/// dayMoney : "0" -/// yesterdayMoney : "0" -/// paySum : "0" -/// yesterdayPaySum : "0" -/// rechargeMoney : "0" -/// weekRechargeMoney : "0" -/// lastWeekRechargeMoney : "0" -/// orderNum : 0 -/// yesterdayOrderNum : 0 -/// memberNum : 21800 -/// lastWeekMemberNum : 4 -/// weekMemberNum : 1 -/// newMemberNum : 0 -/// yesterdayNewMemberNum : 0 - -class VipCountsInfo { - VipCountsInfo({ - String dayMoney, - String yesterdayMoney, - String paySum, - String yesterdayPaySum, - String rechargeMoney, - String weekRechargeMoney, - String lastWeekRechargeMoney, - num orderNum, - num yesterdayOrderNum, - num memberNum, - num lastWeekMemberNum, - num weekMemberNum, - num newMemberNum, - num yesterdayNewMemberNum,}){ - _dayMoney = dayMoney; - _yesterdayMoney = yesterdayMoney; - _paySum = paySum; - _yesterdayPaySum = yesterdayPaySum; - _rechargeMoney = rechargeMoney; - _weekRechargeMoney = weekRechargeMoney; - _lastWeekRechargeMoney = lastWeekRechargeMoney; - _orderNum = orderNum; - _yesterdayOrderNum = yesterdayOrderNum; - _memberNum = memberNum; - _lastWeekMemberNum = lastWeekMemberNum; - _weekMemberNum = weekMemberNum; - _newMemberNum = newMemberNum; - _yesterdayNewMemberNum = yesterdayNewMemberNum; -} - - VipCountsInfo.fromJson(dynamic json) { - _dayMoney = json['dayMoney']; - _yesterdayMoney = json['yesterdayMoney']; - _paySum = json['paySum']; - _yesterdayPaySum = json['yesterdayPaySum']; - _rechargeMoney = json['rechargeMoney']; - _weekRechargeMoney = json['weekRechargeMoney']; - _lastWeekRechargeMoney = json['lastWeekRechargeMoney']; - _orderNum = json['orderNum']; - _yesterdayOrderNum = json['yesterdayOrderNum']; - _memberNum = json['memberNum']; - _lastWeekMemberNum = json['lastWeekMemberNum']; - _weekMemberNum = json['weekMemberNum']; - _newMemberNum = json['newMemberNum']; - _yesterdayNewMemberNum = json['yesterdayNewMemberNum']; - } - String _dayMoney; - String _yesterdayMoney; - String _paySum; - String _yesterdayPaySum; - String _rechargeMoney; - String _weekRechargeMoney; - String _lastWeekRechargeMoney; - num _orderNum; - num _yesterdayOrderNum; - num _memberNum; - num _lastWeekMemberNum; - num _weekMemberNum; - num _newMemberNum; - num _yesterdayNewMemberNum; -VipCountsInfo copyWith({ String dayMoney, - String yesterdayMoney, - String paySum, - String yesterdayPaySum, - String rechargeMoney, - String weekRechargeMoney, - String lastWeekRechargeMoney, - num orderNum, - num yesterdayOrderNum, - num memberNum, - num lastWeekMemberNum, - num weekMemberNum, - num newMemberNum, - num yesterdayNewMemberNum, -}) => VipCountsInfo( dayMoney: dayMoney ?? _dayMoney, - yesterdayMoney: yesterdayMoney ?? _yesterdayMoney, - paySum: paySum ?? _paySum, - yesterdayPaySum: yesterdayPaySum ?? _yesterdayPaySum, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - weekRechargeMoney: weekRechargeMoney ?? _weekRechargeMoney, - lastWeekRechargeMoney: lastWeekRechargeMoney ?? _lastWeekRechargeMoney, - orderNum: orderNum ?? _orderNum, - yesterdayOrderNum: yesterdayOrderNum ?? _yesterdayOrderNum, - memberNum: memberNum ?? _memberNum, - lastWeekMemberNum: lastWeekMemberNum ?? _lastWeekMemberNum, - weekMemberNum: weekMemberNum ?? _weekMemberNum, - newMemberNum: newMemberNum ?? _newMemberNum, - yesterdayNewMemberNum: yesterdayNewMemberNum ?? _yesterdayNewMemberNum, -); - String get dayMoney => _dayMoney; - String get yesterdayMoney => _yesterdayMoney; - String get paySum => _paySum; - String get yesterdayPaySum => _yesterdayPaySum; - String get rechargeMoney => _rechargeMoney; - String get weekRechargeMoney => _weekRechargeMoney; - String get lastWeekRechargeMoney => _lastWeekRechargeMoney; - num get orderNum => _orderNum; - num get yesterdayOrderNum => _yesterdayOrderNum; - num get memberNum => _memberNum; - num get lastWeekMemberNum => _lastWeekMemberNum; - num get weekMemberNum => _weekMemberNum; - num get newMemberNum => _newMemberNum; - num get yesterdayNewMemberNum => _yesterdayNewMemberNum; - - Map toJson() { - final map = {}; - map['dayMoney'] = _dayMoney; - map['yesterdayMoney'] = _yesterdayMoney; - map['paySum'] = _paySum; - map['yesterdayPaySum'] = _yesterdayPaySum; - map['rechargeMoney'] = _rechargeMoney; - map['weekRechargeMoney'] = _weekRechargeMoney; - map['lastWeekRechargeMoney'] = _lastWeekRechargeMoney; - map['orderNum'] = _orderNum; - map['yesterdayOrderNum'] = _yesterdayOrderNum; - map['memberNum'] = _memberNum; - map['lastWeekMemberNum'] = _lastWeekMemberNum; - map['weekMemberNum'] = _weekMemberNum; - map['newMemberNum'] = _newMemberNum; - map['yesterdayNewMemberNum'] = _yesterdayNewMemberNum; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/vip_record_details_list.dart b/lib/retrofit/data/vip_record_details_list.dart deleted file mode 100644 index 65da0a4a..00000000 --- a/lib/retrofit/data/vip_record_details_list.dart +++ /dev/null @@ -1,349 +0,0 @@ -/// records : [{"id":"1740270714188988416","createTime":"2023-12-28 15:17:26","createUser":"1659496253991419904","updateTime":"2023-12-28 15:17:26","updateUser":"1659496253991419904","mid":"1659496253991419904","linkId":"202312281517200005","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"0.01","realNumber":"0.01","balance":"1109.94","mark":"","status":true,"isDeleted":false,"tenantName":"海峡姐妹茶膳坊","rechargeMoney":"0.01","giftMoney":"0.00","totalMoney":"0.01","balanceMoney":"1109.94"},{"id":"1740270550686629888","createTime":"2023-12-28 15:16:47","createUser":"1659496253991419904","updateTime":"2023-12-28 15:16:47","updateUser":"1659496253991419904","mid":"1659496253991419904","linkId":"202312281516420004","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"0.01","realNumber":"0.01","balance":"1109.95","mark":"","status":true,"isDeleted":false,"tenantName":"海峡姐妹茶膳坊","rechargeMoney":"0.01","giftMoney":"0.00","totalMoney":"0.01","balanceMoney":"1109.95"},{"id":"1740270356993671168","createTime":"2023-12-28 15:16:00","createUser":"1659496253991419904","updateTime":"2023-12-28 15:16:00","updateUser":"1659496253991419904","mid":"1659496253991419904","linkId":"202312281515560003","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"0.01","realNumber":"0.01","balance":"1109.96","mark":"","status":true,"isDeleted":false,"tenantName":"海峡姐妹茶膳坊","rechargeMoney":"0.01","giftMoney":"0.00","totalMoney":"0.01","balanceMoney":"1109.96"},{"id":"1740270215087783936","createTime":"2023-12-28 15:15:27","createUser":"1659496253991419904","updateTime":"2023-12-28 15:15:27","updateUser":"1659496253991419904","mid":"1659496253991419904","linkId":"202312281515230002","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"0.01","realNumber":"0.01","balance":"1109.97","mark":"","status":true,"isDeleted":false,"tenantName":"海峡姐妹茶膳坊","rechargeMoney":"0.01","giftMoney":"0.00","totalMoney":"0.01","balanceMoney":"1109.97"},{"id":"1740270122343333888","createTime":"2023-12-28 15:15:04","createUser":"1659496253991419904","updateTime":"2023-12-28 15:15:04","updateUser":"1659496253991419904","mid":"1659496253991419904","linkId":"202312281515000001","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"0.01","realNumber":"0.01","balance":"1109.98","mark":"","status":true,"isDeleted":false,"tenantName":"海峡姐妹茶膳坊","rechargeMoney":"0.01","giftMoney":"0.00","totalMoney":"0.01","balanceMoney":"1109.98"},{"id":"1740269600106348544","createTime":"2023-12-28 15:13:00","createUser":"1659496253991419904","updateTime":"2023-12-28 15:13:00","updateUser":"1659496253991419904","mid":"1659496253991419904","linkId":"202312281512530001","pm":0,"title":"商户余额操作","category":"用户消费","type":"商户会员余额支付","number":"0.01","realNumber":"0.01","balance":"1109.99","mark":"","status":true,"isDeleted":false,"tenantName":"海峡姐妹茶膳坊","rechargeMoney":"0.01","giftMoney":"0.00","totalMoney":"0.01","balanceMoney":"1109.99"}] -/// total : "6" -/// size : "10" -/// current : "1" -/// orders : [{"column":"id","asc":false}] -/// hitCount : false -/// searchCount : true -/// pages : "1" - -class VipRecordDetailsList { - VipRecordDetailsList({ - List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages,}){ - _records = records; - _total = total; - _size = size; - _current = current; - _orders = orders; - _hitCount = hitCount; - _searchCount = searchCount; - _pages = pages; -} - - VipRecordDetailsList.fromJson(dynamic json) { - if (json['records'] != null) { - _records = []; - json['records'].forEach((v) { - _records.add(Records.fromJson(v)); - }); - } - _total = json['total']; - _size = json['size']; - _current = json['current']; - if (json['orders'] != null) { - _orders = []; - json['orders'].forEach((v) { - _orders.add(Orders.fromJson(v)); - }); - } - _hitCount = json['hitCount']; - _searchCount = json['searchCount']; - _pages = json['pages']; - } - List _records; - String _total; - String _size; - String _current; - List _orders; - bool _hitCount; - bool _searchCount; - String _pages; -VipRecordDetailsList copyWith({ List records, - String total, - String size, - String current, - List orders, - bool hitCount, - bool searchCount, - String pages, -}) => VipRecordDetailsList( records: records ?? _records, - total: total ?? _total, - size: size ?? _size, - current: current ?? _current, - orders: orders ?? _orders, - hitCount: hitCount ?? _hitCount, - searchCount: searchCount ?? _searchCount, - pages: pages ?? _pages, -); - List get records => _records; - String get total => _total; - String get size => _size; - String get current => _current; - List get orders => _orders; - bool get hitCount => _hitCount; - bool get searchCount => _searchCount; - String get pages => _pages; - - Map toJson() { - final map = {}; - if (_records != null) { - map['records'] = _records.map((v) => v.toJson()).toList(); - } - map['total'] = _total; - map['size'] = _size; - map['current'] = _current; - if (_orders != null) { - map['orders'] = _orders.map((v) => v.toJson()).toList(); - } - map['hitCount'] = _hitCount; - map['searchCount'] = _searchCount; - map['pages'] = _pages; - return map; - } - -} - -/// column : "id" -/// asc : false - -class Orders { - Orders({ - String column, - bool asc,}){ - _column = column; - _asc = asc; -} - - Orders.fromJson(dynamic json) { - _column = json['column']; - _asc = json['asc']; - } - String _column; - bool _asc; -Orders copyWith({ String column, - bool asc, -}) => Orders( column: column ?? _column, - asc: asc ?? _asc, -); - String get column => _column; - bool get asc => _asc; - - Map toJson() { - final map = {}; - map['column'] = _column; - map['asc'] = _asc; - return map; - } - -} - -/// id : "1740270714188988416" -/// createTime : "2023-12-28 15:17:26" -/// createUser : "1659496253991419904" -/// updateTime : "2023-12-28 15:17:26" -/// updateUser : "1659496253991419904" -/// mid : "1659496253991419904" -/// linkId : "202312281517200005" -/// pm : 0 -/// title : "商户余额操作" -/// category : "用户消费" -/// type : "商户会员余额支付" -/// number : "0.01" -/// realNumber : "0.01" -/// balance : "1109.94" -/// mark : "" -/// status : true -/// isDeleted : false -/// tenantName : "海峡姐妹茶膳坊" -/// rechargeMoney : "0.01" -/// giftMoney : "0.00" -/// totalMoney : "0.01" -/// balanceMoney : "1109.94" - -class Records { - Records({ - String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String linkId, - num pm, - String title, - String category, - String type, - String number, - String realNumber, - String balance, - String mark, - bool status, - bool isDeleted, - String tenantName, - String rechargeMoney, - String giftMoney, - String totalMoney, - String balanceMoney,}){ - _id = id; - _createTime = createTime; - _createUser = createUser; - _updateTime = updateTime; - _updateUser = updateUser; - _mid = mid; - _linkId = linkId; - _pm = pm; - _title = title; - _category = category; - _type = type; - _number = number; - _realNumber = realNumber; - _balance = balance; - _mark = mark; - _status = status; - _isDeleted = isDeleted; - _tenantName = tenantName; - _rechargeMoney = rechargeMoney; - _giftMoney = giftMoney; - _totalMoney = totalMoney; - _balanceMoney = balanceMoney; -} - - Records.fromJson(dynamic json) { - _id = json['id']; - _createTime = json['createTime']; - _createUser = json['createUser']; - _updateTime = json['updateTime']; - _updateUser = json['updateUser']; - _mid = json['mid']; - _linkId = json['linkId']; - _pm = json['pm']; - _title = json['title']; - _category = json['category']; - _type = json['type']; - _number = json['number']; - _realNumber = json['realNumber']; - _balance = json['balance']; - _mark = json['mark']; - _status = json['status']; - _isDeleted = json['isDeleted']; - _tenantName = json['tenantName']; - _rechargeMoney = json['rechargeMoney']; - _giftMoney = json['giftMoney']; - _totalMoney = json['totalMoney']; - _balanceMoney = json['balanceMoney']; - } - String _id; - String _createTime; - String _createUser; - String _updateTime; - String _updateUser; - String _mid; - String _linkId; - num _pm; - String _title; - String _category; - String _type; - String _number; - String _realNumber; - String _balance; - String _mark; - bool _status; - bool _isDeleted; - String _tenantName; - String _rechargeMoney; - String _giftMoney; - String _totalMoney; - String _balanceMoney; -Records copyWith({ String id, - String createTime, - String createUser, - String updateTime, - String updateUser, - String mid, - String linkId, - num pm, - String title, - String category, - String type, - String number, - String realNumber, - String balance, - String mark, - bool status, - bool isDeleted, - String tenantName, - String rechargeMoney, - String giftMoney, - String totalMoney, - String balanceMoney, -}) => Records( id: id ?? _id, - createTime: createTime ?? _createTime, - createUser: createUser ?? _createUser, - updateTime: updateTime ?? _updateTime, - updateUser: updateUser ?? _updateUser, - mid: mid ?? _mid, - linkId: linkId ?? _linkId, - pm: pm ?? _pm, - title: title ?? _title, - category: category ?? _category, - type: type ?? _type, - number: number ?? _number, - realNumber: realNumber ?? _realNumber, - balance: balance ?? _balance, - mark: mark ?? _mark, - status: status ?? _status, - isDeleted: isDeleted ?? _isDeleted, - tenantName: tenantName ?? _tenantName, - rechargeMoney: rechargeMoney ?? _rechargeMoney, - giftMoney: giftMoney ?? _giftMoney, - totalMoney: totalMoney ?? _totalMoney, - balanceMoney: balanceMoney ?? _balanceMoney, -); - String get id => _id; - String get createTime => _createTime; - String get createUser => _createUser; - String get updateTime => _updateTime; - String get updateUser => _updateUser; - String get mid => _mid; - String get linkId => _linkId; - num get pm => _pm; - String get title => _title; - String get category => _category; - String get type => _type; - String get number => _number; - String get realNumber => _realNumber; - String get balance => _balance; - String get mark => _mark; - bool get status => _status; - bool get isDeleted => _isDeleted; - String get tenantName => _tenantName; - String get rechargeMoney => _rechargeMoney; - String get giftMoney => _giftMoney; - String get totalMoney => _totalMoney; - String get balanceMoney => _balanceMoney; - - Map toJson() { - final map = {}; - map['id'] = _id; - map['createTime'] = _createTime; - map['createUser'] = _createUser; - map['updateTime'] = _updateTime; - map['updateUser'] = _updateUser; - map['mid'] = _mid; - map['linkId'] = _linkId; - map['pm'] = _pm; - map['title'] = _title; - map['category'] = _category; - map['type'] = _type; - map['number'] = _number; - map['realNumber'] = _realNumber; - map['balance'] = _balance; - map['mark'] = _mark; - map['status'] = _status; - map['isDeleted'] = _isDeleted; - map['tenantName'] = _tenantName; - map['rechargeMoney'] = _rechargeMoney; - map['giftMoney'] = _giftMoney; - map['totalMoney'] = _totalMoney; - map['balanceMoney'] = _balanceMoney; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/data/vip_rule_details.dart b/lib/retrofit/data/vip_rule_details.dart deleted file mode 100644 index 4bba102a..00000000 --- a/lib/retrofit/data/vip_rule_details.dart +++ /dev/null @@ -1,57 +0,0 @@ -/// rule : "" -/// contrast : "" -/// qa : "" - -class VipRuleDetails { - VipRuleDetails({ - String rule, - String contrast, - String qa, - String recharge,}){ - _rule = rule; - _contrast = contrast; - _qa = qa; - _recharge = recharge; -} - - VipRuleDetails.fromJson(dynamic json) { - _rule = json['rule']; - _contrast = json['contrast']; - _qa = json['qa']; - _recharge = json['recharge']; - } - String _rule; - String _contrast; - String _qa; - String _recharge; - - String get rule => _rule; - String get contrast => _contrast; - String get qa => _qa; - String get recharge => _recharge; - - - set rule(String value) { - _rule = value; - } - - Map toJson() { - final map = {}; - map['rule'] = _rule; - map['contrast'] = _contrast; - map['qa'] = _qa; - return map; - } - - set contrast(String value) { - _contrast = value; - } - - set qa(String value) { - _qa = value; - } - - set recharge(String value) { - _recharge = value; - } -} \ No newline at end of file diff --git a/lib/retrofit/data/wx_pay.dart b/lib/retrofit/data/wx_pay.dart deleted file mode 100644 index 17017d8a..00000000 --- a/lib/retrofit/data/wx_pay.dart +++ /dev/null @@ -1,65 +0,0 @@ -/// appId : "" -/// nonceStr : "" -/// packageValue : "" -/// partnerId : "" -/// prepayId : "" -/// sign : "" -/// timeStamp : "" - -class WxPay { - String _appId; - String _nonceStr; - String _packageValue; - String _partnerId; - String _prepayId; - String _sign; - String _timeStamp; - - String get appId => _appId; - String get nonceStr => _nonceStr; - String get packageValue => _packageValue; - String get partnerId => _partnerId; - String get prepayId => _prepayId; - String get sign => _sign; - String get timeStamp => _timeStamp; - - WxPay({ - String appId, - String nonceStr, - String packageValue, - String partnerId, - String prepayId, - String sign, - String timeStamp}){ - _appId = appId; - _nonceStr = nonceStr; - _packageValue = packageValue; - _partnerId = partnerId; - _prepayId = prepayId; - _sign = sign; - _timeStamp = timeStamp; -} - - WxPay.fromJson(dynamic json) { - _appId = json["appId"]; - _nonceStr = json["nonceStr"]; - _packageValue = json["packageValue"]; - _partnerId = json["partnerId"]; - _prepayId = json["prepayId"]; - _sign = json["sign"]; - _timeStamp = json["timeStamp"]; - } - - Map toJson() { - var map = {}; - map["appId"] = _appId; - map["nonceStr"] = _nonceStr; - map["packageValue"] = _packageValue; - map["partnerId"] = _partnerId; - map["prepayId"] = _prepayId; - map["sign"] = _sign; - map["timeStamp"] = _timeStamp; - return map; - } - -} \ No newline at end of file diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 295b20f1..59cb6bcb 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -4,31 +4,33 @@ import 'package:dio/dio.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:huixiang/data/activity_act_record_details.dart'; +import 'package:huixiang/data/activity_area_list.dart'; +import 'package:huixiang/data/activity_details.dart'; +import 'package:huixiang/data/activity_order.dart'; +import 'package:huixiang/data/address.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/find_mini_group.dart'; +import 'package:huixiang/data/home_recommend_list.dart'; +import 'package:huixiang/data/launch_join_act.dart'; +import 'package:huixiang/data/member_recharge.dart'; +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; +import 'package:huixiang/data/shopping_cart.dart'; +import 'package:huixiang/data/wx_pay.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/address.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/min_order_info.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:retrofit/retrofit.dart'; -import 'data/activity_actRecord_details.dart'; -import 'data/activity_area_list.dart'; -import 'data/activity_details.dart'; -import 'data/activity_order_list.dart'; -import 'data/findMiNiGroupList.dart'; -import 'data/home_recommend_list.dart'; -import 'data/launch_join_act.dart'; -import 'data/member_recharge_list.dart'; -import 'data/miNiDetail.dart'; -import 'data/settleOrderInfo.dart'; -import 'data/shoppingCart.dart'; -import 'data/shopping_home_config.dart'; part 'min_api.g.dart'; const localBaseUrl = "http://192.168.10.78:8765/app/";///本地 + // const localBaseUrl = "http://pos-test.api.lotus-wallet.com/app/";///测试 + const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 @@ -37,32 +39,31 @@ const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 abstract class MinApiService { factory MinApiService( Dio dio, { - String baseUrl, - BuildContext context, - String token, - String tenant, - String storeId, + String? baseUrl, + required BuildContext context, + String? token, + String? tenant, + String? storeId, bool showLoading = false, }) { Map headers = - (token == null || token == "") ? {} : {'token': "Bearer $token"}; - if (tenant != null && tenant != "") { + (token == "") ? {} : {'token': "Bearer $token"}; + if (tenant != "") { headers["tenant"] = tenant; } - if (storeId != null && storeId != "") { + if (storeId != "") { headers["store-id"] = storeId; } headers["Environment"] = "app"; dio.options = BaseOptions( - connectTimeout: 18000, - receiveTimeout: 18000, + connectTimeout: const Duration(milliseconds: 18000), + receiveTimeout: const Duration(milliseconds: 18000), headers: headers, responseType: ResponseType.json, ); dio.interceptors.add( - InterceptorsWrapper(onRequest: (RequestOptions options) { - debugPrint( - "\n======================= Min_请求数据 ======================="); + InterceptorsWrapper(onRequest: (RequestOptions options, RequestInterceptorHandler handler,) { + debugPrint("\n======================= Min_请求数据 ======================="); debugPrint("method = ${options.method.toString()}"); debugPrint("url = ${options.uri.toString()}"); debugPrint("headers = ${options.headers}"); @@ -76,41 +77,35 @@ abstract class MinApiService { debugPrint("params data = ${jsonEncode(options.data)}"); } debugPrint("params queryParameters = ${options.queryParameters}"); - }, onResponse: (Response response) { - debugPrint( - "\n======================= Min_响应数据开始 ======================="); + handler.next(options); + }, onResponse: (Response response, ResponseInterceptorHandler handler,) { + debugPrint("\n======================= Min_响应数据开始 ======================="); if (showLoading && EasyLoading.isShow) { EasyLoading.dismiss(); } debugPrint("code = ${response.statusCode}"); p(jsonEncode(response.data)); - // debugPrint(jsonEncode(response.data), wrapWidth: response.data.toString().length); - Map map = response.data; if (map["code"] != 0) { EasyLoading.dismiss(); } if (map["code"] == 40005 || map["code"] == 40001) { if (!LoginTipsDialog().isShow) { - // print("show: ${LoginTipsDialog().isShow}"); LoginTipsDialog().show(context); } - } else if (map["code"] != 0 && response.request.baseUrl == baseUrl) { - ///高德地图的poi服务请求不需要toast - // SmartDialog.showToast(map["msg"], alignment: Alignment.center); } - debugPrint( - "======================= Min_响应数据结束 =======================\n"); - }, onError: (DioError e) { + debugPrint("======================= Min_响应数据结束 =======================\n"); + handler.next(response); + }, onError: (DioException e, ErrorInterceptorHandler handler,) { if (EasyLoading.isShow) { EasyLoading.dismiss(); } - debugPrint( - "\n======================= Min_错误响应数据 ======================="); + debugPrint("\n======================= Min_错误响应数据 ======================="); debugPrint("type = ${e.type}"); debugPrint("message = ${e.message}"); debugPrint("\n"); + handler.next(e); }), ); @@ -135,12 +130,12 @@ abstract class MinApiService { ///小程序查询分组及商品列表 @POST("product/findMiNiGroupList") - Future>> findMiNiGroupList( + Future>> findMiNiGroupList( @Body() Map param); ///小程序查询商品详情/規格选择 @GET("/product/queryMiNiProductDetail?id={id}") - Future> miNiDetail(@Path("id") String id); + Future> miNiDetail(@Path("id") String id); ///添加购物车 @POST("shoppingcart") @@ -204,7 +199,7 @@ abstract class MinApiService { ///获取门店首页配置 @GET("store/homeConfig") - Future> homeConfig(); + Future> homeConfig(); ///活动专区,秒杀,砍价,拼团 @GET("actTemplate/findActListByType?allDay={allDay}&type={type}") @@ -226,11 +221,11 @@ abstract class MinApiService { /// 活动付款 @POST("actTemplate/actPay") - Future actPay(@Body() Map param); + Future> actPay(@Body() Map param); /// 查看我的拼团、砍价、列表 @POST("actTemplate/showMyActList") - Future>> showMyActList(@Body() Map param); + Future>> showMyActList(@Body() Map param); /// 查看某一个发起的拼团、砍价详情 @GET("actTemplate/showOneAct?actRecordId={actRecordId}") @@ -250,7 +245,7 @@ abstract class MinApiService { ///充值列表 @GET("/store/getRechargePreferential") - Future>> memberRechargeList(); + Future>> memberRechargeList(); } diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index bb860d8e..8af7b374 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -6,694 +6,888 @@ part of 'min_api.dart'; // RetrofitGenerator // ************************************************************************** +// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers + class _MinApiService implements MinApiService { - _MinApiService(this._dio, {this.baseUrl}) { - ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= kReleaseMode?serviceBaseUrl:localBaseUrl; + _MinApiService( + this._dio, { + this.baseUrl, + }) { + baseUrl ??= 'http://192.168.10.78:8765/app/'; } final Dio _dio; - String baseUrl; + String? baseUrl; @override Future> memberInfo() async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/info', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/info', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future>> findMiNiGroupList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future>> findMiNiGroupList( + Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'product/findMiNiGroupList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => FindMiNiGroupList.fromJson(i as Map)) - .toList()); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'product/findMiNiGroupList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future> miNiDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; + Future> miNiDetail(String id) async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/product/queryMiNiProductDetail?id=$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => MiNiDetail.fromJson(json), - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/product/queryMiNiProductDetail?id=${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future>> addShoppingCart(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future>> addShoppingCart( + Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('shoppingcart', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => ((json??"") == "")?null:(json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'shoppingcart', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future>> getShoppingCart(tableId) async { - ArgumentError.checkNotNull(tableId, 'tableId'); - const _extra = {}; - final queryParameters = {'tableId': tableId}; - final _data = {}; - final _result = await _dio.request>('shoppingcart', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => ((json??"") == "")?null:(json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); + Future>> getShoppingCart(int tableId) async { + final _extra = {}; + final queryParameters = {r'tableId': tableId}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'shoppingcart', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future> clearShoppingCart(storeId) async { - ArgumentError.checkNotNull(storeId, 'storeId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'shoppingcart/delCart?storeId=$storeId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as bool, - ); + Future> clearShoppingCart(String storeId) async { + final _extra = {}; + final queryParameters = {r'storeId': storeId}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'shoppingcart/delCart?storeId={storeId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future>> shoppingCart1(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future>> shoppingCart1( + Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('shoppingcart', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'shoppingcart', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future>> shoppingCartSingle(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future>> shoppingCartSingle( + Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'shoppingcart/single', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => ((json??"") == "")?null:(json as List) - .map( - (i) => ShoppingCart.fromJson(i as Map)) - .toList()); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'shoppingcart/single', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future> getOrderInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> getOrderInfo( + Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/getOrderInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null :SettleOrderInfo.fromJson(json), - ); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'order/getOrderInfo', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> getOrderDetails(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> getOrderDetails( + Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/getOrderDetail', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")?null:MinOrderInfo.fromJson(json), - ); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'order/getOrderDetail', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future>> queryAddress() async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'address/queryMemberAddress', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map
((i) => Address.fromJson(i as Map)) - .toList()); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'address/queryMemberAddress', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future> placeOrderFirst(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> placeOrderFirst(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'order/placeOrderFirst', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json, - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'order/placeOrderFirst', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> addOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> addOrder(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('order/addOrder', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json, - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'order/addOrder', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> settlementWx(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> settlementWx(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('order/settlement', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")?null:(WxPay.fromJson(json)), - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'order/settlement', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> settlementApi(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> settlementApi(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('order/settlement', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")?null:(json as dynamic), - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'order/settlement', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> queryStoreInfo1(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> queryStoreInfo1(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('store/getStore', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'store/getStore', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> getParentInfo(tableId) async { - ArgumentError.checkNotNull(tableId, 'tableId'); - const _extra = {}; + Future> getParentInfo(String tableId) async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'order/getParentInfo?tableId=$tableId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'order/getParentInfo?tableId=${tableId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future>> recommendList() async { - const _extra = {}; + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'product/recommendList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => HomeRecommendList.fromJson(i as Map)) - .toList()); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'product/recommendList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future> homeConfig() async { - const _extra = {}; + Future> homeConfig() async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('store/homeConfig', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ShoppingHomeConfig.fromJson(json), - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'store/homeConfig', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> findActListByType(allDay, type) async { - ArgumentError.checkNotNull(allDay, 'allDay'); - ArgumentError.checkNotNull(type, 'type'); - const _extra = {}; + Future> findActListByType( + bool allDay, + String type, + ) async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'actTemplate/findActListByType?allDay=$allDay&type=$type', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ActivityAreaList.fromJson(json), - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'actTemplate/findActListByType?allDay=${allDay}&type=${type}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> viewProduct(actProductId, type) async { - ArgumentError.checkNotNull(actProductId, 'actProductId'); - ArgumentError.checkNotNull(type, 'type'); - const _extra = {}; + Future> viewProduct( + String actProductId, + String type, + ) async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'actTemplate/viewProduct?actProductId=$actProductId&type=$type', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ActivityDetails.fromJson(json), - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'actTemplate/viewProduct?actProductId=${actProductId}&type=${type}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> launchAct(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> launchAct(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'actTemplate/launchAct', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => LaunchJoinAct.fromJson(json), - ); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'actTemplate/launchAct', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> joinAct(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> joinAct(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'actTemplate/joinAct', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => LaunchJoinAct.fromJson(json), - ); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'actTemplate/joinAct', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> actPay(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> actPay(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'actTemplate/actPay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'actTemplate/actPay', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future>> showMyActList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future>> showMyActList( + Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'actTemplate/showMyActList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => ActivityOrderList.fromJson(i as Map)) - .toList()); + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'actTemplate/showMyActList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override - Future> showOneAct(actRecordId) async { - ArgumentError.checkNotNull(actRecordId, 'actRecordId'); - const _extra = {}; + Future> showOneAct( + String actRecordId) async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'actTemplate/showOneAct?actRecordId=$actRecordId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ActivityActRecordDetails.fromJson(json), - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'actTemplate/showOneAct?actRecordId=${actRecordId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> cancelMemberCoupon(orderId) async { - ArgumentError.checkNotNull(orderId, 'orderId'); - const _extra = {}; + Future> cancelMemberCoupon(String orderId) async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'promotion/cancelMemberCoupon?orderId=$orderId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'promotion/cancelMemberCoupon?orderId=${orderId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> useMemberCoupon(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> useMemberCoupon(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - 'promotion/useMemberCoupon', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'promotion/useMemberCoupon', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future> memberRecharge(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; + Future> memberRecharge(Map param) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('//member/recharge', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/recharge', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override - Future>> memberRechargeList() async { - const _extra = {}; + Future>> memberRechargeList() async { + final _extra = {}; final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/store/getRechargePreferential', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => MemberRechargeList.fromJson(i as Map)) - .toList()); + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/store/getRechargePreferential', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } + + RequestOptions _setStreamType(RequestOptions requestOptions) { + if (T != dynamic && + !(requestOptions.responseType == ResponseType.bytes || + requestOptions.responseType == ResponseType.stream)) { + if (T == String) { + requestOptions.responseType = ResponseType.plain; + } else { + requestOptions.responseType = ResponseType.json; + } + } + return requestOptions; + } + + String _combineBaseUrls( + String dioBaseUrl, + String? baseUrl, + ) { + if (baseUrl == null || baseUrl.trim().isEmpty) { + return dioBaseUrl; + } + + final url = Uri.parse(baseUrl); + + if (url.isAbsolute) { + return url.toString(); + } + + return Uri.parse(dioBaseUrl).resolveUri(url).toString(); + } } diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index f1d4dc15..0fe567e8 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -6,63 +6,64 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:gbk2utf8/gbk2utf8.dart'; +import 'package:huixiang/data/achivement_detail_list.dart'; +import 'package:huixiang/data/activity_pos.dart'; +import 'package:huixiang/data/address.dart'; +import 'package:huixiang/data/app_update.dart'; +import 'package:huixiang/data/banner.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/brand_data.dart'; +import 'package:huixiang/data/category_select.dart'; +import 'package:huixiang/data/channels.dart'; +import 'package:huixiang/data/chapter.dart'; +import 'package:huixiang/data/collect_class.dart'; +import 'package:huixiang/data/coupon_detail.dart'; +import 'package:huixiang/data/course.dart'; +import 'package:huixiang/data/course_details.dart'; +import 'package:huixiang/data/exchange_order.dart'; +import 'package:huixiang/data/follow.dart'; +import 'package:huixiang/data/goods.dart'; +import 'package:huixiang/data/goods_category.dart'; +import 'package:huixiang/data/headlines.dart'; +import 'package:huixiang/data/headlines_details.dart'; +import 'package:huixiang/data/home_rank.dart'; +import 'package:huixiang/data/invitation.dart'; +import 'package:huixiang/data/ip_data.dart'; +import 'package:huixiang/data/login_info.dart'; +import 'package:huixiang/data/logistics.dart'; +import 'package:huixiang/data/member_comment.dart'; +import 'package:huixiang/data/member_infor.dart'; +import 'package:huixiang/data/message.dart'; +import 'package:huixiang/data/msg_stats.dart'; +import 'package:huixiang/data/page.dart'; +import 'package:huixiang/data/rank.dart'; +import 'package:huixiang/data/recharge_act.dart'; +import 'package:huixiang/data/second_card.dart'; +import 'package:huixiang/data/sign_info.dart'; +import 'package:huixiang/data/social_info.dart'; +import 'package:huixiang/data/store.dart'; +import 'package:huixiang/data/upload_result.dart'; +import 'package:huixiang/data/user_bill.dart'; +import 'package:huixiang/data/user_info.dart'; +import 'package:huixiang/data/vip_badges.dart'; +import 'package:huixiang/data/vip_benefit.dart'; +import 'package:huixiang/data/vip_card.dart'; +import 'package:huixiang/data/vip_card_home.dart'; +import 'package:huixiang/data/vip_rule_details.dart'; +// import 'package:gbk2utf8/gbk2utf8.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/farmers_list.dart'; -import 'package:huixiang/retrofit/data/order_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/comunity_comment.dart'; +import 'package:huixiang/data/coupon.dart'; +import 'package:huixiang/data/farmers.dart'; +import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:retrofit/retrofit.dart'; import '../login/captcha/click_word_captcha.dart'; -import '../utils/flutter_utils.dart'; -import 'data/achievement_detail_list.dart'; -import 'data/activity_pos.dart'; -import 'data/address.dart'; -import 'data/app_update.dart'; -import 'data/banner.dart'; -import 'data/brand_data.dart'; -import 'data/category_select_list.dart'; -import 'data/channels_list.dart'; -import 'data/chapter.dart'; -import 'data/collect_class_list.dart'; -import 'data/coupon_detail.dart'; -import 'data/course_details.dart'; -import 'data/course_list.dart'; -import 'data/exchange_order.dart'; -import 'data/follow_list.dart'; -import 'data/goods.dart'; -import 'data/goods_category.dart'; -import 'data/headlines_list.dart'; -import 'data/headlines_list_details.dart'; -import 'data/home_rank.dart'; -import 'data/invitation_list.dart'; -import 'data/ip_data.dart'; -import 'data/logistics.dart'; -import 'data/member_Infor.dart'; -import 'data/member_comment_list.dart'; -import 'data/message.dart'; -import 'data/msg_stats.dart'; -import 'data/page.dart'; -import 'data/rank.dart'; -import 'data/rechargeActLists.dart'; -import 'data/second_card_list.dart'; -import 'data/sign_info.dart'; -import 'data/social_info.dart'; -import 'data/store.dart'; -import 'data/upload_result.dart'; -import 'data/user_bill.dart'; -import 'data/user_info.dart'; -import 'data/vip_badges_list.dart'; -import 'data/vip_benefit_list.dart'; -import 'data/vip_card.dart'; -import 'data/vip_card_home.dart'; -import 'data/vip_rule_details.dart'; -import 'data/wx_pay.dart'; + part 'retrofit_api.g.dart'; @@ -78,84 +79,79 @@ const ipBaseUrl = "http://whois.pconline.com.cn"; abstract class ApiService { factory ApiService( Dio dio, { - String baseUrl, - BuildContext context, - String token, + String? baseUrl, + required BuildContext context, + String? token, bool showLoading = false, bool isIp = false, bool pay = true, }) { - Map headers = - (token == null || token == "") ? {} : {'token': "Bearer $token"}; + Map headers = (token?.isEmpty ?? true) ? {} : {'token': "Bearer $token"}; if (pay) { headers["Environment"] = "app"; } - print("软件当前运行的模式 kReleaseMode:"+(kReleaseMode ? "发布模式":"调试模式")); + print("软件当前运行的模式 kReleaseMode:" + (kReleaseMode ? "发布模式":"调试模式")); if (kReleaseMode) baseUrl = serviceBaseUrl; if (isIp) baseUrl = ipBaseUrl; dio.options = BaseOptions( - connectTimeout: 30000, - receiveTimeout: 30000, + connectTimeout: const Duration(milliseconds: 30000), + receiveTimeout: const Duration(milliseconds: 30000), headers: headers, responseType: ResponseType.json, ); dio.interceptors.add( - InterceptorsWrapper(onRequest: (RequestOptions options) { + InterceptorsWrapper(onRequest: (RequestOptions options, RequestInterceptorHandler handler,) { try { - debugPrint("\n======================= 请求数据 ======================="); - debugPrint("method = ${options.method.toString()}"); - debugPrint("url = ${options.uri.toString()}"); - debugPrint("headers = ${options.headers}"); - if (showLoading && !EasyLoading.isShow) { - //是否显示loading - EasyLoading.show( - status: S.of(context).zhengzaijiazai, - maskType: EasyLoadingMaskType.black); - } - if (options.data is FormData) { - debugPrint("params data = FormData"); - } else { + debugPrint("\n======================= 请求数据 ======================="); + debugPrint("method = ${options.method.toString()}"); + debugPrint("url = ${options.uri.toString()}"); + debugPrint("headers = ${options.headers}"); + if (showLoading && !EasyLoading.isShow) { + //是否显示loading + EasyLoading.show( + status: S.of(context).zhengzaijiazai, + maskType: EasyLoadingMaskType.black, + ); + } + if (options.data is FormData) { + debugPrint("params data = FormData"); + } else { debugPrint("params data = ${jsonEncode(options.data)}"); - } - debugPrint("params queryParameters = ${options.queryParameters}"); + } + debugPrint("params queryParameters = ${options.queryParameters}"); } catch (e1) {} - }, onResponse: (Response response) { + handler.next(options); + }, onResponse: (Response response, ResponseInterceptorHandler handler,) { try { - debugPrint("\n======================= 响应数据开始 ======================="); - if (showLoading && EasyLoading.isShow) { - EasyLoading.dismiss(); - } - debugPrint("code = ${response.statusCode}"); - - p(jsonEncode(response.data)); - - // debugPrint(jsonEncode(response.data), wrapWidth: response.data.toString().length * 10); - - Map map = response.data; - // if (map["code"] != 0) { - // EasyLoading.dismiss(); - // } - if (map["code"] == 40005 || map["code"] == 40001) { - if (!LoginTipsDialog().isShow) { - print("show: ${LoginTipsDialog().isShow}"); - LoginTipsDialog().show(context); + debugPrint("\n======================= 响应数据开始 ======================="); + if (showLoading && EasyLoading.isShow) { + EasyLoading.dismiss(); } - } else if (map["code"] != 0 && response.request.baseUrl == baseUrl) { - ///高德地图的poi服务请求不需要toast - // SmartDialog.showToast(map["msg"], alignment: Alignment.center); + debugPrint("code = ${response.statusCode}"); + p(jsonEncode(response.data)); + Map map = response.data; + if (map["code"] == 40005 || map["code"] == 40001) { + if (!LoginTipsDialog().isShow) { + print("show: ${LoginTipsDialog().isShow}"); + LoginTipsDialog().show(context); + } + } + debugPrint("======================= 响应数据结束 =======================\n"); + if(map["code"] == 0 || map["code"] == 200) { + } + handler.next(response); + } catch (e2) { + print("respon: ${e2}"); } - debugPrint("======================= 响应数据结束 =======================\n"); - } catch (e2) {} - }, onError: (DioError e) { + }, onError: (DioException e, ErrorInterceptorHandler handler,) { if (EasyLoading.isShow) { EasyLoading.dismiss(); } - // SmartDialog.showToast(AppUtils.dioErrorTypeToString(e.type), - // alignment: Alignment.center); debugPrint("\n======================= 错误响应数据 ======================="); debugPrint("type = ${e.type}"); debugPrint("message = ${e.message}"); debugPrint("\n"); + handler.next(e); }), ); return _ApiService(dio, baseUrl: baseUrl); @@ -190,11 +186,11 @@ abstract class ApiService { /// 用户登录 @POST("/auth/platform/memberLogin") - Future memberLogin(@Body() Map param); + Future?> memberLogin(@Body() Map param); ///获取APP门店推广渠道 @GET("/auth/appChannels") - Future> appChannels(); + Future> appChannels(); ///发送验证码 @POST("/auth/sendVerify") @@ -236,7 +232,7 @@ abstract class ApiService { ///充值活动列表 @GET("/wallet/rechargeActList?tenantCode={tenantCode}") - Future> rechargeActList( + Future> rechargeActList( @Path("tenantCode") String tenantCode); ///领取优惠券 @@ -396,7 +392,7 @@ abstract class ApiService { ///查询评论列表 @POST("/memberComment/list") - Future>> memberCommentList( + Future>> memberCommentList( @Body() Map param); ///评论点赞 @@ -436,7 +432,7 @@ abstract class ApiService { /// 我关注/粉丝的会员列表 @POST("/member/follow/list") - Future>> followList( + Future>> followList( @Body() Map map); ///关注/取关会员 @@ -453,7 +449,7 @@ abstract class ApiService { ///课程分类列表 @GET("/course/categoryList") - Future>> categoryList(); + Future>> categoryList(); ///课程章节列表 @GET("/course/catalogList/{courseId}") @@ -462,16 +458,16 @@ abstract class ApiService { /// 课程列表 @POST("/course/list") - Future>> courseList( + Future>> courseList( @Body() Map map); ///课程的合集列表 @GET("/course/collectList") - Future>> collectList(); + Future>> collectList(); ///合集包含的课程列表 @GET("/course/collect/{collectId}") - Future>> collect( + Future>> collect( @Path("collectId") String collectId); ///课程详情 @@ -484,18 +480,17 @@ abstract class ApiService { /// APP查询所有成就徽章 并显示会员完成的 @POST("/app-memberAchievement/findBadges") - Future>> findBadges( + Future>> findBadges( @Body() Map map); ///查看一个成就大类详情 - @GET( - "/app-memberAchievement/getAchievementDetail?achievementCategoryId={achievementCategoryId}") - Future>> getAchievementDetail( + @GET("/app-memberAchievement/getAchievementDetail?achievementCategoryId={achievementCategoryId}") + Future>> getAchievementDetail( @Path("achievementCategoryId") String achievementCategoryId); ///会员的权益列表 @GET("/member/benefitList") - Future>> benefitList(); + Future>> benefitList(); ///会员权益 @GET("/home/vipBenefit") @@ -503,7 +498,7 @@ abstract class ApiService { ///查询副卡列表 @GET("/member/secondCardList") - Future>> secondCardList(); + Future>> secondCardList(); ///绑定副卡 @GET("/member/bindSecondCard/{phone}") @@ -524,16 +519,16 @@ abstract class ApiService { ///文章合集列表 @GET("/information/categoryList") - Future>> headlinesList(); + Future>> headlinesList(); ///文章合集详情 @GET("/information/category/{id}") - Future> headlinesDetails( + Future> headlinesDetails( @Path("id") String id); /// 我的邀请会员列表 @POST("/member/inviteMemberList") - Future>> inviteMemberList( + Future>> inviteMemberList( @Body() Map map); ///核销优惠券 @@ -590,7 +585,7 @@ abstract class ApiService { ///通过code获取设置/助农列表 @GET("/raise/products") - Future>> getConfig(); + Future>> getConfig(); ///更换账户手机号码 @POST("/auth/changePhone") diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index db98afb0..26a37c2d 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -6,2280 +6,2806 @@ part of 'retrofit_api.dart'; // RetrofitGenerator // ************************************************************************** +// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers + class _ApiService implements ApiService { - _ApiService(this._dio, {this.baseUrl}) { - ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= kReleaseMode ? serviceBaseUrl : localBaseUrl; + _ApiService( + this._dio, { + this.baseUrl, + }) { + baseUrl ??= 'http://192.168.10.54:8766/app/'; } final Dio _dio; - String baseUrl; + String? baseUrl; @override - Future> upload(data, folderId, bool isVideo) async { - ArgumentError.checkNotNull(data, 'data'); - ArgumentError.checkNotNull(folderId, 'folderId'); - const _extra = {}; + Future> upload( + File data, + int folderId, + bool isVideo, + ) async { + final _extra = {}; final queryParameters = {}; + final _headers = {}; final _data = FormData(); - String fileName = data.path.split(Platform.pathSeparator).last; - if (!isVideo && !fileName.contains(".jpeg") && !fileName.contains(".png")) - fileName += ".jpeg"; - else if (isVideo && !fileName.contains(".mp4")) fileName += ".mp4"; _data.files.add(MapEntry( - 'file', MultipartFile.fromFileSync(data.path, filename: fileName))); - print("filename:$fileName"); - if (folderId != null) { - _data.fields.add(MapEntry('folderId', folderId.toString())); - } - final _result = await _dio.request>('/file/upload', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - connectTimeout: 60000, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => UploadResult.fromJson(json), - ); - return value; - } - - @override - Future searchPoi(lat, lng, keywords, size, page) async { - ArgumentError.checkNotNull(lat, 'lat'); - ArgumentError.checkNotNull(lng, 'lng'); - ArgumentError.checkNotNull(keywords, 'keywords'); - ArgumentError.checkNotNull(size, 'size'); - ArgumentError.checkNotNull(page, 'page'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request( - 'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=$lat,$lng&keywords=$keywords&offset={size}&page={page}&extensions=all', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = _result.data; - return value; - } - - @override - Future memberLogin(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/auth/platform/memberLogin', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null : json, - ); - return value; - } - - @override - Future> appChannels() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/appChannels', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ChannelsList.fromJson(json), - ); - return value; - } - - @override - Future> sendVerify(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/auth/sendVerify', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null :json as dynamic, - ); - return value; - } - - @override - Future>> creditGoods(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditGoods/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Goods.fromJson(json), - ), - ); - return value; - } - - @override - Future>> goodsCategory(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditGoodsCategory/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => GoodsCategory.fromJson(json), + 'file', + MultipartFile.fromFileSync( + data.path, + filename: data.path.split(Platform.pathSeparator).last, ), - ); + )); + _data.fields.add(MapEntry( + 'folderId', + folderId.toString(), + )); + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) + .compose( + _dio.options, + '/file/upload', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future searchPoi( + String lat, + String lng, + String keywords, + int size, + int page, + ) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=${lat},${lng}&keywords=${keywords}&offset={size}&page={page}&extensions=all', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = _result.data; return value; } @override - Future> creditGoodsById(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/creditGoods/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Goods.fromJson(json), - ); + Future?> memberLogin(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch?>( + _setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/auth/platform/memberLogin', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = _result.data == null + ? null + : BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> appChannels() async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/auth/appChannels', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> sendVerify(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/auth/sendVerify', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> creditGoods( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditGoods/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> goodsCategory( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditGoodsCategory/page', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> creditGoodsById(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditGoods/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> queryInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/info', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => UserInfo.fromJson(json), - ); - return value; - } - - @override - Future> editInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/editMemberInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/info', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> editInfo(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/editMemberInfo', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> signInInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/signInInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => SignInfo.fromJson(json), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/signInInfo', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> signIn() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/signIn', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> recharge(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/wallet/recharge', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> rechargeActList(tenantCode) async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/wallet/rechargeActList?tenantCode=$tenantCode', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => RechargeActLists.fromJson(json), - ); - return value; - } - - @override - Future> receiveCoupon(couponId) async { - ArgumentError.checkNotNull(couponId, 'couponId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/coupon/receive?couponId=$couponId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null : json as dynamic, - ); - return value; - } - - @override - Future>> creditOrderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => ExchangeOrder.fromJson(json), - ), - ); - return value; - } - - @override - Future> creditOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/create', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> addAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/add', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> deleteAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/delete', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> queryAddress(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/detail/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/signIn', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> recharge(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/wallet/recharge', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> rechargeActList(String tenantCode) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/wallet/rechargeActList?tenantCode=${tenantCode}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> receiveCoupon(String couponId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/coupon/receive?couponId=${couponId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> creditOrderList( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditOrder/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> creditOrder(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditOrder/create', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> addAddress(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/address/add', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> deleteAddress(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/address/delete', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> queryAddress(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/address/detail/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future>> queryMemberAddress() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/queryMemberAddress', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map
((i) => Address.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> updateAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/update', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryCoupon(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/centreList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Coupon.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryCard(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/packageList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Coupon.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryStore(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/store/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => ((json ?? "") == "") - ? null - : (json as List) - .map((i) => Store.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> informationList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Activity.fromJson(json), - ), - ); - return value; - } - - @override - Future> informationInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/information/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData
.fromJson( - _result.data, - (json) => Article.fromJson(json), - ); - return value; - } - - @override - Future> activityInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/information/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Activity.fromJson(json), - ); - return value; - } - - @override - Future> creditOrderReceive(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/address/queryMemberAddress', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> updateAddress(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/address/update', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> queryCoupon( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/coupon/centreList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> queryCard( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/coupon/packageList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> queryStore(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/store/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> informationList( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> informationInfo(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData
.fromJson(_result.data!); + return value; + } + + @override + Future> activityInfo(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> creditOrderReceive(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditOrder/receive/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> queryHome() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/home', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => BrandData.fromJson(json), - ); - return value; - } - - @override - Future> queryStoreInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/store/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryArticle(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo
.fromJson( - json, - (json) => Article.fromJson(json), - ), - ); - return value; - } - - @override - Future>> queryBanner(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/banner/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => BannerData.fromJson(json), - ), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/home/home', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> queryStoreInfo(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/store/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> queryArticle( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> queryBanner( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/banner/page', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override Future> queryHomeBrand() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/brand', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> minLogin(storeId) async { - ArgumentError.checkNotNull(storeId, 'storeId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/mini/login/$storeId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> queryBillInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/listBill', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => UserBill.fromJson(json), - ), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/home/brand', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> minLogin(String storeId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/auth/mini/login/${storeId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> queryBillInfo( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/listBill', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override Future>> rankList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/rankList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => Rank.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> orderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/order/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => ((json ?? "") == "") - ? null - : PageInfo.fromJson( - json, - (json) => OrderInfo.fromJson(json), - ), - ); - return value; - } - - @override - Future> orderDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/orderDetail?id=$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null : OrderInfo.fromJson(json), - ); - return value; - } - - @override - Future> continuePay(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/order/continuePay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> receiveToCard(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> vipList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/vipList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => VipCard.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> vipDetail(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/vipDetail', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => VipCard.fromJson(json), - ); - return value; - } - - @override - Future>> msgList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/app-msg/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => Message.fromJson(json), - ), - ); - return value; - } - - @override - Future captchaGet(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/captcha/get', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = - (_result.data['repCode'] != '0000' || _result.data['repData'] == null) - ? null - : ClickWordCaptchaModel.fromMap(_result.data['repData']); - return value; - } - - @override - Future captchaCheck(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/captcha/check', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - return (_result.data['repCode'] != '0000' || _result.data['repData'] == null || !_result.data['repData']['result']); - } - - @override - Future> queryMsg(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/app-msg/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/rankList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> orderList( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/order/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> orderDetail(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/order/orderDetail?id=${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> continuePay(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/order/continuePay', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> receiveToCard(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditOrder/receive/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> vipList(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/vipList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> vipDetail(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/vipDetail', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> msgList( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/app-msg/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future captchaGet(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/captcha/get', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = ClickWordCaptchaModel.fromJson(_result.data!); + return value; + } + + @override + Future captchaCheck(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch(_setStreamType(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/captcha/check', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = _result.data!; + return value; + } + + @override + Future> queryMsg(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/app-msg/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future>> stats() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/app-msg/stats', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => MsgStats.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> informationLikes(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/information/likes/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> memberComment(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/memberComment', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> memberCommentList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/memberComment/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => MemberCommentList.fromJson(json), - ), - ); - return value; - } - - @override - Future> commentLike(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/memberComment/likes/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> delComment(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/memberComment/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'DELETE', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> shippingTrace(shipperCode, logisticCode) async { - ArgumentError.checkNotNull(shipperCode, 'shipperCode'); - ArgumentError.checkNotNull(logisticCode, 'logisticCode'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/getShippingTrace/$shipperCode/$logisticCode', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Logistics.fromJson(json), - ); - return value; - } - - // @override - // Future> report(map) async { - // ArgumentError.checkNotNull(map, 'map'); - // const _extra = {}; - // final queryParameters = {}; - // final _data = {}; - // _data.addAll(map ?? {}); - // final _result = await _dio.request>('/other/report', - // queryParameters: queryParameters, - // options: RequestOptions( - // method: 'POST', - // headers: {}, - // extra: _extra, - // baseUrl: baseUrl), - // data: _data); - // final value = BaseData.fromJson( - // _result.data, - // (json) => json as bool, - // ); - // return value; - // } - - @override - Future> orderCancel(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/cancel/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> settlement(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/order/settlement', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null : (json as String), - ); - return value; - } - - @override - Future> trend(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/information/trend', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ((json??"") == "")? null : (json as bool), - ); - return value; - } - - @override - Future>> trendList(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/information/trend-list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => ComunityComment.fromJson(json), - ), - ); - return value; - } - - @override - Future>> followList(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/member/follow/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => ListData.fromJson(json), - ), - ); - return value; - } - - @override - Future> follow(followId) async { - ArgumentError.checkNotNull(followId, 'followId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/follow/$followId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'PUT', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> deleteTrend(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/information/trend/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'DELETE', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/app-msg/stats', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> informationLikes(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/likes/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> memberComment(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/memberComment', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> memberCommentList( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/memberComment/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> commentLike(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/memberComment/likes/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> delComment(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/memberComment/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> shippingTrace( + String shipperCode, + String logisticCode, + ) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/order/getShippingTrace/${shipperCode}/${logisticCode}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> orderCancel(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/order/cancel/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> settlement(Map map) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(map); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/order/settlement', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> trend(Map map) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(map); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/trend', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> trendList( + Map map) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(map); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/trend-list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> followList( + Map map) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(map); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/follow/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> follow(String followId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'PUT', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/follow/${followId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> deleteTrend(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'DELETE', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/trend/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> socialInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/socialInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => SocialInfo.fromJson(json), - ); - return value; - } - - @override - Future>> categoryList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/course/categoryList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => CategorySelectList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> catalogList(courseId) async { - ArgumentError.checkNotNull(courseId, 'courseId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/course/catalogList/$courseId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => Chapter.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> courseList(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>('/course/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => CourseList.fromJson(json), - ), - ); - return value; - } - - @override - Future>> collectList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/course/collectList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => CollectClassList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> collect(collectId) async { - ArgumentError.checkNotNull(collectId, 'collectId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/course/collect/$collectId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => CourseList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> course(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/course/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => CourseDetails.fromJson(json), - ); - return value; - } - - @override - Future> courseLikes(courseId) async { - ArgumentError.checkNotNull(courseId, 'courseId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/course/likes/$courseId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> findBadges(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/app-memberAchievement/findBadges', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => VipBadgesList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> getAchievementDetail( - achievementCategoryId) async { - ArgumentError.checkNotNull(achievementCategoryId, 'achievementCategoryId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/app-memberAchievement/getAchievementDetail?achievementCategoryId=$achievementCategoryId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => - AchievementDetailList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future>> benefitList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/benefitList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => VipBenefitList.fromJson(i as Map)) - .toList()); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/socialInfo', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> categoryList() async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/course/categoryList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> catalogList(String courseId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/course/catalogList/${courseId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> courseList( + Map map) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(map); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/course/list', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> collectList() async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/course/collectList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> collect(String collectId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/course/collect/${collectId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> course(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/course/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> courseLikes(String courseId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/course/likes/${courseId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> findBadges(Map map) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(map); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/app-memberAchievement/findBadges', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> getAchievementDetail( + String achievementCategoryId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/app-memberAchievement/getAchievementDetail?achievementCategoryId=${achievementCategoryId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future>> benefitList() async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/benefitList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override Future> vipBenefit() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/vipBenefit', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => VipRuleDetails.fromJson(json), - ); - return value; - } - - @override - Future>> secondCardList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/secondCardList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => SecondCardList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> bindSecondCard(phone) async { - ArgumentError.checkNotNull(phone, 'phone'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/bindSecondCard/$phone', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> unbindSecondCard(phone) async { - ArgumentError.checkNotNull(phone, 'phone'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/unbindSecondCard/$phone', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> getAppShippingTrace(orderId) async { - ArgumentError.checkNotNull(orderId, 'orderId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/getAppShippingTrace?orderId=$orderId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => Logistics.fromJson(json), - ); - return value; - } - - @override - Future> rankBuy(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/rankBuy', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future>> headlinesList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/information/categoryList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => HeadlinesList.fromJson(i as Map)) - .toList()); - return value; - } - - @override - Future> headlinesDetails(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/information/category/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => HeadlinesListDetails.fromJson(json), - ); - return value; - } - - @override - Future>> inviteMemberList(map) async { - ArgumentError.checkNotNull(map, 'map'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(map ?? {}); - final _result = await _dio.request>( - '/member/inviteMemberList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => PageInfo.fromJson( - json, - (json) => InvitationList.fromJson(json), - ), - ); - return value; - } - - @override - Future> wiped(memberCouponId) async { - ArgumentError.checkNotNull(memberCouponId, 'memberCouponId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/coupon/wiped/$memberCouponId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> couponDetail(memberCouponId) async { - ArgumentError.checkNotNull(memberCouponId, 'memberCouponId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - 'coupon/detail/$memberCouponId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => CouponDetail.fromJson(json), - ); - return value; - } - - @override - Future> memberDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/detail/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => MemberInfor.fromJson(json), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/home/vipBenefit', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> secondCardList() async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/secondCardList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> bindSecondCard(String phone) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/bindSecondCard/${phone}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> unbindSecondCard(String phone) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/unbindSecondCard/${phone}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> getAppShippingTrace(String orderId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/creditOrder/getAppShippingTrace?orderId=${orderId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> rankBuy(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/rankBuy', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> headlinesList() async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/categoryList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> headlinesDetails(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/category/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> inviteMemberList( + Map map) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(map); + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/inviteMemberList', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> wiped(String memberCouponId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/coupon/wiped/${memberCouponId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> couponDetail(String memberCouponId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/coupon/detail/{memberCouponId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> memberDetail(String id) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/detail/${id}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> appPopup() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/appPopup', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => ActivityPos.fromJson(json), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/home/appPopup', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> deleteMine() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/deleteMine', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> complaint(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/complaint', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/deleteMine', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> complaint(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/information/complaint', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> appVersion() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/version', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => AppUpdate.fromJson(json), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/home/version', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> recommendRank() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/home/recommendRank', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => HomeRank.fromJson(json), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/home/recommendRank', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> sendVerifyByUpdatePayPwd() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/sendVerifyByUpdatePayPwd', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> updatePayPwd(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/updatePayPwd', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } - - @override - Future> verifyByUpdatePayPwd(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/verifyByUpdatePayPwd', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/sendVerifyByUpdatePayPwd', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> updatePayPwd(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/updatePayPwd', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> verifyByUpdatePayPwd( + Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/member/verifyByUpdatePayPwd', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); return value; } @override Future> vipCardIndex() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/vipCard/index', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => VipCardHome.fromJson(json), - ); + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/vipCard/index', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> orderVip(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/vipCard/orderVip', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> getConfig() async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/raise/products', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); + return value; + } + + @override + Future> changePhone(Map param) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(param); + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'POST', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/auth/changePhone', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future> changeSendVerify(String mobile) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio + .fetch>(_setStreamType>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/auth/sendVerify/${mobile}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData.fromJson(_result.data!); + return value; + } + + @override + Future>> storeListByCreditId( + String creditGoodsId) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = await _dio.fetch>( + _setStreamType>>(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/store/storeListByCreditId/${creditGoodsId}', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + final value = BaseData>.fromJson(_result.data!); return value; } @override Future getIpInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/ipJson.jsp', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - extra: _extra, - baseUrl: baseUrl, - responseType: ResponseType.bytes), - data: _data); - var ts = gbk.decode(_result.data); - final value = IpData.fromJson(jsonDecode( - ts.substring(ts.indexOf("{\"ip\":\"")).replaceAll(");}", ""))); - return value; - } - - @override - Future> orderVip(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/vipCard/orderVip', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + const Map? _data = null; + final _result = + await _dio.fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + '/ipJson.jsp', + queryParameters: queryParameters, + data: _data, + ) + .copyWith( + baseUrl: _combineBaseUrls( + _dio.options.baseUrl, + baseUrl, + )))); + String result = _result.data! as String; + print("result: ${result}"); + final value = IpData.fromJson(jsonDecode(result.substring(result.indexOf("{\"ip\":\"")).replaceAll(");}", ""))); + return value; + } + + RequestOptions _setStreamType(RequestOptions requestOptions) { + if (T != dynamic && + !(requestOptions.responseType == ResponseType.bytes || + requestOptions.responseType == ResponseType.stream)) { + if (T == String) { + requestOptions.responseType = ResponseType.plain; + } else { + requestOptions.responseType = ResponseType.json; + } + } + return requestOptions; } - @override - Future>> getConfig() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/raise/products', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map( - (i) => FarmersList.fromJson(i as Map)) - .toList()); - return value; - } + String _combineBaseUrls( + String dioBaseUrl, + String? baseUrl, + ) { + if (baseUrl == null || baseUrl.trim().isEmpty) { + return dioBaseUrl; + } - @override - Future> changePhone(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/auth/changePhone', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } + final url = Uri.parse(baseUrl); - @override - Future> changeSendVerify(mobile) async { - ArgumentError.checkNotNull(mobile, 'mobile'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/sendVerify/$mobile', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson( - _result.data, - (json) => json as dynamic, - ); - return value; - } + if (url.isAbsolute) { + return url.toString(); + } - @override - Future>> storeListByCreditId(creditGoodsId) async { - ArgumentError.checkNotNull(creditGoodsId, 'creditGoodsId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/store/storeListByCreditId/$creditGoodsId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData>.fromJson( - _result.data, - (json) => (json as List) - .map((i) => Store.fromJson(i as Map)) - .toList()); - return value; + return Uri.parse(dioBaseUrl).resolveUri(url).toString(); } } diff --git a/lib/setting/about_page.dart b/lib/setting/about_page.dart index 2c385a05..8a7da768 100644 --- a/lib/setting/about_page.dart +++ b/lib/setting/about_page.dart @@ -4,12 +4,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/utils/bridge.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:huixiang/view_widget/update_dialog.dart'; -import 'package:package_info/package_info.dart'; +import 'package:package_info_plus/package_info_plus.dart'; import 'package:url_launcher/url_launcher.dart'; class AboutPage extends StatefulWidget { @@ -49,37 +47,37 @@ class _AboutPage extends State { bottom: BorderSide(color: Color(0xffF7F7F7), width: 0.0)), color: Color(0xffF7F7F7), ), - padding: EdgeInsets.only(top: 25.h), + padding: EdgeInsets.only(top: 25), alignment: Alignment.center, child: SingleChildScrollView( physics: BouncingScrollPhysics(), child:Column( children: [ Image.asset( - "assets/image/icon_about_logo.webp", + "assets/image/icon_about_logo.png", width: 130, height: 130, ), Padding( - padding: EdgeInsets.only(top: 32.h, bottom: 5.h), + padding: EdgeInsets.only(top: 32, bottom: 5), child: Text( S.of(context).yixinhuixiang, style: TextStyle( - fontSize: 30.sp, - color: Color(0xff32A060), + fontSize: 30, + color: Color(0xFF30415B), ), ), ), Text( S.of(context).guojiankangyoujishenghuo, style: TextStyle( - fontSize: 16.sp, + fontSize: 16, fontWeight: MyFontWeight.regular, color: Color(0xffB2B2B2), ), ), SizedBox( - height: 20.h, + height: 20, ), GestureDetector( onTap: (){ @@ -91,13 +89,6 @@ class _AboutPage extends State { ) ), // textItem(S.of(context).tebieshengming), - InkWell( - onTap: () { - Navigator.of(context) - .pushNamed('/router/help_feedback_page'); - }, - child: textItem(S.of(context).shiyongbangzhu), - ), if (!Platform.isAndroid) GestureDetector( child: settingSingleItem(S.of(context).geiwopingfen), @@ -122,22 +113,28 @@ class _AboutPage extends State { Navigator.of(context).pushNamed('/router/user_service_page'); }, ), + GestureDetector( + child: settingSingleItem("注销账户"), + onTap: () { + Navigator.of(context).pushNamed('/router/logout_page'); + }, + ), Padding( - padding: EdgeInsets.only(left: 20.w, right: 20.w), + padding: EdgeInsets.only(left: 20, right: 20), child: Divider( - height: 10.0.h, + height: 10.0, indent: 0.0, color: Colors.grey, ), ), SizedBox( - height:100.h, + height:100, ), ], ),) ), Container( - margin: EdgeInsets.only(bottom: 23.h), + margin: EdgeInsets.only(bottom: 23), alignment: Alignment.bottomCenter, child: Column( mainAxisAlignment: MainAxisAlignment.end, @@ -148,12 +145,12 @@ class _AboutPage extends State { overflow: TextOverflow.ellipsis, style: TextStyle( color: Colors.black, - fontSize: 12.sp, + fontSize: 12, fontWeight: MyFontWeight.medium, ), ), SizedBox( - height: 10.h, + height: 10, ), Align( alignment: Alignment.center, @@ -164,7 +161,7 @@ class _AboutPage extends State { textAlign: TextAlign.center, style: TextStyle( color: Colors.black, - fontSize: 12.sp, + fontSize: 12, fontWeight: MyFontWeight.medium, ), ), @@ -194,26 +191,26 @@ class _AboutPage extends State { child: Column( children: [ Divider( - height: 10.0.h, + height: 10.0, indent: 0.0, color: Colors.grey, ), Padding( - padding: EdgeInsets.only(top: 15.h, bottom: 15.h), + padding: EdgeInsets.only(top: 15, bottom: 15), child: Row( children: [ Expanded( child: Text( right, style: TextStyle( - fontSize: 16.sp, + fontSize: 16, color: Color(0xFF353535), fontWeight: MyFontWeight.medium, ), ), ), SizedBox( - width: 16.w, + width: 16, ), Icon( Icons.keyboard_arrow_right, @@ -232,12 +229,12 @@ class _AboutPage extends State { child: Column( children: [ Divider( - height: 10.0.h, + height: 10.0, indent: 0.0, color: Colors.grey, ), Padding( - padding: EdgeInsets.only(top: 15.h, bottom: 15.h), + padding: EdgeInsets.only(top: 15, bottom: 15), child: Row( children: [ Expanded( @@ -245,7 +242,7 @@ class _AboutPage extends State { left, style: TextStyle( fontWeight: MyFontWeight.medium, - fontSize: 16.sp, + fontSize: 16, color: Color(0xFF353535), ), ), @@ -254,7 +251,7 @@ class _AboutPage extends State { Text( right, style: TextStyle( - fontSize: 16.sp, + fontSize: 16, fontWeight: MyFontWeight.regular, color: Color(0xFF727272), ), @@ -270,22 +267,22 @@ class _AboutPage extends State { return Container( width: double.infinity, // padding: EdgeInsets.fromLTRB(20, 16, 20, 16), - margin: EdgeInsets.fromLTRB(16.w, 0.h, 16.w, 0.h), + margin: EdgeInsets.fromLTRB(16, 0, 16, 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Divider( - height: 10.0.h, + height: 10.0, indent: 0.0, color: Colors.grey, ), Padding( - padding: EdgeInsets.only(top: 15.h, bottom: 15.h), + padding: EdgeInsets.only(top: 15, bottom: 15), child: Text( text, style: TextStyle( fontWeight: MyFontWeight.medium, - fontSize: 16.sp, + fontSize: 16, color: Color(0xFF353535), ), ), diff --git a/lib/setting/account_security_page.dart b/lib/setting/account_security_page.dart index 50ee2cf4..fe51519a 100644 --- a/lib/setting/account_security_page.dart +++ b/lib/setting/account_security_page.dart @@ -1,12 +1,11 @@ import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -20,8 +19,8 @@ class AccountSecurityPage extends StatefulWidget { } class _AccountSecurityPage extends State { - ApiService apiService; - UserInfo userInfo; + ApiService? apiService; + UserInfo? userInfo; @override void initState() { @@ -29,18 +28,17 @@ class _AccountSecurityPage extends State { EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), - context: context, token: value.getString("token"),), + context: context, token: value.getString("token") ?? "",), queryUser(), }); } queryUser() async { - BaseData baseDate = - await apiService.queryInfo().catchError((onError) { + BaseData? baseDate = await apiService?.queryInfo().catchError((onError) { }); - if (baseDate != null && baseDate.isSuccess) { - userInfo = baseDate.data; + if (baseDate?.isSuccess ?? false) { + userInfo = baseDate!.data; setState(() {}); SharedPreferences.getInstance().then( (value) => { @@ -152,14 +150,14 @@ class _AccountSecurityPage extends State { ), flex: 1, ), - if(userInfo?.hasPayPassword != null) Text( - (userInfo?.hasPayPassword ?? true)? S.of(context).xiugai :S.of(context).shezhi, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D)), + (userInfo?.hasPayPassword ?? true)? S.of(context).xiugai :S.of(context).shezhi, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D), ), + ), SizedBox( width:8.w, ), diff --git a/lib/setting/binding_phone_page.dart b/lib/setting/binding_phone_page.dart index d9f21804..a99340fe 100644 --- a/lib/setting/binding_phone_page.dart +++ b/lib/setting/binding_phone_page.dart @@ -1,24 +1,21 @@ import 'dart:async'; import 'dart:io'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import '../login/captcha/block_puzzle_captcha.dart'; import '../view_widget/border_text.dart'; class BindingPhonePage extends StatefulWidget { - final Map arguments; + final Map? arguments; BindingPhonePage({this.arguments}); @@ -29,7 +26,7 @@ class BindingPhonePage extends StatefulWidget { } class _BindingPhonePage extends State { - ApiService apiService; + ApiService? apiService; String area = "+86"; var _controllerPhone = TextEditingController(); var _controllerNewPhone = TextEditingController(); @@ -40,28 +37,28 @@ class _BindingPhonePage extends State { var mobileStatus = 0; var btnText = "获取验证码"; var _sendCodeStatus = 0; - Timer _timer; - UserInfo userInfo; + Timer? _timer; + UserInfo? userInfo; int phoneState = 1; - String mobile; - String newMobile; + String? mobile; + String? newMobile; @override void initState() { super.initState(); - userInfo = widget.arguments['userInfo']; + userInfo = widget.arguments?['userInfo']; } @override void dispose() { - if (_timer != null && _timer.isActive) _timer.cancel(); + if (_timer?.isActive ?? false) _timer?.cancel(); super.dispose(); } ///修改绑定手机号码 modifyPhoneCode(int state) async { var mobile = _controllerPhone.text; - if (mobile == ""&& phoneState == 1) { + if (mobile == "" && phoneState == 1) { SmartDialog.showToast(S.of(context).qingshurushoujihao, alignment: Alignment.center); return; } @@ -88,21 +85,16 @@ class _BindingPhonePage extends State { SmartDialog.showToast(S.of(context).code_error, alignment: Alignment.center); return; } - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: false); - } - BaseData baseData = await apiService.changePhone({ + BaseData? baseData = await apiService?.changePhone({ "areaCode": area, - "capcha": phoneState == 1 ? code:newCode, + "capcha": phoneState == 1 ? code : newCode, "mobile1": mobile, "mobile2": newMobile, "state": state, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if(state == 1){ - _timer.cancel(); + _timer?.cancel(); btnText = "获取验证码"; _sendCodeStatus = 0; phoneState = 2; @@ -111,36 +103,31 @@ class _BindingPhonePage extends State { setState(() {}); } else { setState(() {}); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } ///验证验证码 verificationCode() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: false); - } - BaseData baseData = await apiService.changeSendVerify(mobile).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.changeSendVerify(mobile!).catchError((error) {}); + if (baseData?.isSuccess ?? false) { _sendCodeStatus = 1; countdown(); - SmartDialog.showToast(baseData.data ?? false, alignment: Alignment.center); + SmartDialog.showToast(baseData?.data, alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } countdown() { - if (_timer != null && _timer.isActive) return; + if (_timer?.isActive ?? true) return; int countdown = 60; _timer = Timer.periodic(Duration(seconds: 1), (timer) { countdown--; if (countdown == 0) { btnText = "重新发送"; _sendCodeStatus = 0; - _timer.cancel(); + _timer?.cancel(); } else { btnText = "${countdown}s"; } @@ -324,7 +311,7 @@ class _BindingPhonePage extends State { .then((value) { if (value != null) setState(() { - area = value; + area = value as String; }); }); }, @@ -352,7 +339,7 @@ class _BindingPhonePage extends State { color: Color(0xFF353535), ), onChanged: (value) { - if (value != null && value.isNotEmpty) { + if (value.isNotEmpty) { if (isPhone(value)) { mobileStatus = 1; } else { @@ -421,8 +408,7 @@ class _BindingPhonePage extends State { color: statusCodeTextColor, ), onChanged: (value) { - if (value != null && - value.isNotEmpty) { + if (value.isNotEmpty) { if (value.length == 6) { verifyStatus = 1; } else { @@ -563,7 +549,7 @@ class _BindingPhonePage extends State { .then((value) { if (value != null) setState(() { - area = value; + area = value as String; }); }); }, @@ -591,7 +577,7 @@ class _BindingPhonePage extends State { color: Color(0xFF353535), ), onChanged: (value) { - if (value != null && value.isNotEmpty) { + if (value.isNotEmpty) { if (isPhone(value)) { mobileStatus = 1; } else { @@ -661,8 +647,7 @@ class _BindingPhonePage extends State { color: statusCodeTextColor, ), onChanged: (value) { - if (value != null && - value.isNotEmpty) { + if (value.isNotEmpty) { if (value.length == 6) { verifyStatus = 1; } else { diff --git a/lib/setting/help_feedback_page.dart b/lib/setting/help_feedback_page.dart index 48bd796c..23d792fe 100644 --- a/lib/setting/help_feedback_page.dart +++ b/lib/setting/help_feedback_page.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; @@ -22,14 +21,14 @@ class HelpFeedbackPage extends StatefulWidget { class _HelpFeedbackPage extends State { var _isExpanded = [false, false, false]; - ApiService apiService; + ApiService? apiService; @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) { - apiService = ApiService(Dio(), context: context, token: value.getString("token")); + apiService = ApiService(Dio(), context: context, token: value.getString("token") ?? ""); }); } @@ -175,23 +174,15 @@ class _HelpFeedbackPage extends State { } report() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.complaint({ + BaseData? baseData = await apiService?.complaint({ "content": phoneController.text, "informationId":0, }).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("反馈成功"); Navigator.of(context).pop(); } else { - SmartDialog.showToast(baseData.msg,alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}",alignment: Alignment.center); } } diff --git a/lib/setting/logout_ing.dart b/lib/setting/logout_ing.dart index 06280fa0..5b51e079 100644 --- a/lib/setting/logout_ing.dart +++ b/lib/setting/logout_ing.dart @@ -1,14 +1,12 @@ import 'dart:async'; -import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -18,7 +16,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../login/captcha/block_puzzle_captcha.dart'; -import '../main.dart'; class LogoutIng extends StatefulWidget { @override @@ -30,15 +27,15 @@ class LogoutIng extends StatefulWidget { class _LogoutIng extends State { final TextEditingController phoneController = TextEditingController(); final TextEditingController provingController = TextEditingController(); - String money; - String balance; + String? money; + String? balance; String phone = ""; - MinApiService minService; - ApiService apiService; + MinApiService? minService; + ApiService? apiService; var btnText = S.current.send_code; var _sendCodeStatus = 0; - Timer _timer; - UserInfo userInfo; + Timer? _timer; + UserInfo? userInfo; String area = "+86"; @override @@ -52,13 +49,12 @@ class _LogoutIng extends State { apiService = ApiService( Dio(), context: context, - token: value.getString("token"), + token: value.getString("token") ?? "", showLoading: false, ); - BaseData baseData = - await apiService.queryInfo().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; + BaseData? baseData = await apiService?.queryInfo().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; balance = userInfo?.balance ?? "0.00"; money = userInfo?.money ??"0.00"; phone = userInfo?.phone ?? ""; @@ -78,51 +74,30 @@ class _LogoutIng extends State { } sendProving(v) async{ - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - showLoading: true - ); - } - BaseData baseData = await apiService.sendVerify({"areaCode": "+86", "mobile": phoneController.text, "verification": v}).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.sendVerify({"areaCode": "+86", "mobile": phoneController.text, "verification": v}).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { countdown(); - SmartDialog.showToast(baseData.data, + SmartDialog.showToast(baseData!.data, alignment: Alignment.center); }else{ - SmartDialog.showToast(baseData.msg, - alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } ///注销账户 logout() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - showLoading: true - ); - } - BaseData baseData = await apiService.deleteMine().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.deleteMine().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { logOut(); - SmartDialog.showToast(baseData.data, - alignment: Alignment.center); + SmartDialog.showToast(baseData!.data, alignment: Alignment.center); }else{ - SmartDialog.showToast(baseData.msg, - alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); Navigator.of(context).pop(); } } countdown() { - if (_timer != null && _timer.isActive) return; + if (_timer?.isActive ?? true) return; int countdown = 60; _timer = Timer.periodic(Duration(seconds: 1), (timer) { countdown--; @@ -131,7 +106,7 @@ class _LogoutIng extends State { btnText = S.of(context).send_code; }); _sendCodeStatus = 0; - _timer.cancel(); + _timer?.cancel(); } else { setState(() { btnText = S.of(context).resend_in_seconds(countdown); @@ -142,7 +117,7 @@ class _LogoutIng extends State { @override void dispose() { - if (_timer != null && _timer.isActive) _timer.cancel(); + if (_timer?.isActive ?? false) _timer?.cancel(); super.dispose(); } @@ -217,7 +192,7 @@ class _LogoutIng extends State { Navigator.of(context).pushNamed('/router/phone_address_page').then((value) { if(value != null) setState(() { - area = value; + area = value as String; }); }); }, diff --git a/lib/setting/logout_page.dart b/lib/setting/logout_page.dart index d86bc928..e6a5e49d 100644 --- a/lib/setting/logout_page.dart +++ b/lib/setting/logout_page.dart @@ -1,12 +1,15 @@ +import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/utils/business_instance.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/round_button.dart'; +import 'package:shared_preferences/shared_preferences.dart'; class LogoutPage extends StatefulWidget { @override @@ -22,6 +25,7 @@ class _LogoutPage extends State { @override void initState() { super.initState(); + } @override @@ -30,7 +34,7 @@ class _LogoutPage extends State { appBar: MyAppBar( title: S.of(context).zhanghaozhuxiaoshuoming, titleColor: Colors.black, - titleSize: 18.sp, + titleSize: 18, background: Colors.transparent, leadingColor: Colors.black, ), @@ -57,7 +61,7 @@ class _LogoutPage extends State { child: Text( "注销协议", style: TextStyle( - fontSize: 16.sp, + fontSize: 16, fontWeight: MyFontWeight.semi_bold, color: Color(0xFF1A1A1A), ), @@ -70,7 +74,7 @@ class _LogoutPage extends State { child: Text( "特别提示", style: TextStyle( - fontSize: 14.sp, + fontSize: 14, fontWeight: MyFontWeight.semi_bold, color: Color(0xFF1A1A1A), ), @@ -84,7 +88,7 @@ class _LogoutPage extends State { child: Text( "您已了解并同意帐号注销后,将要自行承担以下后果:", style: TextStyle( - fontSize: 14.sp, + fontSize: 14, fontWeight: MyFontWeight.semi_bold, height: 1.5, color: Color(0xFF1A1A1A), @@ -110,7 +114,7 @@ class _LogoutPage extends State { child: Text( "注销流程:", style: TextStyle( - fontSize: 14.sp, + fontSize: 14, fontWeight: MyFontWeight.semi_bold, color: Color(0xFF1A1A1A), ), @@ -128,7 +132,7 @@ class _LogoutPage extends State { child: Text( "协议附则:", style: TextStyle( - fontSize: 14.sp, + fontSize: 14, fontWeight: MyFontWeight.semi_bold, color: Color(0xFF1A1A1A), ), @@ -139,7 +143,7 @@ class _LogoutPage extends State { _textRich( "2.本协议的拟定、解释均以中文为准。除双方另有约定外,任何有关本协议的翻译不得作为解释本协议或判定双方当事人意图之依据。"), SizedBox( - height: 24.h, + height: 24, ), Container( width: double.infinity, @@ -162,7 +166,7 @@ class _LogoutPage extends State { "已了解《海峡姐妹账号注销协议》,并自行承担相关后果", textAlign: TextAlign.center, style: TextStyle( - fontSize: 11.sp, + fontSize: 11, fontWeight: MyFontWeight.medium, color: Color(0xFF010101), ), @@ -181,9 +185,9 @@ class _LogoutPage extends State { }, child: Container( width: double.infinity, - height: 54.h, + height: 54, alignment: Alignment.center, - margin:EdgeInsets.only(left:20.w,right:20.w,bottom: 25.h), + margin:EdgeInsets.only(left:20,right:20,bottom: 25), decoration: BoxDecoration( borderRadius: BorderRadius.circular(45), color: checkStatus ? Color(0xFF32A060) : Color(0xFFD8D8D8), @@ -191,11 +195,12 @@ class _LogoutPage extends State { child: Text( "注销", style: TextStyle( - fontSize: 16.sp, + fontSize: 16, fontWeight: MyFontWeight.semi_bold, color: Color(0xFFFFFFFF), ), - )), + ), + ), ) ], ), @@ -210,7 +215,7 @@ class _LogoutPage extends State { child: Text( text, style: TextStyle( - fontSize: 16.sp, + fontSize: 16, fontWeight: MyFontWeight.regular, height: 1.7, color: Colors.black), @@ -226,7 +231,7 @@ class _LogoutPage extends State { return AlertDialog( content: Container( width: MediaQuery.of(context).size.width - 84, - height: 130.h, + height: 130, child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -235,14 +240,14 @@ class _LogoutPage extends State { "注销账户会清空所有的信息和数据,确认要进行注销吗?", textAlign: TextAlign.center, style: TextStyle( - fontSize: 17.sp, + fontSize: 17, height: 1.2, fontWeight: MyFontWeight.medium, color: Colors.black, ), ), SizedBox( - height: 20.h, + height: 20, ), Row( children: [ @@ -251,7 +256,7 @@ class _LogoutPage extends State { child: BorderText( text: S.of(context).querenzhuxiao, textColor: Color(0xFF32A060), - fontSize: 16.sp, + fontSize: 16, fontWeight: FontWeight.bold, borderColor: Color(0xFF32A060), radius: 4, @@ -259,14 +264,13 @@ class _LogoutPage extends State { borderWidth: 1, ), onTap: () { - Navigator.of(context).popAndPushNamed( - '/router/logout_ing'); + unregistTenant(); }, ), flex: 1, ), SizedBox( - width: 16.w, + width: 16, ), Expanded( child: InkWell( @@ -276,7 +280,7 @@ class _LogoutPage extends State { radius: 4, padding: EdgeInsets.all(12), backgroup: Color(0xFF32A060), - fontSize: 16.sp, + fontSize: 16, fontWeight: FontWeight.bold, ), onTap: () { @@ -294,4 +298,23 @@ class _LogoutPage extends State { }, ); } + + unregistTenant() async { + // BaseData baseData = await businessService.unregist({ + // "tenantCode": BusinessInstance.instance.businessTenant, + // }).catchError((error){}); + // + // if (baseData?.isSuccess ?? false) { + // SmartDialog.showToast("注销成功"); + // + // SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); + // sharedPreferences.setString('account', ""); + // sharedPreferences.setString('password', ""); + // sharedPreferences.setString('identitySwitch', "1"); + // sharedPreferences.setString('login_info', ""); + // sharedPreferences.setString('login_store_Id', ""); + // Navigator.of(context).pushNamedAndRemoveUntil('/router/business_login_page', (route) => false); + // } + } + } diff --git a/lib/setting/permission_setting_page.dart b/lib/setting/permission_setting_page.dart index b0cbf557..e5116c96 100644 --- a/lib/setting/permission_setting_page.dart +++ b/lib/setting/permission_setting_page.dart @@ -3,7 +3,6 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/request_permission.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -75,7 +74,7 @@ class _PermissionSettingPage extends State { ]; queryPermission() async { - await permissions.forEach((element) async { + await Future.forEach(permissions, (Permission element) async { if (await element.isGranted) { permissionSwitch[element] = true; } @@ -111,13 +110,13 @@ class _PermissionSettingPage extends State { openPermission(Permission permission, int position) async { if ((permissionSwitch.containsKey(permission) && - permissionSwitch[permission])) { + (permissionSwitch[permission] ?? false))) { openAppSettings(); return; } if (await permission.isPermanentlyDenied) { requestDialog(position); - } else if (await permission.isUndetermined) { + } else if (await permission.isDenied) { await permission.request(); queryPermission(); } else { @@ -159,11 +158,11 @@ class _PermissionSettingPage extends State { Widget buildPermissionItem( title, icon, content, Permission permission, int position) { return Container( - margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), - padding: EdgeInsets.fromLTRB(20.w, 16.h, 20.w, 16.h), + margin: EdgeInsets.fromLTRB(16, 8, 16, 8), + padding: EdgeInsets.fromLTRB(20, 16, 20, 16), decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.circular(8.w), + borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), @@ -186,21 +185,21 @@ class _PermissionSettingPage extends State { title, style: TextStyle( color: Colors.black, - fontSize: 16.sp, + fontSize: 16, fontWeight: FontWeight.bold), ), SizedBox( - width: 8.w, + width: 8, ), Image.asset( icon, - width: 22.w, - height: 22.h, + width: 22, + height: 22, ), ], ), SizedBox( - height: 8.h, + height: 8, ), Text( content, @@ -208,18 +207,18 @@ class _PermissionSettingPage extends State { maxLines: 2, style: TextStyle( color: Color(0xFF353535), - fontSize: 12.sp, + fontSize: 12, ), ), ], ), ), SizedBox( - width: 32.w, + width: 32, ), CupertinoSwitch( value: (permissionSwitch.containsKey(permission) && - permissionSwitch[permission]), + (permissionSwitch[permission] ?? false)), onChanged: (boo) { if (boo) { requestDialog(position); diff --git a/lib/setting/platform_code_page.dart b/lib/setting/platform_code_page.dart index 7a61e7a4..4c27cc98 100644 --- a/lib/setting/platform_code_page.dart +++ b/lib/setting/platform_code_page.dart @@ -1,24 +1,20 @@ import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/view_widget/pay_selected_dialog.dart'; import 'package:pin_input_text_field/pin_input_text_field.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import '../login/captcha/block_puzzle_captcha.dart'; class PlatformCodePage extends StatefulWidget { - final Map arguments; + final Map? arguments; PlatformCodePage({this.arguments}); @@ -29,11 +25,11 @@ class PlatformCodePage extends StatefulWidget { } class _PlatformCodePage extends State { - ApiService apiService; + ApiService? apiService; int codeType = 0; - UserInfo userInfo; + UserInfo? userInfo; String inputText = ""; - Timer _timer; + Timer? _timer; int sendCodeStatus = 0; var codeText = "重新发送"; @@ -44,61 +40,48 @@ class _PlatformCodePage extends State { @override void dispose() { - if (_timer != null && _timer.isActive) _timer.cancel(); + if (_timer?.isActive ?? false) _timer!.cancel(); super.dispose(); } ///发送修改支付密码的短信验证 sendCode() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, - token: value.getString("token"), - showLoading: false); - } - BaseData baseData = - await apiService.sendVerifyByUpdatePayPwd().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.sendVerifyByUpdatePayPwd().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { countdown(); codeType = 1; - SmartDialog.showToast(baseData.data, alignment: Alignment.center); + SmartDialog.showToast(baseData!.data, alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } ///验证验证码 verificationCode(String smsCode) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: false); - } - BaseData baseData = await apiService.verifyByUpdatePayPwd({ + BaseData? baseData = await apiService?.verifyByUpdatePayPwd({ "smsCode": smsCode, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { Navigator.of(context).pushReplacementNamed( '/router/platform_pay_code', arguments: { "inputText": inputText, }); - SmartDialog.showToast(baseData.data ?? false, alignment: Alignment.center); + SmartDialog.showToast(baseData!.data ?? false, alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } countdown() { - if (_timer != null && _timer.isActive) return; + if (_timer?.isActive ?? true) return; int countdown = 60; _timer = Timer.periodic(Duration(seconds: 1), (timer) { countdown--; if (countdown == 0) { codeText = "重新发送"; sendCodeStatus = 0; - _timer.cancel(); + _timer?.cancel(); } else { codeText = S.of(context).resend_in_seconds(countdown); } @@ -181,7 +164,7 @@ class _PlatformCodePage extends State { height: 14.h, ), Text( - AppUtils.phoneEncode(widget.arguments["userInfo"]?.phone ?? ""), + AppUtils.phoneEncode(widget.arguments?["userInfo"]?.phone ?? ""), style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14.sp, @@ -228,7 +211,7 @@ class _PlatformCodePage extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - "验证码已发至 ${AppUtils.phoneEncode(widget.arguments["userInfo"]?.phone ?? "")}", + "验证码已发至 ${AppUtils.phoneEncode(widget.arguments?["userInfo"]?.phone ?? "")}", style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 18.sp, diff --git a/lib/setting/platform_pay_code.dart b/lib/setting/platform_pay_code.dart index dc5b2d69..43f2ceab 100644 --- a/lib/setting/platform_pay_code.dart +++ b/lib/setting/platform_pay_code.dart @@ -3,12 +3,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pin_input_text_field/pin_input_text_field.dart'; class PlatformPayCode extends StatefulWidget { final Map arguments; - PlatformPayCode({this.arguments}); + PlatformPayCode({required this.arguments}); @override State createState() { @@ -46,7 +45,7 @@ class _PlatformPayCode extends State { S.of(context).pingtaizhifumima, style: TextStyle( fontWeight: MyFontWeight.regular, - fontSize: 17.sp, + fontSize: 17, color: Color(0xFF0D0D0D), ), ), @@ -65,7 +64,7 @@ class _PlatformPayCode extends State { Widget settingCode(){ return Container( alignment: Alignment.center, - margin: EdgeInsets.only(top: 28.h), + margin: EdgeInsets.only(top: 28), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -74,24 +73,24 @@ class _PlatformPayCode extends State { "请输入6位数字密码", style: TextStyle( fontWeight: MyFontWeight.semi_bold, - fontSize: 18.sp, + fontSize: 18, color: Color(0xFF353535), ), ), SizedBox( - height: 12.h, + height: 12, ), Text( "将用于海峡姐妹APP下单时平台余额消费", style: TextStyle( fontWeight: MyFontWeight.medium, - fontSize: 14.sp, + fontSize: 14, color: Color(0xFFA29E9E), ), ), Container( - margin: EdgeInsets.only(top: 24.h, bottom: 31.h,right: 35.w,left: 35.w), - height: 45.h, + margin: EdgeInsets.only(top: 24, bottom: 31,right: 35,left: 35), + height: 45, child: PinInputTextField( onChanged: (txtCode){ print(txtCode); @@ -103,10 +102,11 @@ class _PlatformPayCode extends State { strokeColorBuilder: FixedColorBuilder(Color(0xFFEBEAEA)), textStyle: TextStyle( fontWeight: MyFontWeight.medium, - fontSize: 18.sp, + fontSize: 18, color: Color(0xFF353535), ), - radius: Radius.circular(4.r)), + radius: Radius.circular(4), + ), ), ), GestureDetector( @@ -123,18 +123,18 @@ class _PlatformPayCode extends State { }); }, child: Container( - width: 163.w, - height: 46.h, + width: 163, + height: 46, alignment: Alignment.center, decoration: BoxDecoration( color: inputCode.length == 6 ? Color(0xFF32A060):Color(0xFFBBE7CC), - borderRadius: BorderRadius.circular(23.r), + borderRadius: BorderRadius.circular(23), ), child: Text( "下一步", style: TextStyle( fontWeight: MyFontWeight.semi_bold, - fontSize: 18.sp, + fontSize: 18, color: Color(0xFFFFFFFF), ), ), diff --git a/lib/setting/platform_pay_code_success.dart b/lib/setting/platform_pay_code_success.dart index aca3a657..75b7f773 100644 --- a/lib/setting/platform_pay_code_success.dart +++ b/lib/setting/platform_pay_code_success.dart @@ -1,20 +1,16 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/pay_selected_dialog.dart'; import 'package:pin_input_text_field/pin_input_text_field.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class PlatformPayCodeSuccess extends StatefulWidget { - final Map arguments; + final Map? arguments; PlatformPayCodeSuccess({this.arguments}); @override @@ -24,9 +20,9 @@ class PlatformPayCodeSuccess extends StatefulWidget { } class _PlatformPayCodeSuccess extends State { - ApiService apiService; + ApiService? apiService; int codeType = 0; - UserInfo userInfo; + UserInfo? userInfo; String againInputCode = ""; @override @@ -36,25 +32,20 @@ class _PlatformPayCodeSuccess extends State { ///修改支付密码 modifyPayCode(String payCode,String code) async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: false); - } - BaseData baseData = await apiService.updatePayPwd({ + BaseData? baseData = await apiService?.updatePayPwd({ "newPayPwd": payCode, "smsCode": code, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { codeType=4; }); - SmartDialog.showToast(baseData.data ?? false, alignment: Alignment.center); + SmartDialog.showToast(baseData!.data, alignment: Alignment.center); } else { setState(() { codeType = 5; }); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } } @@ -149,10 +140,10 @@ class _PlatformPayCodeSuccess extends State { GestureDetector( onTap: (){ setState(() { - if(againInputCode.length == 6 && (widget.arguments["inputCode"] == againInputCode)){ - modifyPayCode(againInputCode,widget.arguments["inputText"]); + if(againInputCode.length == 6 && (widget.arguments?["inputCode"] == againInputCode)){ + modifyPayCode(againInputCode,widget.arguments?["inputText"]); }else{ - if(widget.arguments["inputCode"] != againInputCode){ + if(widget.arguments?["inputCode"] != againInputCode){ SmartDialog.showToast("请输入与上次一致的6位数字密码", alignment: Alignment.center); }else{ SmartDialog.showToast("请再次输入6位数字密码", alignment: Alignment.center); diff --git a/lib/setting/setting_page.dart b/lib/setting/setting_page.dart index 9a729e7e..a0895083 100644 --- a/lib/setting/setting_page.dart +++ b/lib/setting/setting_page.dart @@ -12,7 +12,6 @@ import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:path_provider/path_provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; class SettingPage extends StatefulWidget { @override @@ -39,7 +38,7 @@ class _SettingPage extends State { setLanguage() async { SharedPreferences shared = await SharedPreferences.getInstance(); - locale = shared.getString('language'); + locale = shared.getString('language') ?? "tw"; if (mounted) setState(() {}); } @@ -61,7 +60,7 @@ class _SettingPage extends State { S.of(context).shezhi, style: TextStyle( fontWeight: MyFontWeight.regular, - fontSize: 17.sp, + fontSize: 17, color: Color(0xFF0D0D0D), ), ), @@ -80,7 +79,7 @@ class _SettingPage extends State { mainAxisSize: MainAxisSize.max, children: [ SizedBox( - height: 16.h, + height: 16, ), GestureDetector( child: settingSingleItem(S.of(context).gerenxinxi), @@ -95,7 +94,7 @@ class _SettingPage extends State { }, ), SizedBox( - height: 16.h, + height: 16, ), GestureDetector( child: settingSingleItem(S.of(context).zhanghaoyuanquan), @@ -104,7 +103,7 @@ class _SettingPage extends State { }, ), SizedBox( - height: 16.h, + height: 16, ), GestureDetector( onTap: () { @@ -163,7 +162,7 @@ class _SettingPage extends State { }, ), SizedBox( - height: 16.h, + height: 16, ), GestureDetector( child: settingItem(S.of(context).qinglihuancun, cacheTotal), @@ -172,7 +171,7 @@ class _SettingPage extends State { }, ), SizedBox( - height: 16.h, + height: 16, ), GestureDetector( child: settingSingleItem(S.of(context).zhuxiaozhanghao), @@ -181,7 +180,7 @@ class _SettingPage extends State { }, ), SizedBox( - height: 16.h, + height: 16, ), // GestureDetector( // child: settingSingleItem(S.of(context).bangzhuyufankui), @@ -205,9 +204,9 @@ class _SettingPage extends State { logOut(); }, child: Container( - height: 54.h, + height: 54, alignment: Alignment.center, - margin:EdgeInsets.symmetric(horizontal: 16.w,vertical:25.h), + margin:EdgeInsets.symmetric(horizontal: 16,vertical:25), decoration: BoxDecoration( borderRadius: BorderRadius.circular(45), ), @@ -215,7 +214,7 @@ class _SettingPage extends State { text: S.of(context).tuichudenglu, backgroup: Color(0xFF32A060), textColor: Colors.white, - fontSize: 16.sp, + fontSize: 16, radius:45, fontWeight: MyFontWeight.semi_bold, ), @@ -239,7 +238,7 @@ class _SettingPage extends State { } SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - List miniAppids = sharedPreferences.getStringList("miniAppid"); + List? miniAppids = sharedPreferences.getStringList("miniAppid"); if (miniAppids != null && miniAppids.length > 0) { miniAppids.forEach((element) async { print("appid: $element"); @@ -248,7 +247,7 @@ class _SettingPage extends State { AppUtils.deleteDirectory(Directory(path)); String filePath = ""; if (Platform.isAndroid) { - filePath = (await getExternalStorageDirectory()).path; + filePath = (await getExternalStorageDirectory())?.path ?? ""; } else { filePath = (await getApplicationDocumentsDirectory()).path; } @@ -316,7 +315,7 @@ class _SettingPage extends State { left, style: TextStyle( fontWeight: MyFontWeight.semi_bold, - fontSize: 15.sp, + fontSize: 15, color: Color(0xFF353535), ), ), @@ -325,12 +324,12 @@ class _SettingPage extends State { Text( right, style: TextStyle( - fontSize: 13.sp, + fontSize: 13, fontWeight: MyFontWeight.regular, color: Color(0xFF727272)), ), SizedBox( - width: 16.w, + width: 16, ), Icon( Icons.keyboard_arrow_right, @@ -353,14 +352,14 @@ class _SettingPage extends State { child: Text( right, style: TextStyle( - fontSize: 15.sp, + fontSize: 15, color: Color(0xFF353535), fontWeight: MyFontWeight.semi_bold, ), ), ), SizedBox( - width: 16.w, + width: 16, ), Icon( Icons.keyboard_arrow_right, diff --git a/lib/setting/treaty_page.dart b/lib/setting/treaty_page.dart index cd44bac6..e26f5e89 100644 --- a/lib/setting/treaty_page.dart +++ b/lib/setting/treaty_page.dart @@ -4,9 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:webview_flutter/webview_flutter.dart'; class TreatyPage extends StatefulWidget { @@ -18,14 +16,34 @@ class TreatyPage extends StatefulWidget { class _TreatyPage extends State { var controller = new ScrollController(); - String userType; + + late WebViewController _webViewController; @override void initState() { super.initState(); EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - // if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); - // if (Platform.isIOS) WebView.platform = CupertinoWebView(); + + _webViewController = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) {}, + onPageStarted: (String url) {}, + onPageFinished: (String url) { + EasyLoading.dismiss(); + }, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + // if (request.url.startsWith('https://www.youtube.com/')) { + // return NavigationDecision.prevent; + // } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse("http://huixiang.lotus-wallet.com/Privacy.html")); + } @override @@ -43,13 +61,10 @@ class _TreatyPage extends State { height: MediaQuery.of(context).size.height, alignment: Alignment.center, child: - WebView( - initialUrl: "http://huixiang.lotus-wallet.com/Privacy.html", - javascriptMode: JavascriptMode.unrestricted, - onPageFinished: (initialUrl){ - EasyLoading.dismiss(); - }, - )), + WebViewWidget( + controller: _webViewController, + ), + ), ); } } diff --git a/lib/setting/user_service_page.dart b/lib/setting/user_service_page.dart index 95c1316c..96361554 100644 --- a/lib/setting/user_service_page.dart +++ b/lib/setting/user_service_page.dart @@ -1,13 +1,10 @@ import 'dart:io'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:webview_flutter/webview_flutter.dart'; -import 'package:webview_flutter/src/webview_cupertino.dart'; + import '../generated/l10n.dart'; @@ -21,13 +18,32 @@ class UserServicePage extends StatefulWidget { class _UserServicePage extends State with WidgetsBindingObserver { var controller = new ScrollController(); + late WebViewController _webViewController; + @override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); - if (Platform.isIOS) WebView.platform = CupertinoWebView(); + _webViewController = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) {}, + onPageStarted: (String url) {}, + onPageFinished: (String url) { + EasyLoading.dismiss(); + }, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + // if (request.url.startsWith('https://www.youtube.com/')) { + // return NavigationDecision.prevent; + // } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse("http://huixiang.lotus-wallet.com/user.html")); } @override @@ -43,14 +59,10 @@ class _UserServicePage extends State with WidgetsBindingObserve width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, alignment: Alignment.center, - child: - WebView( - initialUrl: "http://huixiang.lotus-wallet.com/user.html", - javascriptMode: JavascriptMode.unrestricted, - onPageFinished: (initialUrl){ - EasyLoading.dismiss(); - }, - )), + child: WebViewWidget( + controller: _webViewController, + ), + ), ); } } diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index b6e7da6b..04afad59 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -2,27 +2,26 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; -import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; -import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; +import 'package:flutter_datetime_picker_plus/src/datetime_picker_theme.dart' as picker_theme; +import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:fluwx/fluwx.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/shopping_cart.dart'; +import 'package:huixiang/data/subscribe_param.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity_details.dart'; -import 'package:huixiang/retrofit/data/address.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/down_order.dart'; -import 'package:huixiang/retrofit/data/launch_join_act.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.dart'; -import 'package:huixiang/retrofit/data/min_order_info.dart'; -import 'package:huixiang/retrofit/data/placeOrderFirst.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; +import 'package:huixiang/data/activity_details.dart'; +import 'package:huixiang/data/address.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/down_order.dart'; +import 'package:huixiang/data/launch_join_act.dart'; +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/data/place_order_first.dart'; +import 'package:huixiang/data/store_info.dart'; +import 'package:huixiang/data/wx_pay.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/settlement/settlement_model.dart'; import 'package:huixiang/settlement/settlement_view/activity_coupon_remarks.dart'; @@ -38,7 +37,6 @@ import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../retrofit/data/shoppingCart.dart'; import '../view_widget/settlement_tips_dialog.dart'; class Settlement extends StatefulWidget { @@ -53,52 +51,54 @@ class Settlement extends StatefulWidget { } class _Settlement extends State { - MinApiService minService; - Function(int type) callback; - StoreInfo storeInfo; - SettleOrderInfo settleOrderInfo; - MinOrderInfo minOrderInfo; + MinApiService? minService; + Function(int type)? callback; + StoreInfo? storeInfo; + SettleOrderInfo? settleOrderInfo; + MinOrderInfo? minOrderInfo; int selectedBtn = 0; String remakers = ""; String parentCode = ""; - String parentId = ""; + String? parentId = ""; int payChannel = 1; int tableId = 0; int numberOfPeople = 0; - String pageType; - Address address; - CouponListBean couponListBean; - PromotionInfoListBean promotion; - String mobile; + String? pageType; + Address? address; + CouponListBean? couponListBean; + PromotionInfoListBean? promotion; + String? mobile; bool placeOrder = false; - String actProductId; - String actProductSkuId; - ActivityDetails activityDetails; + String? actProductId; + String? actProductSkuId; + ActivityDetails? activityDetails; BargainType bargainType = BargainType.BargainZBug; - LaunchJoinAct launchJoinAct; - String skuPrice1; + LaunchJoinAct? launchJoinAct; + String? skuPrice1; JoinActivity joinA = JoinActivity.GoJoin; - String bargainOrderId; - String productSkuId; + String? bargainOrderId; + String? productSkuId; int count1 = 0; - String productId; + String? productId; bool orderButton = false; bool useVipPriceSelect = true; bool showVipTips = false; bool useBenefitSelect = true; bool isRaiseChannel = false; - ShoppingCart shopCarGoods; - String vipLevelName; + ShoppingCart? shopCarGoods; + String? vipLevelName; bool isVips = false; - SubscribeParam subscribeParam; - String reservationTime; - String subscribeStoresName; - String subTime; + SubscribeParam? subscribeParam; + String? reservationTime; + String? subscribeStoresName; + String? subTime; int storesIndex = 0; - String discountType; + String? discountType; int diningStatus = 4; int vipSelect = 0; + Fluwx fluwx = Fluwx(); + @override void initState() { super.initState(); @@ -124,15 +124,15 @@ class _Settlement extends State { vipLevelName = widget.arguments["vipLevelName"]; isVips = widget.arguments["isVips"]; - subscribeParam = widget?.arguments["subscribeParam"] ?? null; + subscribeParam = widget.arguments["subscribeParam"] ?? null; if (tableId == 0) { placeOrder = true; } SharedPreferences.getInstance().then((value) { - String minToken = value.getString("minToken"); - String tenant = value.getString("tenant"); - String storeId = value.getString("storeId"); + String minToken = value.getString("minToken") ?? ""; + String tenant = value.getString("tenant") ?? ""; + String storeId = value.getString("storeId") ?? ""; minService = MinApiService(Dio(), context: context, token: minToken, @@ -142,7 +142,7 @@ class _Settlement extends State { queryMemberInfo(); if (widget.arguments["pid"] != null && widget.arguments["pid"] != "" && tableId <= 0) { queryOrderInfo( - address != null ? address.id : null, + address != null ? address!.id : null, ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && @@ -163,7 +163,7 @@ class _Settlement extends State { tableId); } else if ( widget.arguments["cid"] != null && widget.arguments["cid"] != "" && tableId <= 0) { queryOrderInfo( - address != null ? address.id : null, + address != null ? address!.id : null, ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && @@ -185,8 +185,8 @@ class _Settlement extends State { } else queryOrderInfo( null, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && - (subscribeParam?.isEnableSubscribe ?? false) == false && + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && + !(subscribeParam?.isEnableSubscribe ?? false) && selectedBtn != 1 && selectedBtn != 2) ? diningStatus @@ -205,9 +205,9 @@ class _Settlement extends State { tableId); }); - weChatResponseEventHandler.listen((event) async { - print("payCallback: ${event.errCode}"); - toOrderDetails(placeOrderFirst.id); + fluwx.addSubscriber((response) { + print("payCallback: ${response.errCode}"); + toOrderDetails(placeOrderFirst?.id); }); } @@ -230,7 +230,7 @@ class _Settlement extends State { try { EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - BaseData baseData = await minService.getOrderInfo({ + BaseData? baseData = await minService?.getOrderInfo({ "addressId": addressId, "isTake": isTake, "memberCouponId": memberCouponId, @@ -250,26 +250,25 @@ class _Settlement extends State { promotions = ""; this.couponListBean = null; coupons = ""; - if (baseData != null && baseData.isSuccess) { - settleOrderInfo = baseData.data; - if ((settleOrderInfo?.promotionId ?? "") != "") { - settleOrderInfo.promotionInfoList.forEach((element) { - if (element.id == settleOrderInfo.promotionId) { + if (baseData?.isSuccess ?? false) { + settleOrderInfo = baseData!.data; + if (settleOrderInfo?.promotionId?.isNotEmpty ?? false) { + settleOrderInfo?.promotionInfoList?.forEach((element) { + if (element.id == settleOrderInfo!.promotionId) { this.promotion = element; promotions = promotion?.name ?? ""; } }); } - if ((settleOrderInfo?.memberCouponId ?? "") != "") { - settleOrderInfo.couponList.forEach((element) { - if (element.id == settleOrderInfo.memberCouponId) { + if (settleOrderInfo?.memberCouponId?.isNotEmpty ?? false) { + settleOrderInfo?.couponList?.forEach((element) { + if (element.id == settleOrderInfo?.memberCouponId) { this.couponListBean = element; coupons = couponListBean?.promotionName ?? ""; } }); } - if (settleOrderInfo.orderProductList == null || - settleOrderInfo.orderProductList.length == 0) { + if (settleOrderInfo?.orderProductList?.length == 0) { placeOrder = true; queryOrderDetails( pageType != null ? widget.arguments["orderId"] : parentId); @@ -315,13 +314,13 @@ class _Settlement extends State { ///会员信息 queryMemberInfo() async { - BaseData baseData = await minService.memberInfo().catchError((error) { + BaseData? baseData = await minService?.memberInfo().catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { SharedPreferences.getInstance().then( (value) => { - value.setString('minMember', jsonEncode(baseData.data)), + value.setString('minMember', jsonEncode(baseData!.data)), }, ); } @@ -330,44 +329,44 @@ class _Settlement extends State { ///查看订单详情 queryOrderDetails(id) async { EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - BaseData baseData = await minService.getOrderDetails({ + BaseData? baseData = await minService?.getOrderDetails({ "id": pageType != null ? widget.arguments["orderId"] : id ?? parentId, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - minOrderInfo = baseData.data; + minOrderInfo = baseData!.data; coupons = minOrderInfo?.couponName ?? ""; }); EasyLoading.dismiss(); } else { - SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); EasyLoading.dismiss(); } } ///取消优惠券 queryCancelMemberCoupon(orderId) async { - BaseData baseData = - await minService.cancelMemberCoupon(orderId).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = + await minService?.cancelMemberCoupon(orderId).catchError((error) {}); + if (baseData?.isSuccess ?? false) { queryOrderDetails(parentId); // SmartDialog.showToast(baseData.data, alignment: Alignment.center); } else { - SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } } ///使用该优惠券 queryUseMemberCoupon(memberCouponId) async { - BaseData baseData = await minService.useMemberCoupon({ + BaseData? baseData = await minService?.useMemberCoupon({ "memberCouponId": memberCouponId, "orderId": parentId, - "phone": minOrderInfo.orderInfoVo.memberVO.phone + "phone": minOrderInfo?.orderInfoVo?.memberVO?.phone }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { queryOrderDetails(parentId); } else { - SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } } @@ -375,103 +374,99 @@ class _Settlement extends State { setState(() { this.selectedBtn = selectedBtn; }); - if (address != null) { - queryOrderInfo( - address.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && - (subscribeParam?.isEnableSubscribe ?? false) == false && - selectedBtn != 1 && - selectedBtn != 2) - ? diningStatus - : selectedBtn, - null, - 0, - productId ?? null, - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - "AUTO", - // useVipPriceSelect, - // useBenefitSelect, - count1, - payChannel, - tableId); - return; - } - BaseData> baseDate = - await minService.queryAddress().catchError((error) {}); - - BMFCoordinate bmfCoordinate = BMFCoordinate( - double.tryParse(storeInfo.latitude), - double.tryParse(storeInfo.longitude), - ); - if (baseDate != null && baseDate.isSuccess) { - setState(() { - address = baseDate.data[0]; - }); - for (int i = 1; i < baseDate.data.length; i++) { - Address address1 = baseDate.data[i]; - - BMFCoordinate coordinate = await BMFCalculateUtils.coordConvert( - coordinate: BMFCoordinate( - double.tryParse(address.longitude), - double.tryParse(address.latitude), - ), - fromType: BMF_COORD_TYPE.COMMON, - toType: BMF_COORD_TYPE.BD09LL); - BMFCoordinate coordinate1 = await BMFCalculateUtils.coordConvert( - coordinate: BMFCoordinate( - double.tryParse(address1.longitude), - double.tryParse(address1.latitude), - ), - fromType: BMF_COORD_TYPE.COMMON, - toType: BMF_COORD_TYPE.BD09LL); - - double mi = await BMFCalculateUtils.getLocationDistance( - bmfCoordinate, coordinate); - double mi1 = await BMFCalculateUtils.getLocationDistance( - bmfCoordinate, coordinate1); - if (mi1 < mi) { - address = address1; - } - } - await queryOrderInfo( - address.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && - (subscribeParam?.isEnableSubscribe ?? false) == false && - selectedBtn != 1 && - selectedBtn != 2) - ? diningStatus - : selectedBtn, - null, - 0, - productId ?? null, - productSkuId ?? "", - actProductId ?? "", - actProductSkuId ?? "", - "AUTO", - // useVipPriceSelect, - // useBenefitSelect, - count1, - payChannel, - tableId); - } + queryOrderInfo( + address?.id, + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && + (subscribeParam?.isEnableSubscribe ?? false) == false && + selectedBtn != 1 && + selectedBtn != 2) + ? diningStatus + : selectedBtn, + null, + 0, + productId ?? null, + productSkuId ?? "", + actProductId ?? "", + actProductSkuId ?? "", + "AUTO", + // useVipPriceSelect, + // useBenefitSelect, + count1, + payChannel, + tableId); + return; + // BaseData> baseDate = + // await minService?.queryAddress().catchError((error) {}); + // + // BMFCoordinate bmfCoordinate = BMFCoordinate( + // double.tryParse(storeInfo.latitude), + // double.tryParse(storeInfo.longitude), + // ); + // if (baseDate.isSuccess) { + // setState(() { + // address = baseDate.data[0]; + // }); + // for (int i = 1; i < baseDate.data.length; i++) { + // Address address1 = baseDate.data[i]; + // + // BMFCoordinate coordinate = await BMFCalculateUtils.coordConvert( + // coordinate: BMFCoordinate( + // double.tryParse(address.longitude), + // double.tryParse(address.latitude), + // ), + // fromType: BMF_COORD_TYPE.COMMON, + // toType: BMF_COORD_TYPE.BD09LL); + // BMFCoordinate coordinate1 = await BMFCalculateUtils.coordConvert( + // coordinate: BMFCoordinate( + // double.tryParse(address1.longitude), + // double.tryParse(address1.latitude), + // ), + // fromType: BMF_COORD_TYPE.COMMON, + // toType: BMF_COORD_TYPE.BD09LL); + // + // double mi = await BMFCalculateUtils.getLocationDistance( + // bmfCoordinate, coordinate); + // double mi1 = await BMFCalculateUtils.getLocationDistance( + // bmfCoordinate, coordinate1); + // if (mi1 < mi) { + // address = address1; + // } + // } + // await queryOrderInfo( + // address.id, + // ((storeInfo.pickupType.dineInTakeStatus ?? false) == true && + // (subscribeParam.isEnableSubscribe ?? false) == false && + // selectedBtn != 1 && + // selectedBtn != 2) + // ? diningStatus + // : selectedBtn, + // null, + // 0, + // productId ?? null, + // productSkuId ?? "", + // actProductId ?? "", + // actProductSkuId ?? "", + // "AUTO", + // // useVipPriceSelect, + // // useBenefitSelect, + // count1, + // payChannel, + // tableId); + // } } ///选择收货地址 selectedAddress(String addId) async { - BaseData> baseDate = - await minService.queryAddress().catchError((error) {}); - - if (baseDate != null && baseDate.isSuccess) { + BaseData>? baseDate = await minService?.queryAddress().catchError((error) {}); + if (baseDate?.isSuccess ?? false) { setState(() { - baseDate.data.forEach((element) { + baseDate!.data?.forEach((element) { if (element.id == addId) address = element; }); }); queryOrderInfo( - address.id, + address?.id, ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && @@ -493,30 +488,30 @@ class _Settlement extends State { } } - PlaceOrderFirst placeOrderFirst; - DownOrder downOrder; + PlaceOrderFirst? placeOrderFirst; + DownOrder? downOrder; ///发起活动 queryLaunchAct() async { - BaseData baseData = await minService.launchAct({ - "actProductId": activityDetails.actProduct.id, + BaseData? baseData = await minService?.launchAct({ + "actProductId": activityDetails?.actProduct?.id, "actRecordId": 0, - "actTemplateId": activityDetails.actProduct.templateId, - "actTimeId": activityDetails.actProduct.timeId, - "addressId": address == null ? null : address.id, + "actTemplateId": activityDetails?.actProduct?.templateId, + "actTimeId": activityDetails?.actProduct?.timeId, + "addressId": address == null ? null : address!.id, "isDirectBuy": (bargainType == BargainType.BargainBug || bargainType == BargainType.CollageBug) ? false : true, "getType": selectedBtn, - "productId": activityDetails.actProduct.productId, + "productId": activityDetails?.actProduct?.productId, "skuId": actProductSkuId ?? "", - "skuPrice": settleOrderInfo.price, + "skuPrice": settleOrderInfo?.price, "templateType": pageType, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - launchJoinAct = baseData.data; + launchJoinAct = baseData!.data; if (bargainType == BargainType.BargainBug) { toBargain(); } else { @@ -531,27 +526,27 @@ class _Settlement extends State { ///参与活动 queryJoinAct() async { - BaseData baseData = await minService.joinAct({ - "actProductId": activityDetails.actProduct.id, + BaseData? baseData = await minService?.joinAct({ + "actProductId": activityDetails?.actProduct?.id, "actRecordId": widget.arguments["indexP"], - "actTemplateId": activityDetails.actProduct.templateId, - "actTimeId": activityDetails.actProduct.timeId, - "addressId": address == null ? null : address.id, + "actTemplateId": activityDetails?.actProduct?.templateId, + "actTimeId": activityDetails?.actProduct?.timeId, + "addressId": address == null ? null : address!.id, "isDirectBuy": (bargainType == BargainType.BargainBug || bargainType == BargainType.CollageBug) ? false : true, "getType": selectedBtn, - "productId": activityDetails.actProduct.productId, + "productId": activityDetails?.actProduct?.productId, "skuId": actProductSkuId ?? "", "skuPrice": skuPrice1, "templateType": pageType }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - launchJoinAct = baseData.data; + if (baseData?.isSuccess ?? false) { + launchJoinAct = baseData!.data; activityPay(); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } } @@ -569,88 +564,80 @@ class _Settlement extends State { // }); // } + if (settleOrderInfo == null || storeInfo == null) { + return; + } + placeOrderFirst = PlaceOrderFirst(); - placeOrderFirst.cartNum = settleOrderInfo.orderNum; - placeOrderFirst.cartSum = settleOrderInfo.price; - placeOrderFirst.addressId = address == null ? null : address.id; - placeOrderFirst.isSubscribe = + placeOrderFirst!.cartNum = settleOrderInfo!.orderNum; + placeOrderFirst?.cartSum = settleOrderInfo?.price; + placeOrderFirst?.addressId = address == null ? null : address!.id; + placeOrderFirst?.isSubscribe = ((subscribeParam?.isEnableSubscribe ?? false) == true) ? true : false; //是否预约 - placeOrderFirst.isTakeOut = - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && - (subscribeParam?.isEnableSubscribe ?? false) == false && + placeOrderFirst?.isTakeOut = ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && + !(subscribeParam?.isEnableSubscribe ?? false) && selectedBtn != 1 && selectedBtn != 2) ? diningStatus : selectedBtn; - placeOrderFirst.notes = remakers + + placeOrderFirst?.notes = remakers + (reservationTime ?? "") + ((subscribeParam?.isEnableSubscribe ?? false) == true ? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 - ? (subscribeParam.stores[0]) + ? (subscribeParam?.stores?[0]) : (subscribeStoresName ?? ""))}" : ""); - placeOrderFirst.numberOfPeople = "$numberOfPeople"; - placeOrderFirst.orderSource = 2; - placeOrderFirst.orderType = "0"; - placeOrderFirst.orderTypeId = 0; - placeOrderFirst.parentCode = parentCode; // 火锅加菜 - placeOrderFirst.parentId = parentId; // 火锅加菜 - placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") + placeOrderFirst?.numberOfPeople = "$numberOfPeople"; + placeOrderFirst?.orderSource = 2; + placeOrderFirst?.orderType = "0"; + placeOrderFirst?.orderTypeId = 0; + placeOrderFirst?.parentCode = parentCode; // 火锅加菜 + placeOrderFirst?.parentId = parentId; // 火锅加菜 + placeOrderFirst?.payChannel = ((placeOrderFirst?.cartSum == "0.00") ? payChannel = 0 : ((tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7 : payChannel)); - placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); - placeOrderFirst.promotionInfoDTO.promotionId = - (promotion != null && tableId <= 0) ? promotion.id : ""; + placeOrderFirst?.promotionInfoDTO = PromotionInfoDTOBean(); + placeOrderFirst?.promotionInfoDTO?.promotionId = (tableId <= 0) ? (promotion?.id ?? "") : ""; // : widget.arguments["pid"] ?? ""; - placeOrderFirst.promotionInfoDTO.couponId = - (couponListBean != null && tableId <= 0) ? couponListBean.id : ""; + placeOrderFirst?.promotionInfoDTO?.couponId = (tableId <= 0) ? (couponListBean?.id ?? "") : ""; // : widget.arguments["cid"] ?? ""; // placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect; // placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect; - placeOrderFirst.promotionInfoDTO.discountType = - (!placeOrder) ? "AUTO" : settleOrderInfo?.discountType ?? ""; - placeOrderFirst.recMobile = - (mobile == null || mobile == "") ? mobile : storeInfo.headMobile; - placeOrderFirst.shoppingCartSkuItemList = - settleOrderInfo.orderProductList; - placeOrderFirst.skuItemDTOList = []; - placeOrderFirst.source = 1; - placeOrderFirst.storeId = storeInfo.id; - placeOrderFirst.subcribeTime = subTime ?? ""; //预约时间 - placeOrderFirst.tableId = "$tableId"; - for (int i = 0; - i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); - i++) { - placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList = - shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; + placeOrderFirst?.promotionInfoDTO?.discountType = (!placeOrder) ? "AUTO" : settleOrderInfo?.discountType ?? ""; + placeOrderFirst?.recMobile = (mobile?.isNotEmpty ?? false) ? mobile! : storeInfo!.headMobile; + placeOrderFirst?.shoppingCartSkuItemList = settleOrderInfo!.orderProductList; + placeOrderFirst?.skuItemDTOList = []; + placeOrderFirst?.source = 1; + placeOrderFirst?.storeId = storeInfo!.id; + placeOrderFirst?.subcribeTime = subTime ?? ""; //预约时间 + placeOrderFirst?.tableId = "$tableId"; + for (int i = 0; i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); i++) { + placeOrderFirst?.shoppingCartSkuItemList?[i].setMealDataList = shopCarGoods!.shoppingCartSkuItemList?[i].setMealDataList; } if (tableId == 0) { ///正常的商店下单 - BaseData baseData = await minService - .placeOrderFirst(placeOrderFirst.toJson()) + BaseData? baseData = await minService?.placeOrderFirst(placeOrderFirst!.toJson()) .catchError((error) { print("error: $error"); }); - if (baseData != null && baseData.isSuccess) { - // EasyLoading.show(status: S.current.zhengzaijiazai, - // maskType: EasyLoadingMaskType.black); + if (baseData?.isSuccess ?? false) { placeOrder = true; - this.downOrder = DownOrder.fromJson(baseData.data); + this.downOrder = DownOrder.fromJson(baseData!.data); await querySettlement(); } else { // orderButton = false; - SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } } else { ///火锅店下单, 等待结算 - BaseData baseData; + BaseData? baseData; if (placeOrder) { // 结算 querySettlement(); @@ -658,30 +645,30 @@ class _Settlement extends State { } else { if (parentId == "") { // 下单 - baseData = await minService - .placeOrderFirst(placeOrderFirst.toJson()) + baseData = await minService?.placeOrderFirst(placeOrderFirst!.toJson()) .catchError((error) { print("error: $error"); }); } else { //加菜 - baseData = await minService - .addOrder(placeOrderFirst.toJson()) + baseData = await minService?.addOrder(placeOrderFirst!.toJson()) .catchError((error) { print("error: $error"); }); } } // orderButton = false; - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { placeOrder = true; - this.downOrder = DownOrder.fromJson(baseData.data); - parentId = this.downOrder.id ?? this.downOrder.parentId; - queryOrderDetails(parentId); - setState(() {}); + this.downOrder = DownOrder.fromJson(baseData!.data); + if (this.downOrder != null) { + parentId = this.downOrder?.id ?? this.downOrder!.parentId; + queryOrderDetails(parentId); + setState(() {}); + } } else { // orderButton = false; - SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } } }finally{ @@ -689,14 +676,16 @@ class _Settlement extends State { } } + ///结算 querySettlement() async { - placeOrderFirst.id = ((parentId != "") ? parentId : downOrder.id); - placeOrderFirst.orderProductVOList = ((downOrder == null) - ? minOrderInfo.orderProductVOList - : downOrder.orderProductVOList); + if (placeOrderFirst == null || minOrderInfo == null || downOrder == null) { + return; + } + placeOrderFirst?.id = ((parentId?.isNotEmpty ?? false) ? parentId : downOrder?.id); + placeOrderFirst?.orderProductVOList = ((downOrder == null) ? minOrderInfo!.orderProductVOList : downOrder!.orderProductVOList); - if (placeOrderFirst.payChannel == 1) { + if (placeOrderFirst?.payChannel == 1) { if (Platform.isAndroid) { if (!(await Min.isInitialize())) { // 小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, @@ -705,51 +694,54 @@ class _Settlement extends State { await Min.initialize(); } } - BaseData baseData = await minService - .settlementWx(placeOrderFirst.toJson()) + BaseData? baseData = await minService?.settlementWx(placeOrderFirst!.toJson()) .catchError((error) { print(error); }); // orderButton = false; - if (baseData != null && baseData.isSuccess) { - WxPay wxPay = baseData.data; - await registerWxApi( - appId: wxPay.appId, + if (baseData?.isSuccess ?? false) { + WxPay? wxPay = baseData!.data; + if (wxPay?.isAnyEmpty() ?? true) { + return; + } + await fluwx.registerApi( + appId: wxPay!.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + ) ); }else{ EasyLoading.dismiss(); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); Future.delayed(Duration(seconds:2), () { - toOrderDetails(placeOrderFirst.id); + toOrderDetails(placeOrderFirst!.id); }); } } else { - BaseData baseData = await minService - .settlementApi(placeOrderFirst.toJson()) + BaseData? baseData = await minService?.settlementApi(placeOrderFirst!.toJson()) .catchError((error) { print(error); }); // orderButton = false; - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { // SmartDialog.showToast(baseData.data, alignment: Alignment.center); - toOrderDetails(placeOrderFirst.id); + toOrderDetails(placeOrderFirst!.id); } else { SmartDialog.show( clickBgDismissTemp: false, widget: SettlementTips( () { - toOrderDetails(placeOrderFirst.id); + toOrderDetails(placeOrderFirst!.id); }, text: "${baseData?.msg}", )); @@ -768,56 +760,59 @@ class _Settlement extends State { await Min.initialize(); } } - BaseData baseData = await minService.actPay({ - "orderId": - bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId, - "payChannel": placeOrderFirst.payChannel + BaseData? baseData = await minService?.actPay({ + "orderId": bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId, + "payChannel": placeOrderFirst!.payChannel }).catchError((error) { print(error); }); - if (baseData != null && baseData.isSuccess) { - WxPay wxPay = baseData.data; - await registerWxApi( - appId: wxPay.appId, + if (baseData?.isSuccess ?? false) { + WxPay? wxPay = baseData!.data; + if (wxPay?.isAnyEmpty() ?? true) { + return; + } + await fluwx.registerApi( + appId: wxPay!.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + ) ); } } else { - BaseData baseData = await minService.actPay({ - "orderId": - bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId, + BaseData? baseData = await minService?.actPay({ + "orderId": bargainOrderId != null ? bargainOrderId : launchJoinAct?.orderId, "payChannel": payChannel }).catchError((error) { print(error); }); - if (baseData != null && baseData.isSuccess) { - toOrderDetails( - bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId); + if (baseData?.isSuccess ?? false) { + toOrderDetails(bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId); } else { SmartDialog.show( widget: SettlementTips( () { - toOrderDetails(bargainOrderId != null - ? bargainOrderId - : launchJoinAct.orderId); + toOrderDetails(bargainOrderId != null ? bargainOrderId! : launchJoinAct?.orderId); }, - text: "${baseData.msg}", + text: "${baseData?.msg}", )); } } } - toOrderDetails(String orderId) { + toOrderDetails(String? orderId) { + if (orderId == null) { + return; + } EasyLoading.dismiss(); Navigator.of(context).pushReplacementNamed( '/router/order_details', @@ -834,7 +829,7 @@ class _Settlement extends State { toBargain() async { await Navigator.of(context) .pushReplacementNamed('/router/bargain_details', arguments: { - "actRecordId": launchJoinAct.actRecordId, + "actRecordId": launchJoinAct?.actRecordId, // "limitNumber": limitNumber, "storeInfo": storeInfo, }); @@ -866,7 +861,7 @@ class _Settlement extends State { leadingColor: Colors.white, title: S.of(context).dingdanjiesuan, titleColor: Colors.white, - brightness: Brightness.dark, + systemUiOverlayStyle: SystemUiOverlayStyle.dark, titleSize: 18.sp, ), body: Container( @@ -880,21 +875,14 @@ class _Settlement extends State { child: Column( children: [ DistributionMode( - (addressId, isTake, memberCouponId, orderId, - promotionId) { + (addressId, isTake, memberCouponId, orderId, String? promotionId) { setState(() { this.selectedBtn = 0; }); queryOrderInfo( addressId, - ((storeInfo?.pickupType - ?.dineInTakeStatus ?? - false) == - true && - (subscribeParam - ?.isEnableSubscribe ?? - false) == - false && + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && + (subscribeParam?.isEnableSubscribe ?? false) && selectedBtn != 1 && selectedBtn != 2) ? diningStatus @@ -925,15 +913,10 @@ class _Settlement extends State { ), ///堂食/打包 - if ((storeInfo?.pickupType?.dineInTakeStatus ?? - false) == - true && - (subscribeParam?.isEnableSubscribe ?? - false) == - false && + if ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && + !(subscribeParam?.isEnableSubscribe ?? false) && selectedBtn != 1 && - selectedBtn != 2 && - settleOrderInfo != null) + selectedBtn != 2) takeStatus(), /// 预留的手机号, 可修改 @@ -990,7 +973,7 @@ class _Settlement extends State { "remake": remakers }).then((value) => { setState(() { - if (value != null) remakers = value; + if (value != null) remakers = value as String; }) }); }, @@ -1011,8 +994,7 @@ class _Settlement extends State { subscribeStoresName, ), - if (settleOrderInfo != null && - placeOrder && + if (placeOrder && joinA != JoinActivity.BargainBug) ///支付方式 @@ -1059,8 +1041,8 @@ class _Settlement extends State { ), Text( (minOrderInfo != null - ? "¥${minOrderInfo.finalPayPrice}" - : "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}"), + ? "¥${minOrderInfo!.finalPayPrice}" + : "¥${settleOrderInfo == null ? "0" : settleOrderInfo!.price}"), style: TextStyle( fontSize: 20.sp, fontWeight: MyFontWeight.medium, @@ -1092,12 +1074,9 @@ class _Settlement extends State { // return; // } else // orderButton = true; - if (subscribeParam != null && - ((subscribeParam.isEnableSubscribe ?? false) == - true) && - (reservationTime == null || - ((subscribeParam.stores.length == 1 - ? subscribeParam.stores[0] + if (((subscribeParam?.isEnableSubscribe ?? false)) && + (((subscribeParam?.stores?.length == 1 + ? subscribeParam?.stores![0] : subscribeStoresName) == null))) { SmartDialog.showToast( @@ -1153,23 +1132,24 @@ class _Settlement extends State { Expanded( child: GestureDetector( onTap: () { + if (settleOrderInfo == null) { + return; + } setState(() { diningStatus = 4; queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == - true && - (subscribeParam?.isEnableSubscribe ?? false) == - false && + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && + !(subscribeParam?.isEnableSubscribe ?? false) && selectedBtn != 1 && selectedBtn != 2) ? diningStatus : selectedBtn, - (settleOrderInfo.isRaise || payChannel == 5) + ((settleOrderInfo!.isRaise ?? false) || payChannel == 5) ? "" : couponListBean?.id, 0, - (settleOrderInfo.isRaise || payChannel == 5) + ((settleOrderInfo!.isRaise ?? false) || payChannel == 5) ? "" : promotion?.id ?? productId, productSkuId ?? "", @@ -1248,6 +1228,9 @@ class _Settlement extends State { Expanded( child: GestureDetector( onTap: () { + if (settleOrderInfo == null) { + return; + } setState(() { diningStatus = 3; queryOrderInfo( @@ -1260,11 +1243,11 @@ class _Settlement extends State { selectedBtn != 2) ? diningStatus : selectedBtn, - (settleOrderInfo.isRaise || payChannel == 5) + ((settleOrderInfo!.isRaise ?? false) || payChannel == 5) ? "" : couponListBean?.id, 0, - (settleOrderInfo.isRaise || payChannel == 5) + ((settleOrderInfo!.isRaise ?? false) || payChannel == 5) ? "" : promotion?.id ?? productId, productSkuId ?? "", @@ -1288,12 +1271,10 @@ class _Settlement extends State { borderRadius: BorderRadius.all(Radius.circular(6)), border: Border.all( width: diningStatus == 3 ? 2.w : 1.w, - color: - diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE), + color: diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE), style: BorderStyle.solid, ), - color: - diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), + color: diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), ), padding: EdgeInsets.only(top: 11.h, bottom: 14.h), child: Row( @@ -1386,6 +1367,9 @@ class _Settlement extends State { if (tableId > 0) { queryOrderDetails(parentId); } else { + if (settleOrderInfo == null) { + return; + } queryOrderInfo( address?.id, ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && @@ -1394,11 +1378,11 @@ class _Settlement extends State { selectedBtn != 2) ? diningStatus : selectedBtn, - (settleOrderInfo.isRaise || payChannel == 5) + ((settleOrderInfo!.isRaise ?? false) || payChannel == 5) ? "" : couponListBean?.id, 0, - (settleOrderInfo.isRaise || payChannel == 5) + ((settleOrderInfo!.isRaise ?? false) || payChannel == 5) ? "" : widget.arguments["pid"] ?? (promotion?.id ?? productId), productSkuId ?? "", @@ -1423,17 +1407,20 @@ class _Settlement extends State { } String preferentialType() { - if (settleOrderInfo.isRaise || payChannel == 5) return "NONE"; - if (settleOrderInfo.discountType == "ACTIVITY") { + if (settleOrderInfo == null) { + return "AUTO"; + } + if ((settleOrderInfo!.isRaise ?? false) || payChannel == 5) return "NONE"; + if (settleOrderInfo!.discountType == "ACTIVITY") { return "ACTIVITY"; - } else if (settleOrderInfo.discountType == "COUPON") { + } else if (settleOrderInfo!.discountType == "COUPON") { return "COUPON"; - } else if (settleOrderInfo.discountType == "SURPRISE") { + } else if (settleOrderInfo!.discountType == "SURPRISE") { return "SURPRISE"; - } else if (settleOrderInfo.discountType == "MEMBER_RANK" || - settleOrderInfo.discountType == "SURPRISE") { + } else if (settleOrderInfo!.discountType == "MEMBER_RANK" || + settleOrderInfo!.discountType == "SURPRISE") { return "MEMBER_RANK"; - } else if (settleOrderInfo.discountType == "VIP") { + } else if (settleOrderInfo!.discountType == "VIP") { return "VIP"; } else { return "AUTO"; @@ -1502,11 +1489,10 @@ class _Settlement extends State { } int couponCount() { - if (settleOrderInfo == null || - settleOrderInfo.couponList == null || - settleOrderInfo.couponList.length == 0) return 0; + if (settleOrderInfo?.couponList?.isEmpty ?? true) + return 0; int count = 0; - settleOrderInfo.couponList.forEach((element) { + settleOrderInfo!.couponList?.forEach((element) { if (element.tenantCode == "") { count++; } @@ -1534,24 +1520,23 @@ class _Settlement extends State { // promotions = ""; // this.promotion = null; if (tableId > 0) { - if (couponBean == null) queryCancelMemberCoupon(parentId); - if (couponBean.id != null) queryUseMemberCoupon(couponBean.id); + queryUseMemberCoupon(couponBean.id); } else { queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && - (subscribeParam?.isEnableSubscribe ?? false) == false && + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && + (subscribeParam?.isEnableSubscribe ?? false) && selectedBtn != 1 && selectedBtn != 2) ? diningStatus : selectedBtn, - ((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? 0: couponBean?.id, + ((couponBean.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? 0: couponBean.id, 0, - ((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? promotion?.id ?? productId :0, + ((couponBean.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? promotion?.id ?? productId :0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (couponBean?.id ?? 0) == 0 ? ((promotion?.id ?? productId ?? 0) !=0 ? "ACTIVITY":"AUTO") : "COUPON", + (couponBean.id ?? 0) == 0 ? ((promotion?.id ?? productId ?? 0) !=0 ? "ACTIVITY":"AUTO") : "COUPON", // useVipPriceSelect, // useBenefitSelect, count1, @@ -1579,19 +1564,19 @@ class _Settlement extends State { // this.couponListBean = null; queryOrderInfo( address?.id, - ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && - (subscribeParam?.isEnableSubscribe ?? false) == false && + ((storeInfo?.pickupType?.dineInTakeStatus ?? false) && + (subscribeParam?.isEnableSubscribe ?? false) && selectedBtn != 1 && selectedBtn != 2) ? diningStatus : selectedBtn, - (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0)?couponListBean?.id:0, + (((pro.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0)?couponListBean?.id:0, 0, - (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0) ? 0 :((pro?.id ?? 0) ?? productId), + (((pro.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0) ? 0 :((pro.id ?? 0) ?? productId), productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 ? ((couponListBean?.id ??0) != 0 ? "COUPON":"AUTO") : "ACTIVITY"), + (((pro.id ?? 0) ?? (productId ?? 0)) == 0 ? ((couponListBean?.id ??0) != 0 ? "COUPON":"AUTO") : "ACTIVITY"), // useVipPriceSelect, // useBenefitSelect, count1, @@ -1601,15 +1586,14 @@ class _Settlement extends State { ///立即预约时间选择 showDateSelector() { - var minTime = DateTime.now().isAfter( - DateTime.tryParse(subscribeParam?.subscribeStartTime ?? "")) + var minTime = DateTime.now().isAfter(DateTime.tryParse(subscribeParam?.subscribeStartTime ?? "") ?? DateTime.now()) ? DateTime.now() : DateTime.tryParse(subscribeParam?.subscribeStartTime ?? ""); DatePicker.showDateTimePicker(context, showTitleActions: true, minTime: minTime, maxTime: DateTime.tryParse(subscribeParam?.subscribeEndTime ?? ""), - theme: DatePickerTheme( + theme: picker_theme.DatePickerTheme( headerColor: Colors.white, backgroundColor: Colors.white, itemStyle: TextStyle( @@ -1631,14 +1615,14 @@ class _Settlement extends State { showAlertDialog() { showModalBottomSheet( builder: (BuildContext context) { - return StatefulBuilder(builder: ( - context, - state, - ) { + return StatefulBuilder(builder: (context, state) { return Container( width: double.infinity, height: 300.h, - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h), + padding: EdgeInsets.symmetric( + horizontal: 14.w, + vertical: 16.h, + ), decoration: new BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( @@ -1666,7 +1650,7 @@ class _Settlement extends State { color: Color(0xFF353535), ), ), - )), + ),), GestureDetector( onTap: () { setState(() { @@ -1684,7 +1668,7 @@ class _Settlement extends State { ), Expanded( child: ListView.builder( - itemCount: subscribeParam.stores.length ?? 0, + itemCount: subscribeParam?.stores?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { @@ -1694,13 +1678,13 @@ class _Settlement extends State { }, child: storesNameItem(position), ); - }), + }, + ), ), GestureDetector( onTap: () { setState(() { - subscribeStoresName = - subscribeParam.stores[storesIndex]; + subscribeStoresName = subscribeParam?.stores?[storesIndex]; }); Navigator.of(context).pop(); }, @@ -1731,7 +1715,8 @@ class _Settlement extends State { }); }, backgroundColor: Colors.transparent, - context: context); + context: context, + ); } Widget storesNameItem(index) { @@ -1749,7 +1734,7 @@ class _Settlement extends State { color: storesIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7), ), child: Text( - subscribeParam.stores[index], + subscribeParam?.stores![index] ?? "", style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 16.sp, diff --git a/lib/settlement/settlement_view/activity.dart b/lib/settlement/settlement_view/activity.dart index 4f17b455..2df70986 100644 --- a/lib/settlement/settlement_view/activity.dart +++ b/lib/settlement/settlement_view/activity.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -9,10 +9,10 @@ import 'package:huixiang/view_widget/round_button.dart'; class ActivityWidget extends StatefulWidget { final PromotionInfoListBean promotionInfoListBean; - final StoreInfo storeInfo; + final StoreInfo? storeInfo; final int index; - final Function() callback; + final Function()? callback; ActivityWidget(this.promotionInfoListBean, this.storeInfo, this.index, { this.callback, }); @@ -48,7 +48,7 @@ class _ActivityWidget extends State { children: [ MImage( widget.promotionInfoListBean != null - ? widget.promotionInfoListBean.image + ? "${widget.promotionInfoListBean.image}" : "", fit: BoxFit.cover, aspectRatio: 1, @@ -101,7 +101,7 @@ class _ActivityWidget extends State { ), IconText( widget.promotionInfoListBean != null - ? ("${widget.promotionInfoListBean.activityStartTime.split(" ")[0].replaceAll("-", ".")}-${widget.promotionInfoListBean.activityEndTime.split(" ")[0].replaceAll("-", ".")}") + ? ("${widget.promotionInfoListBean.activityStartTime?.split(" ")[0].replaceAll("-", ".")}-${widget.promotionInfoListBean.activityEndTime?.split(" ")[0].replaceAll("-", ".")}") : "", leftIcon: Icons.circle, iconColor: Color(0xFF32A060), @@ -134,8 +134,7 @@ class _ActivityWidget extends State { color: Color(0xFFACACAC), ), ), - if (widget.promotionInfoListBean != null && - widget.promotionInfoListBean.canPartake) + if (widget.promotionInfoListBean.canPartake ?? false) RoundButton( text: "选择活动", textColor: Colors.white, diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index db8522c9..28c787a5 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -1,13 +1,14 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/subscribe_param.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/min_order_info.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; +import 'package:huixiang/data/min_order_info.dart'; + import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../../retrofit/data/miNiDetail.dart'; + import '../../view_widget/settlement_tips_dialog.dart'; @@ -18,8 +19,8 @@ class ActivityCouponRemarks extends StatefulWidget { final String coupons; final String promotions; - final SettleOrderInfo settleOrderInfo; - final MinOrderInfo minOrderInfo; + final SettleOrderInfo? settleOrderInfo; + final MinOrderInfo? minOrderInfo; final int couponCount; final bool placeOrder; final String remark; @@ -28,12 +29,12 @@ class ActivityCouponRemarks extends StatefulWidget { final Function showVipTips; final Function(bool useBenefitSelect) vipBenefitSelect; final int payChannell; - final String vipLevelName; - final SubscribeParam subscribeParam; + final String? vipLevelName; + final SubscribeParam? subscribeParam; final Function() showDateSelector; - final String reservationTime; + final String? reservationTime; final Function() showAlertDialog; - final String subscribeStoresName; + final String? subscribeStoresName; ActivityCouponRemarks( this.couponCart, @@ -311,7 +312,7 @@ class _ActivityCouponRemarks extends State { // ), if (widget.placeOrder && widget.tableId <= 0 && - !(widget?.settleOrderInfo?.isRaise ?? false)) + !(widget.settleOrderInfo?.isRaise ?? false)) InkWell( onTap: () { if (widget.payChannell == 5) { @@ -355,14 +356,14 @@ class _ActivityCouponRemarks extends State { ], ), ), - if (widget.placeOrder && !(widget?.settleOrderInfo?.isRaise ?? false)) + if (widget.placeOrder && !(widget.settleOrderInfo?.isRaise ?? false)) SizedBox( height: 13.h, ), if (widget.placeOrder && (widget.tableId > 0 - ? !(widget?.minOrderInfo?.isRaise ?? false) - : !(widget?.settleOrderInfo?.isRaise ?? false))) + ? !(widget.minOrderInfo?.isRaise ?? false) + : !(widget.settleOrderInfo?.isRaise ?? false))) InkWell( onTap: () { if (widget.payChannell == 5) { @@ -408,8 +409,8 @@ class _ActivityCouponRemarks extends State { ), if (widget.placeOrder && (widget.tableId > 0 - ? !(widget?.minOrderInfo?.isRaise ?? false) - : !(widget?.settleOrderInfo?.isRaise ?? false))) + ? !(widget.minOrderInfo?.isRaise ?? false) + : !(widget.settleOrderInfo?.isRaise ?? false))) SizedBox( height: 13, ), @@ -499,7 +500,7 @@ class _ActivityCouponRemarks extends State { if ((widget.subscribeParam?.isEnableSubscribe ?? false) == true) InkWell( onTap: () { - if (widget.subscribeParam.stores.length > 1) + if ((widget.subscribeParam?.stores?.length ?? 0) > 1) widget.showAlertDialog(); }, child: Row( @@ -519,8 +520,8 @@ class _ActivityCouponRemarks extends State { ), Expanded( child: Text( - ((widget.subscribeParam.stores.length == 1) - ? widget?.subscribeParam?.stores[0] + ((widget.subscribeParam?.stores?.length == 1) + ? widget.subscribeParam?.stores![0] : widget.subscribeStoresName) ?? "请选择店铺", textAlign: TextAlign.end, @@ -545,14 +546,11 @@ class _ActivityCouponRemarks extends State { String activityText() { String promotion = ""; - if (widget.promotions == null || widget.promotions == "") { + if (widget.promotions == "") { promotion = "未选择任何活动"; - if (widget.settleOrderInfo == null || - widget.settleOrderInfo.promotionInfoList == null) { - promotion = "暂无可选活动"; - } else if (widget.coupons != null && widget.coupons != "") { - promotion = "活动与优惠券不可同享"; - } + if (widget.coupons != "") { + promotion = "活动与优惠券不可同享"; + } } else { promotion = widget.promotions; } @@ -561,20 +559,16 @@ class _ActivityCouponRemarks extends State { String couponText() { String coupon = ""; - if (widget.coupons == null || widget.coupons == "") { + if (widget.coupons == "") { coupon = "未选择任何优惠券"; - if (widget.placeOrder) if (widget.minOrderInfo == null || - widget.minOrderInfo.orderInfoVo.couponList == null) { + if (widget.placeOrder) if (widget.minOrderInfo?.orderInfoVo?.couponList == null) { coupon = "未选择任何优惠券"; - } else if (widget.promotions != null && widget.promotions != "") { - coupon = "优惠券与活动不可同享"; - } - if (widget.settleOrderInfo == null || - widget.settleOrderInfo.couponList == null) { - coupon = "暂无可选优惠券"; - } else if (widget.promotions != null && widget.promotions != "") { + } else if (widget.promotions != "") { coupon = "优惠券与活动不可同享"; } + if (widget.promotions != "") { + coupon = "优惠券与活动不可同享"; + } } else { coupon = widget.coupons; } diff --git a/lib/settlement/settlement_view/coupon.dart b/lib/settlement/settlement_view/coupon.dart index c285cc4e..c6c3474c 100644 --- a/lib/settlement/settlement_view/coupon.dart +++ b/lib/settlement/settlement_view/coupon.dart @@ -1,15 +1,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/data/settle_order_info.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/separator.dart'; class CouponWidget extends StatefulWidget { - final CouponListBean couponList; - final StoreInfo storeInfo; + final CouponListBean? couponList; + final StoreInfo? storeInfo; final bool selected; CouponWidget( @@ -137,7 +137,7 @@ class _CouponWidget extends State { ), Expanded( child: Text( - widget.storeInfo.storeName, + widget.storeInfo?.storeName ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 16.sp, @@ -150,7 +150,7 @@ class _CouponWidget extends State { ], ), Text( - widget.couponList.promotionName, + widget.couponList?.promotionName ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 14.sp, @@ -168,7 +168,7 @@ class _CouponWidget extends State { fontSize: 12.sp, ), ), - if (widget.couponList.usable) + if (widget.couponList?.usable ?? false) Container( margin: EdgeInsets.only(right: 23.w), child: GestureDetector( @@ -239,8 +239,8 @@ class _CouponWidget extends State { ), //点击按钮布局 onTap: () { setState(() { - widget.couponList.isEx = - !(widget.couponList.isEx ?? false); + widget.couponList?.isEx = + !(widget.couponList?.isEx ?? false); }); }, ), @@ -258,10 +258,10 @@ class _CouponWidget extends State { ), ), Text( - (widget.couponList.useStartTime == null && - widget.couponList.useEndTime == null) + (widget.couponList?.useStartTime == null && + widget.couponList?.useEndTime == null) ? S.of(context).quantian - : "${widget.couponList.useStartTime.replaceAll("-", ".").split(" ")[0]} - ${widget.couponList.useEndTime.replaceAll("-", ".").split(" ")[0]}", + : "${widget.couponList?.useStartTime!.replaceAll("-", ".").split(" ")[0]} - ${widget.couponList?.useEndTime!.replaceAll("-", ".").split(" ")[0]}", style: TextStyle( color: Color(0xFF353535), fontSize: 10.sp, @@ -270,7 +270,7 @@ class _CouponWidget extends State { ], ), if ((widget.couponList?.isEx ?? false) && - (widget.couponList.usableReason != null)) + (widget.couponList?.usableReason != null)) Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -288,14 +288,15 @@ class _CouponWidget extends State { child: Align( alignment: Alignment.centerRight, child: Text( - widget.couponList.usableReason ?? "", + widget.couponList?.usableReason ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF353535), fontSize: 10.sp, ), ), - )), + ), + ), ], ), ], @@ -308,7 +309,7 @@ class _CouponWidget extends State { } Widget couponListWidget(BuildContext context) { - if (widget.couponList.bizType == 1) { + if (widget.couponList?.bizType == 1) { return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -331,7 +332,7 @@ class _CouponWidget extends State { ), Text( widget.couponList != null - ? "${AppUtils.calculateDouble(double.tryParse(widget.couponList.discountAmount) ?? 0)}" + ? "${AppUtils.calculateDouble(double.tryParse("${widget.couponList?.discountAmount}") ?? 0)}" : "", style: TextStyle( fontSize: 30.sp, @@ -343,7 +344,7 @@ class _CouponWidget extends State { ), Text( S.of(context).manyuankeyong(widget.couponList != null - ? ("${widget.couponList.fullAmount}" ?? "0").toString() + ? ("${widget.couponList?.fullAmount ?? "0"}").toString() : ""), style: TextStyle( fontSize: 12.sp, @@ -353,7 +354,7 @@ class _CouponWidget extends State { ), ], ); - } else if (widget.couponList.bizType == 3) { + } else if (widget.couponList?.bizType == 3) { return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -379,7 +380,7 @@ class _CouponWidget extends State { ), ], ); - } else if (widget.couponList.bizType == 5) { + } else if (widget.couponList?.bizType == 5) { return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -405,7 +406,7 @@ class _CouponWidget extends State { ), ], ); - } else if (widget.couponList.bizType == 6) { + } else if (widget.couponList?.bizType == 6) { return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -420,7 +421,7 @@ class _CouponWidget extends State { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.medium, - color: widget.couponList.status == 3 + color: widget.couponList?.status == 3 ? Color(0xFFB3B3B3) : Color(0xff32A060), ), @@ -430,7 +431,7 @@ class _CouponWidget extends State { ), Text( widget.couponList != null - ? "${AppUtils.calculateDouble(double.tryParse(widget.couponList.limitAmount) ?? 0)}" + ? "${AppUtils.calculateDouble(double.tryParse("${widget.couponList?.limitAmount}") ?? 0)}" : "", style: TextStyle( fontSize: 28.sp, @@ -454,7 +455,7 @@ class _CouponWidget extends State { children: [ Text( widget.couponList != null - ? "${(widget.couponList.discountPercent / 10.0 >= 10) ? 10 : widget.couponList.discountPercent / 10.0}" ?? + ? "${((widget.couponList!.discountPercent ?? 0) / 10.0 >= 10) ? 10 : (widget.couponList!.discountPercent ?? 0) / 10.0}" ?? "0" : "", style: TextStyle( diff --git a/lib/settlement/settlement_view/distribution.dart b/lib/settlement/settlement_view/distribution.dart index 6e93ceb7..4b71400f 100644 --- a/lib/settlement/settlement_view/distribution.dart +++ b/lib/settlement/settlement_view/distribution.dart @@ -1,12 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; -import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:huixiang/data/address.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/address.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/location.dart'; @@ -15,18 +13,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class DistributionMode extends StatefulWidget { final Function( - String addressId, + String? addressId, int isTake, - String memberCouponId, + String? memberCouponId, int orderId, - String promotionId, + String? promotionId, ) queryOrderInfo; final Function(int selectedBtn) queryAddress; final Function(String addId) selectedNewAddress; - final StoreInfo storeInfo; - final Address address; - final String pageType; - final double distance; + final StoreInfo? storeInfo; + final Address? address; + final String? pageType; + final double? distance; DistributionMode(this.queryOrderInfo, this.queryAddress, this.storeInfo, this.address, this.selectedNewAddress, this.pageType, this.distance); @@ -44,7 +42,7 @@ class _DistributionMode extends State { "assets/svg/dingdan_wuliu.svg", ]; - BMFCoordinate myLatLng; + BMFCoordinate? myLatLng; String distance = "0"; int selectedBtn = 0; @@ -57,24 +55,28 @@ class _DistributionMode extends State { ///定位获取当前的位置 void startLocation() async { - Location.getInstance().startLocation(context, (BaiduLocation result) { - if (result != null && - result.latitude != null && + Location.instance.startLocation(context, (BaiduLocation result) { + if (result.latitude != null && result.longitude != null) { print("location: $result"); - myLatLng = BMFCoordinate(result.latitude, result.longitude); + myLatLng = BMFCoordinate(result.latitude!, result.longitude!); calculate(); - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); } }); } calculate() async { + if (widget.storeInfo == null) { + return; + } BMFCoordinate bmfCoordinate = BMFCoordinate( - double.tryParse(widget.storeInfo.latitude), - double.tryParse(widget.storeInfo.longitude), + double.tryParse("${widget.storeInfo!.latitude}") ?? 0, + double.tryParse("${widget.storeInfo!.longitude}") ?? 0, ); - distance = await AppUtils.calculateDistance(bmfCoordinate, myLatLng); + if (myLatLng != null) { + distance = await AppUtils.calculateDistance(bmfCoordinate, myLatLng!); + } setState(() {}); } @@ -124,8 +126,7 @@ class _DistributionMode extends State { onTap: () { setState(() { selectedBtn = 0; - widget.queryOrderInfo( - null, selectedBtn, null, 0, null); + widget.queryOrderInfo(null, selectedBtn, null, 0, null); }); }, child: Container( @@ -160,7 +161,7 @@ class _DistributionMode extends State { height: 50.h, alignment: Alignment.center, child: Text( - (widget?.storeInfo?.pickupType?.takeawayStatus ?? false) == false ? "" :S.of(context).waimaipeisong, + (widget.storeInfo?.pickupType?.takeawayStatus ?? false) ? "" :S.of(context).waimaipeisong, style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.regular, @@ -188,7 +189,7 @@ class _DistributionMode extends State { height: 50.h, alignment: Alignment.center, child: Text( - (widget?.storeInfo?.pickupType?.expressDeliveryStatus ?? false) == false ? "" :S.of(context).kuaidiwuliu, + (widget.storeInfo?.pickupType?.expressDeliveryStatus ?? false) ? "" :S.of(context).kuaidiwuliu, style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.regular, @@ -211,14 +212,13 @@ class _DistributionMode extends State { children: [ Expanded( child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, children: [ Text( widget.storeInfo != null - ? (widget.storeInfo.storeName ?? "") + ? (widget.storeInfo!.storeName ?? "") : "", overflow: TextOverflow.ellipsis, style: TextStyle( @@ -231,9 +231,7 @@ class _DistributionMode extends State { height: 6, ), Text( - widget.storeInfo != null - ? widget.storeInfo.address - : "", + widget.storeInfo!.address ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -323,13 +321,13 @@ class _DistributionMode extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Image.asset( - (widget.storeInfo?.pickupType?.expressDeliveryStatus ?? false == true) ? "assets/image/order_wl.webp":"assets/image/icon_permission_location.webp", + (widget.storeInfo?.pickupType?.expressDeliveryStatus ?? false) ? "assets/image/order_wl.webp":"assets/image/icon_permission_location.webp", height: 24.h, width: 24.w, ), SizedBox(width: 5), Text( - widget?.address?.username ?? "", + widget.address?.username ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 15.sp, @@ -342,7 +340,7 @@ class _DistributionMode extends State { ), Expanded( child: Text( - widget?.address?.phone ?? "", + widget.address?.phone ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -378,9 +376,9 @@ class _DistributionMode extends State { Padding( padding: EdgeInsets.only(top: 4.h, left: 25.w), child: Text( - (widget?.address?.city ?? "") + - (widget?.address?.area ?? "") + - (widget?.address?.address ?? ""), + (widget.address?.city ?? "") + + (widget.address?.area ?? "") + + (widget.address?.addressStr ?? ""), overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( diff --git a/lib/settlement/settlement_view/edit_phone.dart b/lib/settlement/settlement_view/edit_phone.dart index c9bf175a..c05d641a 100644 --- a/lib/settlement/settlement_view/edit_phone.dart +++ b/lib/settlement/settlement_view/edit_phone.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -21,7 +21,7 @@ class EditPhoneWidget extends StatefulWidget { class _EditPhoneWidget extends State { bool isEdit = false; - TextEditingController _vc; + late TextEditingController _vc; @override void initState() { @@ -104,9 +104,7 @@ class _EditPhoneWidget extends State { height: 25.h, alignment: Alignment.centerRight, child: Text( - widget.storeInfo != null - ? widget.storeInfo.headMobile - : "", + widget.storeInfo.headMobile ?? "", overflow: TextOverflow.ellipsis, textAlign: TextAlign.end, style: TextStyle( @@ -120,7 +118,7 @@ class _EditPhoneWidget extends State { GestureDetector( onTap: () { String mobile = _vc.text; - if (mobile != null && AppUtils.isPhone(mobile)) { + if (AppUtils.isPhone(mobile)) { widget.mobileChange(mobile); widget.storeInfo.headMobile = mobile; } diff --git a/lib/settlement/settlement_view/pay_method.dart b/lib/settlement/settlement_view/pay_method.dart index dac2da36..20f7ff74 100644 --- a/lib/settlement/settlement_view/pay_method.dart +++ b/lib/settlement/settlement_view/pay_method.dart @@ -2,24 +2,23 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/data/settle_order_info.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../../retrofit/data/min_order_info.dart'; -import '../../retrofit/data/settleOrderInfo.dart'; import '../../view_widget/settlement_tips_dialog.dart'; -import '../../view_widget/tips_dialog.dart'; class PayMethod extends StatefulWidget { final Function(int payChannel) payChannelCheck; final String coupons; final String promotions; final bool useVipPriceSelect; - final SettleOrderInfo settleOrderInfo; + final SettleOrderInfo? settleOrderInfo; final bool useBenefitSelect; final int tableId; - final MinOrderInfo minOrderInfo; + final MinOrderInfo? minOrderInfo; PayMethod(this.payChannelCheck,this.coupons,this.promotions,this.useVipPriceSelect,this.settleOrderInfo,this.useBenefitSelect,this.tableId,this.minOrderInfo); @@ -38,15 +37,16 @@ class _PayMethod extends State { @override void initState() { super.initState(); - checkIndex = ((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? 4:5; + checkIndex = ((widget.minOrderInfo != null) ? (widget.minOrderInfo?.isRaise??false) : (widget.settleOrderInfo?.isRaise ?? false)) ? 4:5; SharedPreferences.getInstance().then((value) { - Map memberInfo = - jsonDecode(value.getString("minMember")); - balance = memberInfo["balance"]; - money = memberInfo["money"]; - mGreenMoney = memberInfo["greenMoney"]; - mRaiseMoney = memberInfo["raiseMoney"]; - setState(() {}); + if (value.getString("minMember")?.isNotEmpty ?? false) { + Map memberInfo = jsonDecode(value.getString("minMember")!); + balance = memberInfo["balance"]; + money = memberInfo["money"]; + mGreenMoney = memberInfo["greenMoney"]; + mRaiseMoney = memberInfo["raiseMoney"]; + setState(() {}); + } }); } @@ -92,7 +92,7 @@ class _PayMethod extends State { ), ), ), - if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) + if(widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false)) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { @@ -133,11 +133,11 @@ class _PayMethod extends State { ], ), ), - if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) + if(widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false)) SizedBox( height: 10, ), - if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) + if(widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false)) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { @@ -178,11 +178,11 @@ class _PayMethod extends State { ], ), ), - if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) + if(widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false)) SizedBox( height: 10, ), - if(mGreenMoney!="0.00" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) + if(mGreenMoney!="0.00" && (widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false))) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { @@ -232,11 +232,11 @@ class _PayMethod extends State { ], ), ), - if(mGreenMoney!="0.00" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) + if(mGreenMoney!="0.00" && (widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false))) SizedBox( height: 10, ), - if(mRaiseMoney!="0" && (widget.tableId > 0? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false))) + if(mRaiseMoney!="0" && (widget.tableId > 0? (widget.minOrderInfo?.isRaise ?? false) : (widget.settleOrderInfo?.isRaise ?? false))) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { @@ -286,9 +286,9 @@ class _PayMethod extends State { ], ), ), - if(mRaiseMoney !="0" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) + if(mRaiseMoney !="0" && (widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false))) - if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) + if(widget.tableId > 0 ? !(widget.minOrderInfo?.isRaise ?? false) : !(widget.settleOrderInfo?.isRaise ?? false)) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { diff --git a/lib/settlement/settlement_view/settlement_activity.dart b/lib/settlement/settlement_view/settlement_activity.dart index 3ccf1836..97b9bc0f 100644 --- a/lib/settlement/settlement_view/settlement_activity.dart +++ b/lib/settlement/settlement_view/settlement_activity.dart @@ -1,15 +1,14 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/settlement/settlement_view/activity.dart'; -import 'package:huixiang/settlement/settlement_view/coupon.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class SettlementActivity extends StatefulWidget { - final StoreInfo storeInfo; - final SettleOrderInfo settleOrderInfo; + final StoreInfo? storeInfo; + final SettleOrderInfo? settleOrderInfo; SettlementActivity(this.settleOrderInfo, this.storeInfo); @@ -30,11 +29,9 @@ class _SettlementActivity extends State { promotionInfoCan.clear(); promotionInfoNo.clear(); - if (widget.settleOrderInfo != null && - widget.settleOrderInfo.promotionInfoList != null && - widget.settleOrderInfo.promotionInfoList.length > 0) { - widget.settleOrderInfo.promotionInfoList.forEach((element) { - if (element.canPartake) { + if (widget.settleOrderInfo?.promotionInfoList?.isNotEmpty ?? false) { + widget.settleOrderInfo!.promotionInfoList?.forEach((element) { + if (element.canPartake ?? false) { promotionInfoCan.add(element); } else { promotionInfoNo.add(element); @@ -106,8 +103,7 @@ class _SettlementActivity extends State { right: 16, ), child: ListView.builder( - itemCount: (promotionInfoCan == null || - promotionInfoCan.length == 0) + itemCount: (promotionInfoCan.length == 0) ? 0 : promotionInfoCan.length, shrinkWrap: true, @@ -149,8 +145,7 @@ class _SettlementActivity extends State { right: 16, ), child: ListView.builder( - itemCount: (promotionInfoNo == null || - promotionInfoNo.length == 0) + itemCount: (promotionInfoNo.length == 0) ? 0 : promotionInfoNo.length, shrinkWrap: true, diff --git a/lib/settlement/settlement_view/settlement_coupon.dart b/lib/settlement/settlement_view/settlement_coupon.dart index 23b6a090..024a63a1 100644 --- a/lib/settlement/settlement_view/settlement_coupon.dart +++ b/lib/settlement/settlement_view/settlement_coupon.dart @@ -1,17 +1,17 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/min_order_info.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/data/settle_order_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/settlement/settlement_view/coupon.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class SettlementCoupon extends StatefulWidget { - final StoreInfo storeInfo; - final MinOrderInfo minOrderInfo; + final StoreInfo? storeInfo; + final MinOrderInfo? minOrderInfo; final int tableId; - final SettleOrderInfo settleOrderInfo; - final CouponListBean couponBean; + final SettleOrderInfo? settleOrderInfo; + final CouponListBean? couponBean; SettlementCoupon( this.settleOrderInfo, @@ -38,11 +38,10 @@ class _SettlementCoupon extends State { couponCan.clear(); couponNo.clear(); - if(widget.tableId > 0){ - if (widget.minOrderInfo != null && - widget.minOrderInfo.orderInfoVo.couponList != null && - widget.minOrderInfo.orderInfoVo.couponList.length > 0) { - widget.minOrderInfo.orderInfoVo.couponList.forEach((element) { + if (widget.tableId > 0) { + if (widget.minOrderInfo?.orderInfoVo?.couponList != null && + widget.minOrderInfo!.orderInfoVo?.couponList?.isNotEmpty) { + widget.minOrderInfo!.orderInfoVo?.couponList.forEach((element) { if (element["usable"]) { couponCan.add(CouponListBean.fromJson(element)); } else { @@ -51,12 +50,10 @@ class _SettlementCoupon extends State { }); setState(() {}); } - }else{ - if (widget.settleOrderInfo != null && - widget.settleOrderInfo.couponList != null && - widget.settleOrderInfo.couponList.length > 0) { - widget.settleOrderInfo.couponList.forEach((element) { - if (element.usable) { + } else { + if ((widget.settleOrderInfo?.couponList?.isNotEmpty ?? false)) { + widget.settleOrderInfo!.couponList?.forEach((element) { + if (element.usable ?? false) { couponCan.add(element); } else { couponNo.add(element); @@ -65,9 +62,6 @@ class _SettlementCoupon extends State { setState(() {}); } } - - - } @override @@ -138,12 +132,12 @@ class _SettlementCoupon extends State { return CouponWidget( couponCan[position], widget.storeInfo, - selected: widget?.couponBean?.id == couponCan[position]?.id, + selected: widget.couponBean?.id == couponCan[position].id, ); }, ), ), - if (couponNo != null || couponNo.length > 0) + if (couponNo.isNotEmpty) Container( padding: EdgeInsets.only( top: 16, @@ -160,7 +154,7 @@ class _SettlementCoupon extends State { ), ), ), - if (couponNo != null || couponNo.length > 0) + if (couponNo.isNotEmpty) Container( padding: EdgeInsets.only( top: 8, diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index 0fc396f7..6e8af8fc 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -1,24 +1,25 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/data/set_meal_data.dart'; +import 'package:huixiang/data/settle_order_info.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/min_order_info.dart'; -import 'package:huixiang/retrofit/data/order_product_vo.dart'; -import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; +import 'package:huixiang/data/min_order_info.dart'; +import 'package:huixiang/data/order_product_vo.dart'; + import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/separator.dart'; -import '../../retrofit/data/shoppingCart.dart'; class SettlementOrderCommodity extends StatefulWidget { final int isTakeOut; final int diningStatus; final int tableId; - final SettleOrderInfo settleOrderInfo; - final MinOrderInfo minOrderInfo; - final String pageType; + final SettleOrderInfo? settleOrderInfo; + final MinOrderInfo? minOrderInfo; + final String? pageType; final bool useVipPriceSelect; final bool showVipTips; final bool useBenefitSelect; @@ -87,19 +88,9 @@ class _SettlementOrderCommodity extends State { } List commodityList() { - if (widget.settleOrderInfo == null) return []; - List widgets = []; - - if (widget.minOrderInfo != null) { - widgets.addAll(widget.minOrderInfo.orderProductVOList - .map((e) => commodityItem(e)) - .toList()); - } else if (widget.settleOrderInfo != null) { - widgets.addAll(widget.settleOrderInfo.orderProductList - .map((e) => commodityItem(e)) - .toList()); - } - widgets.add(SizedBox(height: 20.h)); + List widgets = widget.minOrderInfo?.orderProductVOList?.map((e) => commodityItem(e)) + .toList() ?? []; + widgets.add(SizedBox(height: 20.h)); if (widget.isTakeOut != 0) { // 配送费 @@ -125,59 +116,56 @@ class _SettlementOrderCommodity extends State { "打包费", "", (widget.minOrderInfo != null) - ? "+ ${widget.minOrderInfo?.totalPackagingFee ?? "0"}" + ? "+ ${widget.minOrderInfo!.totalPackagingFee ?? "0"}" : "+ ${widget.settleOrderInfo?.totalPackagingFee ?? "0"}", ), ); } if (widget.useVipPriceSelect && - widget.settleOrderInfo.memberVO.isVip && + (widget.settleOrderInfo?.memberVO?.isVip ?? false) && (widget.tableId > 0 - ? !(widget?.minOrderInfo?.isRaise ?? false) - : !(widget?.settleOrderInfo?.isRaise ?? false)) && - (widget?.settleOrderInfo?.discountType == "VIP" && - widget?.settleOrderInfo?.vipDiscountAmount != "0")) { + ? !(widget.minOrderInfo?.isRaise ?? false) + : !(widget.settleOrderInfo?.isRaise ?? false)) && + (widget.settleOrderInfo?.discountType == "VIP" && + widget.settleOrderInfo?.vipDiscountAmount != "0")) { widgets.add(vipItem( Color(0xFFFF7A1A), "VIP优惠", AppUtils.calculateDouble(double.tryParse( - (widget.minOrderInfo != null && - widget.minOrderInfo.orderProductVOList != null) - ? (widget.minOrderInfo?.discountAmount ?? "") - : (widget?.settleOrderInfo?.vipDiscountAmount ?? ""))))); + (widget.minOrderInfo?.orderProductVOList != null) + ? (widget.minOrderInfo!.discountAmount ?? "") + : (widget.settleOrderInfo?.vipDiscountAmount ?? "")) ?? 0))); } if (widget.useBenefitSelect && - (widget?.settleOrderInfo?.discountType == "SURPRISE" && - widget?.settleOrderInfo?.vipDayDiscountAmount != "0") && + (widget.settleOrderInfo?.discountType == "SURPRISE" && + widget.settleOrderInfo?.vipDayDiscountAmount != "0") && ((widget.tableId > 0 - ? !(widget?.minOrderInfo?.isRaise ?? false) - : !(widget?.settleOrderInfo?.isRaise ?? false)))) { + ? !(widget.minOrderInfo?.isRaise ?? false) + : !(widget.settleOrderInfo?.isRaise ?? false)))) { widgets.add(vipItem( Color(0xFFFF7A1A), "会员日优惠金额", AppUtils.calculateDouble(double.tryParse( - (widget.minOrderInfo != null && - widget.minOrderInfo.orderProductVOList != null) - ? (widget.minOrderInfo?.discountAmount ?? "") - : (widget?.settleOrderInfo?.vipDayDiscountAmount ?? ""))))); + (widget.minOrderInfo?.orderProductVOList != null) + ? (widget.minOrderInfo!.discountAmount ?? "") + : (widget.settleOrderInfo?.vipDayDiscountAmount ?? "")) ?? 0))); } if (widget.useBenefitSelect && - ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK") && - widget?.settleOrderInfo?.benefitDiscountAmount != "0") && + ((widget.settleOrderInfo?.discountType == "MEMBER_RANK") && + widget.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 - ? !(widget?.minOrderInfo?.isRaise ?? false) - : !(widget?.settleOrderInfo?.isRaise ?? false)))) { + ? !(widget.minOrderInfo?.isRaise ?? false) + : !(widget.settleOrderInfo?.isRaise ?? false)))) { widgets.add(vipItem( Color(0xFFFF7A1A), "会员优惠金额", AppUtils.calculateDouble(double.tryParse( - (widget.minOrderInfo != null && - widget.minOrderInfo.orderProductVOList != null) - ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") - : (widget?.settleOrderInfo?.benefitDiscountAmount ?? ""))))); + (widget.minOrderInfo?.orderProductVOList != null) + ? (widget.minOrderInfo!.benefitDiscountAmount ?? "") + : (widget.settleOrderInfo?.benefitDiscountAmount ?? "")) ?? 0))); } if (widget.showVipTips) { @@ -230,7 +218,7 @@ class _SettlementOrderCommodity extends State { return widgets; } - Widget commodityItem(OrderProductVOList productList) { + Widget commodityItem(OrderProductVO productList) { return Container( margin: EdgeInsets.only(top: 8.h, bottom: 8.h), child: Column( @@ -238,7 +226,7 @@ class _SettlementOrderCommodity extends State { Row( children: [ MImage( - productList.skuImg, + productList.skuImg ?? "", width: 55, height: 55, fit: BoxFit.cover, @@ -258,7 +246,7 @@ class _SettlementOrderCommodity extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - productList.productName, + productList.productName ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -296,26 +284,18 @@ class _SettlementOrderCommodity extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - productList.buyNum > 1 - ? S.of(context).yuan_(AppUtils.calculateDouble( - double.tryParse(productList.sellPrice ?? "0") - - AppUtils.stringAsFixedDouble2((double.tryParse( - productList.discountAmount ?? "0") / - productList.buyNum)))) - : S.of(context).yuan_(AppUtils.calculateDouble( - double.tryParse(productList.sellPrice ?? "0") - - double.tryParse( - productList.discountAmount ?? "0"))), + (productList.buyNum ?? 0) > 1 + ? S.of(context).yuan_(AppUtils.calculateDouble((double.tryParse("${productList.sellPrice}") ?? 0) - AppUtils.stringAsFixedDouble2(((double.tryParse("${productList.discountAmount}") ?? 0) / (productList.buyNum ?? 1))))) + : S.of(context).yuan_(AppUtils.calculateDouble((double.tryParse("${productList.sellPrice}") ?? 0) - (double.tryParse("${productList.discountAmount}") ?? 0))), style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14.sp, color: Color(0xFF4C4C4C), ), ), - if (productList.discountAmount != null && - productList.discountAmount != "0") + if (productList.discountAmount != "0") Text( - S.of(context).yuan_(productList.sellPrice), + S.of(context).yuan_(productList.sellPrice ?? 0), style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 12.sp, @@ -328,15 +308,15 @@ class _SettlementOrderCommodity extends State { ), ], ), - if (productList.setMealDataList.length != 0) + if (productList.setMealDataList?.isNotEmpty ?? false) ListView.builder( - itemCount: productList.setMealDataList.length, + itemCount: productList.setMealDataList?.length ?? 0, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), shrinkWrap: true, padding: EdgeInsets.zero, itemBuilder: (context, index) { - return orderMealsItem(productList.setMealDataList[index]); + return orderMealsItem(productList.setMealDataList![index]); }, ), ], @@ -344,8 +324,8 @@ class _SettlementOrderCommodity extends State { ); } - Widget orderMealsItem(SetMealDataList setMealDataList) { - return Column(children: setMealDataList.productInfoList.map((e) { + Widget orderMealsItem(SetMealData setMealDataList) { + return Column(children: setMealDataList.productInfoList?.map((e) { return Container( margin: EdgeInsets.symmetric( vertical: 10.h, @@ -355,7 +335,7 @@ class _SettlementOrderCommodity extends State { Expanded( flex: 2, child: Text( - e.productName, + e.productName ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -391,7 +371,7 @@ class _SettlementOrderCommodity extends State { ], ), ); - }).toList(),); + }).toList() ?? [],); } Widget discountItem(Color color, textName, condition, amount) { @@ -556,15 +536,9 @@ class _SettlementOrderCommodity extends State { String countAllGoods() { int count = 0; - if (widget.minOrderInfo != null) { - widget.minOrderInfo.orderProductVOList.forEach((element) { - count += element.buyNum; - }); - } else if (widget.settleOrderInfo != null) { - widget.settleOrderInfo.orderProductList.forEach((element) { - count += element.buyNum; - }); - } + widget.minOrderInfo?.orderProductVOList?.forEach((element) { + count += (element.buyNum ?? 0); + }); return count.toString(); } @@ -589,7 +563,7 @@ class _SettlementOrderCommodity extends State { ), Container( child: Text( - "已优惠:¥${(widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? "0" : discountPrice()}", + "已优惠:¥${(widget.tableId > 0 ? (widget.minOrderInfo?.isRaise ?? false) : (widget.settleOrderInfo?.isRaise ?? false)) ? "0" : discountPrice()}", style: TextStyle( fontSize: 12.sp, fontFamily: 'JDZhengHT', @@ -631,25 +605,12 @@ class _SettlementOrderCommodity extends State { ///已优惠金额 String discountPrice() { - if (widget.minOrderInfo != null) { - return AppUtils.calculateDouble( - double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0")); - } else if (widget.tableId < 0) { - return "0"; - } else { - return AppUtils.calculateDouble( - double.tryParse(widget?.settleOrderInfo?.totalDiscountAmount ?? "0")); + return double.tryParse("${widget.minOrderInfo?.totalDiscountPrice}")?.toStringAsFixed(2) ?? "0"; } - } String totalPrice() { - if (widget.minOrderInfo != null && - widget.minOrderInfo.orderProductVOList != null) { - return "¥${AppUtils.calculateDouble( - double.tryParse(widget.minOrderInfo.finalPayPrice))}"; - } - if (widget.settleOrderInfo.orderProductList == null) return ""; - return "¥${AppUtils.calculateDouble( - double.tryParse(widget.settleOrderInfo.price ?? ""))}"; + return "¥${double.tryParse("${widget.minOrderInfo?.finalPayPrice}")?.toStringAsFixed(2) ?? 0}"; + // return "¥${AppUtils.calculateDouble( + // double.tryParse(widget.settleOrderInfo.price ?? ""))}"; } } diff --git a/lib/settlement/settlement_view/vip_discounts_select.dart b/lib/settlement/settlement_view/vip_discounts_select.dart index 6a017e50..5307570e 100644 --- a/lib/settlement/settlement_view/vip_discounts_select.dart +++ b/lib/settlement/settlement_view/vip_discounts_select.dart @@ -1,19 +1,19 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/settle_order_info.dart'; import 'package:huixiang/utils/font_weight.dart'; -import '../../retrofit/data/min_order_info.dart'; -import '../../retrofit/data/settleOrderInfo.dart'; -import '../../retrofit/data/store_info.dart'; +import '../../data/min_order_info.dart'; +import '../../data/store_info.dart'; import '../../view_widget/settlement_tips_dialog.dart'; class VipDiscountsSelect extends StatefulWidget { final Function(int vipSelect) vipSelectCheck; - final SettleOrderInfo settleOrderInfo; - final MinOrderInfo minOrderInfo; + final SettleOrderInfo? settleOrderInfo; + final MinOrderInfo? minOrderInfo; final int payChannel; - final StoreInfo storeInfo; + final StoreInfo? storeInfo; VipDiscountsSelect(this.vipSelectCheck,this.settleOrderInfo,this.minOrderInfo,this.payChannel,this.storeInfo); @@ -50,11 +50,11 @@ class _VipDiscountsSelect extends State { ), child: Column( children: [ - Padding(padding:EdgeInsets.only(bottom: (widget?.storeInfo?.usePlatformVip ?? false) == true ? 14.h :0), + Padding(padding:EdgeInsets.only(bottom: (widget.storeInfo?.usePlatformVip ?? false) == true ? 14.h :0), child: GestureDetector( onTap: (){ setState(() { - if (widget.settleOrderInfo.usePlateMoney == false || widget.payChannel == 5) { + if (widget.settleOrderInfo?.usePlateMoney == false || widget.payChannel == 5) { SmartDialog.show( widget: SettlementTips( () {}, @@ -91,12 +91,12 @@ class _VipDiscountsSelect extends State { ], ), ),), - if((widget?.settleOrderInfo?.isVipDay?? false) == true || (widget?.storeInfo?.usePlatformVip ?? false) == true) + if((widget.settleOrderInfo?.isVipDay?? false) == true || (widget.storeInfo?.usePlatformVip ?? false) == true) Padding(padding:EdgeInsets.only(bottom: 14.h), child: GestureDetector( onTap: (){ setState(() { - if (widget.settleOrderInfo.usePlateMoney == false || widget.payChannel == 5) { + if (widget.settleOrderInfo?.usePlateMoney == false || widget.payChannel == 5) { SmartDialog.show( widget: SettlementTips( () {}, @@ -133,11 +133,11 @@ class _VipDiscountsSelect extends State { ], ), ),), - if((widget?.storeInfo?.usePlatformVip ?? false) == true) + if((widget.storeInfo?.usePlatformVip ?? false) == true) GestureDetector( onTap: (){ setState(() { - if (widget.settleOrderInfo.usePlateMoney == false || widget.payChannel == 5) { + if (widget.settleOrderInfo?.usePlateMoney == false || widget.payChannel == 5) { SmartDialog.show( widget: SettlementTips( () {}, @@ -181,11 +181,11 @@ class _VipDiscountsSelect extends State { Widget vipCheckView(var index) { return Image.asset( - ((widget?.settleOrderInfo?.discountType??"") == "MEMBER_RANK" + ((widget.settleOrderInfo?.discountType) == "MEMBER_RANK" ? 1 - : ((widget?.settleOrderInfo?.discountType??"") == "SURPRISE" + : ((widget.settleOrderInfo?.discountType) == "SURPRISE" ? 2 - : ((widget?.settleOrderInfo?.discountType??"") == "VIP" + : ((widget.settleOrderInfo?.discountType ) == "VIP" ? 3 : 0))) != index diff --git a/lib/store/report_assess .dart b/lib/store/report_assess .dart index 43afe3f3..d175088a 100644 --- a/lib/store/report_assess .dart +++ b/lib/store/report_assess .dart @@ -1,29 +1,13 @@ -import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_html/flutter_html.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:fluwx/fluwx.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/recharge_list.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; -import 'package:huixiang/retrofit/data/vip_rule_details.dart'; -import 'package:huixiang/retrofit/data/wx_pay.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/item_input_widget.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -35,7 +19,7 @@ class ReportAssess extends StatefulWidget { } class _ReportAssess extends State { - ApiService apiService; + ApiService? apiService; TextEditingController editingController = TextEditingController(); int textLength = 0; final RefreshController refreshController = RefreshController(); @@ -47,7 +31,7 @@ class _ReportAssess extends State { SharedPreferences.getInstance().then((value) { apiService = ApiService(Dio(), - context: context, token: value.getString("token"), pay: true); + context: context, token: value.getString("token") ?? "", pay: true); }); } @@ -124,66 +108,66 @@ class _ReportAssess extends State { ), ), ); - Scaffold( - appBar: MyAppBar( - title: "发布评价", - titleColor: Colors.black, - titleSize: 17.sp, - background: Color(0xFFFFFFFF), - leadingColor: Colors.black, - actions: [ - Container( - width: 46.w, - margin: EdgeInsets.only(right: 14,top: 14,bottom: 14), - decoration: BoxDecoration( - color: Color(0xFFB3B3B3), - borderRadius: BorderRadius.circular(4), - ), - alignment: Alignment.center, - child: Text( - S.of(context).fabu, - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 14.sp, - color: Color(0xFFFFFFFF), - ), - ), - ) - ], - ), - body: Container( - height: double.infinity, - color: Color(0xFFFFFFFF), - child: Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF2F2F2), - ), - SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - // margin: EdgeInsets.only(left: 14, right: 14, top: 13.h), - child:Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - goodsAssessList(), - ], - ), - ), - ) - ], - ), - ], - ), - ), - ); + // Scaffold( + // appBar: MyAppBar( + // title: "发布评价", + // titleColor: Colors.black, + // titleSize: 17.sp, + // background: Color(0xFFFFFFFF), + // leadingColor: Colors.black, + // actions: [ + // Container( + // width: 46.w, + // margin: EdgeInsets.only(right: 14,top: 14,bottom: 14), + // decoration: BoxDecoration( + // color: Color(0xFFB3B3B3), + // borderRadius: BorderRadius.circular(4), + // ), + // alignment: Alignment.center, + // child: Text( + // S.of(context).fabu, + // style: TextStyle( + // fontWeight: MyFontWeight.bold, + // fontSize: 14.sp, + // color: Color(0xFFFFFFFF), + // ), + // ), + // ) + // ], + // ), + // body: Container( + // height: double.infinity, + // color: Color(0xFFFFFFFF), + // child: Stack( + // children: [ + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // Container( + // width: double.infinity, + // height: 1.h, + // color: Color(0xFFF2F2F2), + // ), + // SingleChildScrollView( + // physics: BouncingScrollPhysics(), + // child: Container( + // // margin: EdgeInsets.only(left: 14, right: 14, top: 13.h), + // child:Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // goodsAssessList(), + // ], + // ), + // ), + // ) + // ], + // ), + // ], + // ), + // ), + // ); } ///评价列表 diff --git a/lib/store/scan.dart b/lib/store/scan.dart index 3f399995..5ba60397 100644 --- a/lib/store/scan.dart +++ b/lib/store/scan.dart @@ -28,10 +28,10 @@ class Scan { var result = await Navigator.of(context).pushNamed('/router/qr_scan'); // String result = await scanner.scan(); if (result != null && result != "") { - Uri uri = Uri.parse(result); - String table = uri.queryParameters["tableId"]; - if (table != null && table != "") { - int tableId = int.tryParse(table); + Uri uri = Uri.parse(result as String); + String? table = uri.queryParameters["tableId"]; + if (table?.isNotEmpty ?? false) { + int? tableId = int.tryParse(table!); Navigator.of(context).pushNamed( '/router/store_order', arguments: { diff --git a/lib/store/shop_details_page.dart b/lib/store/shop_details_page.dart index 51731ef2..27fe2d5b 100644 --- a/lib/store/shop_details_page.dart +++ b/lib/store/shop_details_page.dart @@ -4,13 +4,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/shopping_cart.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/store_view/people_num.dart'; @@ -28,7 +28,7 @@ import '../view_widget/border_text.dart'; import '../view_widget/request_permission.dart'; class ShopDetailsPage extends StatefulWidget { - final Map arguments; + final Map? arguments; ShopDetailsPage({this.arguments}); @@ -39,39 +39,39 @@ class ShopDetailsPage extends StatefulWidget { } class _ShopDetailsPage extends State { - ApiService apiService; - MinApiService minService; + ApiService? apiService; + MinApiService? minService; final ScrollController scrollController = ScrollController(); final RefreshController refreshController = RefreshController(); - String id; - MiNiDetail miNiDetail; - ShoppingCart shopCarGoods; + late String id; + MiniDetail? miNiDetail; + ShoppingCart? shopCarGoods; bool dialogShowing = false; - StoreInfo storeInfo; + StoreInfo? storeInfo; String parentCode = ""; int tableId = 0; - String tenant; - String minToken; - String pName; - String pid; - String cName; - String cid; + String? tenant; + String? minToken; + String? pName; + String? pid; + String? cName; + String? cid; List selectSkus = []; - List activitys; + List? activitys; int counts = 1; String selectedPrice = ""; - String storeId; - String parentId; + late String storeId; + String? parentId; int numberOfPeople = 0; - int index; - bool isSetMeal; + int? index; + late bool isSetMeal; @override void initState() { super.initState(); - id = widget.arguments["id"]; - storeId = widget.arguments["storeId"]; - isSetMeal = widget.arguments["isSetMeal"] ?? false; + id = widget.arguments?["id"] ?? ""; + storeId = widget.arguments?["storeId"] ?? ""; + isSetMeal = widget.arguments?["isSetMeal"] ?? false; // SharedPreferences.getInstance().then((value) { // String minToken = value.getString("minToken"); // String tenant = value.getString("tenant"); @@ -96,20 +96,12 @@ class _ShopDetailsPage extends State { queryStoreInfo() async { EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); SharedPreferences value = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - BaseData baseData = - await apiService.queryStoreInfo(storeId).catchError((error) { + BaseData? baseData = await apiService?.queryStoreInfo(storeId).catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { - storeInfo = StoreInfo.fromJson(baseData.data); - activitys = storeInfo.informationVOPageVO.list - .map((e) => Activity.fromJson(e)) + if (baseData?.isSuccess ?? false) { + storeInfo = StoreInfo.fromJson(baseData!.data); + activitys = storeInfo?.informationVOPageVO?.list?.map((e) => Activity.fromJson(e)) .toList(); if (mounted) { setState(() {}); @@ -121,27 +113,27 @@ class _ShopDetailsPage extends State { /// 小程序登录 minLogin() async { - apiService.minLogin(storeId).catchError((onError) { + apiService?.minLogin(storeId).catchError((onError) { debugPrint(onError); }).then((baseData) { - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { Map minStoreInfo = baseData.data; String minToken = minStoreInfo["token"]; - String tenant = storeInfo.tenantCode; - String storeId = storeInfo.id; + String? tenant = storeInfo?.tenantCode; + String? storeId = storeInfo?.id; SharedPreferences.getInstance().then( (value) => { value.setString('minToken', minToken), - value.setString('tenant', tenant), - value.setString('storeId', storeId), + value.setString('tenant', tenant ?? ""), + value.setString('storeId', storeId ?? ""), }, ); minService = MinApiService( Dio(), context: context, token: minToken, - tenant: tenant, - storeId: storeId, + tenant: tenant ?? "", + storeId: storeId ?? "", ); queryMiNiDetail(id); queryShopCar().then((value) { @@ -155,15 +147,16 @@ class _ShopDetailsPage extends State { ///商品详情 queryMiNiDetail(id) async { - BaseData baseData = - await minService.miNiDetail(id).catchError((error) { + BaseData? baseData = await minService?.miNiDetail(id).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - miNiDetail = baseData.data; - miNiDetail.attrList.forEach((element) { - selectSkus.add(element.attrValueList[0].attrValue); + miNiDetail = baseData!.data; + miNiDetail?.attrList?.forEach((element) { + if (element.attrValueList![0].attrValue?.isNotEmpty ?? false) { + selectSkus.add(element.attrValueList![0].attrValue!); + } }); }); EasyLoading.dismiss(); @@ -179,12 +172,11 @@ class _ShopDetailsPage extends State { ///获取父订单(火锅订单加菜前调用) getParentInfo() async { - BaseData baseData = - await minService.getParentInfo("$tableId").catchError((error) { + BaseData? baseData = await minService?.getParentInfo("$tableId").catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { - if (baseData.data != null) { + if (baseData?.isSuccess ?? false) { + if (baseData!.data != null) { parentId = baseData.data["id"]; parentCode = baseData.data["parentCode"]; } else { @@ -195,7 +187,7 @@ class _ShopDetailsPage extends State { } ///显示选择人数的弹窗 - showPeopleNum(String tableName) async { + showPeopleNum(String? tableName) async { var people = await showDialog( context: context, barrierDismissible: false, @@ -215,29 +207,25 @@ class _ShopDetailsPage extends State { ///获取桌子信息 queryStoreInfo1() async { - BaseData baseData = await minService.queryStoreInfo1({ + BaseData? baseData = await minService?.queryStoreInfo1({ "getCoupon": true, "storeId": storeId, "tableId": tableId, }).catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { - StoreInfo storeInfo = StoreInfo.fromJson(baseData.data); - if (storeInfo.storeTable != null) { - showPeopleNum(storeInfo.storeTable.tableName); - } + if (baseData?.isSuccess ?? false) { + StoreInfo storeInfo = StoreInfo.fromJson(baseData!.data); + showPeopleNum(storeInfo.storeTable?.tableName); } } ///计算个数 int count() { - if (shopCarGoods == null || - shopCarGoods.shoppingCartSkuItemList == null || - shopCarGoods.shoppingCartSkuItemList.length == 0) return 0; + if (shopCarGoods?.shoppingCartSkuItemList?.isEmpty ?? true) return 0; int count = 0; - shopCarGoods.shoppingCartSkuItemList.forEach((element) { - count += element.buyNum; + shopCarGoods?.shoppingCartSkuItemList!.forEach((element) { + count += (element.buyNum ?? 0); }); return count; } @@ -246,7 +234,7 @@ class _ShopDetailsPage extends State { toDownOrder() async { int num = count(); - if (parentId == null || parentId == "") { + if (parentId == "") { if (num == 0) { SmartDialog.showToast("请先选择您要购买的商品!~", alignment: Alignment.center); return; @@ -266,12 +254,12 @@ class _ShopDetailsPage extends State { "cid": cid, "shoppingCart": shopCarGoods, "numberOfPeople": numberOfPeople, - "distance": widget.arguments["distance"], + "distance": widget.arguments?["distance"], "subscribeParam": miNiDetail?.subscribeParam, }, ); - if ((miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) == true) { + if ((miNiDetail?.subscribeParam?.isEnableSubscribe ?? false)) { clearShopCar(); this.shopCarGoods = await queryShopCar(); } @@ -312,8 +300,8 @@ class _ShopDetailsPage extends State { ///清空购物车 clearShopCar() async { - BaseData baseData = await minService.clearShoppingCart(storeId); - if (baseData.isSuccess) { + BaseData? baseData = await minService?.clearShoppingCart(storeId); + if (baseData?.isSuccess ?? false) { shopCarGoods = null; setState(() {}); } @@ -323,7 +311,7 @@ class _ShopDetailsPage extends State { _queryMiNiDetail(String id, int count) async { EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); if (count < 0) { - shopCarGoods.shoppingCartSkuItemList.forEach((element) { + shopCarGoods?.shoppingCartSkuItemList?.forEach((element) { if (element.productId == id) { shopCartReduce(element); setState(() {}); @@ -331,18 +319,17 @@ class _ShopDetailsPage extends State { }); return; } - BaseData baseData = await minService.miNiDetail(id); - if (baseData != null && baseData.isSuccess) { - showStoreSelector(baseData.data, id, count); + BaseData? baseData = await minService?.miNiDetail(id); + if (baseData?.isSuccess ?? false) { + showStoreSelector(baseData!.data, id, count); } EasyLoading.dismiss(); } ///选规格弹窗 - showStoreSelector(MiNiDetail miNiDetail, String id, int count) async { - if (miNiDetail.attrList != null && - miNiDetail.attrList.length == 1 && - miNiDetail.attrList[0].attrValueList.length == 1) { + showStoreSelector(MiniDetail? miNiDetail, String id, int count) async { + if (miNiDetail?.attrList?.length == 1 && + (miNiDetail?.attrList![0].attrValueList?.isNotEmpty ?? false)) { _addShopCar(miNiDetail, [], counts); } else { // showSpanDialog(); @@ -351,15 +338,15 @@ class _ShopDetailsPage extends State { } ///添加购物车 - Future _addShopCar(MiNiDetail miNiDetail, selectSkus, int count) async { - ProductSkuVOListBean productSku; + Future _addShopCar(MiniDetail? miNiDetail, selectSkus, int count) async { + ProductSkuVOList? productSku; if (selectSkus != null && selectSkus.length == 0) { - productSku = miNiDetail.productSkuVOList.first; + productSku = miNiDetail?.productSkuVOList?.first; } else { - productSku = miNiDetail.productSkuVOList.firstWhere((element) { + productSku = miNiDetail?.productSkuVOList?.firstWhere((element) { bool gg = true; selectSkus.forEach((element1) { - if (element.skuNameStr.indexOf(element1) < 0) { + if ((element.skuNameStr?.indexOf(element1) ?? 0) < 0) { gg = false; return gg; } @@ -367,118 +354,108 @@ class _ShopDetailsPage extends State { return gg; }); } - if (productSku == null) return; - String skuId = productSku.id; + String? skuId = productSku?.id; String skuValue = selectSkus .toString() .replaceAll("[", "") .replaceAll("]", "") .replaceAll(",", ""); - if ((miNiDetail.subscribeParam.isEnableSubscribe ?? false) == true) { + if (miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) { clearShopCar(); } - if (miNiDetail != null) { - BaseData> baseDate = await minService.addShoppingCart({ - "storeId": storeInfo.id, - "storeName": storeInfo.storeName ?? "", - "numberOfPeople": numberOfPeople, - "tableId": tableId, - "parentId": parentId, - "parentCode": parentCode, - "shoppingCartSkuItemList": [ - { - "buyNum": count, - "id": skuId, - "productId": miNiDetail.id, - "productName": miNiDetail.productName, - "skuName": skuValue, - "storeId": storeInfo.id, - "skuPrice": productSku.skuPrice, - "skuStock": productSku.skuStock, - "tableId": tableId, - }, - ], + BaseData>? baseDate = await minService?.addShoppingCart({ + "storeId": storeInfo?.id, + "storeName": storeInfo?.storeName ?? "", + "numberOfPeople": numberOfPeople, + "tableId": tableId, + "parentId": parentId, + "parentCode": parentCode, + "shoppingCartSkuItemList": [ + { + "buyNum": count, + "id": skuId, + "productId": miNiDetail?.id, + "productName": miNiDetail?.productName, + "skuName": skuValue, + "storeId": storeInfo?.id, + "skuPrice": productSku?.skuPrice, + "skuStock": productSku?.skuStock, + "tableId": tableId, + }, + ], + }); + EasyLoading.dismiss(); + if (baseDate?.isSuccess ?? false) { + queryShopCar().then((value) { + this.shopCarGoods = value; + if (miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) + toDownOrder(); + setState(() {}); }); - EasyLoading.dismiss(); - if (baseDate != null && baseDate.isSuccess) { - queryShopCar().then((value) { - this.shopCarGoods = value; - if ((miNiDetail.subscribeParam.isEnableSubscribe ?? false) == true) - toDownOrder(); - setState(() {}); - }); - } else { - SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center); - } + } else { + SmartDialog.showToast(baseDate?.msg ?? "", alignment: Alignment.center); + } } - } ///查询购物车 - Future queryShopCar() async { + Future queryShopCar() async { pName = ""; //活动 pid = ""; //活动 cName = ""; //优惠券 cid = ""; //优惠券 - BaseData> baseDate = - await minService.getShoppingCart(tableId); - if (baseDate != null && - baseDate.isSuccess && - baseDate.data != null && - baseDate.data.length > 0) { - if (baseDate.data[0].selectDiscount == 1) { - baseDate.data[0].couponList.forEach((element) { - if (element.isMaxCoupon) { + BaseData>? baseDate = await minService?.getShoppingCart(tableId); + if ((baseDate?.isSuccess ?? false) && + (baseDate!.data?.isNotEmpty ?? false)) { + if (baseDate.data![0].selectDiscount == 1) { + baseDate.data![0].couponList?.forEach((element) { + if (element.isMaxCoupon ?? false) { // cName = element.promotionName; cid = element.id; } }); - } else if (baseDate.data[0].selectDiscount == 2) { - baseDate.data[0].promotionInfoList.forEach((element) { - if (element.isMaxPromotion) { + } else if (baseDate.data![0].selectDiscount == 2) { + baseDate.data![0].promotionInfoList?.forEach((element) { + if (element.isMaxPromotion ?? false) { // pName = element.name; pid = element.id; } }); } - return baseDate.data[0]; + return baseDate.data![0]; } else { return null; } } ///购物车➕1 - Future shopCartAdd( - ShoppingCartSkuItemListBean cartSkuItem) async { - Map shopCarTemp = shopCarGoods.toJson(); - cartSkuItem.buyNum += 1; + Future shopCartAdd(SkuItemList cartSkuItem) async { + Map shopCarTemp = shopCarGoods?.toJson() ?? {}; + int buyNum = cartSkuItem.buyNum ?? 0; + cartSkuItem.buyNum = buyNum + 1; shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); + if (baseDate?.isSuccess ?? false) { this.shopCarGoods = await queryShopCar(); - if (shopCartKey != null) { - shopCartKey.currentState.setState(() {}); - } + shopCartKey.currentState?.setState(() {}); setState(() {}); } return this.shopCarGoods; } ///购物车➖1 - Future shopCartReduce( - ShoppingCartSkuItemListBean cartSkuItem) async { - Map shopCarTemp = shopCarGoods.toJson(); - cartSkuItem.buyNum -= 1; + Future shopCartReduce(SkuItemList cartSkuItem) async { + Map shopCarTemp = shopCarGoods?.toJson() ?? {}; + int buyNum = cartSkuItem.buyNum ?? 0; + cartSkuItem.buyNum = buyNum - 1; shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); + if (baseDate?.isSuccess ?? false) { EasyLoading.dismiss(); this.shopCarGoods = await queryShopCar(); - if (shopCartKey?.currentState != null) { - shopCartKey.currentState.setState(() {}); + if (shopCartKey.currentState != null) { + shopCartKey.currentState!.setState(() {}); } setState(() {}); } @@ -486,37 +463,27 @@ class _ShopDetailsPage extends State { } ///商品➕1 - add(MiNiDetail miNiDetail, selectSkus) async { - ProductSkuVOListBean productSku = - miNiDetail.productSkuVOList.firstWhere((element) { + add(MiniDetail miNiDetail, selectSkus) async { + ProductSkuVOList? productSku = miNiDetail.productSkuVOList?.firstWhere((element) { return skuY(element, selectSkus); }); - - if (productSku == null) return; - String skuId = productSku.id; - if (shopCarGoods == null) { - await _addShopCar(miNiDetail, selectSkus, 2); - return; - } - int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList - .indexWhere((element) => skuId == element.id); - Map shopCarTemp = shopCarGoods.toJson(); - shopCarGoods.tableId = "$tableId"; + String? skuId = productSku?.id; + int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1; + Map shopCarTemp = shopCarGoods?.toJson() ?? {}; + shopCarGoods?.tableId = "$tableId"; if (shopSkuIndex >= 0) { - shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum += 1; - ShoppingCartSkuItemListBean cartSkuItem = shopCarGoods - .shoppingCartSkuItemList - .firstWhere((element) => skuId == element.id); - shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; + int buyNum = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0; + shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = buyNum + 1; + SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id); + shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()]; } else { await _addShopCar(miNiDetail, selectSkus, 2); return; } - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); + if (baseDate?.isSuccess ?? false) { queryShopCar().then((value) { this.shopCarGoods = value; setState(() {}); @@ -525,43 +492,26 @@ class _ShopDetailsPage extends State { } ///商品➖1 - reduce(MiNiDetail miNiDetail, selectSkus) async { - ProductSkuVOListBean productSku = - miNiDetail.productSkuVOList.firstWhere((element) { + reduce(MiniDetail miNiDetail, selectSkus) async { + ProductSkuVOList? productSku = miNiDetail.productSkuVOList?.firstWhere((element) { return skuY(element, selectSkus); }); + String? skuId = productSku?.id; + SkuItemList? shopSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id); + int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1; - if (productSku == null) return; - String skuId = productSku.id; - if (shopCarGoods == null) { - await _addShopCar(miNiDetail, selectSkus, 2); - return; + if ((shopSkuItem?.buyNum ?? 0) > 1) { + int buyNum = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0; + shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = buyNum - 1; } - ShoppingCartSkuItemListBean shopSkuItem = shopCarGoods - .shoppingCartSkuItemList - .firstWhere((element) => skuId == element.id); - int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList - .indexWhere((element) => skuId == element.id); + shopCarGoods?.tableId = "$tableId"; - if (shopSkuItem != null) { - if (shopSkuItem.buyNum > 1) { - shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum -= 1; - } - } else { - await _addShopCar(miNiDetail, selectSkus, 2); - return; - } - shopCarGoods.tableId = "$tableId"; - - Map shopCarTemp = shopCarGoods.toJson(); - ShoppingCartSkuItemListBean cartSkuItem = shopCarGoods - .shoppingCartSkuItemList - .firstWhere((element) => skuId == element.id); - shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; + Map shopCarTemp = shopCarGoods?.toJson() ?? {}; + SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id); + shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()]; - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); + if (baseDate?.isSuccess ?? false) { queryShopCar().then((value) { this.shopCarGoods = value; setState(() {}); @@ -569,10 +519,10 @@ class _ShopDetailsPage extends State { } } - bool skuY(ProductSkuVOListBean productSku, selectSkus) { + bool skuY(ProductSkuVOList productSku, selectSkus) { bool gg = true; selectSkus.forEach((element1) { - if (productSku.skuNameStr.indexOf(element1) < 0) { + if ((productSku.skuNameStr?.indexOf(element1) ?? 0) < 0) { gg = false; return gg; } @@ -582,23 +532,19 @@ class _ShopDetailsPage extends State { buildCount() { counts = 1; - ProductSkuVOListBean productSku; + ProductSkuVOList? productSku; try { - productSku = miNiDetail.productSkuVOList.firstWhere((element) { + productSku = miNiDetail?.productSkuVOList?.firstWhere((element) { return skuY(element, selectSkus); }); } catch (ex) { return; } - if (productSku == null) return; - selectedPrice = productSku.skuPrice; - String skuId = productSku.id; - if (shopCarGoods == null || shopCarGoods.shoppingCartSkuItemList == null) - return; - int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList - .indexWhere((element) => skuId == element.id); + selectedPrice = productSku?.skuPrice ?? ""; + String? skuId = productSku?.id; + int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1; if (shopSkuIndex >= 0) { - counts = shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum; + counts = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0; } } @@ -661,23 +607,6 @@ class _ShopDetailsPage extends State { color: Colors.white, child: Html( data: miNiDetail?.details ?? "", - style: { - 'body': Style( - backgroundColor: Colors.white, - padding: EdgeInsets.all(0), - margin: EdgeInsets.all(0)), - 'p': Style( - margin: EdgeInsets.all(0), - padding: EdgeInsets.all(0), - ), - }, - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, ), ), ], @@ -719,14 +648,13 @@ class _ShopDetailsPage extends State { fontWeight: MyFontWeight.bold), ), TextSpan( - text: shopCarGoods != null - ? shopCarGoods.cartSum - : "0.0", + text: "${shopCarGoods?.cartSum ?? 0}", style: TextStyle( fontSize: 20.sp, color: Color(0xFFFFFFFF), fontFamily: 'JDZhengHT', - fontWeight: MyFontWeight.medium), + fontWeight: MyFontWeight.medium, + ), ), ]), ), @@ -784,7 +712,7 @@ class _ShopDetailsPage extends State { ), SizedBox( height: 30.h, - ) + ), ], ), ); @@ -804,13 +732,15 @@ class _ShopDetailsPage extends State { spreadRadius: 0, ) ], - color: Color(0xFFFFFFFF)), + color: Color(0xFFFFFFFF), + ), child: Column( children: [ swiper(), Container( padding: EdgeInsets.only( - top: 16.h, left: 14.w, right: 14.w, bottom: 16.h), + top: 16.h, left: 14.w, right: 14.w, bottom: 16.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -841,11 +771,11 @@ class _ShopDetailsPage extends State { fontWeight: MyFontWeight.regular, color: Color(0xFFA29E9E), ), - )), + ), + ), GestureDetector( onTap: () async { - if (storeInfo.posType.code == "NORMALSTORE" && - tableId == 0) { + if (storeInfo?.posType?.code == "NORMALSTORE" && tableId == 0) { showDeleteDialog(); } else if (isSetMeal == true) { await Navigator.of(context).pushNamed( @@ -885,11 +815,9 @@ class _ShopDetailsPage extends State { width: 2, ), Text( - ((miNiDetail?.subscribeParam?.isEnableSubscribe ?? - false) == - true) + ((miNiDetail?.subscribeParam?.isEnableSubscribe ?? false)) ? S.of(context).lijiyuyue - : (isSetMeal ?? false) == true + : (isSetMeal) ? "选套餐" : "加入购物车", style: TextStyle( @@ -951,7 +879,7 @@ class _ShopDetailsPage extends State { ), itemBuilder: (context, position) { return MImage( - miNiDetail?.imgs != null ? miNiDetail.imgs[position] : "", + miNiDetail?.imgs != null ? miNiDetail!.imgs![position] : "", fit: BoxFit.cover, radius: BorderRadius.zero, height: 375, @@ -984,10 +912,7 @@ class _ShopDetailsPage extends State { selectSpecsShowBottomSheet() { showModalBottomSheet( builder: (BuildContext context) { - return StatefulBuilder(builder: ( - context, - state, - ) { + return StatefulBuilder(builder: (context, state) { return Container( alignment: Alignment.topCenter, padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16), @@ -1010,7 +935,7 @@ class _ShopDetailsPage extends State { children: [ ClipRRect( child: MImage( - miNiDetail.imgs[0], + miNiDetail?.imgs?[0] ?? "", fit: BoxFit.cover, width: 70, height: 70, @@ -1064,19 +989,18 @@ class _ShopDetailsPage extends State { ), ], ), - )), + ), + ), ], ), - if (miNiDetail.attrList != null && - miNiDetail.attrList.length > 0) + if (miNiDetail?.attrList?.isNotEmpty ?? false) SizedBox( height: 10, ), - if (miNiDetail.attrList != null && - miNiDetail.attrList.length > 0) + if (miNiDetail?.attrList?.isNotEmpty ?? false) Expanded( child: ListView.builder( - itemCount: miNiDetail.attrList.length, + itemCount: miNiDetail?.attrList?.length ?? 0, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), padding: EdgeInsets.zero, @@ -1089,7 +1013,7 @@ class _ShopDetailsPage extends State { buildCount(); }); }, - miNiDetail.attrList[position], + miNiDetail!.attrList![position], position, ); }, @@ -1129,7 +1053,8 @@ class _ShopDetailsPage extends State { Icons.remove, color: Color(0xFF32A060), size: 24, - )), + ), + ), Padding( padding: EdgeInsets.only(left: 8, right: 8), child: Text( @@ -1152,7 +1077,8 @@ class _ShopDetailsPage extends State { Icons.add, color: Color(0xFF32A060), size: 24, - )), + ), + ), ], ) ], @@ -1163,9 +1089,7 @@ class _ShopDetailsPage extends State { RoundButton( width: double.infinity, height: 54.h, - text: ((miNiDetail?.subscribeParam?.isEnableSubscribe ?? - false) == - true) + text: (miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) ? S.of(context).lijiyuyue : "加入购物车", textColor: Colors.white, @@ -1190,16 +1114,15 @@ class _ShopDetailsPage extends State { context: context); } - Widget attrItem(Function fc, AttrListBean attrListBean, position) { - if (attrListBean.attrValueList != null && - attrListBean.attrValueList.length > 0) + Widget attrItem(Function fc, AttrList attrListBean, position) { + if (attrListBean.attrValueList?.isNotEmpty ?? false) return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only(top: 16, bottom: 16), child: Text( - attrListBean.attrName, + attrListBean.attrName ?? "", style: TextStyle( color: Color(0xFFB3B3B3), fontSize: 14.sp, @@ -1207,7 +1130,7 @@ class _ShopDetailsPage extends State { ), ), ), - sweetnessStore(fc, attrListBean.attrValueList, position), + sweetnessStore(fc, attrListBean.attrValueList!, position), // sweetnessStore(fc, attrListBean.attrValueList, position), ], ); @@ -1216,12 +1139,11 @@ class _ShopDetailsPage extends State { } } - Widget sweetnessStore(Function fc, List arrays, position) { + Widget sweetnessStore(Function fc, List arrays, position) { return Wrap( runSpacing: 10.0, spacing: 10.0, - children: - arrays.take(arrays.length).map((AttrValueListBean tag) { + children: arrays.take(arrays.length).map((AttrValueList tag) { return GestureDetector( onTap: () { fc(tag.attrValue); @@ -1234,7 +1156,7 @@ class _ShopDetailsPage extends State { }).toList()); } - Widget sweetnessItem(String name, bool isCheck) { + Widget sweetnessItem(String? name, bool isCheck) { return Container( padding: const EdgeInsets.symmetric(vertical: 5.0, horizontal: 12.0), decoration: BoxDecoration( @@ -1249,7 +1171,7 @@ class _ShopDetailsPage extends State { ), ), child: Text( - name, + name ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: !isCheck ? Color(0xFF4D4D4D) : Color(0xFF32A060), @@ -1358,23 +1280,23 @@ class _ShopDetailsPage extends State { // String result = "http://pos.app.gznl.top/placeorder/?tableId=1315906639160672256&tenantCode=1166&shopId=1300372027722432512"; // 新版桌子码跳转 // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 - Uri uri = Uri.parse(result); - String tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; - String tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; - String shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; - if (tableId != null && - tableId != "" && - tenantCode != null && - tenantCode != "" && - shopId != null && - shopId != "") { + if (result == null) { + return; + } + Uri uri = Uri.parse(result as String); + String? tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String? tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String? shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; + if ((tableId?.isNotEmpty ?? false) && + (tenantCode?.isNotEmpty ?? false) && + (shopId?.isNotEmpty ?? false)) { Navigator.of(context).pushReplacementNamed( '/router/store_order', arguments: { "id": shopId, "tenant": tenantCode, "storeName": "", - "tableId": int.tryParse(tableId), + "tableId": int.tryParse(tableId!), }, ); } diff --git a/lib/store/shopping/activity_prefecture_details.dart b/lib/store/shopping/activity_prefecture_details.dart index 743cb5af..40367a1a 100644 --- a/lib/store/shopping/activity_prefecture_details.dart +++ b/lib/store/shopping/activity_prefecture_details.dart @@ -1,14 +1,14 @@ import 'dart:async'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/activity_area_list.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/activity_area_list.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -19,7 +19,7 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ActivityPrefectureDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; ActivityPrefectureDetails({this.arguments}); @@ -30,24 +30,24 @@ class ActivityPrefectureDetails extends StatefulWidget { } class _ActivityPrefectureDetails extends State { - ApiService apiService; - MinApiService minService; + ApiService? apiService; + MinApiService? minService; int seckillIndex = 0; RefreshController refreshController = RefreshController(); - ScrollController _scrollController; + ScrollController? _scrollController; ScrollPhysics _scrollPhysics = NeverScrollableScrollPhysics(); bool scrollFlag = false; List actTimeList = []; - List productList = []; - List activitys; - ActTemplate actTemplate; + List productList = []; + List? activitys; + ActTemplate? actTemplate; int actTimeListIndex = 0; - StoreInfo storeInfo; + StoreInfo? storeInfo; String pageType = "1"; - String storeId; - String tenant; - String minToken; - Timer _timer; + late String storeId; + late String tenant; + late String minToken; + Timer? _timer; String testTime = "2021-12-30 10:00:00"; int tempDay = 0; int tempHour = 0; @@ -59,21 +59,19 @@ class _ActivityPrefectureDetails extends State { void dispose() { super.dispose(); isDispose = true; - if (_timer != null) { - _timer.cancel(); - } + _timer?.cancel(); } @override void initState() { super.initState(); _scrollController = ScrollController(); - if(pageType != "2"){ + if (pageType != "2") { _scrollPhysics = BouncingScrollPhysics(); - }else{ - _scrollController.addListener(() { + } else { + _scrollController?.addListener(() { setState(() { - if (_scrollController.offset < + if ((_scrollController?.offset ?? 0) < (325.h - MediaQuery.of(context).padding.top)) { _scrollPhysics = NeverScrollableScrollPhysics(); } else { @@ -83,9 +81,9 @@ class _ActivityPrefectureDetails extends State { }); } - pageType = widget.arguments["type"]; - storeId = widget.arguments["storeId"]; - tenant = widget.arguments["tenant"]; + pageType = widget.arguments?["type"] ?? "1"; + storeId = widget.arguments?["storeId"] ?? ""; + tenant = widget.arguments?["tenant"] ?? ""; SharedPreferences.getInstance().then((value) { minLogin(value); @@ -95,17 +93,19 @@ class _ActivityPrefectureDetails extends State { /// 小程序登录 minLogin(SharedPreferences shared) async { - EasyLoading.show(status: S.of(context).zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.of(context).zhengzaijiazai, + maskType: EasyLoadingMaskType.black); apiService = ApiService( Dio(), context: context, - token: shared.getString('token'), + token: shared.getString('token') ?? "", showLoading: false, ); - apiService.minLogin(storeId).catchError((onError) { + apiService?.minLogin(storeId).catchError((onError) { debugPrint(onError.toString()); }).then((baseData) { - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { minToken = baseData.data["token"]; queryStoreInfo(); SharedPreferences.getInstance().then( @@ -132,14 +132,14 @@ class _ActivityPrefectureDetails extends State { /// 查询店铺信息 queryStoreInfo() async { - BaseData baseData = - await apiService.queryStoreInfo(storeId).catchError((error) { + BaseData? baseData = + await apiService?.queryStoreInfo(storeId).catchError((error) { debugPrint(error.toString()); }); - if (baseData != null && baseData.isSuccess) { - storeInfo = StoreInfo.fromJson(baseData.data); - activitys = storeInfo.informationVOPageVO.list - .map((e) => Activity.fromJson(e)) + if (baseData?.isSuccess ?? false) { + storeInfo = StoreInfo.fromJson(baseData!.data); + activitys = storeInfo?.informationVOPageVO?.list + ?.map((e) => Activity.fromJson(e)) .toList(); if (mounted) { setState(() {}); @@ -150,8 +150,8 @@ class _ActivityPrefectureDetails extends State { ///秒杀/砍价/拼团列表 queryFindActListByType(allDay) async { - BaseData baseData = await minService - .findActListByType(allDay, pageType) + BaseData? baseData = await minService + ?.findActListByType(allDay, pageType) .catchError((error) { refreshController.refreshFailed(); }); @@ -159,19 +159,24 @@ class _ActivityPrefectureDetails extends State { actTimeList.clear(); productList.clear(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { + if (baseData!.data == null || + baseData.data?.actTemplate == null || + baseData.data?.timeProductList == null) { + return; + } setState(() { - actTemplate = baseData.data.actTemplate; - actTimeList.addAll(baseData.data.timeProductList); + actTemplate = baseData.data!.actTemplate; + actTimeList.addAll(baseData.data!.timeProductList!); actTimeListIndex = 0; for (var i = 0; i < actTimeList.length; i++) { - if (timeFlag(actTimeList[i].actTime.startHour) == 1) { + if (timeFlag(actTimeList[i].actTime?.startHour) == 1) { actTimeListIndex = i; break; } } if (actTimeList.length > actTimeListIndex) - productList.addAll(actTimeList[actTimeListIndex].productList); + productList.addAll(actTimeList[actTimeListIndex].productList ?? []); startCountdownTimer(); refreshController.refreshCompleted(); }); @@ -182,30 +187,29 @@ class _ActivityPrefectureDetails extends State { ///限天秒杀时间 startCountdownTimer() { - if (_timer != null) return; - const oneSec = const Duration(seconds: 1); - var callback = ((timer) { - if (isDispose) return; - setState(() { - var tempDateTime = - DateTime.parse(actTemplate.endTime).difference(DateTime.now()); - if (tempDateTime.inSeconds < 0) { - tempDay = 0; - tempHour = 0; - tempM = 0; - tempS = 0; - return; - } - tempDay = tempDateTime.inDays; - tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); - tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); - tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); - }); - }); - _timer = Timer.periodic(oneSec, callback); + return; + // const oneSec = const Duration(seconds: 1); + // var callback = ((timer) { + // if (isDispose) return; + // setState(() { + // var tempDateTime = + // DateTime.parse(actTemplate!.endTime).difference(DateTime.now()); + // if (tempDateTime.inSeconds < 0) { + // tempDay = 0; + // tempHour = 0; + // tempM = 0; + // tempS = 0; + // return; + // } + // tempDay = tempDateTime.inDays; + // tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); + // tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); + // tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); + // }); + // }); + // _timer = Timer.periodic(oneSec, callback); } - @override Widget build(BuildContext context) { return Container( @@ -217,11 +221,10 @@ class _ActivityPrefectureDetails extends State { header: MyHeader(), physics: BouncingScrollPhysics(), onRefresh: () { - setState(() { - queryFindActListByType((pageType == "2" && seckillIndex == 0) ? false : true); - }); + queryFindActListByType( + (pageType == "2" && seckillIndex == 0) ? false : true); }, - child:SingleChildScrollView( + child: SingleChildScrollView( physics: BouncingScrollPhysics(), controller: _scrollController, child: Column( @@ -240,18 +243,19 @@ class _ActivityPrefectureDetails extends State { Widget seckillProduct() { return Container( decoration: BoxDecoration( - borderRadius: BorderRadius.vertical( - bottom: Radius.circular(8.h), - ), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - color: Colors.white), + borderRadius: BorderRadius.vertical( + bottom: Radius.circular(8.h), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + color: Colors.white, + ), child: Column( children: [ swiper(), @@ -277,26 +281,27 @@ class _ActivityPrefectureDetails extends State { width: 14.w, ), Expanded( - child: ListView.builder( - scrollDirection: Axis.horizontal, - physics: BouncingScrollPhysics(), - itemCount: actTimeList?.length ?? 0, - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - setState(() { - actTimeListIndex = position; - productList.clear(); - productList.addAll( - actTimeList[actTimeListIndex] - .productList); - }); - }, - child: - timeItem(actTimeList[position], position), - ); - }, - )), + child: ListView.builder( + scrollDirection: Axis.horizontal, + physics: BouncingScrollPhysics(), + itemCount: actTimeList.length ?? 0, + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + setState(() { + actTimeListIndex = position; + productList.clear(); + productList.addAll( + actTimeList[actTimeListIndex] + .productList ?? + []); + }); + }, + child: timeItem(actTimeList[position], position), + ); + }, + ), + ), ], ), ) @@ -591,69 +596,70 @@ class _ActivityPrefectureDetails extends State { ///秒杀列表 Widget seckilList() { - return (pageType == "2")?Container( - height: MediaQuery.of(context).size.height - - 62.h - - MediaQuery.of(context).padding.top, - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - color: Colors.white, - child: seckilListChild(), - ):Container( - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - color: Colors.white, - child: seckilListChild(), - ); + return (pageType == "2") + ? Container( + height: MediaQuery.of(context).size.height - + 62.h - + MediaQuery.of(context).padding.top, + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + color: Colors.white, + child: seckilListChild(), + ) + : Container( + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + color: Colors.white, + child: seckilListChild(), + ); } Widget seckilListChild() { - return productList.length == 0 - ? Container( - width: double.infinity, - alignment: Alignment.topCenter, - child: Text( - "暂无商品参与活动", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Colors.black, - ), - ), - ) - : ListView.builder( - padding: EdgeInsets.zero, - itemCount: productList?.length ?? 0, - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: _scrollPhysics, - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - setState(() { - Navigator.of(context).pushNamed( - '/router/shopping_goods_details', - arguments: { - "actProductId": productList[position].id, - "productId":productList[position].productId, - "type":pageType, - "storeId": storeId, - "tenant": tenant, - "limitNumber":actTemplate.limitNumber, - "limitTime":actTemplate.limitTime, - "bannerImg":actTemplate.bannerImg, - }, - ); - }); + return productList.length == 0 + ? Container( + width: double.infinity, + alignment: Alignment.topCenter, + child: Text( + "暂无商品参与活动", + style: TextStyle( + fontSize: 18.sp, + fontWeight: MyFontWeight.medium, + color: Colors.black, + ), + ), + ) + : ListView.builder( + padding: EdgeInsets.zero, + itemCount: productList.length ?? 0, + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: _scrollPhysics, + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + setState(() { + Navigator.of(context).pushNamed( + '/router/shopping_goods_details', + arguments: { + "actProductId": productList[position].id, + "productId": productList[position].productId, + "type": pageType, + "storeId": storeId, + "tenant": tenant, + "limitNumber": actTemplate?.limitNumber, + "limitTime": actTemplate?.limitTime, + "bannerImg": actTemplate?.bannerImg, + }, + ); + }); + }, + child: seckilItem(productList[position]), + ); }, - child: seckilItem(productList[position]), ); - }, - ); } int timeFlag(String time) { - if (time == null) return 0; var now = DateTime.now().hour; - var tHour = int.tryParse(time.substring(0, 2)); + var tHour = int.tryParse(time.substring(0, 2)) ?? 0; if (now < tHour) return 0; else if (now == tHour) @@ -663,7 +669,7 @@ class _ActivityPrefectureDetails extends State { } Widget timeItem(TimeProductList actTimeList, index) { - var tStatus = timeFlag(actTimeList.actTime.startHour); + var tStatus = timeFlag(actTimeList.actTime?.startHour); return Container( margin: EdgeInsets.only(right: 12.w, top: 8.h, bottom: 8.h), child: Column( @@ -671,7 +677,7 @@ class _ActivityPrefectureDetails extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - actTimeList?.actTime?.startHour ?? "", + actTimeList.actTime?.startHour ?? "", style: TextStyle( fontSize: 17.sp, fontWeight: MyFontWeight.semi_bold, @@ -681,102 +687,103 @@ class _ActivityPrefectureDetails extends State { ), ), Expanded( - child: tStatus == 0 - ? Container( - alignment: Alignment.center, - width: 48.w, - height: 15.h, - decoration: BoxDecoration( + child: tStatus == 0 + ? Container( + alignment: Alignment.center, + width: 48.w, + height: 15.h, + decoration: BoxDecoration( + color: index == actTimeListIndex + ? Color(0xFFFB312B) + : Colors.transparent, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + ), + child: Text( + "即将开始", + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.regular, color: index == actTimeListIndex - ? Color(0xFFFB312B) - : Colors.transparent, - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ), - ], + ? Colors.white + : Color(0xFF4D4D4D), ), - child: Text( - "即将开始", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, + ), + ) + : (tStatus == 1 + ? Container( + alignment: Alignment.center, + width: 48.w, + height: 15.h, + decoration: BoxDecoration( color: index == actTimeListIndex - ? Colors.white - : Color(0xFF4D4D4D), + ? Color(0xFFFB312B) + : Colors.transparent, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], ), - ), - ) - : (tStatus == 1 - ? Container( - alignment: Alignment.center, - width: 48.w, - height: 15.h, - decoration: BoxDecoration( + child: Text( + "马上抢", + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.regular, color: index == actTimeListIndex - ? Color(0xFFFB312B) - : Colors.transparent, - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ), - ], + ? Colors.white + : Color(0xFF4D4D4D), ), - child: Text( - "马上抢", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: index == actTimeListIndex - ? Colors.white - : Color(0xFF4D4D4D), + ), + ) + : Container( + alignment: Alignment.center, + width: 48.w, + height: 15.h, + decoration: BoxDecoration( + color: index == actTimeListIndex + ? Color(0xFFFB312B) + : Colors.transparent, + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, ), - ), - ) - : Container( - alignment: Alignment.center, - width: 48.w, - height: 15.h, - decoration: BoxDecoration( + ], + ), + child: Text( + "已结束", + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.regular, color: index == actTimeListIndex - ? Color(0xFFFB312B) - : Colors.transparent, - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ), - ], - ), - child: Text( - "已结束", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: index == actTimeListIndex - ? Colors.white - : Color(0xFF4D4D4D), - ), + ? Colors.white + : Color(0xFF4D4D4D), ), - ))) + ), + )), + ) ], ), ); } - Widget seckilItem(ProductList productList) { - var tStatus = timeFlag(actTimeList[actTimeListIndex].actTime.startHour); + Widget seckilItem(ShopHomeProductList productList) { + var tStatus = timeFlag(actTimeList[actTimeListIndex].actTime?.startHour); return Container( // height:94.h, margin: EdgeInsets.only(right: 12.w, top: 12.h, bottom: 12.h), @@ -785,7 +792,7 @@ class _ActivityPrefectureDetails extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - productList.productImg, + productList.productImg ?? "", width: 94, height: 94, fit: BoxFit.cover, @@ -801,7 +808,7 @@ class _ActivityPrefectureDetails extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - productList.productName, + productList.productName ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -833,20 +840,20 @@ class _ActivityPrefectureDetails extends State { Container( width: productList.sellCount == 0 ? 0 - : (((productList?.sellCount ?? 0) / - (productList?.productStock ?? - 0)) * - 180.w) - .toDouble(), + : (((productList.sellCount ?? 0) / + (productList.productStock ?? + 0)) * + 180.w) + .toDouble(), height: 8.h, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [ - Color(0xFFFDBA56), - Color(0xFFFB2B2B) - ])), + Color(0xFFFDBA56), + Color(0xFFFB2B2B) + ])), ) ], )), @@ -874,7 +881,7 @@ class _ActivityPrefectureDetails extends State { color: Color(0xFFFFCD00), ), child: Text( - "最高可砍${(double.parse(productList?.productPrice ?? "0") - double.parse(productList?.promotionPrice ?? "0")).toStringAsFixed(2)}元", + "最高可砍${(double.parse(productList.productPrice ?? "0") - double.parse(productList.promotionPrice ?? "0")).toStringAsFixed(2)}元", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, @@ -917,10 +924,12 @@ class _ActivityPrefectureDetails extends State { ], ), ), - SizedBox(width:2.w,), + SizedBox( + width: 2.w, + ), Expanded( child: Text( - productList.productPrice, + productList.productPrice ?? "", style: TextStyle( fontSize: 11.sp, decoration: TextDecoration.lineThrough, diff --git a/lib/store/shopping/shopping_cart/shopping_cart_page.dart b/lib/store/shopping/shopping_cart/shopping_cart_page.dart index a2e65784..478b73fb 100644 --- a/lib/store/shopping/shopping_cart/shopping_cart_page.dart +++ b/lib/store/shopping/shopping_cart/shopping_cart_page.dart @@ -1,12 +1,10 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/shopping_cart.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -18,10 +16,10 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ShoppingCartPage extends StatefulWidget { - final String minToken; + final String? minToken; final String storeId; final String tenant; - final StoreInfo storeInfo; + final StoreInfo? storeInfo; ShoppingCartPage(this.minToken, this.storeId, this.tenant, this.storeInfo); @@ -33,13 +31,13 @@ class ShoppingCartPage extends StatefulWidget { class _ShoppingCartPage extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; - MinApiService minService; + ApiService? apiService; + MinApiService? minService; List shopCarGoods = []; - String pName; - String pid; - String cName; - String cid; + String? pName; + String? pid; + String? cName; + String? cid; int tableId = 0; bool topIndex = false; bool isAllSelect = false; @@ -53,9 +51,9 @@ class _ShoppingCartPage extends State ///清空购物车 clearShopCar() async { - shopCarGoods[0].shoppingCartSkuItemList.forEach((element) { + shopCarGoods[0].shoppingCartSkuItemList?.forEach((element) { if (element.selected == 1) { - shopCartAdd(element, -element.buyNum, element.selected); + shopCartAdd(element, -(element.buyNum ?? 0), (element.selected ?? 0)); } }); queryShopCar(); @@ -79,41 +77,32 @@ class _ShoppingCartPage extends State ///查询购物车商品 queryShopCar() async { - if (widget.minToken == null) return; - if (minService == null) - minService = MinApiService( - Dio(), - context: context, - token: widget.minToken, - tenant: widget.tenant, - storeId: widget.storeId, - showLoading: false, - ); - BaseData> baseData = - await minService.getShoppingCart(tableId).catchError((error) { + BaseData>? baseData = await minService?.getShoppingCart(tableId).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - setState(() { - shopCarGoods.clear(); - shopCarGoods.addAll(baseData.data); - refreshController.refreshCompleted(); - }); + if (baseData?.isSuccess ?? false) { + if (baseData!.data?.isNotEmpty ?? false) { + setState(() { + shopCarGoods.clear(); + shopCarGoods.addAll(baseData.data!); + refreshController.refreshCompleted(); + }); + } } else { refreshController.refreshFailed(); } } ///购物车数量修改 - shopCartAdd( - ShoppingCartSkuItemListBean cartSkuItem, int count, int selected) async { + shopCartAdd(SkuItemList? cartSkuItem, int count, int selected) async { Map shopCarTemp = shopCarGoods[0].toJson(); - cartSkuItem.buyNum += count; - cartSkuItem.selected = selected; + int butNum = cartSkuItem?.buyNum ?? 0; + cartSkuItem?.buyNum = (butNum + count); + cartSkuItem?.selected = selected; shopCarTemp["selected"] = selected; - shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; - BaseData baseDate = await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()]; + BaseData? baseDate = await minService?.shoppingCartSingle(shopCarTemp); + if (baseDate?.isSuccess ?? false) { setState(() { queryShopCar(); }); @@ -126,7 +115,7 @@ class _ShoppingCartPage extends State @override void dispose() { super.dispose(); - if (refreshController != null) refreshController.dispose(); + refreshController.dispose(); } final RefreshController refreshController = RefreshController(); @@ -191,6 +180,7 @@ class _ShoppingCartPage extends State ], ); }, + future: null, ), ), ), @@ -224,11 +214,9 @@ class _ShoppingCartPage extends State onTap: () { setState(() { isAllSelect = !isAllSelect; - shopCarGoods[0] - .shoppingCartSkuItemList - .forEach((element) { + shopCarGoods[0].shoppingCartSkuItemList?.forEach((element) { element.selected = isAllSelect ? 1 : 0; - shopCartAdd(element, 0, element.selected); + shopCartAdd(element, 0, (element.selected ?? 0)); }); }); }, @@ -268,8 +256,8 @@ class _ShoppingCartPage extends State ), ), TextSpan( - text: ((shopCarGoods?.length ?? 0) > 0) - ? (shopCarGoods[0]?.cartSum ?? "") + text: (shopCarGoods.isNotEmpty) + ? ("${shopCarGoods[0].cartSum}") : "", style: TextStyle( fontSize: 20.sp, @@ -358,15 +346,13 @@ class _ShoppingCartPage extends State bool isAllItemUnSelected(){ bool unAllSelectedFlag = true; bool allSelectedFlag = true; - if(shopCarGoods == null || shopCarGoods.length == 0){ + if(shopCarGoods.length == 0){ setState(() { isAllSelect = false; }); return unAllSelectedFlag; } - shopCarGoods[0] - .shoppingCartSkuItemList - .forEach((element) { + shopCarGoods[0].shoppingCartSkuItemList?.forEach((element) { if(element.selected == 1) unAllSelectedFlag = false; else allSelectedFlag = false; @@ -378,7 +364,7 @@ class _ShoppingCartPage extends State } Widget cartGoodsList() { - return (shopCarGoods == null || shopCarGoods.length == 0) + return (shopCarGoods.length == 0) ? NoDataView( src: "assets/image/shopping_k.webp", isShowBtn: false, @@ -390,8 +376,8 @@ class _ShoppingCartPage extends State margin: EdgeInsets.only(bottom: 50.h), child: SlidableAutoCloseBehavior( child:ListView.builder( - itemCount: ((shopCarGoods?.length ?? 0) > 0) - ? (shopCarGoods[0]?.shoppingCartSkuItemList?.length ?? 0) + itemCount: ((shopCarGoods.length ?? 0) > 0) + ? (shopCarGoods[0].shoppingCartSkuItemList?.length ?? 0) : 0, shrinkWrap: true, padding: EdgeInsets.only( @@ -415,13 +401,12 @@ class _ShoppingCartPage extends State children: [ SlidableAction( onPressed: (bc) { - shopCarGoods[0].shoppingCartSkuItemList[position].selected = - (shopCarGoods[0].shoppingCartSkuItemList[position].selected == - 0) + shopCarGoods[0].shoppingCartSkuItemList?[position].selected = + (shopCarGoods[0].shoppingCartSkuItemList?[position].selected == 0) ? 1 : 0; - shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList[position], 0, - shopCarGoods[0].shoppingCartSkuItemList[position].selected); + shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList?[position], 0, + shopCarGoods[0].shoppingCartSkuItemList?[position].selected ?? 0); if(isAllItemUnSelected()) return; clearShopCar(); @@ -467,19 +452,17 @@ class _ShoppingCartPage extends State GestureDetector( onTap: () { setState(() { - shopCarGoods[0].shoppingCartSkuItemList[index].selected = - (shopCarGoods[0].shoppingCartSkuItemList[index].selected == - 0) + shopCarGoods[0].shoppingCartSkuItemList?[index].selected = (shopCarGoods[0].shoppingCartSkuItemList?[index].selected == 0) ? 1 : 0; - shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList[index], 0, - shopCarGoods[0].shoppingCartSkuItemList[index].selected); + shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList?[index], 0, + shopCarGoods[0].shoppingCartSkuItemList?[index].selected ?? 0); }); }, child:Container( height: 60, child:Image.asset( - (shopCarGoods[0].shoppingCartSkuItemList[index].selected == 1) + (shopCarGoods[0].shoppingCartSkuItemList?[index].selected == 1) ? "assets/image/icon_radio_selected.webp" : "assets/image/icon_radio_unselected.webp", width: 16, @@ -488,7 +471,7 @@ class _ShoppingCartPage extends State ), SizedBox(width: 16.w), MImage( - shopCarGoods[0].shoppingCartSkuItemList[index]?.skuImg ?? "", + shopCarGoods[0].shoppingCartSkuItemList?[index].skuImg ?? "", isCircle: true, width: 81, height: 81, @@ -506,8 +489,8 @@ class _ShoppingCartPage extends State children: [ Text( shopCarGoods[0] - .shoppingCartSkuItemList[index] - ?.productName ?? + .shoppingCartSkuItemList?[index] + .productName ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, @@ -519,7 +502,7 @@ class _ShoppingCartPage extends State ), // SizedBox(height: 5.h), Text( - shopCarGoods[0].shoppingCartSkuItemList[index]?.skuName ?? + shopCarGoods[0].shoppingCartSkuItemList?[index].skuName ?? "", style: TextStyle( fontSize: 12.sp, @@ -546,8 +529,8 @@ class _ShoppingCartPage extends State ), TextSpan( text: shopCarGoods[0] - .shoppingCartSkuItemList[index] - ?.skuPrice ?? + .shoppingCartSkuItemList?[index] + .skuPrice ?? "", style: TextStyle( fontSize: 16.sp, @@ -565,17 +548,17 @@ class _ShoppingCartPage extends State InkWell( onTap: () { setState(() { - if (shopCarGoods[0] - .shoppingCartSkuItemList[index] - .buyNum > + if ((shopCarGoods[0] + .shoppingCartSkuItemList?[index] + .buyNum ?? 0) > 1) shopCartAdd( shopCarGoods[0] - .shoppingCartSkuItemList[index], + .shoppingCartSkuItemList?[index], -1, shopCarGoods[0] - .shoppingCartSkuItemList[index] - .selected); + .shoppingCartSkuItemList?[index] + .selected ?? 0); }); }, child: Image.asset( @@ -588,11 +571,7 @@ class _ShoppingCartPage extends State width: 30, alignment: Alignment.center, child: Text( - shopCarGoods[0] - .shoppingCartSkuItemList[index] - ?.buyNum - .toString() ?? - 0, + "${shopCarGoods[0].shoppingCartSkuItemList?[index].buyNum.toString()}", style: TextStyle( color: Colors.black, fontSize: 16.sp, @@ -602,14 +581,14 @@ class _ShoppingCartPage extends State ), InkWell( onTap: () { + shopCartAdd( + shopCarGoods[0] + .shoppingCartSkuItemList?[index], + 1, + shopCarGoods[0] + .shoppingCartSkuItemList?[index] + .selected ?? 0); setState(() { - shopCartAdd( - shopCarGoods[0] - .shoppingCartSkuItemList[index], - 1, - shopCarGoods[0] - .shoppingCartSkuItemList[index] - .selected); }); }, child: Image.asset( diff --git a/lib/store/shopping/shopping_goods_details.dart b/lib/store/shopping/shopping_goods_details.dart index 60e8fb5e..71024f7e 100644 --- a/lib/store/shopping/shopping_goods_details.dart +++ b/lib/store/shopping/shopping_goods_details.dart @@ -7,15 +7,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/act_record_and_join_dto_list.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/shopping_cart.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/activity_details.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/launch_join_act.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/activity_details.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/settlement/settlement_model.dart'; @@ -30,7 +30,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:url_launcher/url_launcher.dart'; class ShoppingGoodsDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; ShoppingGoodsDetails({this.arguments}); @@ -43,68 +43,66 @@ class ShoppingGoodsDetails extends StatefulWidget { class _ShoppingGoodsDetails extends State { final RefreshController refreshController = RefreshController(); final ScrollController scrollController = ScrollController(); - ApiService apiService; - MinApiService minService; - String tenant; - String storeId; - String minToken; - String id; - StoreInfo storeInfo; - MiNiDetail miNiDetail; + ApiService? apiService; + MinApiService? minService; + late String tenant; + late String storeId; + late String minToken; + String? id; + StoreInfo? storeInfo; + MiniDetail? miNiDetail; bool dialogShowing = false; - String skuId1; - String skuPrice1; - String skuValue1; + String? skuId1; + String? skuPrice1; + String? skuValue1; int count1 = 0; int tableId = 0; String parentId = ""; String parentCode = ""; int numberOfPeople = 0; - List activitys; - ProductSkuVOListBean productSku; - String actProductId; - String productId; - String pageType = "1"; - ActivityDetails activityDetails; + List? activitys; + ProductSkuVOList? productSku; + String? actProductId; + String? productId; + String? pageType = "1"; + ActivityDetails? activityDetails; int limitNumber = 0; int limitTime = 0; - String bannerImg; - String pName; - String pid; - String cName; - String cid; + String? bannerImg; + String? pName; + String? pid; + String? cName; + String? cid; bool isDispose = false; - Timer _timer; + Timer? _timer; String testTime = "2021-12-30 10:00:00"; int tempDay = 0; int tempHour = 0; int tempM = 0; int tempS = 0; BargainType bargainType = BargainType.BargainZBug; - String indexP; + String? indexP; JoinActivity joinA = JoinActivity.GoJoin; @override void dispose() { super.dispose(); isDispose = true; - if (_timer != null) { - _timer.cancel(); - } + _timer?.cancel(); } @override void initState() { super.initState(); - storeId = widget.arguments["storeId"]; - tenant = widget.arguments["tenant"]; - id = widget.arguments["id"]; - pageType = widget.arguments["type"]; - actProductId = widget.arguments["actProductId"]; - limitNumber = widget.arguments["limitNumber"]; - limitTime = widget.arguments["limitTime"]; - bannerImg = widget.arguments["bannerImg"]; - productId = widget.arguments["productId"]; + storeId = widget.arguments?["storeId"] ?? ""; + tenant = widget.arguments?["tenant"] ?? ""; + id = widget.arguments?["id"]; + pageType = widget.arguments?["type"]; + actProductId = widget.arguments?["actProductId"]; + limitNumber = widget.arguments?["limitNumber"]; + limitTime = widget.arguments?["limitTime"]; + bannerImg = widget.arguments?["bannerImg"]; + productId = widget.arguments?["productId"]; if (pageType == "1") startCountdownTimer(); debugPrint("store_param tenant:$tenant storeId:$storeId"); @@ -116,40 +114,38 @@ class _ShoppingGoodsDetails extends State { /// 小程序登录 minLogin(SharedPreferences shared) async { - EasyLoading.show(status: S.of(context).zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.of(context).zhengzaijiazai, + maskType: EasyLoadingMaskType.black); apiService = ApiService( Dio(), context: context, - token: shared.getString('token'), + token: shared.getString('token') ?? "", showLoading: false, ); - apiService.minLogin(storeId).catchError((onError) { + apiService?.minLogin(storeId ?? "").catchError((onError) { debugPrint(onError.toString()); }).then((baseData) { - if (baseData != null && baseData.isSuccess) { - minToken = baseData.data["token"]; + if (baseData?.isSuccess ?? false) { + minToken = baseData.data["token"] ?? ""; queryStoreInfo(); SharedPreferences.getInstance().then( (value) => { value.setString('minToken', minToken), - value.setString('tenant', tenant), - value.setString('storeId', storeId), + value.setString('tenant', tenant ?? ""), + value.setString('storeId', storeId ?? ""), }, ); minService = MinApiService( Dio(), context: context, - token: minToken, - tenant: tenant, - storeId: storeId, + token: minToken ?? "", + tenant: tenant ?? "", + storeId: storeId ?? "", showLoading: false, ); queryMemberInfo(); - if (pageType == null) { - queryMiNiDetail(id); - } else { - queryMiNiDetail(productId); - } + queryMiNiDetail(productId); EasyLoading.dismiss(); } }); @@ -157,13 +153,13 @@ class _ShoppingGoodsDetails extends State { ///会员信息 queryMemberInfo() async { - BaseData baseData = await minService.memberInfo().catchError((error) { + BaseData? baseData = await minService?.memberInfo().catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { SharedPreferences.getInstance().then( (value) => { - value.setString('minMember', jsonEncode(baseData.data)), + value.setString('minMember', jsonEncode(baseData!.data)), }, ); } @@ -171,14 +167,14 @@ class _ShoppingGoodsDetails extends State { /// 查询店铺信息 queryStoreInfo() async { - BaseData baseData = - await apiService.queryStoreInfo(storeId).catchError((error) { + BaseData? baseData = + await apiService?.queryStoreInfo(storeId).catchError((error) { debugPrint(error.toString()); }); - if (baseData != null && baseData.isSuccess) { - storeInfo = StoreInfo.fromJson(baseData.data); - activitys = storeInfo.informationVOPageVO.list - .map((e) => Activity.fromJson(e)) + if (baseData?.isSuccess ?? false) { + storeInfo = StoreInfo.fromJson(baseData!.data); + activitys = storeInfo?.informationVOPageVO?.list + ?.map((e) => Activity.fromJson(e)) .toList(); if (mounted) { setState(() {}); @@ -189,23 +185,14 @@ class _ShoppingGoodsDetails extends State { ///商品详情 queryMiNiDetail(id) async { - if (minService == null) - minService = MinApiService( - Dio(), - context: context, - token: minToken, - tenant: tenant, - storeId: storeId, - showLoading: false, - ); - BaseData baseData = - await minService.miNiDetail(id).catchError((error) { + BaseData? baseData = + await minService?.miNiDetail(id).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - miNiDetail = baseData.data; - if (pageType != null) queryViewProduct(actProductId, pageType); + miNiDetail = baseData!.data; + queryViewProduct(actProductId, pageType); }); refreshController.refreshCompleted(); } else { @@ -215,32 +202,19 @@ class _ShoppingGoodsDetails extends State { ///活动商品详情 queryViewProduct(actProductId, pageType) async { - if (minService == null) - minService = MinApiService( - Dio(), - context: context, - token: minToken, - tenant: tenant, - storeId: storeId, - showLoading: false, - ); - BaseData baseData = await minService - .viewProduct(actProductId, pageType) + BaseData? baseData = await minService + ?.viewProduct(actProductId, pageType) .catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - activityDetails = baseData.data; - miNiDetail.productSkuVOList.forEach((element) { - var sku = activityDetails.actProduct.skuJson - .firstWhere((ele) => ele.skuId == element.id); - if (sku == null) { - miNiDetail.productSkuVOList.remove(sku); - } else { - element.skuPrice = sku.skuPrice.toString(); - element.skuStock = sku.skuStock.toInt(); - } + activityDetails = baseData!.data; + miNiDetail?.productSkuVOList?.forEach((element) { + var sku = activityDetails?.actProduct?.skuJson + ?.firstWhere((ele) => ele.skuId == element.id); + element.skuPrice = "${sku?.skuPrice}"; + element.skuStock = sku?.skuStock ?? 0; }); goodsCountdownTimer(); refreshController.refreshCompleted(); @@ -251,45 +225,45 @@ class _ShoppingGoodsDetails extends State { } ///选规格弹窗 - showStoreSelector(MiNiDetail miNiDetail, String id, int count) async { + showStoreSelector(MiniDetail miNiDetail, String id, int count) async { // if (miNiDetail.attrList != null && // miNiDetail.attrList.length == 1 && // miNiDetail.attrList[0].attrValueList.length == 1) { // _addShopCar(miNiDetail, [], count); // } else { - EasyLoading.dismiss(); - dialogShowing = true; - SmartDialog.show( - widget: ProductSku( - miNiDetail, - null, - id, - _addShopCar, - add, - reduce, - buttonType: 1, - ), - onDismiss: () { - dialogShowing = false; - }, - alignmentTemp: Alignment.bottomCenter, - ); + EasyLoading.dismiss(); + dialogShowing = true; + SmartDialog.show( + widget: ProductSku( + miNiDetail, + null, + id, + _addShopCar, + add, + reduce, + buttonType: 1, + ), + onDismiss: () { + dialogShowing = false; + }, + alignmentTemp: Alignment.bottomCenter, + ); // } } ///选规格添加购物车 Future _addShopCar( - MiNiDetail miNiDetail, + MiniDetail miNiDetail, selectSkus, int count, ) async { if (selectSkus != null && selectSkus.length == 0) { - productSku = miNiDetail.productSkuVOList.first; + productSku = miNiDetail.productSkuVOList?.first; } else { - productSku = miNiDetail.productSkuVOList.firstWhere((element) { + productSku = miNiDetail.productSkuVOList?.firstWhere((element) { bool gg = true; selectSkus.forEach((element1) { - if (element.skuNameStr.indexOf(element1) < 0) { + if ((element.skuNameStr?.indexOf(element1) ?? 0) < 0) { gg = false; return gg; } @@ -297,14 +271,13 @@ class _ShoppingGoodsDetails extends State { return gg; }); } - if (productSku == null) return; - String skuId = productSku.id; + String? skuId = productSku?.id; String skuValue = selectSkus .toString() .replaceAll("[", "") .replaceAll("]", "") .replaceAll(",", ""); - String skuPrice = productSku.skuPrice; + String? skuPrice = productSku?.skuPrice; setState(() { skuId1 = skuId; skuValue1 = skuValue; @@ -314,14 +287,14 @@ class _ShoppingGoodsDetails extends State { } ///商品➕1 - add(MiNiDetail miNiDetail, selectSkus) async {} + add(MiniDetail miNiDetail, selectSkus) async {} ///商品➖1 - reduce(MiNiDetail miNiDetail, selectSkus) async {} + reduce(MiniDetail miNiDetail, selectSkus) async {} ///添加购物车按钮 addShoppingCar() async { - BaseData> baseDate = await minService.addShoppingCart({ + BaseData>? baseDate = await minService?.addShoppingCart({ "storeId": storeId, "storeName": storeInfo?.storeName ?? "", "numberOfPeople": numberOfPeople, @@ -332,90 +305,85 @@ class _ShoppingGoodsDetails extends State { { "buyNum": count1, "id": skuId1, - "productId": miNiDetail.id, - "productName": miNiDetail.productName, + "productId": miNiDetail?.id, + "productName": miNiDetail?.productName, "skuName": skuValue1, "storeId": storeId, - "skuPrice": productSku.skuPrice, - "skuStock": productSku.skuStock, + "skuPrice": productSku?.skuPrice, + "skuStock": productSku?.skuStock, "tableId": tableId, }, ], }); EasyLoading.dismiss(); - if (baseDate != null && baseDate.isSuccess) { + if (baseDate?.isSuccess ?? false) { SmartDialog.showToast("添加购物车成功", alignment: Alignment.center); } } _onRefresh() { - if (pageType == null) { - queryMiNiDetail(id); - } else { - queryViewProduct(actProductId, pageType); - } + queryViewProduct(actProductId, pageType); } ///团购/秒杀时间 startCountdownTimer() { - if (_timer != null) return; - const oneSec = const Duration(seconds: 1); - var callback = ((timer) { - if (isDispose) return; - setState(() { - if ((activityDetails?.actRecordAndJoinlDTOList) != null) - activityDetails.actRecordAndJoinlDTOList.forEach((element) { - var tempDateTime = DateTime.parse(element.actRecord.endTime) - .difference(DateTime.now()); - if (tempDateTime.inSeconds < 0) { - element.actRecord.tempDay = 0; - element.actRecord.tempHour = 0; - element.actRecord.tempM = 0; - element.actRecord.tempS = 0; - return; - } - element.actRecord.tempDay = tempDateTime.inDays; - element.actRecord.tempHour = - tempDateTime.inHours - (tempDateTime.inDays * 24); - element.actRecord.tempM = - tempDateTime.inMinutes - (tempDateTime.inHours * 60); - element.actRecord.tempS = - tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); - }); - }); - }); - _timer = Timer.periodic(oneSec, callback); + return; + // const oneSec = const Duration(seconds: 1); + // var callback = ((timer) { + // if (isDispose) return; + // setState(() { + // activityDetails?.actRecordAndJoinlDTOList.forEach((element) { + // var tempDateTime = DateTime.parse(element.actRecord.endTime) + // .difference(DateTime.now()); + // if (tempDateTime.inSeconds < 0) { + // element.actRecord.tempDay = 0; + // element.actRecord.tempHour = 0; + // element.actRecord.tempM = 0; + // element.actRecord.tempS = 0; + // return; + // } + // element.actRecord.tempDay = tempDateTime.inDays; + // element.actRecord.tempHour = + // tempDateTime.inHours - (tempDateTime.inDays * 24); + // element.actRecord.tempM = + // tempDateTime.inMinutes - (tempDateTime.inHours * 60); + // element.actRecord.tempS = + // tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); + // }); + // }); + // }); + // _timer = Timer.periodic(oneSec, callback); } ///商品秒杀时间 goodsCountdownTimer() { - if (_timer != null) return; - const oneSec = const Duration(seconds: 1); - var callback = ((timer) { - if (isDispose) return; - setState(() { - var tempDateTime = - DateTime.parse(activityDetails.endTime).difference(DateTime.now()); - if (tempDateTime.inSeconds < 0) { - tempDay = 0; - tempHour = 0; - tempM = 0; - tempS = 0; - return; - } - tempDay = tempDateTime.inDays; - tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); - tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); - tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); - }); - }); - _timer = Timer.periodic(oneSec, callback); + return; + // const oneSec = const Duration(seconds: 1); + // var callback = ((timer) { + // if (isDispose) return; + // setState(() { + // var tempDateTime = + // DateTime.parse(activityDetails!.endTime).difference(DateTime.now()); + // if (tempDateTime.inSeconds < 0) { + // tempDay = 0; + // tempHour = 0; + // tempM = 0; + // tempS = 0; + // return; + // } + // tempDay = tempDateTime.inDays; + // tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); + // tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); + // tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); + // }); + // }); + // _timer = Timer.periodic(oneSec, callback); } ///去下单结算页面 toDownOrder() async { if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast("请先选择您要购买的商品!~", alignment: Alignment.center); return; } await Navigator.of(context).pushNamed( @@ -434,12 +402,12 @@ class _ShoppingGoodsDetails extends State { { "buyNum": count1, "id": skuId1, - "productId": miNiDetail.id, - "productName": miNiDetail.productName, + "productId": miNiDetail?.id, + "productName": miNiDetail?.productName, "skuName": skuValue1, "storeId": storeId, - "skuPrice": productSku.skuPrice, - "skuStock": productSku.skuStock, + "skuPrice": productSku?.skuPrice, + "skuStock": productSku?.skuStock, "tableId": tableId, }, ], @@ -450,14 +418,14 @@ class _ShoppingGoodsDetails extends State { ///普通商品直接购买去下单结算页面 toGoods() async { if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast("请先选择您要购买的商品!~", alignment: Alignment.center); return; } await Navigator.of(context).pushNamed( '/router/settlement', arguments: { "storeInfo": storeInfo, - "productId": miNiDetail.id, + "productId": miNiDetail?.id, "productSkuId": skuId1, "buyNum": count1, }, @@ -473,8 +441,8 @@ class _ShoppingGoodsDetails extends State { "pageType": pageType, "isDirectBuy": true, "productId": (pageType != null) - ? activityDetails.actProduct.productId - : miNiDetail.id, + ? activityDetails?.actProduct?.productId + : miNiDetail?.id, "skuId": skuId1, "buyNum": count1, "skuValue1": skuValue1, @@ -534,7 +502,10 @@ class _ShoppingGoodsDetails extends State { if (pageType == "1") groupRule(), goodsOption(), Padding( - padding: EdgeInsets.only(top: 16.h, bottom: 12.h), + padding: EdgeInsets.only( + top: 16.h, + bottom: 12.h, + ), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -567,13 +538,6 @@ class _ShoppingGoodsDetails extends State { data: pageType != null ? (activityDetails?.actProduct?.details ?? "") : (miNiDetail?.details ?? ""), - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, ), ), ], @@ -610,12 +574,10 @@ class _ShoppingGoodsDetails extends State { children: [ GestureDetector( onTap: () { - Navigator.of(context) - .pushNamed('/router/shopping_mall_home', arguments: { - "type": 1, - "id": storeId, - "tenant": tenant - }); + Navigator.of(context).pushNamed( + '/router/shopping_mall_home', + arguments: {"type": 1, "id": storeId, "tenant": tenant}, + ); }, child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -677,73 +639,6 @@ class _ShoppingGoodsDetails extends State { return Container( child: Row( children: [ - if (pageType == null) - Row( - children: [ - GestureDetector( - onTap: () { - if (productSku == null) - SmartDialog.showToast("请选择規格!", - alignment: Alignment.center); - addShoppingCar(); - }, - child: Container( - alignment: Alignment.center, - width: 120.w, - height: 37.h, - margin: EdgeInsets.only(left: 6.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(16), - border: Border.all( - width: 1, - color: Color(0xFF32A060), - style: BorderStyle.solid, - ), - ), - child: Text( - "加入购物车", - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF32A060), - ), - ), - ), - ), - GestureDetector( - onTap: () { - toGoods(); - }, - child: Container( - alignment: Alignment.center, - width: 120.w, - height: 37.h, - margin: EdgeInsets.only(left: 6.w), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ), - ], - ), - child: Text( - "立即购买", - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, - color: Colors.white, - ), - ), - )), - ], - ), - - ///秒杀按钮 if (pageType == "2") Row( children: [ @@ -751,7 +646,8 @@ class _ShoppingGoodsDetails extends State { onTap: () { joinA = JoinActivity.MZBug; if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast("请先选择您要购买的商品!~", + alignment: Alignment.center); return; } toOrder(); @@ -803,76 +699,77 @@ class _ShoppingGoodsDetails extends State { fontWeight: MyFontWeight.medium, color: Color(0xFF32A060), ), - )), + ), + ), ], ), ), ), GestureDetector( - onTap: () { - joinA = JoinActivity.MBug; - if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); - return; - } - toOrder(); - }, - child: Container( - alignment: Alignment.center, - width: 120.w, - height: 40.h, - margin: EdgeInsets.only(left: 6.w), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ), - ], - ), - child: Column( - children: [ - Text.rich( - TextSpan( - children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 7.sp, - fontWeight: MyFontWeight.medium, - color: Colors.white, - ), + onTap: () { + joinA = JoinActivity.MBug; + if (count1 == 0) { + SmartDialog.showToast("请先选择您要购买的商品!~", + alignment: Alignment.center); + return; + } + toOrder(); + }, + child: Container( + alignment: Alignment.center, + width: 120.w, + height: 40.h, + margin: EdgeInsets.only(left: 6.w), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + ), + child: Column( + children: [ + Text.rich( + TextSpan( + children: [ + TextSpan( + text: "¥", + style: TextStyle( + fontSize: 7.sp, + fontWeight: MyFontWeight.medium, + color: Colors.white, ), - TextSpan( - text: activityDetails - ?.actProduct?.promotionPrice ?? - "", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.medium, - color: Colors.white, - ), + ), + TextSpan( + text: activityDetails?.actProduct?.promotionPrice ?? "", + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, + color: Colors.white, ), - ], - ), - ), - Expanded( - child: Text( - "我要秒杀", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Colors.white, ), + ], + ), + ), + Expanded( + child: Text( + "我要秒杀", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Colors.white, ), ), - ], - ), - )), + ), + ], + ), + ), + ), ], ), @@ -885,7 +782,8 @@ class _ShoppingGoodsDetails extends State { bargainType = BargainType.BargainZBug; joinA = JoinActivity.BargainZBug; if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast("请先选择您要购买的商品!~", + alignment: Alignment.center); return; } toOrder(); @@ -917,9 +815,7 @@ class _ShoppingGoodsDetails extends State { ), ), TextSpan( - text: - activityDetails?.actProduct?.productPrice ?? - "", + text: activityDetails?.actProduct?.productPrice ?? "", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.medium, @@ -947,7 +843,8 @@ class _ShoppingGoodsDetails extends State { bargainType = BargainType.BargainBug; joinA = JoinActivity.BargainBug; if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast("请先选择您要购买的商品!~", + alignment: Alignment.center); return; } toOrder(); @@ -983,9 +880,7 @@ class _ShoppingGoodsDetails extends State { ), ), TextSpan( - text: activityDetails - ?.actProduct?.promotionPrice ?? - "", + text: activityDetails?.actProduct?.promotionPrice ?? "", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.medium, @@ -1007,7 +902,8 @@ class _ShoppingGoodsDetails extends State { ), ], ), - )), + ), + ), ], ), @@ -1019,7 +915,10 @@ class _ShoppingGoodsDetails extends State { onTap: () { joinA = JoinActivity.CollageZBug; if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast( + "请先选择您要购买的商品!~", + alignment: Alignment.center, + ); return; } toOrder(); @@ -1051,9 +950,7 @@ class _ShoppingGoodsDetails extends State { ), ), TextSpan( - text: - activityDetails?.actProduct?.productPrice ?? - "", + text: activityDetails?.actProduct?.productPrice ?? "", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.medium, @@ -1071,7 +968,8 @@ class _ShoppingGoodsDetails extends State { fontWeight: MyFontWeight.medium, color: Color(0xFF32A060), ), - )), + ), + ), ], ), ), @@ -1081,7 +979,10 @@ class _ShoppingGoodsDetails extends State { bargainType = BargainType.CollageBug; joinA = JoinActivity.CollageBug; if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast( + "请先选择您要购买的商品!~", + alignment: Alignment.center, + ); return; } toOrder(); @@ -1117,9 +1018,7 @@ class _ShoppingGoodsDetails extends State { ), ), TextSpan( - text: activityDetails - ?.actProduct?.promotionPrice ?? - "", + text: activityDetails?.actProduct?.promotionPrice ?? "", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.medium, @@ -1141,7 +1040,8 @@ class _ShoppingGoodsDetails extends State { ), ], ), - )), + ), + ), ], ), ], @@ -1153,18 +1053,19 @@ class _ShoppingGoodsDetails extends State { Widget buildColumn() { return Container( decoration: BoxDecoration( - borderRadius: BorderRadius.vertical( - bottom: Radius.circular(8.h), - ), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - color: Colors.white), + borderRadius: BorderRadius.vertical( + bottom: Radius.circular(8.h), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + color: Colors.white, + ), child: Column( children: [ swiper(), @@ -1174,10 +1075,14 @@ class _ShoppingGoodsDetails extends State { height: 50.h, padding: EdgeInsets.only(left: 16.w), decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.centerLeft, - end: Alignment.centerRight, - colors: [Color(0xFF32A057), Color(0xFF61CE6B)])), + gradient: LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + Color(0xFF32A057), Color(0xFF61CE6B), + ], + ), + ), child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -1196,8 +1101,7 @@ class _ShoppingGoodsDetails extends State { TextSpan( text: pageType == null ? (miNiDetail?.price ?? "") - : (activityDetails?.actProduct?.promotionPrice ?? - ""), + : (activityDetails?.actProduct?.promotionPrice ?? ""), style: TextStyle( fontSize: 28.sp, fontWeight: MyFontWeight.semi_bold, @@ -1354,8 +1258,8 @@ class _ShoppingGoodsDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF32A060), - borderRadius: - BorderRadius.circular(1)), + borderRadius: BorderRadius.circular(1), + ), child: Text( tempDay.toString(), style: TextStyle( @@ -1368,7 +1272,8 @@ class _ShoppingGoodsDetails extends State { ), Padding( padding: EdgeInsets.only( - left: 2.w, right: 2.w), + left: 2.w, right: 2.w, + ), child: Text( ":", style: TextStyle( @@ -1388,8 +1293,8 @@ class _ShoppingGoodsDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF32A060), - borderRadius: - BorderRadius.circular(1)), + borderRadius: BorderRadius.circular(1), + ), child: Text( tempHour.toString(), style: TextStyle( @@ -1402,7 +1307,8 @@ class _ShoppingGoodsDetails extends State { ), Padding( padding: EdgeInsets.only( - left: 2.w, right: 2.w), + left: 2.w, right: 2.w, + ), child: Text( ":", style: TextStyle( @@ -1422,8 +1328,8 @@ class _ShoppingGoodsDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF32A060), - borderRadius: - BorderRadius.circular(1)), + borderRadius: BorderRadius.circular(1), + ), child: Text( tempM.toString(), style: TextStyle( @@ -1436,7 +1342,9 @@ class _ShoppingGoodsDetails extends State { ), Padding( padding: EdgeInsets.only( - left: 2.w, right: 2.w), + left: 2.w, + right: 2.w, + ), child: Text( ":", style: TextStyle( @@ -1455,9 +1363,9 @@ class _ShoppingGoodsDetails extends State { height: 14, alignment: Alignment.center, decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: - BorderRadius.circular(1)), + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(1), + ), child: Text( tempS.toString(), style: TextStyle( @@ -1563,7 +1471,7 @@ class _ShoppingGoodsDetails extends State { aspectRatio: 1.3698, child: Stack( children: [ - if ((miNiDetail?.imgs?.length ?? 0) > 0 || pageType != null) + if ((miNiDetail?.imgs?.isNotEmpty ?? false) || pageType != null) pageType == null ? Swiper( pagination: SwiperPagination( @@ -1580,7 +1488,7 @@ class _ShoppingGoodsDetails extends State { return miNiDetail == null ? Container() : Image.network( - miNiDetail.imgs.elementAt(position), + miNiDetail!.imgs![position], fit: BoxFit.cover, ); }, @@ -1677,13 +1585,11 @@ class _ShoppingGoodsDetails extends State { ), GestureDetector( onTap: () { - setState(() { - if (pageType == null) { - showStoreSelector(miNiDetail, id, 1); - } else { - showStoreSelector(miNiDetail, productId, 1); - } - }); + if (miNiDetail != null && productId != null) { + setState(() { + showStoreSelector(miNiDetail!, productId!, 1); + }); + } }, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -1789,7 +1695,7 @@ class _ShoppingGoodsDetails extends State { Navigator.of(context) .pushNamed('/router/group_page_details', arguments: { "actRecordAndJoinlDTOList": - json.encode(activityDetails.actRecordAndJoinlDTOList), + json.encode(activityDetails?.actRecordAndJoinlDTOList), }); }); }, @@ -1835,8 +1741,7 @@ class _ShoppingGoodsDetails extends State { onTap: () { setState(() {}); }, - child: groupItem( - activityDetails.actRecordAndJoinlDTOList[position]), + child: groupItem(activityDetails!.actRecordAndJoinlDTOList![position]), ); }, ), @@ -1853,7 +1758,7 @@ class _ShoppingGoodsDetails extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ?? "", + actRecordAndJoinlDTOList.actRecordJoinList?[0].memberAvatar ?? "", width: 30, height: 30, fit: BoxFit.cover, @@ -1863,15 +1768,15 @@ class _ShoppingGoodsDetails extends State { ), SizedBox(width: 4.w), Expanded( - child: Text( - actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ?? - "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D), + child: Text( + actRecordAndJoinlDTOList.actRecordJoinList?[0].memberNickname ?? "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D), + ), ), - )), + ), Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.end, @@ -1889,8 +1794,8 @@ class _ShoppingGoodsDetails extends State { ), TextSpan( text: (limitNumber - - (activityDetails.actRecordAndJoinlDTOList[0] - .actRecord.joinNum)) + (activityDetails!.actRecordAndJoinlDTOList?[0] + .actRecord?.joinNum ?? 0)) .toString(), style: TextStyle( fontSize: 10.sp, @@ -1910,7 +1815,7 @@ class _ShoppingGoodsDetails extends State { ), ), Text( - "剩余${(actRecordAndJoinlDTOList?.actRecord?.tempDay != 0) ? actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}", + "剩余${(actRecordAndJoinlDTOList.actRecord?.tempDay != 0) ? actRecordAndJoinlDTOList.actRecord?.tempDay : ""}:${actRecordAndJoinlDTOList.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList.actRecord?.tempS ?? 0}", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -1922,9 +1827,10 @@ class _ShoppingGoodsDetails extends State { GestureDetector( onTap: () { joinA = JoinActivity.GoJoin; - indexP = actRecordAndJoinlDTOList.actRecord.id; + indexP = actRecordAndJoinlDTOList.actRecord?.id; if (count1 == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~",alignment: Alignment.center); + SmartDialog.showToast("请先选择您要购买的商品!~", + alignment: Alignment.center); return; } toOrder(); @@ -2275,13 +2181,11 @@ class _ShoppingGoodsDetails extends State { return CupertinoActionSheet( title: Text(S.of(context).bodadianhua), actions: [ - if (storeInfo != null && - storeInfo.tel != null && - storeInfo.tel != "") + if (storeInfo?.tel?.isNotEmpty ?? false) CupertinoActionSheetAction( - child: Text(storeInfo.tel), + child: Text(storeInfo!.tel ?? ""), onPressed: () { - callMobile(storeInfo.tel); + callMobile(storeInfo!.tel); Navigator.of(context).pop(); }, isDefaultAction: true, @@ -2301,8 +2205,8 @@ class _ShoppingGoodsDetails extends State { callMobile(mobile) async { String url = "tel:$mobile"; - if (await canLaunch(url)) { - await launch(url); + if (await canLaunchUrl(Uri.parse(url))) { + await launchUrl(Uri.parse(url)); } else { throw 'Could not launch $url'; } diff --git a/lib/store/shopping/shopping_home/activity_banner.dart b/lib/store/shopping/shopping_home/activity_banner.dart index ccc755d2..ee5090d2 100644 --- a/lib/store/shopping/shopping_home/activity_banner.dart +++ b/lib/store/shopping/shopping_home/activity_banner.dart @@ -1,9 +1,7 @@ -import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/shopping_home_config.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; @@ -11,8 +9,8 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ActivityBanner extends StatefulWidget { - final List specialArea; - final String minToken; + final List? specialArea; + final String? minToken; final String storeId; final String tenant; @@ -25,7 +23,7 @@ class ActivityBanner extends StatefulWidget { } class _ActivityBanner extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); @override @@ -63,7 +61,7 @@ class _ActivityBanner extends State { }, child: ClipRRect( child:Image.network( - widget?.specialArea[position]?.img ?? "", + widget.specialArea?[position].img ?? "", width: double.infinity, height: 165.h, fit: BoxFit.cover, @@ -86,20 +84,20 @@ class _ActivityBanner extends State { scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), padding: EdgeInsets.symmetric(horizontal: 12.w), - itemCount:widget?.specialArea[position]?.productList?.length ?? 0, + itemCount:widget.specialArea?[position].productList?.length ?? 0, itemBuilder: (context, index) { return GestureDetector( onTap: () { Navigator.of(context).pushNamed( '/router/shopping_goods_details', arguments: { - "id":widget.specialArea[position].productList[index].id, + "id":widget.specialArea?[position].productList![index].id, "storeId":widget.storeId, "tenant":widget.tenant, }, ); }, - child: activityBannerItem(widget.specialArea[position].productList[index]), + child: activityBannerItem(widget.specialArea![position].productList![index]), ); }, ), @@ -107,13 +105,13 @@ class _ActivityBanner extends State { ], ); }, - itemCount:widget?.specialArea?.length ?? 0, + itemCount:widget.specialArea?.length ?? 0, ), ), ); } - Widget activityBannerItem(ProductList productList) { + Widget activityBannerItem(ShopHomeProductList productList) { return Container( margin: EdgeInsets.only(right:7.w,left:7.w), child: Column( @@ -122,11 +120,13 @@ class _ActivityBanner extends State { children: [ Container( decoration: BoxDecoration( - borderRadius: BorderRadius.vertical(top: Radius.circular(8)), + borderRadius: BorderRadius.vertical( + top: Radius.circular(8), + ), ), child: MImage( - productList?.productImg ?? "", + productList.productImg ?? "", isCircle: true, width: 70, height: 70, @@ -138,7 +138,7 @@ class _ActivityBanner extends State { height: 4, ), Text( - productList?.productName ?? "", + productList.productName ?? "", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -157,7 +157,7 @@ class _ActivityBanner extends State { ), ), TextSpan( - text:productList?.price ?? "", + text:productList.price ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, diff --git a/lib/store/shopping/shopping_home/bargain_details.dart b/lib/store/shopping/shopping_home/bargain_details.dart index a40dd794..4ca23648 100644 --- a/lib/store/shopping/shopping_home/bargain_details.dart +++ b/lib/store/shopping/shopping_home/bargain_details.dart @@ -1,15 +1,13 @@ import 'dart:async'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/activity_actRecord_details.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/launch_join_act.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/act_record_join_list.dart'; +import 'package:huixiang/data/activity_act_record_details.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; -import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -19,7 +17,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:shared_preferences/shared_preferences.dart'; class BargainDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; BargainDetails({this.arguments}); @@ -30,11 +28,11 @@ class BargainDetails extends StatefulWidget { } class _BargainDetails extends State { - MinApiService minService; - String actRecordId; - ActivityActRecordDetails activityActRecordDetails; + MinApiService? minService; + String? actRecordId; + ActivityActRecordDetails? activityActRecordDetails; bool isDispose = false; - Timer _timer; + Timer? _timer; String testTime = "2021-12-30 10:00:00"; int tempDay = 0; int tempHour = 0; @@ -44,30 +42,28 @@ class _BargainDetails extends State { final RefreshController refreshController = RefreshController(); int limitNumber = 0; double bargainNum = 0; - StoreInfo storeInfo; + StoreInfo? storeInfo; @override void dispose() { super.dispose(); - if (refreshController != null) refreshController.dispose(); + refreshController.dispose(); isDispose = true; - if (_timer != null) { - _timer.cancel(); + _timer?.cancel(); } - } @override void initState() { super.initState(); - actRecordId = widget.arguments["actRecordId"]; - limitNumber = widget.arguments["limitNumber"]; - storeInfo = widget.arguments["storeInfo"]; + actRecordId = widget.arguments?["actRecordId"]; + limitNumber = widget.arguments?["limitNumber"]; + storeInfo = widget.arguments?["storeInfo"]; // skuId = widget.arguments["skuId"]; startCountdownTimer(); SharedPreferences.getInstance().then((value) { - String minToken = value.getString("minToken"); - String tenant = value.getString("tenant"); - String storeId = value.getString("storeId"); + String minToken = value.getString("minToken") ?? ""; + String tenant = value.getString("tenant") ?? ""; + String storeId = value.getString("storeId") ?? ""; minService = MinApiService( Dio(), context: context, @@ -81,42 +77,42 @@ class _BargainDetails extends State { ///团购/秒杀时间 startCountdownTimer() { - if (_timer != null) return; - const oneSec = const Duration(seconds: 1); - var callback = ((timer) { - if (isDispose) return; - setState(() { - var tempDateTime = - DateTime.parse(activityActRecordDetails?.actRecord?.endTime) - .difference(DateTime.now()); - if (tempDateTime.inSeconds < 0) { - tempDay = 0; - tempHour = 0; - tempM = 0; - tempS = 0; - return; - } - tempDay = tempDateTime.inDays; - tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); - tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); - tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); - }); - }); - _timer = Timer.periodic(oneSec, callback); + return; + // const oneSec = const Duration(seconds: 1); + // var callback = ((timer) { + // if (isDispose) return; + // setState(() { + // var tempDateTime = + // DateTime.parse(activityActRecordDetails.actRecord.endTime) + // .difference(DateTime.now()); + // if (tempDateTime.inSeconds < 0) { + // tempDay = 0; + // tempHour = 0; + // tempM = 0; + // tempS = 0; + // return; + // } + // tempDay = tempDateTime.inDays; + // tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); + // tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); + // tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); + // }); + // }); + // _timer = Timer.periodic(oneSec, callback); } ///查看某一个发起的拼团、砍价详情 queryShowOneAct(actRecordId) async { - BaseData baseData = - await minService.showOneAct(actRecordId).catchError((error) { + BaseData? baseData = + await minService?.showOneAct(actRecordId).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { bargainNum = 0; - activityActRecordDetails = baseData.data; - activityActRecordDetails.actRecordJoinList.forEach((element) { - bargainNum += double.tryParse(element.actPrice); + activityActRecordDetails = baseData!.data; + activityActRecordDetails?.actRecordJoinList?.forEach((element) { + bargainNum += double.tryParse(element.actPrice ?? "") ?? 0; }); }); refreshController.refreshCompleted(); @@ -134,13 +130,13 @@ class _BargainDetails extends State { "storeInfo": storeInfo, "pageType": "3", "isDirectBuy": true, - "productId": activityActRecordDetails.actProduct.productId, - "skuId": activityActRecordDetails.skuId, + "productId": activityActRecordDetails?.actProduct?.productId, + "skuId": activityActRecordDetails?.skuId, "buyNum": 1, - "skuValue1": activityActRecordDetails.skuName, - "bargainOrderId": activityActRecordDetails.actRecordJoinList[0].orderId, - "actProductId": activityActRecordDetails.actProduct.id, - "actProductSkuId": activityActRecordDetails.skuId, + "skuValue1": activityActRecordDetails?.skuName, + "bargainOrderId": activityActRecordDetails?.actRecordJoinList?[0].orderId, + "actProductId": activityActRecordDetails?.actProduct?.id, + "actProductSkuId": activityActRecordDetails?.skuId, }, ); } @@ -163,7 +159,8 @@ class _BargainDetails extends State { colors: [ Color(0xFFE8F5E9), Color(0xFFE5F7FF), - ]), + ], + ), ), ), Column( @@ -200,7 +197,7 @@ class _BargainDetails extends State { bargainFriendsList(), ], ); - }, + }, future: null, ), ), ), @@ -226,11 +223,11 @@ class _BargainDetails extends State { offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], color: Colors.white), - margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 24.h), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 24.h,), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h,), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, @@ -283,9 +280,7 @@ class _BargainDetails extends State { ), ), TextSpan( - text: activityActRecordDetails - ?.actProduct?.productPrice ?? - "", + text: activityActRecordDetails?.actProduct?.productPrice ?? "", style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.semi_bold, @@ -318,8 +313,8 @@ class _BargainDetails extends State { ) ], color: Colors.white), - margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 24.h), - padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), + margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 24.h,), + padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h,), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -373,32 +368,23 @@ class _BargainDetails extends State { height: 8.h, color: Color(0xFFF5F5F5), ), - if (double.tryParse(activityActRecordDetails - ?.actProduct?.productPrice ?? - "0") > - 0 && - double.tryParse(activityActRecordDetails - ?.actProduct?.promotionPrice ?? - "0") > - 0) + if ((double.tryParse(activityActRecordDetails?.actProduct?.productPrice ?? "0") ?? 0) > 0 + && (double.tryParse(activityActRecordDetails?.actProduct?.promotionPrice ?? "0") ?? 0) > 0) Container( width: (bargainNum / - (double.tryParse(activityActRecordDetails - ?.actProduct?.productPrice ?? - "0") - - double.tryParse(activityActRecordDetails - ?.actProduct?.promotionPrice ?? - "0"))) * + ((double.tryParse(activityActRecordDetails?.actProduct?.productPrice ?? "0") ?? 0) - + (double.tryParse(activityActRecordDetails?.actProduct?.promotionPrice ?? "0") ?? 0))) * (MediaQuery.of(context).size.width * 0.8), height: 8.h, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.centerLeft, end: Alignment.centerRight, - colors: [Color(0xFFFEC401), Color(0xFF9274F7)])), + colors: [Color(0xFFFEC401), Color(0xFF9274F7),],),), ) ], - )), + ), + ), SizedBox( height: 3, ), @@ -426,9 +412,7 @@ class _BargainDetails extends State { ), ), TextSpan( - text: activityActRecordDetails - ?.actProduct?.promotionPrice ?? - "", + text: activityActRecordDetails?.actProduct?.promotionPrice ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, @@ -443,7 +427,7 @@ class _BargainDetails extends State { SizedBox(height: 16), if ((activityActRecordDetails?.actRecord?.mid ?? "") != (activityActRecordDetails?.actRecordJoinList != null - ? (activityActRecordDetails?.actRecordJoinList[0]?.mid ?? "") + ? (activityActRecordDetails?.actRecordJoinList?[0].mid ?? "") : "")) Row( children: [ @@ -471,7 +455,7 @@ class _BargainDetails extends State { ), ), ), - )), + ),), if (activityActRecordDetails?.isBargain ?? false) Expanded( child: GestureDetector( @@ -500,7 +484,7 @@ class _BargainDetails extends State { color: Colors.white, ), ), - )), + ),), ), if (activityActRecordDetails?.isBargain ?? true) Expanded( @@ -530,7 +514,7 @@ class _BargainDetails extends State { color: Color(0xFF858585), ), ), - )), + ),), ), ], ), @@ -566,7 +550,7 @@ class _BargainDetails extends State { color: Colors.white, ), ), - )), + ),), if ((activityActRecordDetails?.actRecord?.state ?? 0) == 3) Text( "恭喜您砍价成功", @@ -586,7 +570,8 @@ class _BargainDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF9476F7), - borderRadius: BorderRadius.circular(27)), + borderRadius: BorderRadius.circular(27), + ), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -595,7 +580,8 @@ class _BargainDetails extends State { width: 24, height: 24, fit: BoxFit.cover, - color: Colors.white), + color: Colors.white, + ), SizedBox( width: 8, ), @@ -608,7 +594,9 @@ class _BargainDetails extends State { ), ) ], - ))), + ), + ), + ), SizedBox(height: 11.h), Text( "剩余时间 ${((tempDay == 0) ? "" : (tempDay.toString() + ":")).toString()} ${tempHour.toString()} : ${tempM.toString()} : ${tempS.toString()}", @@ -833,13 +821,11 @@ class _BargainDetails extends State { padding: EdgeInsets.zero, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), - itemCount: activityActRecordDetails?.actRecordJoinList != null - ? activityActRecordDetails.actRecordJoinList.length - : 0, + itemCount: activityActRecordDetails?.actRecordJoinList?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () {}, - child: bargainFriendsItem(activityActRecordDetails, position), + child: bargainFriendsItem(activityActRecordDetails!.actRecordJoinList![position], position), ); }, ), @@ -858,8 +844,7 @@ class _BargainDetails extends State { ); } - Widget bargainFriendsItem( - ActivityActRecordDetails activityActRecordDetails, index) { + Widget bargainFriendsItem(ActRecordJoinList actRecordJoinList, index) { return Container( height: 36.h, margin: EdgeInsets.only(bottom: 10), @@ -868,8 +853,7 @@ class _BargainDetails extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - activityActRecordDetails.actRecordJoinList[index]?.memberAvatar ?? - "", + actRecordJoinList.memberAvatar ?? "", width: 34, height: 34, fit: BoxFit.cover, @@ -881,31 +865,30 @@ class _BargainDetails extends State { width: 4, ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - activityActRecordDetails - .actRecordJoinList[index]?.memberNickname ?? - "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF353535), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + actRecordJoinList.memberNickname ?? + "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF353535), + ), ), - ), - Text( - handleDate(activityActRecordDetails - .actRecordJoinList[index].createTime), - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFACACAC), + Text( + handleDate(actRecordJoinList.createTime), + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFACACAC), + ), ), - ), - ], - )), + ], + ), + ), Text.rich( TextSpan( children: [ @@ -918,8 +901,7 @@ class _BargainDetails extends State { ), ), TextSpan( - text: activityActRecordDetails - .actRecordJoinList[index]?.actPrice ?? + text: actRecordJoinList.actPrice ?? "0", style: TextStyle( fontSize: 11.sp, @@ -939,19 +921,22 @@ class _BargainDetails extends State { ), ), ], - )); + ), + ); } - static handleDate(String oldTime) { + static handleDate(String? oldTime) { + if (oldTime?.isEmpty ?? true) { + return ""; + } String nowTime = new DateTime.now().toString().split('.')[0]; - int nowyear = int.parse(nowTime.split(" ")[0].split('-')[0]); int nowmonth = int.parse(nowTime.split(" ")[0].split('-')[1]); int nowday = int.parse(nowTime.split(" ")[0].split('-')[2]); int nowhour = int.parse(nowTime.split(" ")[1].split(':')[0]); int nowmin = int.parse(nowTime.split(" ")[1].split(':')[1]); - int oldyear = int.parse(oldTime.split(" ")[0].split('-')[0]); + int oldyear = int.parse(oldTime!.split(" ")[0].split('-')[0]); int oldmonth = int.parse(oldTime.split(" ")[0].split('-')[1]); int oldday = int.parse(oldTime.split(" ")[0].split('-')[2]); int oldhour = int.parse(oldTime.split(" ")[1].split(':')[0]); diff --git a/lib/store/shopping/shopping_home/classify_list.dart b/lib/store/shopping/shopping_home/classify_list.dart index b1012485..0fc74c7d 100644 --- a/lib/store/shopping/shopping_home/classify_list.dart +++ b/lib/store/shopping/shopping_home/classify_list.dart @@ -1,15 +1,13 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; -import 'package:huixiang/retrofit/data/shopping_home_config.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/custom_image.dart'; class ClassifyList extends StatefulWidget { - final List groupList; - final String minToken; + final List? groupList; + final String? minToken; final String storeId; final String tenant; @@ -22,7 +20,7 @@ class ClassifyList extends StatefulWidget { } class _ClassifyList extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -51,7 +49,7 @@ class _ClassifyList extends State { scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), padding: EdgeInsets.symmetric(horizontal: 14), - itemCount:widget?.groupList?.length ?? 0, + itemCount:widget.groupList?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { @@ -61,10 +59,10 @@ class _ClassifyList extends State { "minToken": widget.minToken, "tenant": widget.tenant, "storeId": widget.storeId, - "searchKey":widget.groupList[position].groupName, + "searchKey":widget.groupList![position].groupName, }); }, - child: classifyItem(widget.groupList[position]), + child: classifyItem(widget.groupList![position]), ); }, ), @@ -78,7 +76,7 @@ class _ClassifyList extends State { child: Column( children: [ MImage( - groupList?.groupImg ?? "", + groupList.groupImg ?? "", isCircle: true, width: 48, height: 48, @@ -88,7 +86,7 @@ class _ClassifyList extends State { ), SizedBox(height: 4,), Text( - groupList?.groupName ?? "", + groupList.groupName ?? "", style: TextStyle( fontSize: 11.sp, fontWeight: MyFontWeight.regular, diff --git a/lib/store/shopping/shopping_home/group_details.dart b/lib/store/shopping/shopping_home/group_details.dart index 229d064a..fa3747f4 100644 --- a/lib/store/shopping/shopping_home/group_details.dart +++ b/lib/store/shopping/shopping_home/group_details.dart @@ -2,11 +2,10 @@ import 'dart:async'; import 'dart:core'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/activity_actRecord_details.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/activity_act_record_details.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -17,7 +16,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:shared_preferences/shared_preferences.dart'; class GroupDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; GroupDetails({this.arguments}); @@ -28,11 +27,11 @@ class GroupDetails extends StatefulWidget { } class _GroupDetails extends State { - MinApiService minService; - String actRecordId; - ActivityActRecordDetails activityActRecordDetails; + MinApiService? minService; + String? actRecordId; + ActivityActRecordDetails? activityActRecordDetails; bool isDispose = false; - Timer _timer; + Timer? _timer; String testTime = "2021-12-30 10:00:00"; int tempDay = 0; int tempHour = 0; @@ -42,22 +41,20 @@ class _GroupDetails extends State { @override void dispose() { super.dispose(); - if (refreshController != null) refreshController.dispose(); + refreshController.dispose(); isDispose = true; - if (_timer != null) { - _timer.cancel(); + _timer?.cancel(); } - } @override void initState() { super.initState(); - actRecordId = widget.arguments["actRecordId"]; + actRecordId = widget.arguments?["actRecordId"]; startCountdownTimer(); SharedPreferences.getInstance().then((value) { - String minToken = value.getString("minToken"); - String tenant = value.getString("tenant"); - String storeId = value.getString("storeId"); + String minToken = value.getString("minToken") ?? ""; + String tenant = value.getString("tenant") ?? ""; + String storeId = value.getString("storeId") ?? ""; minService = MinApiService( Dio(), context: context, @@ -73,39 +70,36 @@ class _GroupDetails extends State { ///团购/秒杀时间 startCountdownTimer() { - if (_timer != null) return; - const oneSec = const Duration(seconds: 1); - var callback = ((timer) { - if (isDispose) return; - setState(() { - var tempDateTime = - DateTime.parse(activityActRecordDetails?.actRecord?.endTime) - .difference(DateTime.now()); - if (tempDateTime.inSeconds < 0) { - tempDay = 0; - tempHour = 0; - tempM = 0; - tempS = 0; - return; - } - tempDay = tempDateTime.inDays; - tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); - tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); - tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); - }); - }); - _timer = Timer.periodic(oneSec, callback); + return; + // const oneSec = const Duration(seconds: 1); + // var callback = ((timer) { + // if (isDispose) return; + // setState(() { + // var tempDateTime = DateTime.parse(activityActRecordDetails?.actRecord.endTime).difference(DateTime.now()); + // if (tempDateTime.inSeconds < 0) { + // tempDay = 0; + // tempHour = 0; + // tempM = 0; + // tempS = 0; + // return; + // } + // tempDay = tempDateTime.inDays; + // tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); + // tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); + // tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); + // }); + // }); + // _timer = Timer.periodic(oneSec, callback); } ///查看某一个发起的拼团、砍价详情 queryShowOneAct(actRecordId) async { - BaseData baseData = - await minService.showOneAct(actRecordId).catchError((error) { + BaseData? baseData = await minService?.showOneAct(actRecordId).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - activityActRecordDetails = baseData.data; + activityActRecordDetails = baseData!.data; }); refreshController.refreshCompleted(); } else { @@ -133,7 +127,8 @@ class _GroupDetails extends State { colors: [ Color(0xFFE8F5E9), Color(0xFFE5F7FF), - ]), + ], + ), ), ), Column( @@ -167,7 +162,7 @@ class _GroupDetails extends State { groupRule(), ], ); - }, + }, future: null, ), ), ), @@ -281,8 +276,7 @@ class _GroupDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( // color: Color(0xFFD2D2D2), - color: (((activityActRecordDetails - ?.actRecord?.joinNum ?? + color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == 0) || tempDay == 0) @@ -308,11 +302,7 @@ class _GroupDetails extends State { fontWeight: MyFontWeight.medium, // color: Color(0xFFD2D2D2), color: - (activityActRecordDetails?.actRecord?.joinNum ?? - 0) == - activityActRecordDetails - ?.successNumber ?? - 0 + (activityActRecordDetails?.actRecord?.joinNum ?? 0) == (activityActRecordDetails?.successNumber ?? 0) ? Color(0xFFD2D2D2) : Color(0xFFF8961E), ), @@ -327,17 +317,15 @@ class _GroupDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( // color: Color(0xFFD2D2D2), - color: (((activityActRecordDetails?.actRecord?.joinNum ?? - 0) == - activityActRecordDetails?.successNumber ?? - 0) || + color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == (activityActRecordDetails?.successNumber ?? 0)) || (tempDay == 0 && tempHour == 0 && tempM == 0 && tempS == 0)) ? Color(0xFFD2D2D2) : Color(0xFFF8961E), - borderRadius: BorderRadius.circular(4)), + borderRadius: BorderRadius.circular(4), + ), child: Text( tempHour.toString(), style: TextStyle( @@ -356,10 +344,8 @@ class _GroupDetails extends State { fontSize: 16.sp, fontWeight: MyFontWeight.medium, // color: Color(0xFFD2D2D2), - color: (((activityActRecordDetails?.actRecord?.joinNum ?? - 0) == - activityActRecordDetails?.successNumber ?? - 0) || + color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == + (activityActRecordDetails?.successNumber ?? 0)) || (tempDay == 0 && tempHour == 0 && tempM == 0 && @@ -376,17 +362,13 @@ class _GroupDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( // color: Color(0xFFD2D2D2), - color: (((activityActRecordDetails?.actRecord?.joinNum ?? - 0) == - activityActRecordDetails?.successNumber ?? - 0) || - (tempDay == 0 && - tempHour == 0 && - tempM == 0 && - tempS == 0)) + color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == + (activityActRecordDetails?.successNumber ?? 0)) || + (tempDay == 0 && tempHour == 0 && tempM == 0 && tempS == 0)) ? Color(0xFFD2D2D2) : Color(0xFFF8961E), - borderRadius: BorderRadius.circular(4)), + borderRadius: BorderRadius.circular(4), + ), child: Text( tempM.toString(), style: TextStyle( @@ -405,10 +387,8 @@ class _GroupDetails extends State { fontSize: 16.sp, fontWeight: MyFontWeight.medium, // color: Color(0xFFD2D2D2), - color: (((activityActRecordDetails?.actRecord?.joinNum ?? - 0) == - activityActRecordDetails?.successNumber ?? - 0) || + color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == + (activityActRecordDetails?.successNumber ?? 0)) || (tempDay == 0 && tempHour == 0 && tempM == 0 && @@ -425,17 +405,15 @@ class _GroupDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( // color: Color(0xFFD2D2D2), - color: (((activityActRecordDetails?.actRecord?.joinNum ?? - 0) == - activityActRecordDetails?.successNumber ?? - 0) || + color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == (activityActRecordDetails?.successNumber ?? 0)) || (tempDay == 0 && tempHour == 0 && tempM == 0 && tempS == 0)) ? Color(0xFFD2D2D2) : Color(0xFFF8961E), - borderRadius: BorderRadius.circular(4)), + borderRadius: BorderRadius.circular(4), + ), child: Text( tempS.toString(), style: TextStyle( @@ -451,9 +429,7 @@ class _GroupDetails extends State { SizedBox( height: 24, ), - if ((activityActRecordDetails?.actRecord?.joinNum ?? 0) == - activityActRecordDetails?.successNumber ?? - 0) + if ((activityActRecordDetails?.actRecord?.joinNum ?? 0) == (activityActRecordDetails?.successNumber ?? 0)) Text( "恭喜您拼团成功", style: TextStyle( @@ -539,13 +515,12 @@ class _GroupDetails extends State { height: 54.h, ), if ((activityActRecordDetails?.actRecord?.joinNum ?? 0) == - activityActRecordDetails?.successNumber ?? - 0) + (activityActRecordDetails?.successNumber ?? 0)) InkWell( onTap: () { Navigator.of(context) .pushNamed('/router/order_details', arguments: { - "id": activityActRecordDetails.actRecordJoinList[0].orderId + "id": activityActRecordDetails?.actRecordJoinList?[0].orderId }); }, child: Container( @@ -555,7 +530,8 @@ class _GroupDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF00A359), - borderRadius: BorderRadius.circular(27)), + borderRadius: BorderRadius.circular(27), + ), child: Text( "查看拼团订单", style: TextStyle( @@ -614,7 +590,8 @@ class _GroupDetails extends State { alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF00A359), - borderRadius: BorderRadius.circular(27)), + borderRadius: BorderRadius.circular(27), + ), child: Text( "联系客服退款", style: TextStyle( @@ -622,7 +599,8 @@ class _GroupDetails extends State { fontWeight: MyFontWeight.medium, color: Colors.white, ), - )), + ), + ), ), ], ), @@ -652,8 +630,7 @@ class _GroupDetails extends State { ), ), child: MImage( - activityActRecordDetails - .actRecordJoinList[position]?.memberAvatar ?? + activityActRecordDetails?.actRecordJoinList?[position].memberAvatar ?? "", width: 60, height: 60, @@ -663,7 +640,7 @@ class _GroupDetails extends State { fadeSrc: "assets/image/default_1.webp", ), ), - activityActRecordDetails.actRecordJoinList[position].isLeader + (activityActRecordDetails?.actRecordJoinList?[position].isLeader ?? false) ? Align( alignment: Alignment.bottomCenter, child: Container( @@ -675,7 +652,8 @@ class _GroupDetails extends State { margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( color: Color(0xFFF8961E), - borderRadius: BorderRadius.circular(7)), + borderRadius: BorderRadius.circular(7), + ), child: Text( "团长", style: TextStyle( @@ -683,7 +661,8 @@ class _GroupDetails extends State { fontWeight: MyFontWeight.light, color: Colors.white, ), - )), + ), + ), ), ) : Container(), diff --git a/lib/store/shopping/shopping_home/group_page_details.dart b/lib/store/shopping/shopping_home/group_page_details.dart index 706a8c0e..ae79fb46 100644 --- a/lib/store/shopping/shopping_home/group_page_details.dart +++ b/lib/store/shopping/shopping_home/group_page_details.dart @@ -2,8 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/activity_details.dart'; -import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/data/act_record_and_join_dto_list.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -13,7 +12,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class GroupPageDetails extends StatefulWidget { - final Map arguments; + final Map? arguments; GroupPageDetails({this.arguments}); @@ -27,24 +26,22 @@ class _GroupPageDetails extends State { RefreshController refreshController = RefreshController(); List actRecordAndJoinlDTOList = []; bool isDispose = false; - Timer _timer; + Timer? _timer; String testTime = "2021-12-30 10:00:00"; @override void dispose() { super.dispose(); isDispose = true; - if (_timer != null) { - _timer.cancel(); + _timer?.cancel(); } - } @override void initState() { super.initState(); // _onRefresh(); actRecordAndJoinlDTOList.addAll((json.decode( - widget.arguments["actRecordAndJoinlDTOList"]) as List) + widget.arguments?["actRecordAndJoinlDTOList"]) as List) .map( (i) => ActRecordAndJoinlDTOList.fromJson(i as Map)) .toList()); @@ -53,32 +50,32 @@ class _GroupPageDetails extends State { ///团购/秒杀时间 startCountdownTimer() { - if (_timer != null) return; - const oneSec = const Duration(seconds: 1); - var callback = ((timer) { - if (isDispose) return; - setState(() { - actRecordAndJoinlDTOList.forEach((element) { - var tempDateTime = DateTime.parse(element.actRecord.endTime) - .difference(DateTime.now()); - if (tempDateTime.inSeconds < 0) { - element.actRecord.tempDay = 0; - element.actRecord.tempHour = 0; - element.actRecord.tempM = 0; - element.actRecord.tempS = 0; - return; - } - element.actRecord.tempDay = tempDateTime.inDays; - element.actRecord.tempHour = - tempDateTime.inHours - (tempDateTime.inDays * 24); - element.actRecord.tempM = - tempDateTime.inMinutes - (tempDateTime.inHours * 60); - element.actRecord.tempS = - tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); - }); - }); - }); - _timer = Timer.periodic(oneSec, callback); + return; + // const oneSec = const Duration(seconds: 1); + // var callback = ((timer) { + // if (isDispose) return; + // setState(() { + // actRecordAndJoinlDTOList.forEach((element) { + // var tempDateTime = DateTime.parse(element.actRecord.endTime) + // .difference(DateTime.now()); + // if (tempDateTime.inSeconds < 0) { + // element.actRecord.tempDay = 0; + // element.actRecord.tempHour = 0; + // element.actRecord.tempM = 0; + // element.actRecord.tempS = 0; + // return; + // } + // element.actRecord.tempDay = tempDateTime.inDays; + // element.actRecord.tempHour = + // tempDateTime.inHours - (tempDateTime.inDays * 24); + // element.actRecord.tempM = + // tempDateTime.inMinutes - (tempDateTime.inHours * 60); + // element.actRecord.tempS = + // tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); + // }); + // }); + // }); + // _timer = Timer.periodic(oneSec, callback); } _onRefresh() { @@ -106,14 +103,12 @@ class _GroupPageDetails extends State { header: MyHeader(), physics: BouncingScrollPhysics(), onRefresh: () { - setState(() { - _onRefresh(); - }); + _onRefresh(); }, child: SingleChildScrollView( physics: NeverScrollableScrollPhysics(), child: FutureBuilder( - // future: queryHome(), + future: null, builder: (context, snapshot) { return Column( children: [ @@ -138,7 +133,7 @@ class _GroupPageDetails extends State { 62.h - MediaQuery.of(context).padding.top, padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - child: (actRecordAndJoinlDTOList == null || actRecordAndJoinlDTOList?.length == 0) + child: (actRecordAndJoinlDTOList.length == 0) ? NoDataView( src:"assets/image/ding_dan.webp", isShowBtn: false, @@ -147,7 +142,7 @@ class _GroupPageDetails extends State { margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), ):ListView.builder( padding: EdgeInsets.zero, - itemCount: actRecordAndJoinlDTOList?.length ?? 0, + itemCount: actRecordAndJoinlDTOList.length ?? 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -172,8 +167,7 @@ class _GroupPageDetails extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ MImage( - actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ?? - "", + actRecordAndJoinlDTOList.actRecordJoinList?[0].memberAvatar ?? "", width: 44, height: 44, fit: BoxFit.cover, @@ -183,16 +177,15 @@ class _GroupPageDetails extends State { ), SizedBox(width: 4.w), Expanded( - child: Text( - actRecordAndJoinlDTOList - ?.actRecordJoinList[0]?.memberNickname ?? - "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D), + child: Text( + actRecordAndJoinlDTOList.actRecordJoinList?[0].memberNickname ?? "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D), + ), ), - )), + ), Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.end, @@ -209,8 +202,7 @@ class _GroupPageDetails extends State { ), ), TextSpan( - text: - actRecordAndJoinlDTOList.actRecord.joinNum.toString(), + text: actRecordAndJoinlDTOList.actRecord?.joinNum.toString(), style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -229,7 +221,7 @@ class _GroupPageDetails extends State { ), ), Text( - "剩余${(actRecordAndJoinlDTOList.actRecord.tempDay != 0) ? actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}", + "剩余${(actRecordAndJoinlDTOList.actRecord?.tempDay != 0) ? actRecordAndJoinlDTOList.actRecord?.tempDay : ""}:${actRecordAndJoinlDTOList.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList.actRecord?.tempS ?? 0}", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -240,11 +232,12 @@ class _GroupPageDetails extends State { ), GestureDetector( onTap: () { - Navigator.of(context).pushNamed('/router/group_details', - arguments: { - "actRecordId": actRecordAndJoinlDTOList - .actRecordJoinList[0].actRecordId, - }); + Navigator.of(context).pushNamed( + '/router/group_details', + arguments: { + "actRecordId": actRecordAndJoinlDTOList.actRecordJoinList?[0].actRecordId, + }, + ); }, child: Container( alignment: Alignment.center, diff --git a/lib/store/shopping/shopping_home/recommend_goods_list_view.dart b/lib/store/shopping/shopping_home/recommend_goods_list_view.dart index da79e81d..6d65d364 100644 --- a/lib/store/shopping/shopping_home/recommend_goods_list_view.dart +++ b/lib/store/shopping/shopping_home/recommend_goods_list_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; -import 'package:huixiang/retrofit/data/home_recommend_list.dart'; +import 'package:huixiang/data/home_recommend_list.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -11,8 +11,7 @@ class RecommendGoodsListView extends StatefulWidget { final String storeId; final String tenant; - - RecommendGoodsListView(this.homeRecommendList,this.storeId,this.tenant); + RecommendGoodsListView(this.homeRecommendList, this.storeId, this.tenant); @override State createState() { @@ -21,7 +20,6 @@ class RecommendGoodsListView extends StatefulWidget { } class _RecommendGoodsListView extends State { - @override void initState() { super.initState(); @@ -42,7 +40,7 @@ class _RecommendGoodsListView extends State { ), ), Container( - margin: EdgeInsets.only(top:5.h), + margin: EdgeInsets.only(top: 5.h), color: Color(0xFF32A060), width: 35.w, height: 5.h, @@ -84,34 +82,29 @@ class _RecommendGoodsListView extends State { // ); // }, // ), - StaggeredGridView.countBuilder( + StaggeredGrid.count( crossAxisCount: 2, - shrinkWrap: true, - itemCount: widget.homeRecommendList.length, mainAxisSpacing: 8, crossAxisSpacing: 8, - padding: EdgeInsets.all(16), - physics: BouncingScrollPhysics(), - // scrollDirection: Axis.vertical, - itemBuilder: (context, position) { - return GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed( - '/router/shopping_goods_details', - arguments: { - "id":widget.homeRecommendList[position].id, - "storeId":widget.storeId, - "tenant":widget.tenant, - }, - ); - }, - child: goodsListItem(widget.homeRecommendList[position]), - ); - }, - staggeredTileBuilder: (position) { - // return StaggeredTile.count(1,position==0?1:1.2); - return StaggeredTile.fit(1); - }, + children: widget.homeRecommendList + .map( + (e) => StaggeredGridTile.count( + crossAxisCellCount: 1, + mainAxisCellCount: 1, + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed( + '/router/shopping_goods_details', + arguments: { + "id": e.id, + "storeId": widget.storeId, + "tenant": widget.tenant, + }, + ); + }, + child: goodsListItem(e), + )), + ).toList(), ), ], ); @@ -138,9 +131,8 @@ class _RecommendGoodsListView extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ ClipRRect( - child: - MImage( - homeRecommendList.imgs[0], + child: MImage( + homeRecommendList.imgs?[0] ?? "", width: double.infinity, height: 166, fit: BoxFit.cover, @@ -152,7 +144,7 @@ class _RecommendGoodsListView extends State { ), ), Container( - padding: EdgeInsets.only(left: 12.w, right: 12.w,bottom:15.h), + padding: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 15.h), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, @@ -171,7 +163,8 @@ class _RecommendGoodsListView extends State { color: Color(0xFF5A5A5A), ), child: Text( - AppUtils.textSubStr(homeRecommendList?.supplierName ?? "",8), + AppUtils.textSubStr( + homeRecommendList.supplierName ?? "", 8), style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -180,7 +173,7 @@ class _RecommendGoodsListView extends State { ), ), Text( - "已售${homeRecommendList?.sellCount ?? 0}件", + "已售${homeRecommendList.sellCount ?? 0}件", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -189,9 +182,11 @@ class _RecommendGoodsListView extends State { ), ], ), - SizedBox(height: 7.h,), + SizedBox( + height: 7.h, + ), Text( - homeRecommendList?.productName ?? "", + homeRecommendList.productName ?? "", // maxLines: 2, // overflow: TextOverflow.ellipsis, style: TextStyle( @@ -201,7 +196,9 @@ class _RecommendGoodsListView extends State { color: Color(0xFF353535), ), ), - SizedBox(height: 7.h,), + SizedBox( + height: 7.h, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.end, @@ -218,7 +215,7 @@ class _RecommendGoodsListView extends State { ), ), TextSpan( - text:homeRecommendList?.price ??"", + text: homeRecommendList.price ?? "", style: TextStyle( fontSize: 18.sp, fontWeight: MyFontWeight.semi_bold, @@ -247,5 +244,4 @@ class _RecommendGoodsListView extends State { ), ); } - } diff --git a/lib/store/shopping/shopping_home/search_page.dart b/lib/store/shopping/shopping_home/search_page.dart index 23f27ba8..d0c73421 100644 --- a/lib/store/shopping/shopping_home/search_page.dart +++ b/lib/store/shopping/shopping_home/search_page.dart @@ -1,10 +1,7 @@ -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/find_mini_group.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; @@ -14,12 +11,12 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; class SearchPage extends StatefulWidget { - final Map arguments; + final Map? arguments; SearchPage({this.arguments}); @@ -31,8 +28,8 @@ class SearchPage extends StatefulWidget { class _SearchPage extends State with AutomaticKeepAliveClientMixin, WidgetsBindingObserver { - ApiService apiService; - MinApiService minService; + ApiService? apiService; + MinApiService? minService; final TextEditingController editingController = TextEditingController(); final RefreshController refreshController = RefreshController(); int optionIndex = 0; @@ -74,19 +71,19 @@ class _SearchPage extends State void initState() { super.initState(); setState(() { - if (widget.arguments["hotSearch"] != null) - hotSearch.addAll(widget.arguments["hotSearch"]); + if (widget.arguments?["hotSearch"] != null) + hotSearch.addAll(widget.arguments!["hotSearch"]); }); _focusNode.addListener(() { setState(() { hasFocus = _focusNode.hasFocus; }); }); - if (widget.arguments["searchKey"] != null) { + if (widget.arguments?["searchKey"] != null) { setState(() { - editingController.text = widget.arguments["searchKey"]; + editingController.text = widget.arguments!["searchKey"]; }); - appletGoods(widget.arguments["searchKey"]); + appletGoods(widget.arguments!["searchKey"]); } getHistorySearch(); } @@ -106,7 +103,7 @@ class _SearchPage extends State ///保存列表 setHistorySearch(String text) async { - if (text == null || text.trim() == "") return; + if (text.trim() == "") return; SharedPreferences value = await SharedPreferences.getInstance(); var str = value.getString("historySearch"); if (str == null) str = ""; @@ -129,22 +126,12 @@ class _SearchPage extends State } ///小程序查询分组及商品列表 - appletGoods(String text) async { + appletGoods(String? text) async { if (editingController.text.trim() == "") { return; } - if (minService == null) - minService = MinApiService( - Dio(), - context: context, - token: widget.arguments["minToken"], - tenant: widget.arguments["tenant"], - storeId: widget.arguments["storeId"], - ); - - BaseData> baseData = await minService - .findMiNiGroupList({ - "id": widget.arguments["storeId"], + BaseData>? baseData = await minService?.findMiNiGroupList({ + "id": widget.arguments?["storeId"], "searchKey": text, "sortType": optionIndex == 0 ? "" @@ -156,24 +143,23 @@ class _SearchPage extends State : (priceOrder == 2) ? true : "" - }) - .catchError((error) {}) - .catchError((error) { + }).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { refreshController.refreshCompleted(); setState(() { productListBeans.clear(); - if (baseData.data.length > 0) - productListBeans.addAll(baseData.data[0].productList); + if (baseData!.data?.isNotEmpty ?? false) { + productListBeans.addAll(baseData.data![0].productList!); + } }); } else { refreshController.refreshFailed(); } - setHistorySearch(text); + setHistorySearch(text!); setState(() { hasFocus = false; FocusScope.of(context).requestFocus(FocusNode()); @@ -356,7 +342,7 @@ class _SearchPage extends State if (!hasFocus) searchList() ], ); - }, + }, future: null, ), ), ), @@ -389,15 +375,13 @@ class _SearchPage extends State Wrap( runSpacing: 10.0, spacing: 10.0, - children: hotSearch.take(hotSearch?.length).map((String hotSearch) { + children: hotSearch.take(hotSearch.length).map((String hotSearch) { return GestureDetector( onTap: () { setState(() { - if (hotSearch.length != null) { - editingController.text = hotSearch; - appletGoods(hotSearch); - } - }); + editingController.text = hotSearch; + appletGoods(hotSearch); + }); }, child:hotSearchItem( hotSearch @@ -473,15 +457,13 @@ class _SearchPage extends State Wrap( runSpacing: 10.0, spacing: 10.0, - children: historySearch.take(historySearch?.length).map((String historySearch) { + children: historySearch.take(historySearch.length).map((String historySearch) { return GestureDetector( onTap: () { setState(() { - if (historySearch.length != null) { - editingController.text = historySearch; - appletGoods(historySearch); - } - }); + editingController.text = historySearch; + appletGoods(historySearch); + }); }, child:historySearchItem( historySearch @@ -528,7 +510,7 @@ class _SearchPage extends State onTap: () { setState(() { optionIndex = 0; - appletGoods(widget.arguments["searchKey"]); + appletGoods(widget.arguments?["searchKey"]); }); }, child: Text( @@ -548,7 +530,7 @@ class _SearchPage extends State onTap: () { setState(() { optionIndex = 1; - appletGoods(widget.arguments["searchKey"]); + appletGoods(widget.arguments?["searchKey"]); }); }, child: Text( @@ -591,7 +573,7 @@ class _SearchPage extends State GestureDetector( onTap: () { priceOrder = 1; - appletGoods(widget.arguments["searchKey"]); + appletGoods(widget.arguments?["searchKey"]); }, child: Icon( Icons.arrow_drop_up, @@ -604,7 +586,7 @@ class _SearchPage extends State GestureDetector( onTap: () { priceOrder = 2; - appletGoods(widget.arguments["searchKey"]); + appletGoods(widget.arguments?["searchKey"]); }, child: Icon( Icons.arrow_drop_down, @@ -645,7 +627,7 @@ class _SearchPage extends State // ), ], ), - (productListBeans == null || productListBeans?.length == 0) + (productListBeans.length == 0) ? NoDataView( src: "assets/image/ding_dan.webp", isShowBtn: false, @@ -685,33 +667,27 @@ class _SearchPage extends State // ); // }, // ) - StaggeredGridView.countBuilder( + StaggeredGrid.count( crossAxisCount: 2, - shrinkWrap: true, - itemCount: productListBeans.length, + children: productListBeans.map((e) => StaggeredGridTile.count( + crossAxisCellCount: 1, + mainAxisCellCount: 1, + child: GestureDetector( + onTap: (){ + Navigator.of(context).pushNamed( + '/router/shopping_goods_details', + arguments: { + "id": e.id, + "storeId": widget.arguments?["storeId"], + "tenant": widget.arguments?["tenant"], + }, + ); + }, + child: searchListItem(e), + ) + )).toList(), mainAxisSpacing: 8, crossAxisSpacing: 8, - physics: BouncingScrollPhysics(), - // scrollDirection: Axis.vertical, - itemBuilder: (context, position) { - return GestureDetector( - onTap: (){ - Navigator.of(context).pushNamed( - '/router/shopping_goods_details', - arguments: { - "id": productListBeans[position].id, - "storeId": widget.arguments["storeId"], - "tenant": widget.arguments["tenant"], - }, - ); - }, - child: searchListItem(productListBeans[position]), - ); - }, - staggeredTileBuilder: (position) { - // return StaggeredTile.count(1,position==0?1:1.2); - return StaggeredTile.fit(1); - }, ), ], ), @@ -741,7 +717,7 @@ class _SearchPage extends State ClipRRect( child: MImage( - productListBeans?.imgPath ?? "", + productListBeans.imgPath ?? "", width: double.infinity, height: 166, fit: BoxFit.cover, @@ -781,7 +757,7 @@ class _SearchPage extends State ), ), Text( - "已售${productListBeans?.sellCount ?? 0}件", + "已售${productListBeans.sellCount ?? 0}件", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, @@ -792,7 +768,7 @@ class _SearchPage extends State ), SizedBox(height: 7.h,), Text( - productListBeans?.productName ?? "", + productListBeans.productName ?? "", style: TextStyle( fontSize: 16.sp, height: 1.2.h, @@ -817,7 +793,7 @@ class _SearchPage extends State ), ), TextSpan( - text: productListBeans?.price ?? "", + text: productListBeans.price ?? "", style: TextStyle( fontSize: 18.sp, fontWeight: MyFontWeight.semi_bold, diff --git a/lib/store/shopping/shopping_home/shopping_acticvity.dart b/lib/store/shopping/shopping_home/shopping_acticvity.dart index 54ee3326..94020d08 100644 --- a/lib/store/shopping/shopping_home/shopping_acticvity.dart +++ b/lib/store/shopping/shopping_home/shopping_acticvity.dart @@ -1,22 +1,13 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/shopping_home_config.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/item_title.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class ShoppingActivity extends StatefulWidget { final String storeId; final String tenant; - final List quickEntry; + final List? quickEntry; ShoppingActivity(this.storeId,this.tenant,this.quickEntry); @override @@ -26,7 +17,7 @@ class ShoppingActivity extends StatefulWidget { } class _ShoppingActivity extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { @@ -34,15 +25,15 @@ class _ShoppingActivity extends State { } ///url跳转 - jumpActivity(String url) { - var router = url.substring(0,url.contains("?")?url.indexOf("?") : (url.length - 1)); + jumpActivity(String? url) { + var router = url?.substring(0,url.contains("?")?url.indexOf("?") : (url.length - 1)); Map argumentsMap = Map(); argumentsMap["storeId"] =widget.storeId; argumentsMap["tenant"] =widget.tenant; - if(url.contains("?")){ - var data = url.substring(url.indexOf("?") + 1); - var dataArr = data.split("&"); - dataArr.forEach((element) { + if(url?.contains("?") ?? false){ + var data = url?.substring(url.indexOf("?") + 1); + var dataArr = data?.split("&"); + dataArr?.forEach((element) { if(element.contains("=")){ var tempData = element.split("="); if(tempData.length == 2){ @@ -51,8 +42,9 @@ class _ShoppingActivity extends State { } }); } - Navigator.of(context).pushNamed(router, - arguments:argumentsMap); + if (router?.isNotEmpty ?? false) { + Navigator.of(context).pushNamed(router!, arguments:argumentsMap); + } } @override @@ -68,7 +60,7 @@ class _ShoppingActivity extends State { children: [ GestureDetector( onTap: () { - jumpActivity(widget?.quickEntry[0].url); + jumpActivity(widget.quickEntry?[0].url); }, child: Container( margin: EdgeInsets.symmetric(horizontal: 5.w ), @@ -80,7 +72,7 @@ class _ShoppingActivity extends State { color: Colors.white, ), child: MImage( - widget?.quickEntry[0]?.img ?? "", + widget.quickEntry?[0].img ?? "", width:double.infinity, fit: BoxFit.contain, errorSrc: "assets/image/default_2_1.webp", @@ -163,7 +155,7 @@ class _ShoppingActivity extends State { children: [ GestureDetector( onTap: () { - jumpActivity(widget?.quickEntry[1].url); + jumpActivity(widget.quickEntry?[1].url); }, child: Container( margin: EdgeInsets.symmetric(horizontal: 5.w), @@ -175,7 +167,7 @@ class _ShoppingActivity extends State { color: Colors.white, ), child: MImage( - widget?.quickEntry[1]?.img ?? "", + widget.quickEntry?[1].img ?? "", width:double.infinity, fit: BoxFit.contain, errorSrc: "assets/image/default_2_1.webp", @@ -264,7 +256,7 @@ class _ShoppingActivity extends State { ), GestureDetector( onTap: () { - jumpActivity(widget?.quickEntry[2].url); + jumpActivity(widget.quickEntry?[2].url); }, child: Container( margin: EdgeInsets.symmetric(horizontal: 5.w), @@ -276,7 +268,7 @@ class _ShoppingActivity extends State { color: Colors.white, ), child:MImage( - widget?.quickEntry[2]?.img ?? "", + widget.quickEntry?[2].img ?? "", width:double.infinity, fit: BoxFit.contain, errorSrc: "assets/image/default_2_1.webp", diff --git a/lib/store/shopping/shopping_home/shopping_home_banner.dart b/lib/store/shopping/shopping_home/shopping_home_banner.dart index 5a69cac1..11f405a0 100644 --- a/lib/store/shopping/shopping_home/shopping_home_banner.dart +++ b/lib/store/shopping/shopping_home/shopping_home_banner.dart @@ -2,10 +2,8 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/banner.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/banner.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; @@ -25,7 +23,7 @@ class ShoppingHomeBanner extends StatefulWidget { } class _ShoppingHomeBanner extends State { - ApiService apiService; + ApiService? apiService; final RefreshController refreshController = RefreshController(); List bannerData = []; @@ -55,8 +53,8 @@ class _ShoppingHomeBanner extends State { bannerClick(widget.bannerData[position]); }, child: MImage( - (widget.bannerData != null && position < widget.bannerData.length) - ? widget.bannerData[position].imgUrl + (position < widget.bannerData.length) + ? (widget.bannerData[position].imgUrl ?? "") : "", fit: BoxFit.cover, radius: BorderRadius.circular(8), @@ -65,7 +63,7 @@ class _ShoppingHomeBanner extends State { ), ); }, - itemCount: (widget.bannerData != null && widget.bannerData.length > 0) + itemCount: (widget.bannerData.length > 0) ? widget.bannerData.length : 1), ), @@ -92,8 +90,11 @@ class _ShoppingHomeBanner extends State { }); break; case 4: - String router = bannerData.content; - if (router.contains("?")) { + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + if (router!.contains("?")) { String params = router.substring(router.indexOf("?")); params = params.replaceAll("?", ""); Map map = jsonDecode(params); @@ -109,9 +110,13 @@ class _ShoppingHomeBanner extends State { }); break; case 7: - String params = bannerData.content.substring(bannerData.content.indexOf("?")+1); + String? router = bannerData.content; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?")+1); Map map = jsonDecode(params); - Navigator.of(context).pushNamed(bannerData.content.substring(0,bannerData.content.indexOf("?")), arguments: map); + Navigator.of(context).pushNamed(router.substring(0,router.indexOf("?")), arguments: map); break; } } diff --git a/lib/store/shopping/shopping_home/shopping_home_page.dart b/lib/store/shopping/shopping_home/shopping_home_page.dart index 1cd24e60..3583de3e 100644 --- a/lib/store/shopping/shopping_home/shopping_home_page.dart +++ b/lib/store/shopping/shopping_home/shopping_home_page.dart @@ -1,12 +1,10 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/home_recommend_list.dart'; -import 'package:huixiang/retrofit/data/shopping_home_config.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/home_recommend_list.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/shopping/shopping_home/recommend_goods_list_view.dart'; @@ -24,8 +22,8 @@ import 'activity_banner.dart'; import 'classify_list.dart'; class ShoppingHomePage extends StatefulWidget { - final String minToken; - final StoreInfo storeInfo; + final String? minToken; + final StoreInfo? storeInfo; final String storeId; final String tenant; @@ -39,12 +37,12 @@ class ShoppingHomePage extends StatefulWidget { class _ShoppingHomePage extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; - MinApiService minService; + ApiService? apiService; + MinApiService? minService; final SwiperController controller = SwiperController(); final RefreshController refreshController = RefreshController(); final ScrollController scrollController = ScrollController(); - ShoppingHomeConfig shoppingHomeConfig; + ShopingHomeConfig? shoppingHomeConfig; int checkNC = 0; List homeRecommendList = []; @@ -55,7 +53,7 @@ class _ShoppingHomePage extends State minService = MinApiService( Dio(), context: context, - token: widget.minToken, + token: widget.minToken ?? "", tenant: widget.tenant, storeId: widget.storeId, showLoading: false, @@ -68,18 +66,17 @@ class _ShoppingHomePage extends State @override void dispose() { super.dispose(); - if (refreshController != null) refreshController.dispose(); + refreshController.dispose(); } ///获取门店首页配置 queryHomeConfig() async { - BaseData baseData = - await minService.homeConfig().catchError((error) { + BaseData? baseData = await minService?.homeConfig().catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - shoppingHomeConfig = baseData.data; + shoppingHomeConfig = baseData!.data; refreshController.refreshCompleted(); }); } else { @@ -89,15 +86,14 @@ class _ShoppingHomePage extends State ///首页为你推荐列表 queryRecommendList() async { - BaseData> baseData = - await minService.recommendList().catchError((onError) { + BaseData>? baseData = await minService?.recommendList().catchError((onError) { refreshController.loadFailed(); refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if ((baseData?.isSuccess ?? false) && baseData!.data != null) { setState(() { homeRecommendList.clear(); - homeRecommendList.addAll(baseData.data); + homeRecommendList.addAll(baseData!.data!); }); }else { refreshController.refreshFailed(); @@ -115,7 +111,7 @@ class _ShoppingHomePage extends State return Column( children: [ MyAppBar( - title: widget?.storeInfo?.storeName ?? "海峡姐妹商城", + title: widget.storeInfo?.storeName ?? "海峡姐妹商城", titleColor: Colors.black, leadingColor: Colors.black, background: Colors.transparent, @@ -143,45 +139,41 @@ class _ShoppingHomePage extends State physics: NeverScrollableScrollPhysics(), child: Column( children: [ - if(shoppingHomeConfig != null) buildSearchItem(), buildSwiper(), ///分类导航栏 - if(shoppingHomeConfig != null) - ShoppingTitleTab(shoppingHomeConfig.categoryGroup, - (index) { - setState(() { - checkNC = index; - }); - }), + ShoppingTitleTab(shoppingHomeConfig?.categoryGroup, + (index) { + setState(() { + checkNC = index; + }); + }), ///分类列表 - if(shoppingHomeConfig != null) ClassifyList( - shoppingHomeConfig.categoryGroup[checkNC].groupList, - widget.minToken, - widget.storeId, - widget.tenant - ), + shoppingHomeConfig?.categoryGroup?[checkNC].groupList, + widget.minToken, + widget.storeId, + widget.tenant + ), ///专区活动 - if(shoppingHomeConfig != null) ShoppingActivity(widget.storeId, widget.tenant, - shoppingHomeConfig.quickEntry), + shoppingHomeConfig?.quickEntry), ///严选活动 - if(shoppingHomeConfig != null) - ActivityBanner(shoppingHomeConfig.specialArea, widget.minToken, - widget.storeId, - widget.tenant), + ActivityBanner(shoppingHomeConfig?.specialArea, widget.minToken, + widget.storeId, + widget.tenant), ///为你推荐 RecommendGoodsListView(homeRecommendList, widget.storeId, widget.tenant), ], - )), + ), + ), ), ), ), @@ -199,7 +191,7 @@ class _ShoppingHomePage extends State "minToken": widget.minToken, "tenant": widget.tenant, "storeId": widget.storeId, - "hotSearch":shoppingHomeConfig.hotSearch, + "hotSearch":shoppingHomeConfig?.hotSearch, }); }, child:Container( @@ -264,10 +256,8 @@ class _ShoppingHomePage extends State itemBuilder: (context, position) { return Container( child: MImage( - (widget.storeInfo != null && - widget.storeInfo.bannerList != null && - position < widget.storeInfo.bannerList.length) - ? widget.storeInfo.bannerList[position].imgUrl + (position < (widget.storeInfo?.bannerList?.length ?? 0)) + ? (widget.storeInfo!.bannerList?[position].imgUrl ?? "") : "", fit: BoxFit.cover, radius: BorderRadius.circular(8), @@ -276,10 +266,7 @@ class _ShoppingHomePage extends State ), ); }, - itemCount: - (widget.storeInfo != null && widget.storeInfo.bannerList != null) - ? widget.storeInfo.bannerList.length - : 1, + itemCount: widget.storeInfo?.bannerList?.length ?? 1, ), ); } diff --git a/lib/store/shopping/shopping_home/shopping_title_tab.dart b/lib/store/shopping/shopping_home/shopping_title_tab.dart index 930d4a01..c0386637 100644 --- a/lib/store/shopping/shopping_home/shopping_title_tab.dart +++ b/lib/store/shopping/shopping_home/shopping_title_tab.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/shopping_home_config.dart'; +import 'package:huixiang/data/shoping_home_config.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_tab.dart'; class ShoppingTitleTab extends StatefulWidget { - final List categoryGroup; + final List? categoryGroup; final Function notifyClassSelectList; ShoppingTitleTab(this.categoryGroup,this.notifyClassSelectList); @@ -18,11 +18,12 @@ class ShoppingTitleTab extends StatefulWidget { class _ClassTitleTab extends State with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin { - TabController tabController; + late TabController tabController; @override void initState() { super.initState(); + tabController = TabController(length: widget.categoryGroup?.length ?? 0, vsync: this); } @override @@ -30,7 +31,7 @@ class _ClassTitleTab extends State return Container( alignment: Alignment.centerLeft, child: DefaultTabController( - length:widget?.categoryGroup?.length ?? 0, + length: widget.categoryGroup?.length ?? 0, child: TabBar( isScrollable: true, //可滚动 @@ -52,11 +53,7 @@ class _ClassTitleTab extends State widget.notifyClassSelectList(index); }, //指示器与文字等宽 - tabs:widget.categoryGroup == null - ? [] - : widget.categoryGroup - .map((e) => MyTab(text: e.name)) - .toList(), + tabs: widget.categoryGroup!.map((e) => MyTab(text: e.name ?? "")).toList() ?? [], ), ), ); diff --git a/lib/store/shopping/shopping_mall_home.dart b/lib/store/shopping/shopping_mall_home.dart index 0de56f71..57b3549c 100644 --- a/lib/store/shopping/shopping_mall_home.dart +++ b/lib/store/shopping/shopping_mall_home.dart @@ -1,11 +1,10 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/shopping/shopping_cart/shopping_cart_page.dart'; @@ -25,17 +24,16 @@ class ShoppingMallHome extends StatefulWidget { } } -class _ShoppingMallHome extends State - with AutomaticKeepAliveClientMixin { - ApiService apiService; - MinApiService minService; +class _ShoppingMallHome extends State with AutomaticKeepAliveClientMixin { + ApiService? apiService; + MinApiService? minService; int choiceIndex = 0; String storeId = ""; String tenant = ""; ///小程序token - String minToken; - StoreInfo storeInfo; - List activitys; + String? minToken; + StoreInfo? storeInfo; + List? activitys; @override void initState() { @@ -59,20 +57,20 @@ class _ShoppingMallHome extends State apiService = ApiService( Dio(), context: context, - token: shared.getString('token'), + token: shared.getString('token') ?? "", showLoading: false, ); - apiService.minLogin(storeId).catchError((onError) { + apiService?.minLogin(storeId).catchError((onError) { debugPrint(onError.toString()); }).then((baseData) { - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { minToken = baseData.data["token"]; }); queryStoreInfo(); SharedPreferences.getInstance().then( (value) => { - value.setString('minToken', minToken), + value.setString('minToken', minToken ?? ""), value.setString('tenant', tenant), value.setString('storeId', storeId), }, @@ -80,7 +78,7 @@ class _ShoppingMallHome extends State minService = MinApiService( Dio(), context: context, - token: minToken, + token: minToken ?? "", tenant: tenant, storeId: storeId, showLoading: false, @@ -93,15 +91,12 @@ class _ShoppingMallHome extends State /// 查询店铺信息 queryStoreInfo() async { - BaseData baseData = - await apiService.queryStoreInfo(storeId).catchError((error) { + BaseData? baseData = await apiService?.queryStoreInfo(storeId).catchError((error) { debugPrint(error.toString()); }); - if (baseData != null && baseData.isSuccess) { - storeInfo = StoreInfo.fromJson(baseData.data); - activitys = storeInfo.informationVOPageVO.list - .map((e) => Activity.fromJson(e)) - .toList(); + if (baseData?.isSuccess ?? false) { + storeInfo = StoreInfo.fromJson(baseData!.data); + activitys = storeInfo?.informationVOPageVO?.list?.map((e) => Activity.fromJson(e)).toList(); if (mounted) { setState(() {}); } @@ -132,14 +127,14 @@ class _ShoppingMallHome extends State ]), ), ), - if (minToken != null && choiceIndex == 0) + if (choiceIndex == 0) ShoppingHomePage( minToken, storeInfo, storeId, tenant, ), - if (minToken != null && choiceIndex == 1) + if (choiceIndex == 1) ShoppingCartPage( minToken, storeId, diff --git a/lib/store/store_html.dart b/lib/store/store_html.dart index 409ca0ae..454381cd 100644 --- a/lib/store/store_html.dart +++ b/lib/store/store_html.dart @@ -1,11 +1,10 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/utils/font_weight.dart'; class StoreHtml extends StatefulWidget { - final Map arguments; + final Map? arguments; StoreHtml({this.arguments}); @@ -58,14 +57,7 @@ class _StoreHtml extends State with WidgetsBindingObserver { ), Container( child: Html( - data: widget.arguments["remark"] ?? "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, + data: widget.arguments?["remark"] ?? "", ), ) ], diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 93725588..88168f26 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -1,19 +1,20 @@ import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/member_vo.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/shopping_cart.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/store_view/people_num.dart'; @@ -31,10 +32,8 @@ import 'package:intl/intl.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../retrofit/data/settleOrderInfo.dart'; - class StoreOrderPage extends StatefulWidget { - final Map arguments; + final Map? arguments; StoreOrderPage({this.arguments}); @@ -46,50 +45,44 @@ class StoreOrderPage extends StatefulWidget { class _StoreOrderPage extends State with TickerProviderStateMixin { - TabController tabcontroller; - ApiService apiService; - MinApiService minService; - StoreInfo storeInfo; - List activitys; - StoreOrderListPage storeOrderListPage; + TabController? tabcontroller; + ApiService? apiService; + MinApiService? minService; + StoreInfo? storeInfo; + List? activitys; + StoreOrderListPage? storeOrderListPage; ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics(); ScrollController controller = ScrollController(); - ShoppingCart shopCarGoods; + ShoppingCart? shopCarGoods; int tableId = 0; String parentId = ""; String parentCode = ""; String tenant = ""; String storeId = ""; int numberOfPeople = 0; - String vipLevelName; - MemberVo memberVo; - MiNiDetail miNiDetail; + String? vipLevelName; + MemberVo? memberVo; + MiniDetail? miniDetail; ///小程序token - String minToken; - String pName; - String pid; - String cName; - String cid; + String? minToken; + String? pName; + String? pid; + String? cName; + String? cid; @override void initState() { super.initState(); - tableId = widget.arguments["tableId"] ?? 0; - tenant = widget.arguments["tenant"]; - storeId = widget.arguments["id"]; + tableId = widget.arguments?["tableId"] ?? 0; + tenant = widget.arguments?["tenant"]; + storeId = widget.arguments?["id"]; debugPrint( "store_param tableId:$tableId tenant:$tenant storeId:$storeId"); - if (tabcontroller == null) - tabcontroller = TabController( - length: 1, - vsync: this, - ); - SharedPreferences.getInstance().then((value) { minLogin(value); }); @@ -103,20 +96,20 @@ class _StoreOrderPage extends State apiService = ApiService( Dio(), context: context, - token: shared.getString('token'), + token: shared.getString('token') ?? "", ); - apiService.minLogin(storeId).catchError((onError) { + apiService?.minLogin(storeId).catchError((onError) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), alignment: Alignment.center); debugPrint(onError); }).then((baseData) async { - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { Map minStoreInfo = baseData.data; minToken = minStoreInfo["token"]; await queryStoreInfo(); SharedPreferences.getInstance().then( (value) => { - value.setString('minToken', minToken), + value.setString('minToken', minToken ?? ""), value.setString('tenant', tenant), value.setString('storeId', storeId), }, @@ -124,7 +117,7 @@ class _StoreOrderPage extends State minService = MinApiService( Dio(), context: context, - token: minToken, + token: minToken ?? "", tenant: tenant, storeId: storeId, ); @@ -144,28 +137,28 @@ class _StoreOrderPage extends State ///会员信息 queryMemberInfo() async { - BaseData baseData = await minService.memberInfo().catchError((error) { + BaseData? baseData = await minService?.memberInfo().catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { SharedPreferences.getInstance().then( (value) => { - value.setString('minMember', jsonEncode(baseData.data)), + value.setString('minMember', jsonEncode(baseData!.data)), }, ); - memberVo = MemberVo.fromJson(baseData.data); + memberVo = MemberVo.fromJson(baseData!.data); } } ///获取父订单(火锅订单加菜前调用) getParentInfo() async { - BaseData baseData = - await minService.getParentInfo("$tableId").catchError((error) { + BaseData? baseData = + await minService?.getParentInfo("$tableId").catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { - if (baseData.data != null) { - parentId = baseData.data["id"]; + if (baseData?.isSuccess ?? false) { + if (baseData?.data != null) { + parentId = baseData!.data["id"]; parentCode = baseData.data["parentCode"]; } else { ///TODO: 没有父订单, @@ -176,53 +169,46 @@ class _StoreOrderPage extends State ///获取桌子信息 queryStoreInfo1() async { - BaseData baseData = await minService.queryStoreInfo1({ + BaseData? baseData = await minService?.queryStoreInfo1({ "getCoupon": true, "storeId": storeId, "tableId": tableId, }).catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { - StoreInfo storeInfo = StoreInfo.fromJson(baseData.data); - if (storeInfo.storeTable != null) { - showPeopleNum(storeInfo.storeTable.tableName); - } + if (baseData?.isSuccess ?? false) { + StoreInfo storeInfo = StoreInfo.fromJson(baseData!.data); + showPeopleNum(storeInfo.storeTable?.tableName); } } /// 查询店铺信息 queryStoreInfo() async { - BaseData baseData = - await apiService.queryStoreInfo(storeId).catchError((error) { + BaseData? baseData = + await apiService?.queryStoreInfo(storeId).catchError((error) { debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { - storeInfo = StoreInfo.fromJson(baseData.data); - activitys = storeInfo.informationVOPageVO.list - .map((e) => Activity.fromJson(e)) - .toList(); + if (baseData?.isSuccess ?? false) { + storeInfo = StoreInfo.fromJson(baseData!.data); + activitys = storeInfo?.informationVOPageVO?.list?.map((e) => Activity.fromJson(e)).toList(); if (mounted) { setState(() {}); } } } - RefreshController refreshController; + RefreshController? refreshController; bool dialogShowing = false; @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async { + return PopScope( + onPopInvoked: (isPop) { if (dialogShowing) { - debugPrint("ssssasdadsasdadasd"); SmartDialog.dismiss(); - return false; - } else { - return false; } }, + canPop: false, child: Container( color: Colors.white, child: Stack( @@ -244,15 +230,14 @@ class _StoreOrderPage extends State NestedScrollView.sliverOverlapAbsorberHandleFor( context), sliver: SliverAppBar( - expandedHeight: (storeInfo != null && - storeInfo.couponVOList != null) + expandedHeight: (storeInfo?.couponVOList != null) ? 400.h : 395.h, floating: false, snap: false, pinned: true, stretch: false, - brightness: Brightness.light, + systemOverlayStyle: SystemUiOverlayStyle.light, leading: GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { @@ -274,7 +259,7 @@ class _StoreOrderPage extends State ), flexibleSpace: FlexibleSpaceBar( title: Title(controller, - storeInfo != null ? storeInfo.storeName : '', + storeInfo!.storeName ?? '', (alpha) { setState(() { if (alpha == 1) @@ -330,7 +315,7 @@ class _StoreOrderPage extends State ///门店信息 StoreInfoView( storeInfo, - widget.arguments["distance"], + widget.arguments?["distance"], ), // Padding(padding:EdgeInsets.only(left: 14.w), // child: Text( @@ -426,10 +411,8 @@ class _StoreOrderPage extends State ), ]; }, - body: - - ///点餐 - TabBarView( + ///点餐 + body: TabBarView( physics: NeverScrollableScrollPhysics(), children: [ ///点餐 @@ -500,17 +483,17 @@ class _StoreOrderPage extends State style: TextStyle( fontSize: 12.sp, color: Color(0xFFFFFFFF), - fontWeight: MyFontWeight.bold), + fontWeight: MyFontWeight.bold, + ), ), TextSpan( - text: shopCarGoods != null - ? shopCarGoods.cartSum - : "0.0", + text: "${shopCarGoods?.cartSum ?? 0}", style: TextStyle( fontSize: 20.sp, fontFamily: 'JDZhengHT', color: Color(0xFFFFFFFF), - fontWeight: MyFontWeight.medium), + fontWeight: MyFontWeight.medium, + ), ), ]), ), @@ -518,17 +501,17 @@ class _StoreOrderPage extends State GestureDetector( onTap: () { if (AppUtils.compareTime( - storeInfo.openStartTime, + storeInfo?.openStartTime, DateFormat('HH:mm:ss') .format(DateTime.now())) && (!AppUtils.compareTime( - storeInfo.openEndTime, + storeInfo?.openEndTime, DateFormat('HH:mm:ss') .format(DateTime.now())))) { toDownOrder(); } else SmartDialog.showToast( - "营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", + "营业时间:${storeInfo?.openStartTime}-${storeInfo?.openEndTime}", alignment: Alignment.center); }, child: RoundButton( @@ -580,13 +563,15 @@ class _StoreOrderPage extends State ), ), ], - ))); + ), + ), + ); } ///领取优惠券 _receiveCoupon(couponId) async { - BaseData baseData = await apiService.receiveCoupon(couponId); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(couponId); + if (baseData?.isSuccess ?? false) { queryStoreInfo(); showAlertDialog(); } @@ -604,7 +589,7 @@ class _StoreOrderPage extends State } ///显示选择人数的弹窗 - showPeopleNum(String tableName) async { + showPeopleNum(String? tableName) async { var people = await showDialog( context: context, barrierDismissible: false, @@ -624,12 +609,10 @@ class _StoreOrderPage extends State ///计算个数 int count() { - if (shopCarGoods == null || - shopCarGoods.shoppingCartSkuItemList == null || - shopCarGoods.shoppingCartSkuItemList.length == 0) return 0; + if (shopCarGoods?.shoppingCartSkuItemList?.isEmpty ?? true) return 0; int count = 0; - shopCarGoods.shoppingCartSkuItemList.forEach((element) { - count += element.buyNum; + shopCarGoods?.shoppingCartSkuItemList?.forEach((element) { + count += (element.buyNum ?? 0); }); return count; } @@ -638,7 +621,7 @@ class _StoreOrderPage extends State toDownOrder() async { int num = count(); - if (parentId == null || parentId == "") { + if (parentId == "") { if (num == 0) { SmartDialog.showToast("请先选择您要购买的商品!~", alignment: Alignment.center); return; @@ -658,14 +641,14 @@ class _StoreOrderPage extends State "cid": cid, "shoppingCart": shopCarGoods, "numberOfPeople": numberOfPeople, - "distance": widget.arguments["distance"], + "distance": widget.arguments?["distance"], "vipLevelName": memberVo?.memberRankVo?.rankName ?? "", "isVips": memberVo?.isVip ?? false, - "subscribeParam": miNiDetail?.subscribeParam, + "subscribeParam": miniDetail?.subscribeParam, }, ); - if ((miNiDetail?.subscribeParam?.isEnableSubscribe ?? false) == true) { + if (miniDetail?.subscribeParam?.isEnableSubscribe ?? false) { clearShopCar(); this.shopCarGoods = await queryShopCar(); } @@ -694,16 +677,14 @@ class _StoreOrderPage extends State color: Colors.white.withAlpha(76), ), ), - autoplay: (storeInfo?.bannerList?.length ?? 0) == 0 ? false : true, + autoplay: storeInfo?.bannerList?.isNotEmpty ?? false, duration: 1000, autoplayDelay: 2000, itemBuilder: (context, position) { return Container( child: MImage( - (storeInfo != null && - storeInfo.bannerList != null && - position < storeInfo.bannerList.length) - ? storeInfo.bannerList[position].imgUrl + (position < (storeInfo?.bannerList?.length ?? 0)) + ? (storeInfo?.bannerList![position].imgUrl ?? "") : "", height: 230.h, width: double.infinity, @@ -714,9 +695,7 @@ class _StoreOrderPage extends State ), ); }, - itemCount: (storeInfo != null && storeInfo.bannerList != null) - ? storeInfo.bannerList.length - : 1, + itemCount: storeInfo?.bannerList?.length ?? 1, ), ); } @@ -748,8 +727,8 @@ class _StoreOrderPage extends State ///清空购物车 clearShopCar() async { - BaseData baseData = await minService.clearShoppingCart(storeId); - if (baseData.isSuccess) { + BaseData? baseData = await minService?.clearShoppingCart(storeId); + if (baseData?.isSuccess ?? false) { shopCarGoods = null; setState(() {}); } @@ -758,9 +737,11 @@ class _StoreOrderPage extends State ///选规格 _queryMiNiDetail(String id, int count) async { EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black, + ); if (count < 0) { - shopCarGoods.shoppingCartSkuItemList.forEach((element) async { + shopCarGoods?.shoppingCartSkuItemList?.forEach((element) async { if (element.productId == id) { await shopCartReduce(element); setState(() {}); @@ -768,18 +749,20 @@ class _StoreOrderPage extends State }); return; } - BaseData baseData = await minService.miNiDetail(id); + BaseData? baseData = await minService?.miNiDetail(id); EasyLoading.dismiss(); - if (baseData != null && baseData.isSuccess) { - miNiDetail = baseData.data; - showStoreSelector(baseData.data, id, count); + if (baseData?.isSuccess ?? false) { + miniDetail = baseData!.data; + if (baseData.data != null) { + showStoreSelector(baseData.data!, id, count); + } } } ///选规格弹窗 - showStoreSelector(MiNiDetail miNiDetail, String id, int count) async { - if (miNiDetail.attrList != null && miNiDetail.attrStyle == 0) { - _addShopCar(miNiDetail, [], count); + showStoreSelector(MiniDetail miniDetail, String? id, int count) async { + if (miniDetail.attrStyle == 0) { + _addShopCar(miniDetail, [], count); } else { EasyLoading.dismiss(); dialogShowing = true; @@ -789,27 +772,28 @@ class _StoreOrderPage extends State isDismissible: false, builder: (_) { return ProductSku( - miNiDetail, + miniDetail, shopCarGoods, id, _addShopCar, add, reduce, ); - }); + }, + ); } } ///添加购物车 - Future _addShopCar(MiNiDetail miNiDetail, selectSkus, int count) async { - ProductSkuVOListBean productSku; + Future _addShopCar(MiniDetail? miniDetail, selectSkus, int count) async { + ProductSkuVOList? productSku; if (selectSkus != null && selectSkus.length == 0) { - productSku = miNiDetail.productSkuVOList.first; + productSku = miniDetail?.productSkuVOList?.first; } else { - productSku = miNiDetail.productSkuVOList.firstWhere((element) { + productSku = miniDetail?.productSkuVOList?.firstWhere((element) { bool gg = true; selectSkus.forEach((element1) { - if (element.skuNameStr.indexOf(element1) < 0) { + if ((element.skuNameStr?.indexOf(element1) ?? 0) < 0) { gg = false; return gg; } @@ -817,54 +801,51 @@ class _StoreOrderPage extends State return gg; }); } - if (productSku == null) return; - String skuId = productSku.id; + String? skuId = productSku?.id; String skuValue = selectSkus .toString() .replaceAll("[", "") .replaceAll("]", "") .replaceAll(",", ""); - if ((miNiDetail.subscribeParam.isEnableSubscribe ?? false) == true) { + if (miniDetail?.subscribeParam?.isEnableSubscribe ?? false) { clearShopCar(); } - if (miNiDetail != null) { - BaseData> baseDate = await minService.addShoppingCart({ - "storeId": storeInfo.id, - "storeName": storeInfo.storeName ?? "", - "numberOfPeople": numberOfPeople, - "tableId": tableId, - "parentId": parentId, - "parentCode": parentCode, - "shoppingCartSkuItemList": [ - { - "buyNum": count, - "id": skuId, - "productId": miNiDetail.id, - "productName": miNiDetail.productName, - "skuName": skuValue, - "storeId": storeInfo.id, - "skuPrice": productSku.skuPrice, - "skuStock": productSku.skuStock, - "tableId": tableId, - }, - ], - }); - // EasyLoading.dismiss(); - if (baseDate != null && baseDate.isSuccess) { - this.shopCarGoods = await queryShopCar(); - if ((miNiDetail.subscribeParam.isEnableSubscribe ?? false) == true) - toDownOrder(); - setState(() {}); - } else { - SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center); - } + BaseData>? baseDate = await minService?.addShoppingCart({ + "storeId": storeInfo?.id, + "storeName": storeInfo?.storeName ?? "", + "numberOfPeople": numberOfPeople, + "tableId": tableId, + "parentId": parentId, + "parentCode": parentCode, + "shoppingCartSkuItemList": [ + { + "buyNum": count, + "id": skuId, + "productId": miniDetail?.id, + "productName": miniDetail?.productName, + "skuName": skuValue, + "storeId": storeInfo?.id, + "skuPrice": productSku?.skuPrice, + "skuStock": productSku?.skuStock, + "tableId": tableId, + }, + ], + }); + // EasyLoading.dismiss(); + if (baseDate?.isSuccess ?? false) { + this.shopCarGoods = await queryShopCar(); + if (miniDetail?.subscribeParam?.isEnableSubscribe ?? false) + toDownOrder(); + setState(() {}); + } else { + SmartDialog.showToast("${baseDate?.msg}", alignment: Alignment.center); } } ///查询购物车 - Future queryShopCar() async { + Future queryShopCar() async { pName = ""; //活动 pid = ""; //活动 cName = ""; //优惠券 @@ -872,64 +853,54 @@ class _StoreOrderPage extends State if (storeInfo?.posType?.code == "NORMALSTORE" && tableId == 0) { return null; } - BaseData> baseDate = - await minService.getShoppingCart(tableId); - if (baseDate != null && - baseDate.isSuccess && - baseDate.data != null && - baseDate.data.length > 0) { - if (baseDate.data[0].selectDiscount == 1) { - baseDate.data[0].couponList.forEach((element) { - if (element.isMaxCoupon) { + BaseData>? baseDate = await minService?.getShoppingCart(tableId); + if ((baseDate?.isSuccess ?? false) && (baseDate!.data?.length ?? 0) > 0) { + if (baseDate.data![0].selectDiscount == 1) { + baseDate.data![0].couponList?.forEach((element) { + if (element.isMaxCoupon ?? false) { // cName = element.promotionName; cid = element.id; } }); - } else if (baseDate.data[0].selectDiscount == 2) { - baseDate.data[0].promotionInfoList.forEach((element) { - if (element.isMaxPromotion) { + } else if (baseDate.data![0].selectDiscount == 2) { + baseDate.data![0].promotionInfoList?.forEach((element) { + if (element.isMaxPromotion ?? false) { // pName = element.name; pid = element.id; } }); } - return baseDate.data[0]; + return baseDate.data![0]; } else { return null; } } ///购物车➕1 - Future shopCartAdd( - ShoppingCartSkuItemListBean cartSkuItem) async { - Map shopCarTemp = shopCarGoods.toJson(); - cartSkuItem.buyNum += 1; + Future shopCartAdd(SkuItemList cartSkuItem) async { + Map shopCarTemp = shopCarGoods?.toJson() ?? {}; + cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) + 1; shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); + if (baseDate?.isSuccess ?? false) { this.shopCarGoods = await queryShopCar(); - if (shopCartKey != null) { - shopCartKey.currentState.setState(() {}); - } + shopCartKey.currentState?.setState(() {}); setState(() {}); } return this.shopCarGoods; } ///购物车➖1 - Future shopCartReduce( - ShoppingCartSkuItemListBean cartSkuItem) async { - Map shopCarTemp = shopCarGoods.toJson(); - cartSkuItem.buyNum -= 1; + Future shopCartReduce(SkuItemList cartSkuItem) async { + Map shopCarTemp = shopCarGoods?.toJson() ?? {}; + cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) - 1; shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp); + if (baseDate?.isSuccess ?? false) { EasyLoading.dismiss(); this.shopCarGoods = await queryShopCar(); - if (shopCartKey?.currentState != null) { - shopCartKey.currentState.setState(() {}); + if (shopCartKey.currentState != null) { + shopCartKey.currentState!.setState(() {}); } setState(() {}); } @@ -937,96 +908,70 @@ class _StoreOrderPage extends State } ///商品➕1 - add(MiNiDetail miNiDetail, selectSkus) async { - ProductSkuVOListBean productSku = - miNiDetail.productSkuVOList.firstWhere((element) { + add(MiniDetail miniDetail, selectSkus) async { + ProductSkuVOList? productSku = miniDetail.productSkuVOList?.firstWhere((element) { return skuY(element, selectSkus); }); - - if (productSku == null) return; - String skuId = productSku.id; - if (shopCarGoods == null) { - await _addShopCar(miNiDetail, selectSkus, 1); - return; - } - int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList - .indexWhere((element) => skuId == element.id); - Map shopCarTemp = shopCarGoods.toJson(); - shopCarGoods.tableId = "$tableId"; + String? skuId = productSku?.id; + int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1; + Map? shopCarTemp = shopCarGoods?.toJson(); + shopCarGoods?.tableId = "$tableId"; if (shopSkuIndex >= 0) { - shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum += 1; - ShoppingCartSkuItemListBean cartSkuItem = shopCarGoods - .shoppingCartSkuItemList - .firstWhere((element) => skuId == element.id); - shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; + int buy = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0; + shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = (buy + 1); + SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id); + shopCarTemp?["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()]; } else { - await _addShopCar(miNiDetail, selectSkus, 1); + await _addShopCar(miniDetail, selectSkus, 1); return; } - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp ?? {}); + if (baseDate?.isSuccess ?? false) { this.shopCarGoods = await queryShopCar(); debugPrint("count.toString()"); setState(() {}); } else { - SmartDialog.showToast(baseDate.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseDate?.msg}", alignment: Alignment.center); } } ///商品➖1 - reduce(MiNiDetail miNiDetail, selectSkus) async { - ProductSkuVOListBean productSku = - miNiDetail.productSkuVOList.firstWhere((element) { + reduce(MiniDetail miNiDetail, selectSkus) async { + ProductSkuVOList? productSku = + miNiDetail.productSkuVOList?.firstWhere((element) { return skuY(element, selectSkus); }); + String? skuId = productSku?.id; + SkuItemList? shopSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id); + int shopSkuIndex = shopCarGoods?.shoppingCartSkuItemList?.indexWhere((element) => skuId == element.id) ?? -1; - if (productSku == null) return; - String skuId = productSku.id; - if (shopCarGoods == null) { - await _addShopCar(miNiDetail, selectSkus, 1); - return; - } - ShoppingCartSkuItemListBean shopSkuItem = shopCarGoods - .shoppingCartSkuItemList - .firstWhere((element) => skuId == element.id); - int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList - .indexWhere((element) => skuId == element.id); - - if (shopSkuItem != null) { - if (shopSkuItem.buyNum > 1) { - shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum -= 1; - } - } else { - await _addShopCar(miNiDetail, selectSkus, 1); - return; + if ((shopSkuItem?.buyNum ?? 0) > 1) { + int butNum = shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum ?? 0; + shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex].buyNum = butNum - 1; } - shopCarGoods.tableId = "$tableId"; + shopCarGoods?.tableId = "$tableId"; - Map shopCarTemp = shopCarGoods.toJson(); - ShoppingCartSkuItemListBean cartSkuItem = shopCarGoods - .shoppingCartSkuItemList - .firstWhere((element) => skuId == element.id); - shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; + Map? shopCarTemp = shopCarGoods?.toJson(); + SkuItemList? cartSkuItem = shopCarGoods?.shoppingCartSkuItemList?.firstWhere((element) => skuId == element.id); + shopCarTemp?["shoppingCartSkuItemList"] = [cartSkuItem?.toJson()]; - BaseData> baseDate = - await minService.shoppingCartSingle(shopCarTemp); - if (baseDate.isSuccess) { + BaseData>? baseDate = await minService?.shoppingCartSingle(shopCarTemp ?? {}); + if (baseDate?.isSuccess ?? false) { queryShopCar().then((value) { this.shopCarGoods = value; setState(() {}); }); } else { - SmartDialog.showToast(baseDate.msg, alignment: Alignment.center); + SmartDialog.showToast(baseDate?.msg ?? "", alignment: Alignment.center); } } - bool skuY(ProductSkuVOListBean productSku, selectSkus) { + bool skuY(ProductSkuVOList productSku, selectSkus) { bool gg = true; selectSkus.forEach((element1) { - if (productSku.skuNameStr.indexOf(element1) < 0) { + if ((productSku.skuNameStr?.indexOf(element1) ?? 0) < 0) { gg = false; return gg; } diff --git a/lib/store/store_view/people_num.dart b/lib/store/store_view/people_num.dart index ddbf7310..7b68589e 100644 --- a/lib/store/store_view/people_num.dart +++ b/lib/store/store_view/people_num.dart @@ -1,12 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/round_button.dart'; class PeopleNumView extends StatefulWidget { - final String tableName; + final String? tableName; // final Function(int peopleNum) callback; diff --git a/lib/store/store_view/product_meals_sku.dart b/lib/store/store_view/product_meals_sku.dart index 78841b1f..7a380861 100644 --- a/lib/store/store_view/product_meals_sku.dart +++ b/lib/store/store_view/product_meals_sku.dart @@ -1,12 +1,13 @@ import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/product_set_meals.dart'; +import 'package:huixiang/data/set_meal_data.dart'; +import 'package:huixiang/data/shopping_cart.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -28,18 +29,18 @@ class ProductMealsSku extends StatefulWidget { } class _ProductMealsSku extends State { - ApiService apiService; - MinApiService minService; + ApiService? apiService; + MinApiService? minService; final RefreshController refreshController = RefreshController(); - String id; - MiNiDetail miNiDetail; + String? id; + MiniDetail? miNiDetail; String parentCode = ""; int tableId = 0; - String storeId; - String parentId; + String? storeId; + String? parentId; int numberOfPeople = 0; - List productSetMeals; - List setMealData; + List? productSetMeals; + List? setMealData; @override void initState() { @@ -48,9 +49,9 @@ class _ProductMealsSku extends State { id = widget.arguments["id"]; storeId = widget.arguments["storeId"]; SharedPreferences.getInstance().then((value) { - String minToken = value.getString("minToken"); - String tenant = value.getString("tenant"); - String storeId = value.getString("storeId"); + String minToken = value.getString("minToken") ?? ""; + String tenant = value.getString("tenant") ?? ""; + String storeId = value.getString("storeId") ?? ""; minService = MinApiService(Dio(), context: context, token: minToken, @@ -63,14 +64,13 @@ class _ProductMealsSku extends State { ///商品详情 queryMiNiDetail(id) async { - BaseData baseData = - await minService.miNiDetail(id).catchError((error) { + BaseData? baseData = await minService?.miNiDetail(id).catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { - miNiDetail = baseData.data; - productSetMeals = miNiDetail.productSkuVOList[0].productSetMeals; + miNiDetail = baseData!.data; + productSetMeals = miNiDetail?.productSkuVOList?[0].productSetMeals; }); refreshController.refreshCompleted(); } else { @@ -81,15 +81,15 @@ class _ProductMealsSku extends State { ///添加购物车 addShopCar() async { List setMealDataList = []; - productSetMeals.forEach((element) { + productSetMeals?.forEach((element) { List productInfoListBean = []; - element.productInfoList.forEach((ele) { + element.productInfoList?.forEach((ele) { if (ele.count > 0) { productInfoListBean.add({ "productId": ele.productId, - "skuId": ele.skuInfoList.length == 1 - ? ele.skuInfoList.first.id - : ele.skuInfoList.firstWhere((e2) => e2.isSelected).id, + "skuId": ele.skuInfoList?.length == 1 + ? ele.skuInfoList?.first.id + : ele.skuInfoList?.firstWhere((e2) => e2.isSelected).id, // "buyNumber":1, }); } @@ -101,29 +101,28 @@ class _ProductMealsSku extends State { }); var requestData = { - "storeId": miNiDetail.storeId, + "storeId": miNiDetail?.storeId, "tableId": tableId, "parentId": 0, "shoppingCartSkuItemList": [ { "buyNum": 1, - "id": miNiDetail.productSkuVOList[0].id, - "productName": miNiDetail.productName, - "skuPrice": miNiDetail.productSkuVOList[0].skuPrice, - "skuStock": miNiDetail.productSkuVOList[0].skuStock, - "skuImg": miNiDetail.productSkuVOList[0].skuImg, + "id": miNiDetail?.productSkuVOList?[0].id, + "productName": miNiDetail?.productName, + "skuPrice": miNiDetail?.productSkuVOList?[0].skuPrice, + "skuStock": miNiDetail?.productSkuVOList?[0].skuStock, + "skuImg": miNiDetail?.productSkuVOList?[0].skuImg, "setMealDataList": setMealDataList }, ], }; - BaseData> baseDate = - await minService.addShoppingCart(requestData); + BaseData>? baseDate = await minService?.addShoppingCart(requestData); EasyLoading.dismiss(); - if (baseDate != null && baseDate.isSuccess) { + if (baseDate?.isSuccess ?? false) { Navigator.of(context).pop(); } else { - SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center); + SmartDialog.showToast(baseDate?.msg ?? "", alignment: Alignment.center); } } @@ -143,135 +142,134 @@ class _ProductMealsSku extends State { width: double.infinity, height: 375.h, ), - if (productSetMeals != null) - Container( - child: Column( - children: [ - GestureDetector( - child: Container( - margin: EdgeInsets.only( - top: 50.h, left: 16.w, right: 16.w, bottom: 10.h), - decoration: BoxDecoration( - color: Colors.transparent, - ), - alignment: Alignment.centerLeft, - child: Image.asset( - "assets/image/integral_return.webp", - width: 24, - height: 24, - ), + Container( + child: Column( + children: [ + GestureDetector( + child: Container( + margin: EdgeInsets.only( + top: 50.h, left: 16.w, right: 16.w, bottom: 10.h), + decoration: BoxDecoration( + color: Colors.transparent, + ), + alignment: Alignment.centerLeft, + child: Image.asset( + "assets/image/integral_return.webp", + width: 24, + height: 24, ), - onTap: () { - Navigator.of(context).pop(); - }, ), - Expanded( - child: Container( - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - child: Column( - children: [ - Container( - width: double.infinity, - margin: EdgeInsets.only( - left: 16.w, - right: 16.w, - top: 26.h, - bottom: 16.h, - ), - padding: EdgeInsets.only( - left: 10.w, - right: 13.w, - top: 16.h, - bottom: 12.h, - ), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Color(0x08203303).withAlpha(12), - offset: Offset(0, 2), - blurRadius: 3, - spreadRadius: 0, - ), - ], - borderRadius: BorderRadius.circular(8), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ListView.builder( - itemCount: productSetMeals?.length ?? 0, - scrollDirection: Axis.vertical, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - padding: EdgeInsets.zero, - itemBuilder: (context, position) { - return productMealsList(position); - }, - ), - ], - ), - ) - ], - ), + onTap: () { + Navigator.of(context).pop(); + }, + ), + Expanded( + child: Container( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + child: Column( + children: [ + Container( + width: double.infinity, + margin: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 26.h, + bottom: 16.h, + ), + padding: EdgeInsets.only( + left: 10.w, + right: 13.w, + top: 16.h, + bottom: 12.h, + ), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x08203303).withAlpha(12), + offset: Offset(0, 2), + blurRadius: 3, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(8), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ListView.builder( + itemCount: productSetMeals?.length ?? 0, + scrollDirection: Axis.vertical, + physics: BouncingScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.zero, + itemBuilder: (context, position) { + return productMealsList(position); + }, + ), + ], + ), + ) + ], ), ), ), - flex: 1, ), - Stack( - alignment: Alignment.bottomLeft, - children: [ - Container( - margin: EdgeInsets.only( - left: 14.w, - right: 14.w, - bottom: 30.h, - ), - height: 45.h, - // color: Color(0xFFFAFAFA), - decoration: BoxDecoration( - color: Color(0xFF383A38), - borderRadius: BorderRadius.circular(100), - ), - child: RoundButton( - width: double.infinity, - height: 54.h, - text: "加入购物车", - textColor: Colors.white, - fontWeight: MyFontWeight.semi_bold, - radius: 27, - backgroup: Color(0xFF32A060), - fontSize: 16.sp, - callback: () { - bool flag = true; - productSetMeals.forEach((element) { - int pInfoTotal = 0; - element.productInfoList.forEach((ele) { - pInfoTotal += ele.count; - }); - if (pInfoTotal != element.optionalNumber) { - flag = false; - return; - } + flex: 1, + ), + Stack( + alignment: Alignment.bottomLeft, + children: [ + Container( + margin: EdgeInsets.only( + left: 14.w, + right: 14.w, + bottom: 30.h, + ), + height: 45.h, + // color: Color(0xFFFAFAFA), + decoration: BoxDecoration( + color: Color(0xFF383A38), + borderRadius: BorderRadius.circular(100), + ), + child: RoundButton( + width: double.infinity, + height: 54.h, + text: "加入购物车", + textColor: Colors.white, + fontWeight: MyFontWeight.semi_bold, + radius: 27, + backgroup: Color(0xFF32A060), + fontSize: 16.sp, + callback: () { + bool flag = true; + productSetMeals?.forEach((element) { + int pInfoTotal = 0; + element.productInfoList?.forEach((ele) { + pInfoTotal += ele.count; }); - if (!flag) { - SmartDialog.showToast("抱歉,还有商品未加购", - alignment: Alignment.center); + if (pInfoTotal != element.optionalNumber) { + flag = false; return; - } else { - addShopCar(); } - }, - )), - ], - ), - ], - ), - ) + }); + if (!flag) { + SmartDialog.showToast("抱歉,还有商品未加购", + alignment: Alignment.center); + return; + } else { + addShopCar(); + } + }, + )), + ], + ), + ], + ), + ) ], ), ); @@ -285,7 +283,7 @@ class _ProductMealsSku extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "${productSetMeals[position].groupName}(${productSetMeals[position].totalNumber}选${productSetMeals[position].optionalNumber})", + "${productSetMeals![position].groupName}(${productSetMeals![position].totalNumber}选${productSetMeals![position].optionalNumber})", style: TextStyle( fontSize: 15.sp, color: Colors.black, @@ -296,7 +294,7 @@ class _ProductMealsSku extends State { height: 8.h, ), ListView.builder( - itemCount: productSetMeals[position].productInfoList.length, + itemCount: productSetMeals![position].productInfoList?.length ?? 0, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), shrinkWrap: true, @@ -316,7 +314,7 @@ class _ProductMealsSku extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - productSetMeals[position].productInfoList[index].productImg ?? "", + productSetMeals![position].productInfoList![index].productImg ?? "", width: 70.h, height: 70.h, radius: BorderRadius.circular(4), @@ -336,8 +334,8 @@ class _ProductMealsSku extends State { children: [ Expanded( child: Text( - productSetMeals[position] - .productInfoList[index] + productSetMeals![position] + .productInfoList![index] .productName ?? "", overflow: TextOverflow.ellipsis, @@ -349,11 +347,10 @@ class _ProductMealsSku extends State { ), ), ), - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[0] - .attrName != - "") + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList![0] + .attrName?.isNotEmpty ?? false) GestureDetector( child: Text( S.of(context).xuanguige, @@ -367,11 +364,10 @@ class _ProductMealsSku extends State { showSkuDialog(position, index); }, ), - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[0] - .attrName != - "") + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList![0] + .attrName?.isNotEmpty ?? false) GestureDetector( onTap: () { showSkuDialog(position, index); @@ -388,18 +384,15 @@ class _ProductMealsSku extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - if (productSetMeals[position] - .productInfoList[index] - .skuInfoList - .where((element) => element.isSelected) - .isNotEmpty && - productSetMeals[position].productInfoList[index].count > + if ((productSetMeals![position] + .productInfoList![index] + .skuInfoList?.where((element) => element.isSelected).isNotEmpty ?? false) && + productSetMeals![position].productInfoList![index].count > 0) Text( - productSetMeals[position] - .productInfoList[index] - .skuInfoList - .firstWhere((element) => element.isSelected) + productSetMeals![position] + .productInfoList![index] + .skuInfoList!.firstWhere((element) => element.isSelected) .skuName ?? "", overflow: TextOverflow.ellipsis, @@ -411,17 +404,15 @@ class _ProductMealsSku extends State { ), ), Spacer(), - if (productSetMeals[position] - .productInfoList[index] - .skuInfoList - .where((element) => element.isSelected) - .isNotEmpty && - productSetMeals[position].productInfoList[index].count > - 0) + if ((productSetMeals![position] + .productInfoList![index] + .skuInfoList?.where((element) => element.isSelected) + .isNotEmpty ?? false) && + productSetMeals![position].productInfoList![index].count > 0) Padding( padding: EdgeInsets.only(right: 4.w), child: Text( - "x${productSetMeals[position].productInfoList[index].count}", + "x${productSetMeals![position].productInfoList![index].count}", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -431,20 +422,18 @@ class _ProductMealsSku extends State { ), ), ), - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[0] - .attrName == - "") + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList![0] + .attrName == "") InkWell( onTap: () { setState(() { - if (productSetMeals[position] - .productInfoList[index] - .count >= - 1) - productSetMeals[position] - .productInfoList[index] + if (productSetMeals![position] + .productInfoList![index] + .count >= 1) + productSetMeals![position] + .productInfoList![index] .count -= 1; }); }, @@ -454,24 +443,24 @@ class _ProductMealsSku extends State { height: 22.h, ), ), - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[0] + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList![0] .attrName == "") Container( width: 30, alignment: Alignment.center, child: Text( - (productSetMeals[position].totalNumber > 1 && - productSetMeals[position].totalNumber != - productSetMeals[position].optionalNumber) - ? productSetMeals[position] - .productInfoList[index] + ((productSetMeals![position].totalNumber ?? 0) > 1 && + productSetMeals![position].totalNumber != + productSetMeals![position].optionalNumber) + ? productSetMeals![position] + .productInfoList![index] .count .toString() - : (productSetMeals[position] - .productInfoList[index] + : (productSetMeals![position] + .productInfoList![index] .count = 1) .toString(), style: TextStyle( @@ -481,45 +470,36 @@ class _ProductMealsSku extends State { ), ), ), - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[0] - .attrName == - "") + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[0] + .attrName?.isEmpty ?? true) GestureDetector( onTap: () { setState(() { - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[0] - .attrName != - "") { + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[0] + .attrName?.isNotEmpty ?? false) { showSkuDialog(position, index); return; } int total = 0; - productSetMeals[position] - .productInfoList - .forEach((element) { + productSetMeals![position] + .productInfoList!.forEach((element) { total += element.count; }); - if (total >= - productSetMeals[position].optionalNumber || - productSetMeals[position] - .productInfoList[index] + if (total >= (productSetMeals![position].optionalNumber ?? 0) || + productSetMeals![position] + .productInfoList![index] .count >= 1) { SmartDialog.showToast("抱歉,无法加购更多", alignment: Alignment.center); return; } - if (productSetMeals[position] - .productInfoList[index] - .count == - 0) - productSetMeals[position] - .productInfoList[index] - .count += 1; + if (productSetMeals![position].productInfoList![index].count == 0) + productSetMeals![position].productInfoList![index].count += 1; }); }, child: Image.asset( @@ -542,27 +522,20 @@ class _ProductMealsSku extends State { } Widget porAttrItem(int position, int index, int pos, state) { - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[pos] - .attrValueList != - null && - productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[pos] - .attrValueList - .length > - 0) + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[pos] + .attrValueList?.isNotEmpty ?? false) return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only(top: 16, bottom: 16), child: Text( - productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[pos] - .attrName, + productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[pos] + .attrName ?? "", style: TextStyle( color: Color(0xFFB3B3B3), fontSize: 14.sp, @@ -582,37 +555,32 @@ class _ProductMealsSku extends State { return Wrap( runSpacing: 10.0, spacing: 10.0, - children: productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[pos] - .attrValueList - .take(productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[pos] - .attrValueList - .length) + children: productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[pos] + .attrValueList?.take(productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[pos] + .attrValueList?.length ?? 0) .map((AttrValueList tag) { return GestureDetector( onTap: () { state(() { - productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[pos] - .selectSku = tag.attrName; + productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[pos].selectSku = tag.attrName; }); }, child: sweetnessItem( tag.attrName, - (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList[pos] - .selectSku == - tag.attrName), + (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?[pos].selectSku == tag.attrName), )); - }).toList()); + }).toList() ?? []); } - Widget sweetnessItem(String name, bool isCheck) { + Widget sweetnessItem(String? name, bool isCheck) { return Container( padding: const EdgeInsets.symmetric(vertical: 5.0, horizontal: 12.0), decoration: BoxDecoration( @@ -627,14 +595,15 @@ class _ProductMealsSku extends State { ), ), child: Text( - name, + name ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: !isCheck ? Color(0xFF4D4D4D) : Color(0xFF32A060), fontSize: 14.sp, fontWeight: MyFontWeight.regular, ), - )); + ), + ); } ///选择規格弹窗 @@ -656,10 +625,7 @@ class _ProductMealsSku extends State { children: [ Expanded( child: ListView.builder( - itemCount: productSetMeals[position] - .productInfoList[index] - .productAttrInfoList - .length, + itemCount: productSetMeals?[position].productInfoList![index].productAttrInfoList?.length ?? 0, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), padding: EdgeInsets.zero, @@ -675,41 +641,35 @@ class _ProductMealsSku extends State { onTap: () { setState(() { int total = 0; - productSetMeals[position] - .productInfoList - .forEach((element) { + productSetMeals![position] + .productInfoList?.forEach((element) { total += element.count; }); - if (productSetMeals[position] - .productInfoList[index] - .productAttrInfoList - .where((element) => element.selectSku == null) - .isNotEmpty) { + if (productSetMeals![position] + .productInfoList![index] + .productAttrInfoList?.where((element) => element.selectSku == null) + .isNotEmpty ?? false) { SmartDialog.showToast(S.of(context).qingxianxuanguige, alignment: Alignment.center); return; } - if (total >= productSetMeals[position].optionalNumber && - productSetMeals[position] - .productInfoList[index] - .count != - 1) { + if (total >= (productSetMeals![position].optionalNumber ?? 0) && + productSetMeals![position] + .productInfoList?[index] + .count != 1) { SmartDialog.showToast("抱歉,无法加购更多", alignment: Alignment.center); return; } - productSetMeals[position].productInfoList[index].count = - 1; - productSetMeals[position] - .productInfoList[index] - .skuInfoList - .forEach((element) { + productSetMeals![position].productInfoList![index].count = 1; + productSetMeals![position] + .productInfoList?[index] + .skuInfoList?.forEach((element) { bool flag = true; - productSetMeals[position] - .productInfoList[index] - .productAttrInfoList - .forEach((e1) { - if (!element.skuName.contains(e1.selectSku)) + productSetMeals![position] + .productInfoList?[index] + .productAttrInfoList?.forEach((e1) { + if (!(element.skuName?.contains("${e1.selectSku}") ?? false)) flag = false; }); element.isSelected = flag; diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index 08902b3e..8161df7e 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -1,23 +1,23 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/shopping_cart.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; class ProductSku extends StatefulWidget { - final MiNiDetail miNiDetail; - final String productId; - final Function(MiNiDetail miNiDetail, List selectSkus, int count) + final MiniDetail miNiDetail; + final String? productId; + final Function(MiniDetail miNiDetail, List selectSkus, int count) addShopCar; - final Function(MiNiDetail miNiDetail, List selectSkus) add; - final Function(MiNiDetail miNiDetail, List selectSkus) reduce; - final ShoppingCart shopCarGoods; - final int buttonType; + final Function(MiniDetail miNiDetail, List selectSkus) add; + final Function(MiniDetail miNiDetail, List selectSkus) reduce; + final ShoppingCart? shopCarGoods; + final int? buttonType; ProductSku(this.miNiDetail, this.shopCarGoods, this.productId, this.addShopCar, this.add, this.reduce, @@ -39,8 +39,10 @@ class _ProductSku extends State { void initState() { super.initState(); - widget.miNiDetail.attrList.forEach((element) { - selectSkus.add(element.attrValueList[0].attrValue); + widget.miNiDetail.attrList?.forEach((element) { + if (element.attrValueList?[0].attrValue?.isNotEmpty ?? false) { + selectSkus.add(element.attrValueList![0].attrValue!); + } }); buildCount(); @@ -48,31 +50,30 @@ class _ProductSku extends State { buildCount() { count = 1; - ProductSkuVOListBean productSku; + ProductSkuVOList? productSku; try { - productSku = widget.miNiDetail.productSkuVOList.firstWhere((element) { + productSku = widget.miNiDetail.productSkuVOList?.firstWhere((element) { return skuY(element, selectSkus); }); } catch (ex) { return; } - if (productSku == null) return; - selectedPrice = productSku.vipPrice ?? productSku.skuPrice ?? ""; - String skuId = productSku.id; - if (widget.shopCarGoods == null || - widget.shopCarGoods.shoppingCartSkuItemList == null) return; - int shopSkuIndex = widget.shopCarGoods.shoppingCartSkuItemList - .indexWhere((element) => skuId == element.id); - if (shopSkuIndex >= 0) { - count = widget.shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum; + selectedPrice = productSku?.vipPrice ?? productSku?.skuPrice ?? ""; + String? skuId = productSku?.id; + int? shopSkuIndex = widget.shopCarGoods?.shoppingCartSkuItemList + ?.indexWhere((element) => skuId == element.id); + if ((shopSkuIndex ?? 0) >= 0) { + count = + widget.shopCarGoods?.shoppingCartSkuItemList?[shopSkuIndex!].buyNum ?? + 0; realCount = count; } } - bool skuY(ProductSkuVOListBean productSku, selectSkus) { + bool skuY(ProductSkuVOList productSku, selectSkus) { bool gg = true; selectSkus.forEach((element1) { - if (productSku.skuNameStr.indexOf(element1) < 0) { + if ((productSku.skuNameStr?.indexOf(element1) ?? 0) < 0) { gg = false; return gg; } @@ -82,17 +83,18 @@ class _ProductSku extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async { - // debugPrint("ssssasdadsasdadasd"); - // SmartDialog.dismiss(); + return PopScope( + canPop: true, + onPopInvoked: (isPop) { Navigator.of(context).pop(); - return true; }, child: StatefulBuilder(builder: (context1, state) { return Container( alignment: Alignment.topCenter, - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16), + padding: EdgeInsets.symmetric( + horizontal: 14.w, + vertical: 16, + ), height: MediaQuery.of(context).size.height / 3 * 2, width: double.infinity, decoration: BoxDecoration( @@ -112,7 +114,7 @@ class _ProductSku extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - widget.miNiDetail.imgs[0], + widget.miNiDetail.imgs?[0] ?? "", width: 76.h, height: 76.h, fit: BoxFit.cover, @@ -124,58 +126,61 @@ class _ProductSku extends State { width: 10, ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - widget.miNiDetail.productName, - style: TextStyle( - color: Colors.black, - fontSize: 16.sp, - fontWeight: MyFontWeight.medium, - ), - ), - if (widget.miNiDetail.attrList[0].attrName != "") - Padding( - padding: EdgeInsets.only(top: 4, bottom: 7), - child: Text( - "已选: " + - (selectSkus - .map((e) => "$e") - .toList() - .toString()), - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xFF727272), - fontSize: 11.sp, - fontWeight: MyFontWeight.regular, - ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.miNiDetail.productName ?? "", + style: TextStyle( + color: Colors.black, + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, ), ), - Row( - children: [ - Text( - S.of(context).huiyuanjia, - style: TextStyle( - color: Color(0xFFFF7A1A), - fontSize: 13.sp, - fontWeight: MyFontWeight.medium, + if (widget + .miNiDetail.attrList?[0].attrName?.isNotEmpty ?? + false) + Padding( + padding: EdgeInsets.only(top: 4, bottom: 7), + child: Text( + "已选: " + + (selectSkus + .map((e) => "$e") + .toList() + .toString()), + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF727272), + fontSize: 11.sp, + fontWeight: MyFontWeight.regular, + ), ), ), - Text( - selectedPrice, - style: TextStyle( - color: Color(0xFFFF7A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, + Row( + children: [ + Text( + S.of(context).huiyuanjia, + style: TextStyle( + color: Color(0xFFFF7A1A), + fontSize: 13.sp, + fontWeight: MyFontWeight.medium, + ), ), - ), - ], - ), - ], - )), + Text( + selectedPrice, + style: TextStyle( + color: Color(0xFFFF7A1A), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ], + ), + ], + ), + ), InkWell( onTap: () { Navigator.of(context).pop(); @@ -190,17 +195,15 @@ class _ProductSku extends State { ), ], ), - if (widget.miNiDetail.attrList != null && - widget.miNiDetail.attrList.length > 0) + if (widget.miNiDetail.attrList?.isNotEmpty ?? false) SizedBox( height: 10, ), - if (widget.miNiDetail.attrList != null && - widget.miNiDetail.attrList.length > 0 && - widget.miNiDetail.attrList[0].attrName != "") + if ((widget.miNiDetail.attrList?.isNotEmpty ?? false) && + (widget.miNiDetail.attrList?[0].attrName?.isNotEmpty ?? false)) Expanded( child: ListView.builder( - itemCount: widget.miNiDetail.attrList.length, + itemCount: widget.miNiDetail.attrList?.length ?? 0, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), padding: EdgeInsets.zero, @@ -212,13 +215,13 @@ class _ProductSku extends State { buildCount(); }); }, - widget.miNiDetail.attrList[position], + widget.miNiDetail.attrList![position], position, ); }, ), ), - if (widget.miNiDetail.attrList[0].attrName == "") + if ((widget.miNiDetail.attrList?.isNotEmpty ?? false) && (widget.miNiDetail.attrList?[0].attrName?.isEmpty ?? true)) Expanded(child: Container()), SizedBox( height: 24, @@ -239,12 +242,11 @@ class _ProductSku extends State { InkWell( onTap: () async { if (count == 1) return; - if ((widget?.miNiDetail?.subscribeParam - ?.isEnableSubscribe ?? - false) == - false) { + if (widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) { _isTapEd = true; - EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black); await widget.reduce(widget.miNiDetail, selectSkus); } count -= 1; @@ -270,23 +272,18 @@ class _ProductSku extends State { ), InkWell( onTap: () async { - if ((widget?.miNiDetail?.subscribeParam - ?.isEnableSubscribe ?? - false) == - false) { + if (widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) { _isTapEd = true; - EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black); if (count == 1 && realCount == 0) await widget.addShopCar( widget.miNiDetail, selectSkus, 2); else await widget.add(widget.miNiDetail, selectSkus); } - if ((widget?.miNiDetail?.oversold ?? 0) == 0 && - count >= - (widget?.miNiDetail?.productSkuVOList[0] - ?.skuStock ?? - 0)) { + if ((widget.miNiDetail.oversold ?? 0) == 0 && count >= (widget.miNiDetail.productSkuVOList?[0].skuStock ?? 0)) { SmartDialog.showToast("库存不足", alignment: Alignment.center); } else { @@ -310,12 +307,9 @@ class _ProductSku extends State { RoundButton( width: double.infinity, height: 54.h, - text: - (widget?.miNiDetail?.subscribeParam?.isEnableSubscribe ?? - false) == - true - ? S.of(context).lijiyuyue - : "加入购物车", + text: (widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) + ? S.of(context).lijiyuyue + : "加入购物车", textColor: Colors.white, fontWeight: MyFontWeight.semi_bold, radius: 27, @@ -328,12 +322,7 @@ class _ProductSku extends State { widget.addShopCar( widget.miNiDetail, selectSkus, - ((widget?.miNiDetail?.subscribeParam - ?.isEnableSubscribe ?? - false) == - false) - ? 1 - : count); + (widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) ? 1 : count); }, ), if (widget.buttonType == 1) @@ -736,16 +725,15 @@ class _ProductSku extends State { ); } - Widget attrItem(Function fc, AttrListBean attrListBean, position) { - if (attrListBean.attrValueList != null && - attrListBean.attrValueList.length > 0) + Widget attrItem(Function fc, AttrList attrListBean, position) { + if (attrListBean.attrValueList?.isNotEmpty ?? false) return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only(top: 16, bottom: 16), child: Text( - attrListBean.attrName, + attrListBean.attrName ?? "", style: TextStyle( color: Colors.black, fontSize: 14.sp, @@ -792,12 +780,11 @@ class _ProductSku extends State { // ); // } - Widget sweetnessStore(Function fc, List arrays, position) { + Widget sweetnessStore(Function fc, List? arrays, position) { return Wrap( runSpacing: 10.0, spacing: 10.0, - children: - arrays.take(arrays.length).map((AttrValueListBean tag) { + children: arrays?.take(arrays.length).map((AttrValueList tag) { return GestureDetector( onTap: () { fc(tag.attrValue); @@ -806,10 +793,10 @@ class _ProductSku extends State { tag.attrValue, (tag.attrValue == selectSkus[position]) ?? false, )); - }).toList()); + }).toList() ?? []); } - Widget sweetnessItem(String name, bool isCheck) { + Widget sweetnessItem(String? name, bool isCheck) { return Container( padding: const EdgeInsets.symmetric(vertical: 5.0, horizontal: 12.0), decoration: BoxDecoration( @@ -824,13 +811,14 @@ class _ProductSku extends State { ), ), child: Text( - name, + name ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: !isCheck ? Color(0xFF4D4D4D) : Color(0xFF32A060), fontSize: 14.sp, fontWeight: MyFontWeight.regular, ), - )); + ), + ); } } diff --git a/lib/store/store_view/shop_car.dart b/lib/store/store_view/shop_car.dart index 57d1ba48..12629bbe 100644 --- a/lib/store/store_view/shop_car.dart +++ b/lib/store/store_view/shop_car.dart @@ -1,21 +1,20 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/shopping_cart.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; -import 'package:huixiang/store/store_view/shop_goods.dart'; import 'package:huixiang/store/store_view/shop_goods_car.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ShopCar extends StatefulWidget { - final Function(String id,int count) queryMiNiDetail; + final Function(String? id,int count)? queryMiNiDetail; final Function() clearShopCar; final Function() toDownOrder; - final Function(ShoppingCartSkuItemListBean cart) shopCartAdd; - final Function(ShoppingCartSkuItemListBean cart) shopCartReduce; + final Function(SkuItemList cart) shopCartAdd; + final Function(SkuItemList cart) shopCartReduce; - ShoppingCart shopingCar; + ShoppingCart? shopingCar; ShopCar( Key key, @@ -36,11 +35,10 @@ class ShopCar extends StatefulWidget { class _ShopCar extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async { - debugPrint("ssssasdadsasdadasd"); + return PopScope( + canPop: true, + onPopInvoked: (isPop) { SmartDialog.dismiss(); - return true; }, child: StatefulBuilder( builder: (context1, state) { @@ -80,7 +78,7 @@ class _ShopCar extends State { ), InkWell( onTap: () { - widget.shopingCar.shoppingCartSkuItemList.clear(); + widget.shopingCar?.shoppingCartSkuItemList?.clear(); state(() {}); widget.clearShopCar(); }, @@ -111,21 +109,21 @@ class _ShopCar extends State { physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return ShopGoodsCar( - (ShoppingCartSkuItemListBean cart) async { - widget.shopingCar = - await widget.shopCartAdd(cart); - setState(() {}); + (SkuItemList? cart) async { + if (cart != null) { + widget.shopingCar = await widget.shopCartAdd(cart); + setState(() {}); + } }, - (ShoppingCartSkuItemListBean cart) async { - widget.shopingCar = - await widget.shopCartReduce(cart); - setState(() {}); + (SkuItemList? cart) async { + if (cart != null) { + widget.shopingCar = await widget.shopCartReduce(cart); + setState(() {}); + } }, isShopCart: true, - count: widget.shopingCar - .shoppingCartSkuItemList[position].buyNum, - shoppingCartSkuItemListBean: widget.shopingCar - .shoppingCartSkuItemList[position], + count: widget.shopingCar?.shoppingCartSkuItemList?[position].buyNum ?? 0, + shoppingCartSkuItemListBean: widget.shopingCar?.shoppingCartSkuItemList?[position], queryMiNiDetail: widget.queryMiNiDetail, ); }, @@ -156,17 +154,17 @@ class _ShopCar extends State { style: TextStyle( fontSize: 12.sp, color: Color(0xFFFFFFFF), - fontWeight: MyFontWeight.bold), + fontWeight: MyFontWeight.bold, + ), ), TextSpan( - text:widget.shopingCar == null - ? "0.0" - : widget.shopingCar.cartSum, + text: "${widget.shopingCar?.cartSum ?? "0.0"}", style: TextStyle( fontSize: 20.sp, fontFamily: 'JDZhengHT', color: Color(0xFFFFFFFF), - fontWeight: MyFontWeight.medium), + fontWeight: MyFontWeight.medium, + ), ), ]), ), @@ -239,25 +237,20 @@ class _ShopCar extends State { } int itemCount() { - if (widget.shopingCar == null || - widget.shopingCar.shoppingCartSkuItemList == null || - widget.shopingCar.shoppingCartSkuItemList.length == 0) return 0; - int index = widget.shopingCar.shoppingCartSkuItemList - .indexWhere((element) => element.buyNum == 0); + if (widget.shopingCar?.shoppingCartSkuItemList?.length == 0) return 0; + int index = widget.shopingCar?.shoppingCartSkuItemList?.indexWhere((element) => element.buyNum == 0) ?? -1; if (index >= 0) { - widget.shopingCar.shoppingCartSkuItemList.removeAt(index); + widget.shopingCar?.shoppingCartSkuItemList?.removeAt(index); } - int count = widget.shopingCar.shoppingCartSkuItemList.length; + int count = widget.shopingCar?.shoppingCartSkuItemList?.length ?? 0; return count; } int count() { - if (widget.shopingCar == null || - widget.shopingCar.shoppingCartSkuItemList == null || - widget.shopingCar.shoppingCartSkuItemList.length == 0) return 0; + if (widget.shopingCar?.shoppingCartSkuItemList?.length == 0) return 0; int count = 0; - widget.shopingCar.shoppingCartSkuItemList.forEach((element) { - count += element.buyNum; + widget.shopingCar?.shoppingCartSkuItemList?.forEach((element) { + count += (element.buyNum ?? 0); }); return count; } diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index 3c0fede4..88cd6827 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -1,37 +1,36 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/find_mini_group.dart'; +import 'package:huixiang/data/mini_detail.dart'; +import 'package:huixiang/data/shopping_cart.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/utils/str_utils.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/miNiDetail.dart'; -import '../../retrofit/data/store_info.dart'; +import '../../data/base_data.dart'; +import '../../data/store_info.dart'; import '../../retrofit/min_api.dart'; import '../../view_widget/border_text.dart'; import '../../view_widget/request_permission.dart'; class ShopGoods extends StatefulWidget { final Function(String id, int count) queryMiNiDetail; - final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add; - final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) - reduce; + final Function(SkuItemList? shoppingCartSkuItemListBean) add; + final Function(SkuItemList? shoppingCartSkuItemListBean) reduce; final Function queryShoppingCart; - final ProductListBean productListBean; - final ShoppingCartSkuItemListBean shoppingCartSkuItemListBean; + final ProductListBean? productListBean; + final SkuItemList? shoppingCartSkuItemListBean; final int count; final int tableId; final bool isShopCart; - final StoreInfo storeInfo; + final StoreInfo? storeInfo; ShopGoods( this.add, @@ -39,10 +38,10 @@ class ShopGoods extends StatefulWidget { this.productListBean, this.count = 0, this.isShopCart = false, - this.tableId, - this.queryShoppingCart, - this.queryMiNiDetail, - this.shoppingCartSkuItemListBean, + required this.tableId, + required this.queryShoppingCart, + required this.queryMiNiDetail, + required this.shoppingCartSkuItemListBean, this.storeInfo, }); @@ -54,15 +53,15 @@ class ShopGoods extends StatefulWidget { class _ShopGoods extends State { int _jumpType = -1; - MiNiDetail miNiDetail; + MiniDetail? miNiDetail; ///商品详情 queryMiNiDetail(id) async { - MinApiService minService; + MinApiService? minService; await SharedPreferences.getInstance().then((value) { - String minToken = value.getString("minToken"); - String tenant = value.getString("tenant"); - String storeId = value.getString("storeId"); + String minToken = value.getString("minToken") ?? ""; + String tenant = value.getString("tenant") ?? ""; + String storeId = value.getString("storeId") ?? ""; minService = MinApiService( Dio(), context: context, @@ -71,19 +70,20 @@ class _ShopGoods extends State { storeId: storeId, ); }); - BaseData baseData = - await minService.miNiDetail(id).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - miNiDetail = baseData.data; - if (baseData.data.productSkuVOList[0].productSetMeals.length == 0) { + BaseData? baseData = await minService?.miNiDetail(id).catchError((error) {}); + if (baseData?.isSuccess ?? false) { + miNiDetail = baseData!.data; + if (baseData.data?.productSkuVOList?[0].productSetMeals?.isEmpty ?? true) { _jumpType = 0; - widget.add(widget.shoppingCartSkuItemListBean); + if (widget.shoppingCartSkuItemListBean != null) { + widget.add.call(widget.shoppingCartSkuItemListBean!); + } } else { _jumpType = 1; await Navigator.of(context) .pushNamed('/router/product_meals_sku', arguments: { - "id": widget.productListBean.id, - "storeId": widget.productListBean.storeId, + "id": widget.productListBean?.id, + "storeId": widget.productListBean?.storeId, "tableId": widget.tableId }); widget.queryShoppingCart(); @@ -95,6 +95,7 @@ class _ShopGoods extends State { @override Widget build(BuildContext context) { + String price = doubleStr2Int("${widget.isShopCart ? widget.shoppingCartSkuItemListBean?.skuPrice : widget.productListBean?.price}"); return Container( color: Colors.white, // padding: EdgeInsets.only( @@ -109,11 +110,7 @@ class _ShopGoods extends State { children: [ SizedBox(width: 12.w), MImage( - widget.productListBean != null - ? widget.productListBean.imgPath - : (widget.shoppingCartSkuItemListBean != null - ? widget.shoppingCartSkuItemListBean.skuImg - : ""), + widget.productListBean!.imgPath ?? widget.shoppingCartSkuItemListBean!.skuImg ?? "", width: 70.h, height: 70.h, radius: BorderRadius.circular(4), @@ -134,9 +131,7 @@ class _ShopGoods extends State { children: [ Expanded( child: Text( - widget.productListBean != null - ? widget.productListBean.productName - : widget.shoppingCartSkuItemListBean.productName, + widget.productListBean!.productName ?? widget.shoppingCartSkuItemListBean!.productName ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -172,10 +167,7 @@ class _ShopGoods extends State { children: [ Expanded( child: Text( - (widget.productListBean != null - ? widget.productListBean.shortName - : widget.shoppingCartSkuItemListBean.skuName ?? - ""), + widget.productListBean!.shortName?? widget.shoppingCartSkuItemListBean!.skuName ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -189,7 +181,8 @@ class _ShopGoods extends State { width: 10.w, ), ], - )), + ), + ), SizedBox( height: 7.h, ), @@ -199,7 +192,7 @@ class _ShopGoods extends State { Row( children: [ Text( - "¥${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price) ?? 0)}", + "¥${price}", style: TextStyle( color: Color(0xFFFF4500), fontSize: 16.sp, @@ -231,23 +224,18 @@ class _ShopGoods extends State { ), if (!widget.isShopCart && (widget.productListBean?.attrStyle ?? 0) == 1 && - !(widget?.productListBean?.subscribeParam - ?.isEnableSubscribe ?? - false) && - !(widget?.productListBean?.isSetMeal ?? false)) + !(widget.productListBean?.subscribeParam?.isEnableSubscribe ?? false) && + !(widget.productListBean?.isSetMeal ?? false)) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () async { - if (widget.storeInfo.posType.code == + if (widget.storeInfo?.posType?.code == "NORMALSTORE" && widget.tableId == 0) { showDeleteDialog(); } else { widget.queryMiNiDetail( - widget.productListBean != null - ? widget.productListBean.id - : widget.shoppingCartSkuItemListBean - .productId, + widget.productListBean!.id ?? widget.shoppingCartSkuItemListBean!.productId ?? "", 0); } }, @@ -259,7 +247,9 @@ class _ShopGoods extends State { top: 4.h, bottom: 4.h, ), - margin: EdgeInsets.only(right: 8.w, top: 4.h), + margin: EdgeInsets.only( + right: 8.w, top: 4.h, + ), child: RoundButton( text: S.of(context).xuanguige, textColor: Colors.white, @@ -268,7 +258,8 @@ class _ShopGoods extends State { backgroup: Color(0xFF32A060), fontSize: 11.sp, padding: EdgeInsets.symmetric( - vertical: 5.h, horizontal: 3.w), + vertical: 5.h, horizontal: 3.w, + ), ), ), Positioned( @@ -289,24 +280,13 @@ class _ShopGoods extends State { ), ], )), - if (widget.isShopCart || - (widget.productListBean?.attrStyle ?? 0) == 0 && - !(widget?.productListBean?.subscribeParam - ?.isEnableSubscribe ?? - false) && - !(widget?.productListBean?.isSetMeal ?? false)) + if (widget.isShopCart || (widget.productListBean?.attrStyle ?? 0) == 0 && !(widget.productListBean?.subscribeParam?.isEnableSubscribe ?? false) && !(widget.productListBean?.isSetMeal ?? false)) Spacer(), - if (widget.isShopCart || - (widget.productListBean?.attrStyle ?? 0) == 0 && - !(widget?.productListBean?.subscribeParam - ?.isEnableSubscribe ?? - false) && - !(widget?.productListBean?.isSetMeal ?? false)) + if (widget.isShopCart || (widget.productListBean?.attrStyle ?? 0) == 0 && !(widget.productListBean?.subscribeParam?.isEnableSubscribe ?? false) && !(widget.productListBean?.isSetMeal ?? false)) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () async { - if (widget.storeInfo.posType.code == "NORMALSTORE" && - widget.tableId == 0) { + if (widget.storeInfo?.posType?.code == "NORMALSTORE" && widget.tableId == 0) { showDeleteDialog(); } else { widget.reduce(widget.shoppingCartSkuItemListBean); @@ -321,12 +301,7 @@ class _ShopGoods extends State { ), ), ), - if (widget.isShopCart || - (widget.productListBean?.attrStyle ?? 0) == 0 && - !(widget?.productListBean?.subscribeParam - ?.isEnableSubscribe ?? - false) && - !(widget?.productListBean?.isSetMeal ?? false)) + if (widget.isShopCart || (widget.productListBean?.attrStyle ?? 0) == 0 && !(widget.productListBean?.subscribeParam?.isEnableSubscribe ?? false) && !(widget.productListBean?.isSetMeal ?? false)) Container( alignment: Alignment.center, child: Text( @@ -338,16 +313,11 @@ class _ShopGoods extends State { ), ), ), - if (widget.isShopCart || - (widget.productListBean?.attrStyle ?? 0) == 0 && - !(widget?.productListBean?.subscribeParam - ?.isEnableSubscribe ?? - false) && - !(widget?.productListBean?.isSetMeal ?? false)) + if (widget.isShopCart || (widget.productListBean?.attrStyle ?? 0) == 0 && !(widget.productListBean?.subscribeParam?.isEnableSubscribe ?? false) && !(widget.productListBean?.isSetMeal ?? false)) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () async { - if (widget.storeInfo.posType.code == "NORMALSTORE" && + if (widget.storeInfo?.posType?.code == "NORMALSTORE" && widget.tableId == 0) { showDeleteDialog(); } else { @@ -360,15 +330,15 @@ class _ShopGoods extends State { // alignment: Alignment.center); // } else if (_jumpType == -1) - queryMiNiDetail(widget.productListBean.id); + queryMiNiDetail(widget.productListBean?.id); else if (_jumpType == 0) widget.add(widget.shoppingCartSkuItemListBean); else if (_jumpType == 1) await Navigator.of(context).pushNamed( '/router/product_meals_sku', arguments: { - "id": widget.productListBean.id, - "storeId": widget.productListBean.storeId, + "id": widget.productListBean?.id, + "storeId": widget.productListBean?.storeId, "tableId": widget.tableId }); widget.queryShoppingCart(); @@ -383,27 +353,21 @@ class _ShopGoods extends State { ), ), ), - if ((widget.productListBean.subscribeParam - .isEnableSubscribe ?? - false) == - true) + if (widget.productListBean?.subscribeParam?.isEnableSubscribe ?? false) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () async { - if (widget.storeInfo.posType.code == - "NORMALSTORE" && - widget.tableId == 0) { + if (widget.storeInfo?.posType?.code == "NORMALSTORE" && widget.tableId == 0) { showDeleteDialog(); - } else if (widget.isShopCart || - (widget.productListBean?.attrStyle ?? 0) == 0) { - queryMiNiDetail(widget.productListBean.id); + } else if (widget.isShopCart || (widget.productListBean?.attrStyle ?? 0) == 0) { + queryMiNiDetail(widget.productListBean?.id); } else { - widget.queryMiNiDetail( - widget.productListBean != null - ? widget.productListBean.id - : widget.shoppingCartSkuItemListBean - .productId, - 0); + String? productId = widget.productListBean != null + ? widget.productListBean!.id + : widget.shoppingCartSkuItemListBean?.productId; + if (productId != null) { + widget.queryMiNiDetail(productId, 0); + } } }, child: Container( @@ -421,16 +385,16 @@ class _ShopGoods extends State { backgroup: Color(0xFF32A060), fontSize: 11.sp, padding: EdgeInsets.symmetric( - vertical: 5.h, horizontal: 3.w), + vertical: 5.h, horizontal: 3.w, + ), ), - )), - if ((widget.productListBean.isSetMeal ?? false) == true) + ), + ), + if ((widget.productListBean?.isSetMeal ?? false) == true) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () async { - if (widget.storeInfo.posType.code == - "NORMALSTORE" && - widget.tableId == 0) { + if (widget.storeInfo?.posType?.code == "NORMALSTORE" && widget.tableId == 0) { showDeleteDialog(); } // else if ((widget?.productListBean?.oversold ?? @@ -447,8 +411,8 @@ class _ShopGoods extends State { await Navigator.of(context).pushNamed( '/router/product_meals_sku', arguments: { - "id": widget.productListBean.id, - "storeId": widget.productListBean.storeId, + "id": widget.productListBean?.id, + "storeId": widget.productListBean?.storeId, "tableId": widget.tableId }); widget.queryShoppingCart(); @@ -645,26 +609,23 @@ class _ShopGoods extends State { // String result = "http://pos.app.gznl.top/placeorder/?tableId=1315906639160672256&tenantCode=1166&shopId=1300372027722432512"; // 新版桌子码跳转 // http://miniscan.lotus-wallet.com/placeorder?tenant_code=1194&table_id=1669609340031467520&store_id=1637659387134738432 - Uri uri = Uri.parse(result); - String tableId = - uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; - String tenantCode = uri.queryParameters["tenantCode"] ?? - uri.queryParameters["tenant_code"]; - String shopId = - uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; - if (tableId != null && - tableId != "" && - tenantCode != null && - tenantCode != "" && - shopId != null && - shopId != "") { + if (result == null) { + return; + } + Uri uri = Uri.parse("$result"); + String? tableId = uri.queryParameters["tableId"] ?? uri.queryParameters["table_id"]; + String? tenantCode = uri.queryParameters["tenantCode"] ?? uri.queryParameters["tenant_code"]; + String? shopId = uri.queryParameters["shopId"] ?? uri.queryParameters["store_id"]; + if ((tableId?.isNotEmpty ?? false) && + (tenantCode?.isNotEmpty ?? false) && + (shopId?.isNotEmpty ?? false)) { Navigator.of(context).pushReplacementNamed( '/router/store_order', arguments: { "id": shopId, "tenant": tenantCode, "storeName": "", - "tableId": int.tryParse(tableId), + "tableId": int.tryParse(tableId!), }, ); } diff --git a/lib/store/store_view/shop_goods_car.dart b/lib/store/store_view/shop_goods_car.dart index f9d82847..ed076b2a 100644 --- a/lib/store/store_view/shop_goods_car.dart +++ b/lib/store/store_view/shop_goods_car.dart @@ -1,21 +1,21 @@ import 'package:flutter/material.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/data/find_mini_group.dart'; +import 'package:huixiang/data/set_meal_data.dart'; +import 'package:huixiang/data/shopping_cart.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/utils/str_utils.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; class ShopGoodsCar extends StatefulWidget { - final Function(String id, int count) queryMiNiDetail; - final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add; - final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) - reduce; - final ProductListBean productListBean; - final ShoppingCartSkuItemListBean shoppingCartSkuItemListBean; + final Function(String? id, int count)? queryMiNiDetail; + final Function(SkuItemList? shoppingCartSkuItemListBean) add; + final Function(SkuItemList? shoppingCartSkuItemListBean) reduce; + final ProductListBean? productListBean; + final SkuItemList? shoppingCartSkuItemListBean; final int count; final bool isShopCart; @@ -38,6 +38,8 @@ class ShopGoodsCar extends StatefulWidget { class _ShopGoodsCar extends State { @override Widget build(BuildContext context) { + String price = doubleStr2Int("${widget.isShopCart ? widget.shoppingCartSkuItemListBean?.skuPrice: widget.productListBean?.price}"); + String applyPrice = doubleStr2Int("${(widget.isShopCart ? widget.shoppingCartSkuItemListBean?.skuPrice : widget.productListBean?.applyPrice)}"); return Container( color: Colors.white, padding: EdgeInsets.only( @@ -53,11 +55,7 @@ class _ShopGoodsCar extends State { children: [ SizedBox(width: 12.w), MImage( - widget.productListBean != null - ? widget.productListBean.imgPath - : (widget.shoppingCartSkuItemListBean != null - ? widget.shoppingCartSkuItemListBean.skuImg - : ""), + widget.productListBean!.imgPath ?? widget.shoppingCartSkuItemListBean!.skuImg ?? "", width: 70.h, height: 70.h, radius: BorderRadius.circular(4), @@ -76,10 +74,7 @@ class _ShopGoodsCar extends State { children: [ Expanded( child: Text( - widget.productListBean != null - ? widget.productListBean.productName - : widget - .shoppingCartSkuItemListBean.productName, + widget.productListBean!.productName ?? widget.shoppingCartSkuItemListBean!.productName ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -112,15 +107,9 @@ class _ShopGoodsCar extends State { children: [ Expanded( child: Text( - (widget.productListBean != null - ? widget.productListBean.shortName - : ((widget.shoppingCartSkuItemListBean - .skuName == - "0") - ? "" - : widget.shoppingCartSkuItemListBean - .skuName) ?? - ""), + widget.productListBean!.shortName + ?? ((widget.shoppingCartSkuItemListBean?.skuName == "0") + ? "" : widget.shoppingCartSkuItemListBean?.skuName) ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -143,7 +132,7 @@ class _ShopGoodsCar extends State { Row( children: [ Text( - "¥${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price) ?? 0)}", + "¥${price}", style: TextStyle( color: Color(0xFFFF7A1A), fontSize: 16.sp, @@ -191,13 +180,7 @@ class _ShopGoodsCar extends State { padding: EdgeInsets.symmetric(vertical: 5.h), callback: () { - widget.queryMiNiDetail( - widget.productListBean != null - ? widget.productListBean.id - : widget - .shoppingCartSkuItemListBean - .productId, - 0); + widget.queryMiNiDetail?.call(widget.productListBean?.id ?? widget.shoppingCartSkuItemListBean?.productId ?? "", 0); }, ), ), @@ -264,7 +247,7 @@ class _ShopGoodsCar extends State { height: 4.h, ), Text( - "¥${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.applyPrice) ?? 0)}", + "¥${applyPrice}", style: TextStyle( color: Color(0xFFA29E9E), fontSize: 12.sp, @@ -278,17 +261,15 @@ class _ShopGoodsCar extends State { ), ], ), - if (widget.shoppingCartSkuItemListBean.setMealDataList.length != 0) + if (widget.shoppingCartSkuItemListBean?.setMealDataList?.isNotEmpty ?? false) ListView.builder( - itemCount: - widget.shoppingCartSkuItemListBean.setMealDataList.length, + itemCount: widget.shoppingCartSkuItemListBean?.setMealDataList?.length ?? 0, scrollDirection: Axis.vertical, physics: BouncingScrollPhysics(), shrinkWrap: true, padding: EdgeInsets.zero, itemBuilder: (context, index) { - return shopCarMealsItem(widget - .shoppingCartSkuItemListBean.setMealDataList[index]); + return shopCarMealsItem(widget.shoppingCartSkuItemListBean!.setMealDataList![index]); }, ), SizedBox( @@ -298,8 +279,8 @@ class _ShopGoodsCar extends State { )); } - Widget shopCarMealsItem(SetMealDataList setMealDataList) { - return Column(children: setMealDataList.productInfoList.map((e) { + Widget shopCarMealsItem(SetMealData setMealDataList) { + return Column(children: setMealDataList.productInfoList?.map((e) { return Container( margin: EdgeInsets.symmetric(vertical: 10.h, horizontal: 16.w), child: Row( @@ -307,7 +288,7 @@ class _ShopGoodsCar extends State { Expanded( flex: 2, child: Text( - e.productName, + e.productName ?? "", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -343,6 +324,6 @@ class _ShopGoodsCar extends State { ], ), ); - }).toList(),); + }).toList() ?? [],); } } diff --git a/lib/store/store_view/store_activity.dart b/lib/store/store_view/store_activity.dart index 1fecac2e..6115f9f8 100644 --- a/lib/store/store_view/store_activity.dart +++ b/lib/store/store_view/store_activity.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:huixiang/data/activity.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -21,7 +21,7 @@ class StoreActivity extends StatefulWidget { class _StoreActivity extends State { @override Widget build(BuildContext context) { - return (widget.activitys == null || widget.activitys.length == 0) + return (widget.activitys.length == 0) ? Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height - (kToolbarHeight + 38 + 54.h), @@ -89,10 +89,7 @@ class _StoreActivity extends State { mainAxisSize: MainAxisSize.max, children: [ MImage( - (widget.activitys != null && - widget.activitys.length > position) - ? widget.activitys[position].coverImg - : "", + widget.activitys[position].coverImg ?? "", aspectRatio: 2.2, radius: BorderRadius.vertical( top: Radius.circular(8), @@ -108,11 +105,7 @@ class _StoreActivity extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - (widget.activitys != null && - widget.activitys.length > - position) - ? widget.activitys[position].storeName - : "", + widget.activitys[position].storeName ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold, @@ -123,11 +116,7 @@ class _StoreActivity extends State { height: 4.h, ), Text( - (widget.activitys != null && - widget.activitys.length > - position) - ? widget.activitys[position].mainTitle - : "", + widget.activitys[position].mainTitle ?? "", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, @@ -156,11 +145,7 @@ class _StoreActivity extends State { ), ), child: Text( - (widget.activitys != null && - widget.activitys.length > position) - ? widget.activitys[position].startTime - .split(" ")[0] - : "", + widget.activitys[position].startTime?.split(" ")[0] ?? "", style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 12.sp, @@ -174,10 +159,7 @@ class _StoreActivity extends State { ), ); }, - itemCount: - (widget.activitys != null && widget.activitys.length > 0) - ? widget.activitys.length - : 0, + itemCount:widget.activitys?.length ?? 0, ), ); } diff --git a/lib/store/store_view/store_header.dart b/lib/store/store_view/store_header.dart index 79214b12..d8ee20ec 100644 --- a/lib/store/store_view/store_header.dart +++ b/lib/store/store_view/store_header.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/store/store_view/store_info.dart'; import 'package:huixiang/union/union_view/union_coupon.dart'; @@ -46,12 +46,11 @@ class StoreHeader extends SliverPersistentHeaderDelegate { StoreInfoView(storeInfo,0), ///门店对应优惠券 - if (storeInfo != null && storeInfo.couponVOList != null) - UnionCoupon( - storeInfo, - (a) {}, - coupon: true, - ), + UnionCoupon( + storeInfo, + (a) {}, + coupon: true, + ), SizedBox( height: 8, @@ -72,7 +71,7 @@ class StoreHeader extends SliverPersistentHeaderDelegate { } // 头部展示内容 @override - double get maxExtent => (storeInfo != null && storeInfo.couponVOList != null) + double get maxExtent => (storeInfo.couponVOList != null) ? 425.h : 365.h; // 最大高度 diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 5aff71d7..b4fed1f1 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -10,8 +10,8 @@ import 'package:huixiang/view_widget/round_button.dart'; import 'package:url_launcher/url_launcher.dart'; class StoreInfoView extends StatefulWidget { - final StoreInfo storeInfo; - final double distance; + final StoreInfo? storeInfo; + final double? distance; StoreInfoView(this.storeInfo,this.distance); @@ -62,7 +62,7 @@ class _StoreInfoView extends State { alignment: Alignment.centerLeft, child: Text( widget.storeInfo != null - ? (widget.storeInfo.storeName ?? "") + ? (widget.storeInfo!.storeName ?? "") : "", overflow: TextOverflow.ellipsis, style: TextStyle( @@ -109,11 +109,7 @@ class _StoreInfoView extends State { Row( children: [ Text( - S.of(context).ren( - widget.storeInfo != null - ? widget.storeInfo.perCapitaConsumption - : "", - ), + S.of(context).ren(widget.storeInfo?.perCapitaConsumption ?? ""), overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 12.sp, @@ -124,18 +120,15 @@ class _StoreInfoView extends State { SizedBox( width: 20.w, ), - ]..addAll(itemServer(widget.storeInfo != null - ? widget.storeInfo.businessService - : "")), + ]..addAll(itemServer(widget.storeInfo?.businessService ?? "")), ), Text( S.of(context).yingyeshijian(widget.storeInfo == null ? "" - : (widget.storeInfo.openStartTime == null && - widget.storeInfo.openEndTime == null) + : ((widget.storeInfo!.openStartTime?.isEmpty ?? true) && (widget.storeInfo!.openEndTime?.isEmpty ?? true)) ? S.of(context).quantian - : "${widget.storeInfo.openStartTime.substring(0, widget.storeInfo.openStartTime.lastIndexOf(":"))} " - "- ${widget.storeInfo.openEndTime.substring(0, widget.storeInfo.openEndTime.lastIndexOf(":"))}"), + : "${widget.storeInfo!.openStartTime?.substring(0, widget.storeInfo!.openStartTime?.lastIndexOf(":"))} " + "- ${widget.storeInfo!.openEndTime?.substring(0, widget.storeInfo!.openEndTime?.lastIndexOf(":"))}"), style: TextStyle( color: Color(0xFF353535), fontWeight: MyFontWeight.regular, @@ -148,7 +141,7 @@ class _StoreInfoView extends State { ), ), MImage( - widget.storeInfo != null ? widget.storeInfo.logo : "", + widget.storeInfo?.logo ?? "", width: 70, height: 70, fit: BoxFit.cover, @@ -171,8 +164,8 @@ class _StoreInfoView extends State { Navigator.of(context).pushNamed( '/router/location_map', arguments: { - "lat": widget.storeInfo.latitude, - "lng": widget.storeInfo.longitude, + "lat": widget.storeInfo?.latitude, + "lng": widget.storeInfo?.longitude, "storeInfo":widget.storeInfo, "distance":widget.distance }, @@ -192,23 +185,19 @@ class _StoreInfoView extends State { child: GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - if(widget.storeInfo.longitude != null && widget.storeInfo.latitude != null){ - Navigator.of(context).pushNamed( - '/router/location_map', - arguments: { - "lat": widget.storeInfo.latitude, - "lng": widget.storeInfo.longitude, - "storeInfo":widget.storeInfo, - "distance":widget.distance - }, - ); - }else{ - return; - } - }, + Navigator.of(context).pushNamed( + '/router/location_map', + arguments: { + "lat": widget.storeInfo?.latitude, + "lng": widget.storeInfo?.longitude, + "storeInfo":widget.storeInfo, + "distance":widget.distance + }, + ); + }, child:Padding(padding: EdgeInsets.only(bottom: 16.h,), child: Text( - "${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo.address : ""}", + "${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo!.address : ""}", maxLines: 2, textAlign: TextAlign.justify, style: TextStyle( @@ -220,7 +209,7 @@ class _StoreInfoView extends State { ), ), ), - if((widget?.storeInfo?.tel ?? "") != "") + if(widget.storeInfo?.tel?.isNotEmpty ?? false) GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { @@ -254,13 +243,11 @@ class _StoreInfoView extends State { return CupertinoActionSheet( title: Text(S.of(context).bodadianhua), actions: [ - if (widget.storeInfo != null && - widget.storeInfo.tel != null && - widget.storeInfo.tel != "") + if (widget.storeInfo?.tel != "") CupertinoActionSheetAction( - child: Text(widget.storeInfo.tel), + child: Text(widget.storeInfo!.tel!), onPressed: () { - callMobile(widget.storeInfo.tel); + callMobile(widget.storeInfo!.tel); Navigator.of(context).pop(); }, isDefaultAction: true, @@ -280,15 +267,15 @@ class _StoreInfoView extends State { callMobile(mobile) async { String url = "tel:$mobile"; - if (await canLaunch(url)) { - await launch(url); + if (await canLaunchUrl(Uri.parse(url))) { + await launchUrl(Uri.parse(url)); } else { throw 'Could not launch $url'; } } List itemServer(String businessService) { - if (businessService == null || businessService == "") return []; + if (businessService == "") return []; var list = businessService.split(","); return list .map((e) => Container( diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 8a9190ce..b8cef209 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -1,12 +1,11 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.dart'; -import 'package:huixiang/retrofit/data/shoppingCart.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/find_mini_group.dart'; +import 'package:huixiang/data/shopping_cart.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/store/store_view/shop_goods.dart'; @@ -18,18 +17,18 @@ import 'package:shared_preferences/shared_preferences.dart'; import '../../utils/flutter_utils.dart'; class StoreOrderListPage extends StatefulWidget { - final Map arguments; - final List activitys; - final StoreInfo storeInfo; + final Map? arguments; + final List? activitys; + final StoreInfo? storeInfo; final ScrollController controller; - final String minToken; + final String? minToken; final String tenant; final int tableId; final Function(String id, int count) queryMiNiDetail; final Function queryShoppingCart; final ScrollPhysics scrollPhysics; - ShoppingCart shopCarGoods; + ShoppingCart? shopCarGoods; StoreOrderListPage( this.arguments, @@ -54,9 +53,9 @@ class _StoreOrderListPage extends State { int isSelected = 0; // int tempClickIndex = 0; - ApiService apiService; - MinApiService minService; - List appletProducts; + late ApiService apiService; + late MinApiService minService; + List? appletProducts; List productListBeans = []; int currentIndex = 0; final ScrollController controller = ScrollController(); @@ -67,11 +66,11 @@ class _StoreOrderListPage extends State { super.initState(); controller.addListener(() { _viewportDimension = controller.position.viewportDimension; - for (int i = 0; i < appletProducts.length; i++) { + for (int i = 0; i < (appletProducts?.length ?? 0); i++) { if (currentIndex != i && - controller.offset >= appletProducts[i].goodsIndex && - (i == appletProducts.length - 1 || - controller.offset < appletProducts[i + 1].goodsIndex)) { + controller.offset >= (appletProducts![i].goodsIndex ?? 0) && + (i == appletProducts!.length - 1 || + controller.offset < (appletProducts![i + 1].goodsIndex ?? 0))) { setState(() { currentIndex = i; }); @@ -87,32 +86,32 @@ class _StoreOrderListPage extends State { SharedPreferences value = await SharedPreferences.getInstance(); minService = MinApiService(Dio(), context: context, - token: widget.minToken, + token: widget.minToken ?? "", tenant: widget.tenant, - storeId: widget.arguments["id"], + storeId: widget.arguments?["id"], showLoading: true); - BaseData> baseData = + BaseData> baseData = await minService.findMiNiGroupList({ - "id": widget.arguments["id"], + "id": widget.arguments?["id"], }).catchError((error) { // refreshController.refreshFailed(); - SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), - alignment: Alignment.center); + SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), + alignment: Alignment.center); debugPrint(error); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { // refreshController.refreshCompleted(); setState(() { appletProducts = baseData.data ?? []; // productListBeans.clear(); // if (appletProducts.length > 0) // productListBeans.addAll(appletProducts[isSelected].productList); - double goodsIndex = 0; - appletProducts.forEach((element) { + int goodsIndex = 0; + appletProducts?.forEach((element) { element.goodsIndex = goodsIndex; - element.height = ((element.productList.length ?? 0) * 120.h + 50.h); - goodsIndex += element.height; + element.height = ((element.productList?.length ?? 0) * 120.h + 50.h).toInt(); + goodsIndex += (element.height ?? 0); }); }); } else { @@ -136,7 +135,7 @@ class _StoreOrderListPage extends State { Container( width: 100.w, child: ListView.builder( - itemCount: appletProducts == null ? 0 : appletProducts.length, + itemCount: appletProducts?.length ?? 0, // controller: controller, physics: BouncingScrollPhysics(), shrinkWrap: true, @@ -152,7 +151,7 @@ class _StoreOrderListPage extends State { Container( width: MediaQuery.of(context).size.width - 100.w, child: ListView.builder( - itemCount: appletProducts == null ? 0 : appletProducts.length, + itemCount: appletProducts?.length ?? 0, padding: EdgeInsets.only(top: 0), controller: controller, physics: widget.scrollPhysics, @@ -190,17 +189,17 @@ class _StoreOrderListPage extends State { } goShopDetailsPage(ProductListBean e) async { - await Navigator.of(context) - .pushNamed('/router/shop_details_page', arguments: { - "id": e.id, - "storeId": e.storeId, - "isSetMeal":e.isSetMeal - }); + await Navigator.of(context).pushNamed('/router/shop_details_page', + arguments: { + "id": e.id, + "storeId": e.storeId, + "isSetMeal": e.isSetMeal ?? false + }); widget.queryShoppingCart(); } Widget orderItem(int index) { - int count = calculateItemCount(appletProducts[index]); + int count = calculateItemCount(appletProducts![index]); return Container( width: 100.w, child: GestureDetector( @@ -209,7 +208,8 @@ class _StoreOrderListPage extends State { // isSelected = index; // productListBeans.clear(); // productListBeans.addAll(appletProducts[index].productList); - controller.jumpTo(appletProducts[index].goodsIndex); + int aindex = appletProducts![index].goodsIndex ?? 0; + controller.jumpTo(aindex.toDouble()); }); }, child: Stack( @@ -233,7 +233,7 @@ class _StoreOrderListPage extends State { ), Expanded( child: Text( - appletProducts[index].groupName, + appletProducts![index].groupName ?? "", textAlign: TextAlign.center, style: TextStyle( color: currentIndex != index @@ -274,9 +274,9 @@ class _StoreOrderListPage extends State { return Container( color: Colors.white, margin: EdgeInsets.only( - bottom: (rightIndex == appletProducts.length - 1) - ? (_viewportDimension > appletProducts[rightIndex].height - ? _viewportDimension - appletProducts[rightIndex].height + bottom: (rightIndex == appletProducts!.length - 1) + ? (_viewportDimension > (appletProducts![rightIndex].height ?? 0) + ? _viewportDimension - (appletProducts![rightIndex].height ?? 0) : 30.h) : 0), padding: EdgeInsets.only( @@ -291,7 +291,7 @@ class _StoreOrderListPage extends State { child: Padding( padding: EdgeInsets.only(left: 16.w, top: 10.h), child: Text( - appletProducts[rightIndex].groupName, + appletProducts![rightIndex].groupName ?? "", textAlign: TextAlign.center, style: TextStyle( color: Color(0xFF000000), @@ -302,10 +302,10 @@ class _StoreOrderListPage extends State { ), ), Column( - children: appletProducts[rightIndex].productList.map((e) { + children: appletProducts![rightIndex].productList?.map((e) { return GestureDetector( onTap: () { - if (widget.storeInfo.posType.code == "NORMALSTORE") + if (widget.storeInfo?.posType?.code == "NORMALSTORE") return; else goShopDetailsPage(e); @@ -320,13 +320,12 @@ class _StoreOrderListPage extends State { ); } - int calculateItemCount(FindMiNiGroupList findMiNiGroupList) { - if (widget.shopCarGoods == null) return 0; + int calculateItemCount(FindMiniGroup findMiNiGroupList) { int count = 0; - findMiNiGroupList.productList.forEach((element) { - widget.shopCarGoods.shoppingCartSkuItemList.forEach((element1) { + findMiNiGroupList.productList?.forEach((element) { + widget.shopCarGoods?.shoppingCartSkuItemList?.forEach((element1) { if (element.id == element1.productId) { - count += element1.buyNum; + count += (element1.buyNum ?? 0); } }); }); @@ -334,26 +333,19 @@ class _StoreOrderListPage extends State { } Widget goodsItem(ProductListBean e) { - ShoppingCartSkuItemListBean shoppingCartSkuItemListBean; + SkuItemList? shoppingCartSkuItemListBean; int count = 0; - if (widget.shopCarGoods != null) { - widget.shopCarGoods.shoppingCartSkuItemList.forEach((element) { - if (e.id == element.productId) { - if (shoppingCartSkuItemListBean == null) { - shoppingCartSkuItemListBean = element; - count = shoppingCartSkuItemListBean.buyNum; - } else { - count += element.buyNum; - } - } - }); - } + widget.shopCarGoods?.shoppingCartSkuItemList?.forEach((element) { + if (e.id == element.productId) { + count += (element.buyNum ?? 0); + } + }); return ShopGoods( - (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { - widget.queryMiNiDetail(e.id, 1); + (SkuItemList? shoppingCartSkuItemListBean) { + widget.queryMiNiDetail(e.id ?? "", 1); }, - (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { - if (count > 0) widget.queryMiNiDetail(e.id, -1); + (SkuItemList? shoppingCartSkuItemListBean) { + if (count > 0) widget.queryMiNiDetail(e.id ?? "", -1); }, productListBean: e, count: count, diff --git a/lib/union/location_map_page.dart b/lib/union/location_map_page.dart index ec1d52a6..22404700 100644 --- a/lib/union/location_map_page.dart +++ b/lib/union/location_map_page.dart @@ -1,6 +1,4 @@ -import 'dart:convert'; import 'dart:io'; -import 'dart:ui'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; @@ -18,13 +16,13 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:url_launcher/url_launcher.dart'; import '../generated/l10n.dart'; -import '../retrofit/data/store_info.dart'; +import '../data/store_info.dart'; import '../view_widget/custom_image.dart'; import '../view_widget/location_tips.dart'; import '../view_widget/round_button.dart'; class LocationMap extends StatefulWidget { - final Map arguments; + final Map? arguments; LocationMap({this.arguments}); @@ -35,24 +33,24 @@ class LocationMap extends StatefulWidget { } class _LocationMap extends State with WidgetsBindingObserver { - StoreInfo storeInfo; + StoreInfo? storeInfo; int navigationState = 0; - double distance; + double? distance; int navigationType = 0; bool positionSorta = false; - String myAddress; - String myCity; - String hours; - String minutes; - String polylineId; + String? myAddress; + String? myCity; + String? hours; + String? minutes; + String? polylineId; bool _isShowLocalTips = false; @override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); - storeInfo = widget.arguments["storeInfo"]; - distance = widget.arguments["distance"]; + storeInfo = widget.arguments?["storeInfo"]; + distance = widget.arguments?["distance"]; getLocation(); } @@ -60,23 +58,21 @@ class _LocationMap extends State with WidgetsBindingObserver { bool powerFlag = false; try { Future.delayed(Duration(seconds: 5), () { - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); }); - powerFlag = await Location.getInstance().startLocation(context, + powerFlag = await Location.instance.startLocation(context, (BaiduLocation result) { - if (result != null && - result.latitude != null && + if (result.latitude != null && result.longitude != null) { print("location: $result"); - myLatLng = BMFCoordinate(result.latitude, result.longitude); + myLatLng = BMFCoordinate(result.latitude!, result.longitude!); myAddress = result.locationDetail; myCity = result.city; - if (distance == null) calculate(); // AppUtils.coordConvert(myLatLng).then((value) { // this.myLatLng = value; locationShow(); // }); - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); } }); } finally { @@ -95,15 +91,6 @@ class _LocationMap extends State with WidgetsBindingObserver { } } - calculate() async { - BMFCoordinate bmfCoordinate = BMFCoordinate( - double.tryParse(storeInfo.latitude), - double.tryParse(storeInfo.longitude), - ); - distance = double.tryParse( - await AppUtils.calculateDistance(bmfCoordinate, myLatLng, isMi: true)); - } - locationShow() { BMFLocation location = BMFLocation( coordinate: myLatLng, @@ -117,14 +104,14 @@ class _LocationMap extends State with WidgetsBindingObserver { location: location, ); setState(() { - _mapController.updateLocationData(userLocation); + _mapController?.updateLocationData(userLocation); }); } @override void dispose() { WidgetsBinding.instance.removeObserver(this); - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); super.dispose(); } @@ -168,8 +155,8 @@ class _LocationMap extends State with WidgetsBindingObserver { ? BMFTextureMapWidget( mapOptions: BMFMapOptions( center: BMFCoordinate( - double.tryParse(widget.arguments["lat"]), - double.tryParse(widget.arguments["lng"]), + double.tryParse(widget.arguments?["lat"]) ?? 0, + double.tryParse(widget.arguments?["lng"]) ?? 0, ), showZoomControl: false, showMapScaleBar: false, @@ -181,8 +168,8 @@ class _LocationMap extends State with WidgetsBindingObserver { : BMFMapWidget( mapOptions: BMFMapOptions( center: BMFCoordinate( - double.tryParse(widget.arguments["lat"]), - double.tryParse(widget.arguments["lng"]), + double.tryParse(widget.arguments?["lat"]) ?? 0, + double.tryParse(widget.arguments?["lng"]) ?? 0, ), showZoomControl: false, showMapScaleBar: false, @@ -197,7 +184,8 @@ class _LocationMap extends State with WidgetsBindingObserver { ? Container( height: 253.h, padding: EdgeInsets.only( - top: 16.h, left: 16.w, right: 28.w), + top: 16.h, left: 16.w, right: 28.w, + ), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -233,12 +221,7 @@ class _LocationMap extends State with WidgetsBindingObserver { Row( children: [ Text( - S.of(context).ren( - storeInfo != null - ? storeInfo - .perCapitaConsumption - : "", - ), + S.of(context).ren(storeInfo!.perCapitaConsumption ?? ""), overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 12.sp, @@ -250,22 +233,17 @@ class _LocationMap extends State with WidgetsBindingObserver { SizedBox( width: 20.w, ), - ]..addAll(itemServer( - storeInfo != null - ? storeInfo.businessService - : "")), + ]..addAll(itemServer(storeInfo!.businessService ?? "")), ), Text( - S.of(context).yingyeshijian(storeInfo == - null + S.of(context).yingyeshijian(storeInfo == null ? "" - : (storeInfo.openStartTime == - null && - storeInfo.openEndTime == + : (storeInfo?.openStartTime == null && + storeInfo?.openEndTime == null) ? S.of(context).quantian - : "${storeInfo.openStartTime.substring(0, storeInfo.openStartTime.lastIndexOf(":"))} " - "- ${storeInfo.openEndTime.substring(0, storeInfo.openEndTime.lastIndexOf(":"))}"), + : "${storeInfo?.openStartTime!.substring(0, storeInfo?.openStartTime!.lastIndexOf(":"))} " + "- ${storeInfo?.openEndTime!.substring(0, storeInfo?.openEndTime!.lastIndexOf(":"))}"), style: TextStyle( color: Color(0xFF4D4D4D), fontWeight: MyFontWeight.medium, @@ -280,7 +258,7 @@ class _LocationMap extends State with WidgetsBindingObserver { ), ), MImage( - storeInfo != null ? storeInfo.logo : "", + storeInfo!.logo ?? "", width: 72.h, height: 72.h, fit: BoxFit.cover, @@ -293,7 +271,7 @@ class _LocationMap extends State with WidgetsBindingObserver { Padding( padding: EdgeInsets.only(bottom: 32.h), child: Text( - "${storeInfo != null ? storeInfo.address : ""}", + "${storeInfo != null ? storeInfo!.address : ""}", maxLines: 2, textAlign: TextAlign.justify, style: TextStyle( @@ -306,22 +284,15 @@ class _LocationMap extends State with WidgetsBindingObserver { GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - if (myLatLng == null) { - // onOpenBaiduMap(); - SmartDialog.showToast( - "您定位服务未开启,请前往系统设置中开启定位服务", - alignment: Alignment.center); - } else { - navigationState = 1; - if ((distance ?? 0) < 500) - navigationType = 1; - else if ((distance ?? 0) < 1500) - navigationType = 2; - else - navigationType = 4; - navigationPosition(); - } - }, + navigationState = 1; + if ((distance ?? 0) < 500) + navigationType = 1; + else if ((distance ?? 0) < 1500) + navigationType = 2; + else + navigationType = 4; + navigationPosition(); + }, child: Container( alignment: Alignment.center, width: double.infinity, @@ -412,7 +383,7 @@ class _LocationMap extends State with WidgetsBindingObserver { void onOpenBaiduMap() async { launch( - "baidumap://map/marker?location=${storeInfo.latitude},${storeInfo.longitude}&title=${storeInfo.storeName}&content=${storeInfo.storeName}&traffic=on&src=andr.baidu.openAPIdemo&coord_type=gcj02"); + "baidumap://map/marker?location=${storeInfo?.latitude},${storeInfo?.longitude}&title=${storeInfo?.storeName}&content=${storeInfo?.storeName}&traffic=on&src=andr.baidu.openAPIdemo&coord_type=gcj02"); } //調取百度地圖APP @@ -420,21 +391,21 @@ class _LocationMap extends State with WidgetsBindingObserver { // 我的位置 BMFCoordinate startCoord = BMFCoordinate( positionSorta == false - ? myLatLng.latitude - : latLng.latitude, + ? myLatLng!.latitude + : latLng!.latitude, positionSorta == false - ? myLatLng.longitude - : latLng.longitude); + ? myLatLng!.longitude + : latLng!.longitude); String startName = ((positionSorta == false) ? "我的位置" : "终点"); // 去的位置 String endName = ((positionSorta == false) ? "终点" : "我的位置"); BMFCoordinate endCoord = BMFCoordinate( positionSorta == false - ? latLng.latitude - : myLatLng.latitude, + ? latLng!.latitude + : myLatLng!.latitude, positionSorta == false - ? latLng.longitude - : myLatLng.longitude); + ? latLng!.longitude + : myLatLng!.longitude); BMFOpenRouteOption routeOption = BMFOpenRouteOption( startCoord: startCoord, startName: startName, @@ -450,17 +421,17 @@ class _LocationMap extends State with WidgetsBindingObserver { appScheme: 'baidumapsdk_flutter://mapsdk.baidu.com', // 指定返回自定义scheme isSupportWeb: true); - BMFOpenErrorCode flag = - await BMFOpenMapUtils.openBaiduMapRoute(routeOption); + BMFOpenErrorCode? flag = await BMFOpenMapUtils.openBaiduMapRoute(routeOption); print('open - route - errorCode = $flag'); } - updateMapLine(List coordinates, int needHours, int needMinutes, - double needDistance) { + updateMapLine(List coordinates, int? needHours, int? needMinutes, double? needDistance) { try { //刪除之前的創建的點和綫 - _mapController.cleanAllMarkers(); - if (polylineId != null) _mapController.removeOverlay(polylineId); + _mapController?.cleanAllMarkers(); + if (polylineId != null) { + _mapController?.removeOverlay(polylineId!); + } /// 创建polyline BMFPolyline colorsPolyline = BMFPolyline( @@ -479,7 +450,7 @@ class _LocationMap extends State with WidgetsBindingObserver { polylineId = colorsPolyline.id; /// 添加polyline - _mapController.addPolyline(colorsPolyline); + _mapController?.addPolyline(colorsPolyline); var startBmfMarker = BMFMarker.icon( position: BMFCoordinate( coordinates.first.latitude, coordinates.first.longitude), @@ -488,7 +459,7 @@ class _LocationMap extends State with WidgetsBindingObserver { icon: "assets/image/icon_start.png", draggable: false, ); - _mapController.addMarker(startBmfMarker); + _mapController?.addMarker(startBmfMarker); var terminalBmfMarker = BMFMarker.icon( position: BMFCoordinate( @@ -498,7 +469,7 @@ class _LocationMap extends State with WidgetsBindingObserver { icon: "assets/image/icon_end.png", draggable: false, ); - _mapController.addMarker(terminalBmfMarker); + _mapController?.addMarker(terminalBmfMarker); double maxLatitude = 0, minLatitude = 0, @@ -516,7 +487,7 @@ class _LocationMap extends State with WidgetsBindingObserver { else if (element.longitude < minLongitude) minLongitude = element.longitude; }); - _mapController.setVisibleMapBounds( + _mapController?.setVisibleMapBounds( BMFCoordinateBounds( northeast: BMFCoordinate( maxLatitude + ((maxLatitude - minLatitude) * 0.8), @@ -569,20 +540,20 @@ class _LocationMap extends State with WidgetsBindingObserver { return; } print( - '`步行检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + '`步行检索回调 errorCode = ${errorCode} \n result = ${result.toMap()}'); /// 坐标点 List coordinates = []; - result.routes.first.steps.forEach((e1) { - e1.points.forEach((e2) { + result.routes?.first.steps?.forEach((e1) { + e1.points?.forEach((e2) { coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); }); }); updateMapLine( coordinates, - result.routes.first.duration.hours, - result.routes.first.duration.minutes, - result.routes.first.distance.toDouble()); + result.routes?.first.duration?.hours, + result.routes?.first.duration?.minutes, + result.routes?.first.distance?.toDouble()); }); bool flag = await walkingRouteSearch.walkingRouteSearch(walkingRoutePlanOption); @@ -603,20 +574,20 @@ class _LocationMap extends State with WidgetsBindingObserver { return; } print( - '`骑行检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + '`骑行检索回调 errorCode = ${errorCode} \n result = ${result.toMap()}'); /// 坐标点 List coordinates = []; - result.routes.first.steps.forEach((e1) { - e1.points.forEach((e2) { + result.routes?.first.steps?.forEach((e1) { + e1.points?.forEach((e2) { coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); }); }); updateMapLine( coordinates, - result.routes.first.duration.hours, - result.routes.first.duration.minutes, - result.routes.first.distance.toDouble()); + result.routes?.first.duration?.hours, + result.routes?.first.duration?.minutes, + result.routes?.first.distance?.toDouble()); }); // 发起检索 bool flag = @@ -638,20 +609,20 @@ class _LocationMap extends State with WidgetsBindingObserver { return; } print( - '`市内公交检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + '`市内公交检索回调 errorCode = ${errorCode} \n result = ${result.toMap()}'); /// 坐标点 List coordinates = []; - result.routes.first.steps.forEach((e1) { - e1.points.forEach((e2) { + result.routes?.first.steps?.forEach((e1) { + e1.points?.forEach((e2) { coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); }); }); updateMapLine( coordinates, - result.routes.first.duration.hours, - result.routes.first.duration.minutes, - result.routes.first.distance.toDouble()); + result.routes?.first.duration?.hours, + result.routes?.first.duration?.minutes, + result.routes?.first.distance?.toDouble()); }); // 发起检索 bool flag = @@ -673,20 +644,20 @@ class _LocationMap extends State with WidgetsBindingObserver { return; } print( - '驾车检索回调 errorCode = ${errorCode} \n result = ${result?.toMap()}'); + '驾车检索回调 errorCode = ${errorCode} \n result = ${result.toMap()}'); /// 坐标点 List coordinates = []; - result.routes.first.steps.forEach((e1) { - e1.points.forEach((e2) { + result.routes?.first.steps?.forEach((e1) { + e1.points?.forEach((e2) { coordinates.add(BMFCoordinate(e2.latitude, e2.longitude)); }); }); updateMapLine( coordinates, - result.routes.first.duration.hours, - result.routes.first.duration.minutes, - result.routes.first.distance.toDouble()); + result.routes?.first.duration?.hours, + result.routes?.first.duration?.minutes, + result.routes?.first.distance?.toDouble()); }); // 发起检索 bool flag = @@ -1142,7 +1113,7 @@ class _LocationMap extends State with WidgetsBindingObserver { } List itemServer(String businessService) { - if (businessService == null || businessService == "") return []; + if (businessService == "") return []; var list = businessService.split(","); return list .map((e) => Container( @@ -1162,16 +1133,16 @@ class _LocationMap extends State with WidgetsBindingObserver { .toList(); } - BMFMapController _mapController; - BMFCoordinate latLng; - BMFCoordinate myLatLng; - BMFMarker bmfMarker; + BMFMapController? _mapController; + BMFCoordinate? latLng; + BMFCoordinate? myLatLng; + BMFMarker? bmfMarker; onMapCreated(BMFMapController controller) { _mapController = controller; setState(() { - _mapController.showUserLocation(true); - _mapController.setCustomMapStyle('assets/map_style/chatian.sty', 0); + _mapController?.showUserLocation(true); + _mapController?.setCustomMapStyle('assets/map_style/chatian.sty', 0); BMFUserLocationDisplayParam displayParam = BMFUserLocationDisplayParam( locationViewOffsetX: 0, locationViewOffsetY: 0, @@ -1182,27 +1153,16 @@ class _LocationMap extends State with WidgetsBindingObserver { locationViewHierarchy: BMFLocationViewHierarchy.LOCATION_VIEW_HIERARCHY_BOTTOM, ); - _mapController.updateLocationViewWithParam(displayParam); + _mapController?.updateLocationViewWithParam(displayParam); addMarker(); }); } addMarker() async { - latLng = await AppUtils.coordConvert(BMFCoordinate(double.tryParse(widget.arguments["lat"]), - double.tryParse(widget.arguments["lng"]))); - // latLng = BMFCoordinate(double.tryParse(widget.arguments["lat"]), - // double.tryParse(widget.arguments["lng"])); - - if (bmfMarker == null && _mapController != null) { - bmfMarker = BMFMarker.icon( - position: latLng, - centerOffset: BMFPoint(0.5, 0.7), - enabled: false, - icon: "assets/image/icon_map_marker.webp", - draggable: false, - ); - _mapController.addMarker(bmfMarker); + latLng = await AppUtils.coordConvert(BMFCoordinate(double.tryParse(widget.arguments?["lat"]) ?? 0, + double.tryParse(widget.arguments?["lng"]) ?? 0)); + if (latLng != null) { + _mapController?.setCenterCoordinate(latLng!, true); } - _mapController.setCenterCoordinate(latLng, true); } } diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index bf0798d7..959e9899 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -2,17 +2,15 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; -import 'package:huixiang/retrofit/data/user_entity.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/store_info.dart'; +import 'package:huixiang/data/user_entity.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/union/union_view/store_activity.dart'; import 'package:huixiang/union/union_view/store_info.dart'; @@ -29,7 +27,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; class UnionDetailsPage extends StatefulWidget { - final Map arguments; + final Map? arguments; UnionDetailsPage({this.arguments}); @@ -40,7 +38,7 @@ class UnionDetailsPage extends StatefulWidget { } class _UnionDetailsPage extends State { - ApiService apiService; + ApiService? apiService; @override void dispose() { @@ -48,24 +46,22 @@ class _UnionDetailsPage extends State { refreshController.dispose(); } - StoreInfo storeInfo; - List activitys; + StoreInfo? storeInfo; + List? activitys; queryStoreInfo() async { final SharedPreferences value = await SharedPreferences.getInstance(); apiService = - ApiService(Dio(), context: context, token: value.getString('token')); + ApiService(Dio(), context: context, token: value.getString('token') ?? ""); - BaseData baseData = await apiService - .queryStoreInfo(widget.arguments["id"]) + BaseData? baseData = await apiService?.queryStoreInfo(widget.arguments?["id"]) .catchError((error) { refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { refreshController.refreshCompleted(); - storeInfo = StoreInfo.fromJson(baseData.data); - activitys = storeInfo.informationVOPageVO.list - .map((e) => Activity.fromJson(e)) + storeInfo = StoreInfo.fromJson(baseData!.data); + activitys = storeInfo?.informationVOPageVO?.list?.map((e) => Activity.fromJson(e)) .toList(); } else { refreshController.refreshFailed(); @@ -83,8 +79,8 @@ class _UnionDetailsPage extends State { appBar: MyAppBar( background: Color(0xFFF7F7F7), title: storeInfo == null - ? (widget.arguments["storeName"] ?? "") - : storeInfo.storeName, + ? (widget.arguments?["storeName"] ?? "") + : storeInfo!.storeName, titleColor: Colors.black87, titleSize: 18.sp, leadingColor: Colors.black, @@ -153,15 +149,10 @@ class _UnionDetailsPage extends State { } bool isEnable() { - if (storeInfo == null) return false; - if (storeInfo.mini == null) return false; - String miniAppId = storeInfo.mini.miniAppId; - if (miniAppId == null || - miniAppId == "" || - storeInfo.mini.miniVersion == null || - storeInfo.mini.miniVersion == "" || - storeInfo.mini.miniDownloadUrl == null || - storeInfo.mini.miniDownloadUrl == "") { + String? miniAppId = storeInfo?.mini?.miniAppId; + if ((miniAppId?.isEmpty ?? true) || + (storeInfo?.mini?.miniVersion?.isEmpty ?? true) || + (storeInfo?.mini?.miniDownloadUrl?.isEmpty ?? true)) { return false; } else { return true; @@ -170,8 +161,8 @@ class _UnionDetailsPage extends State { ///领取优惠券 _receiveCoupon(couponId) async { - BaseData baseData = await apiService.receiveCoupon(couponId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(couponId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { queryStoreInfo(); showAlertDialog(); } @@ -192,8 +183,11 @@ class _UnionDetailsPage extends State { ///领取VIP _receiveVip() async { - BaseData baseData = await apiService.minLogin(storeInfo.id).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (storeInfo == null || (storeInfo?.id?.isEmpty ?? true)) { + return; + } + BaseData? baseData = await apiService?.minLogin(storeInfo!.id!).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { SmartDialog.showToast(S.of(context).lingquchenggong, alignment: Alignment.center); setState(() { @@ -203,7 +197,7 @@ class _UnionDetailsPage extends State { } printMin() async { - String miniAppId = storeInfo.mini.miniAppId; + String? miniAppId = storeInfo?.mini?.miniAppId; debugPrint("print isExistsApp: ${await Min.isExistsApp(miniAppId)}"); debugPrint("print getAppBasePath: ${await Min.getAppBasePath(miniAppId)}"); debugPrint("print currentPageUrl: ${await Min.currentPageUrl()}"); @@ -211,22 +205,25 @@ class _UnionDetailsPage extends State { } _loginMin() async { - if (storeInfo == null) return; if (!isEnable()) { SmartDialog.showToast(S.of(context).zanbuzhichixianshangdiancan, alignment: Alignment.center); return; } - BaseData baseData = await apiService.minLogin(storeInfo.id).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - UserEntity userEntity = UserEntity.fromJson(baseData.data); + if (storeInfo == null || (storeInfo?.id?.isEmpty ?? true)) { + return; + } + BaseData? baseData = await apiService?.minLogin(storeInfo!.id!).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { + UserEntity userEntity = UserEntity.fromJson(baseData!.data); startMin(userEntity.token, userEntity.userId); } } startMin(token, userId) async { - if (storeInfo == null) return; - if (storeInfo.mini == null) return; + if (storeInfo == null) { + return; + } if(Platform.isAndroid){ if (!(await Min.isInitialize())) { // 小程序的微信支付和app的充值支付使用同一个WXPayEntryActivity回调, @@ -236,10 +233,13 @@ class _UnionDetailsPage extends State { } } printMin(); - String miniAppId = storeInfo.mini.miniAppId; + String? miniAppId = storeInfo!.mini?.miniAppId; + if (miniAppId?.isEmpty ?? true) { + return; + } String filePath = ""; if (Platform.isAndroid) { - filePath = (await getExternalStorageDirectory()).path; + filePath = (await getExternalStorageDirectory())?.path ?? ""; } else { filePath = (await getApplicationDocumentsDirectory()).path; } @@ -249,27 +249,26 @@ class _UnionDetailsPage extends State { await downloadWgt(miniAppId, filePath); await Min.reloadWgt(miniAppId, filePath); } else { - String version = await Min.getAppVersionInfo(storeInfo.mini.miniAppId); - if (version != storeInfo.mini.miniVersion) { + String version = await Min.getAppVersionInfo(storeInfo!.mini!.miniAppId!); + if (version != storeInfo!.mini!.miniVersion!) { await downloadWgt(miniAppId, filePath); await Min.reloadWgt(miniAppId, filePath); } } SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - String nickname = sharedPreferences.getString("nick"); - String mobile = sharedPreferences.getString("mobile"); - String user = sharedPreferences.getString('user'); - String latitude = sharedPreferences.getString("latitude"); - String longitude = sharedPreferences.getString("longitude"); + String? nickname = sharedPreferences.getString("nick"); + String? mobile = sharedPreferences.getString("mobile"); + String? user = sharedPreferences.getString('user'); + String? latitude = sharedPreferences.getString("latitude"); + String? longitude = sharedPreferences.getString("longitude"); print(user); - UserInfo userInfo = UserInfo.fromJson(jsonDecode(user)); + UserInfo? userInfo = UserInfo.fromJson(jsonDecode(user ?? "")); Min.startMin(miniAppId, { "token": "Bearer $token", - "shopId": widget.arguments["id"], - "tenantCode": storeInfo.tenantCode, - if (latitude != null && longitude != null) - "position": "$latitude,$longitude", + "shopId": widget.arguments!["id"], + "tenantCode": storeInfo!.tenantCode, + "position": "$latitude,$longitude", "baseURL": "https://pos.api.lotus-wallet.com/app/", // "baseURL": "http://192.168.10.236:8765/app/", "uid": userId, @@ -290,7 +289,7 @@ class _UnionDetailsPage extends State { downloadWgt(appId, savePath) async { downText = S.of(context).zhengzaixiazaizhong; Response response = await Dio() - .download(storeInfo.mini.miniDownloadUrl, savePath, + .download(storeInfo!.mini?.miniDownloadUrl ?? "", savePath, onReceiveProgress: (progress, max) { progressValue = progress.toDouble() / max.toDouble(); EasyLoading.showProgress(progressValue, status: downText); @@ -301,9 +300,7 @@ class _UnionDetailsPage extends State { SharedPreferences.getInstance().then((value) { value.setStringList( "miniAppid", - (value.getStringList("miniAppid") != null - ? value.getStringList("miniAppid") - : []) + (value.getStringList("miniAppid") ?? []) ..add(appId)); }); } else { diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index 2080ac73..259c1af1 100644 --- a/lib/union/union_list.dart +++ b/lib/union/union_list.dart @@ -1,20 +1,17 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/store.dart'; +import 'package:huixiang/data/store.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:shimmer/shimmer.dart'; -import '../retrofit/data/base_data.dart'; -import '../retrofit/data/product_show.dart'; +import '../data/base_data.dart'; +import '../data/product_show.dart'; import '../retrofit/retrofit_api.dart'; import '../utils/flutter_utils.dart'; import '../view_widget/classic_header.dart'; @@ -23,9 +20,9 @@ import '../view_widget/round_button.dart'; class UnionList extends StatefulWidget { final String serviceType; - final BMFCoordinate latLng; - final String searchKey; - final String city; + final BMFCoordinate? latLng; + final String? searchKey; + final String? city; UnionList(Key key, this.serviceType, this.latLng, this.searchKey, this.city) : super(key: key); @@ -37,9 +34,9 @@ class UnionList extends StatefulWidget { } class _UnionList extends State with AutomaticKeepAliveClientMixin { - ApiService apiService; - List storeList; - BMFCoordinate latLng; + ApiService? apiService; + List? storeList; + BMFCoordinate? latLng; final RefreshController _refreshController = RefreshController(); int networkStatus = 0; @@ -53,15 +50,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { } queryStore() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData> baseData = await apiService.queryStore({ + BaseData>? baseData = await apiService?.queryStore({ "city": (widget.city ?? "") == "所有门店" ? "" : (widget.city ?? ""), // "district": district, // "province": province, @@ -76,17 +65,16 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { networkStatus = -1; _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - storeList = baseData.data; + if (baseData?.isSuccess ?? false) { + storeList = baseData!.data; _refreshController.refreshCompleted(); networkStatus = 1; } else { _refreshController.refreshFailed(); - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } EasyLoading.dismiss(); - if(!mounted) - return; + if (!mounted) return; setState(() {}); } @@ -101,82 +89,86 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { ), physics: BouncingScrollPhysics(), onRefresh: queryStore, - child: networkStatus == 0 ? - ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - onTap: () {}, - child: buildStoreItemSm(), - ); - }, - ):((storeList == null || storeList.length == 0) - ? NoDataView( - src: "assets/image/di_zhi.webp", - isShowBtn: false, - text: ((widget.city??"") != "武汉" && (widget.city??"") != "郑州" && (widget.city??"") != "北京") ? - " 当前海峡姐妹开放门店 仅包含 武汉/北京/郑州,您当前的位置无法获取,请手动更换城市" :"暂无店铺列表~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h,left:45.w,right:45.w), - ) - : ListView.builder( - itemCount: storeList.length, - padding: EdgeInsets.only( - top: 8.h, - bottom: 100.h, - ), + child: networkStatus == 0 + ? ListView.builder( + itemCount: 10, + physics: BouncingScrollPhysics(), + shrinkWrap: true, itemBuilder: (context, position) { - return InkWell( - onTap: () { - { - // if (storeList[position].storeName == "一心回乡商城") { - // Navigator.of(context).pushNamed( - // '/router/shopping_mall_home', - // arguments: { - // "type": 0, - // "id": storeList[position].id, - // "tenant": storeList[position].tenantCode, - // "storeName":storeList[position].storeName - // }, - // ); - // } - // else - Navigator.of(context).pushNamed( - '/router/store_order', - arguments: { - "id": storeList[position].id, - "tenant": storeList[position].tenantCode, - "storeName": storeList[position].storeName, - "distance": storeList[position].distance - }, - ); - } - }, - child: buildStoreItem(storeList[position], position), + return GestureDetector( + onTap: () {}, + child: buildStoreItemSm(), ); }, - )), + ) + : ((storeList?.isEmpty ?? true) + ? NoDataView( + src: "assets/image/di_zhi.webp", + isShowBtn: false, + text: ((widget.city ?? "") != "武汉" && + (widget.city ?? "") != "郑州" && + (widget.city ?? "") != "北京") + ? " 当前海峡姐妹开放门店 仅包含 武汉/北京/郑州,您当前的位置无法获取,请手动更换城市" + : "暂无店铺列表~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h, left: 45.w, right: 45.w), + ) + : ListView.builder( + itemCount: storeList!.length, + padding: EdgeInsets.only( + top: 8.h, + bottom: 100.h, + ), + itemBuilder: (context, position) { + return InkWell( + onTap: () { + { + // if (storeList[position].storeName == "一心回乡商城") { + // Navigator.of(context).pushNamed( + // '/router/shopping_mall_home', + // arguments: { + // "type": 0, + // "id": storeList[position].id, + // "tenant": storeList[position].tenantCode, + // "storeName":storeList[position].storeName + // }, + // ); + // } + // else + Navigator.of(context).pushNamed( + '/router/store_order', + arguments: { + "id": storeList![position].id, + "tenant": storeList![position].tenantCode, + "storeName": storeList![position].storeName, + "distance": storeList![position].distance + }, + ); + } + }, + child: buildStoreItem(storeList![position], position), + ); + }, + )), ); } Widget buildStoreItemSm() { return Container( margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 12.h), - padding: EdgeInsets.symmetric(horizontal:12.w,vertical: 12.h), + padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 12.h), width: double.infinity, decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(6)), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(25), - offset: Offset(0, 1), - blurRadius: 12, - spreadRadius: 0, - ) - ]), + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(6)), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(25), + offset: Offset(0, 1), + blurRadius: 12, + spreadRadius: 0, + ) + ]), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -228,19 +220,30 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { Widget buildStoreItem(Store store, position) { return Container( - margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 12.h), - padding: EdgeInsets.symmetric(horizontal:12.w,vertical: 12.h), + margin: EdgeInsets.fromLTRB( + 16.w, + 8.h, + 16.w, + 12.h, + ), + padding: EdgeInsets.symmetric( + horizontal: 12.w, + vertical: 12.h, + ), decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(6)), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(25), - offset: Offset(0, 1), - blurRadius: 12, - spreadRadius: 0, - ) - ]), + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(6), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(25), + offset: Offset(0, 1), + blurRadius: 12, + spreadRadius: 0, + ) + ], + ), width: double.infinity, child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -248,7 +251,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { Stack( children: [ MImage( - store.facade, + store.facade ?? '', width: 74.h, height: 74.h, fit: BoxFit.cover, @@ -260,12 +263,16 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { decoration: BoxDecoration( color: Color(0xFF32A060), borderRadius: BorderRadius.only( - topLeft: Radius.circular(6), - bottomRight: Radius.circular(6), - topRight: Radius.circular(2), - bottomLeft: Radius.circular(2)), + topLeft: Radius.circular(6), + bottomRight: Radius.circular(6), + topRight: Radius.circular(2), + bottomLeft: Radius.circular(2), + ), + ), + padding: EdgeInsets.symmetric( + horizontal: 3.w, + vertical: 2.h, ), - padding: EdgeInsets.symmetric(horizontal: 3.w, vertical: 2.h), child: Text( "品牌", style: TextStyle( @@ -281,87 +288,82 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { width: 12.w, ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - store?.storeName ?? "", - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + store.storeName ?? "", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF0D0D0D), + fontSize: 14.sp, + fontWeight: MyFontWeight.bold, + ), ), - ), - SizedBox(height: 6.h), - Row( - children: [ - Text( - S.of(context).ren( - store?.perCapitaConsumption ?? "", - ), - style: TextStyle( - color: Color(0xFF4D4D4D), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, + SizedBox(height: 6.h), + Row( + children: [ + Text( + S.of(context).ren( + store.perCapitaConsumption ?? "", + ), + style: TextStyle( + color: Color(0xFF4D4D4D), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), ), - ), - SizedBox(width: 22.w), - if (store.distance != null) - Image.asset( - "assets/image/icon_union_location_black.webp", - fit: BoxFit.fill, - height: 12, - width: 12, - ), - SizedBox(width: 4.w), - if (store.distance != null) - Text( - (store.distance ?? 0) > 1000 - ? S.of(context).gongli( - ((store.distance ?? 0) / 1000 * 100).toInt() / - 100.0) - : S - .of(context) - .mi(((store.distance ?? 0) * 100).toInt() / 100.0), - style: TextStyle( - color: Color(0xFF4D4D4D), - fontSize: 12.sp, + SizedBox(width: 22.w), + Image.asset( + "assets/image/icon_union_location_black.webp", + fit: BoxFit.fill, + height: 12, + width: 12, ), - ), - ], - ), - SizedBox(height: 10.h), - Row( - children: []..addAll( - itemServer(store != null ? store.businessService : "")), - ), - if (storeList[position].productShow != null) - SizedBox(height: store.businessService == "" ? 40.h : 23.h), - if (storeList[position].productShow != null) + SizedBox(width: 4.w), + Text( + (store.distance ?? 0) > 1000 + ? S.of(context).gongli( + ((store.distance ?? 0) / 1000 * 100).toInt() / + 100.0) + : S.of(context).mi( + ((store.distance ?? 0) * 100).toInt() / 100.0), + style: TextStyle( + color: Color(0xFF4D4D4D), + fontSize: 12.sp, + ), + ), + ], + ), + SizedBox(height: 10.h), + Row( + children: []..addAll(itemServer(store.businessService ?? "")), + ), + SizedBox(height: store.businessService == "" ? 40.h : 23.h), Container( height: 100.h, child: ListView.builder( padding: EdgeInsets.zero, itemCount: - (storeList[position].productShow?.length ?? 0) > 3 + (storeList![position].productShow?.length ?? 0) > 3 ? 3 - : storeList[position].productShow?.length ?? 0, + : storeList![position].productShow?.length ?? 0, scrollDirection: Axis.horizontal, shrinkWrap: true, - physics:BouncingScrollPhysics(), + physics: BouncingScrollPhysics(), itemBuilder: (context, index) { return GestureDetector( onTap: () {}, child: unionGoodsItem( - storeList[position].productShow[index]), + storeList![position].productShow![index]), ); }, ), ), - ], - )) + ], + ), + ), ], ), ); @@ -369,23 +371,23 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { ///标签 List itemServer(String businessService) { - if (businessService == null || businessService == "") return []; + if (businessService == "") return []; var list = businessService.split(","); return list .map((e) => Container( - margin: EdgeInsets.only(right: 8.w), - child: RoundButton( - height: 17.h * AppUtils.textScale(context), - text: "$e", - backgroup: Color(0xFFF65720), - padding: EdgeInsets.only( - left: 4.w, - right: 4.w, - ), - fontSize: 10.sp, - textColor: Colors.white, - ), - )) + margin: EdgeInsets.only(right: 8.w), + child: RoundButton( + height: 17.h * AppUtils.textScale(context), + text: "$e", + backgroup: Color(0xFFF65720), + padding: EdgeInsets.only( + left: 4.w, + right: 4.w, + ), + fontSize: 10.sp, + textColor: Colors.white, + ), + )) .toList(); } @@ -398,7 +400,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - productShow?.imgs[0] ?? "", + productShow.imgs?[0] ?? "", width: 74.h, height: 74.h, fit: BoxFit.cover, @@ -409,7 +411,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { Padding( padding: EdgeInsets.only(top: 8.h), child: Text( - productShow?.productName ?? "", + productShow.productName ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFFA29E9E), @@ -448,7 +450,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { right: 0, child: ClipRRect( child: MImage( - store.facade, + store.facade ?? "", width: double.infinity, height: 140.h, fit: BoxFit.cover, @@ -477,7 +479,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { crossAxisAlignment: CrossAxisAlignment.start, children: [ MImage( - store.logo, + store.logo ?? "", width: 57, height: 57, fit: BoxFit.cover, @@ -497,7 +499,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { height: 40.h, ), Text( - store?.storeName ?? "", + store.storeName ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF0D0D0D), @@ -522,33 +524,31 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { ) ], )), - if (store.distance != null) - Container( - width: 59.w, - height: 18.h, - alignment: Alignment.center, - margin: EdgeInsets.only(top: 20.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: Color(0xFF32A060), - ), - child: Visibility( - child: Text( - (store.distance ?? 0) > 1000 - ? S.of(context).gongli( - ((store.distance ?? 0) / 1000 * 100).toInt() / - 100.0) - : S.of(context).mi( - ((store.distance ?? 0) * 100).toInt() / - 100.0), - style: TextStyle( - color: Color(0xFFFFFFFF), - fontSize: 10.sp, - ), + Container( + width: 59.w, + height: 18.h, + alignment: Alignment.center, + margin: EdgeInsets.only(top: 20.h), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(2), + color: Color(0xFF32A060), + ), + child: Visibility( + child: Text( + (store.distance ?? 0) > 1000 + ? S.of(context).gongli( + ((store.distance ?? 0) / 1000 * 100).toInt() / + 100.0) + : S.of(context).mi( + ((store.distance ?? 0) * 100).toInt() / 100.0), + style: TextStyle( + color: Color(0xFFFFFFFF), + fontSize: 10.sp, ), - visible: store.distance != null, ), + visible: store.distance != null, ), + ), ], ), ), diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index c8158739..b0757947 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -1,23 +1,20 @@ -import 'dart:ui'; import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/retrofit/data/ip_data.dart'; +import 'package:huixiang/data/ip_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/union/union_list.dart'; +import 'package:huixiang/utils/constant.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/location.dart'; import 'package:huixiang/view_widget/my_tab.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:visibility_detector/visibility_detector.dart'; @@ -43,39 +40,36 @@ class UnionPageState extends State SingleTickerProviderStateMixin { final TextEditingController editingController = TextEditingController(); bool isKeyBoardShow = false; - TabController tabController; - BMFCoordinate latLng; - String areaName; + TabController? tabController; + BMFCoordinate? latLng; + String? areaName; List _allKey = []; bool _isShowLocalTips = false; - double visiblePercentage; + double? visiblePercentage; jumpIndex(jpIndex) { - tabController.index = jpIndex; + tabController?.index = jpIndex; } @override void dispose() { super.dispose(); WidgetsBinding.instance.removeObserver(this); - if (Location.getInstance() != null && - Location.getInstance().aMapFlutterLocation != null) - Location.getInstance().aMapFlutterLocation.stopLocation(); + Location.instance.aMapFlutterLocation.stopLocation(); } @override void didChangeAppLifecycleState(AppLifecycleState state) { if (state == AppLifecycleState.resumed) { // 处理应用程序切换回前台的逻辑 - if(visiblePercentage == 1) - permissionSettings(); + if (visiblePercentage == 1) permissionSettings(); } else if (state == AppLifecycleState.paused) { // 处理应用程序切换到后台的逻辑 } } void permissionSettings() async { - if (_isShowLocalTips && await Permission.location.isGranted){ + if (_isShowLocalTips && await Permission.location.isGranted) { _isShowLocalTips = false; getLocation(); } @@ -115,32 +109,32 @@ class UnionPageState extends State } getLocation({bool showLoading = true}) async { - if(showLoading) - EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); + if (showLoading) + EasyLoading.show( + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black, + ); bool powerFlag = false; // bool finallyFlag = false; try { Future.delayed(Duration(seconds: 5), () { // if (!finallyFlag) - Location.getInstance().stopLocation(); + Location.instance.stopLocation(); }); - powerFlag = await Location.getInstance().startLocation(context, + powerFlag = await Location.instance.startLocation(context, (BaiduLocation result) async { - if (result != null && - result.latitude != null && - result.longitude != null) { + if (result.latitude != null && result.longitude != null) { print("location: $result"); - latLng = BMFCoordinate(result.latitude, result.longitude); + latLng = BMFCoordinate(result.latitude!, result.longitude!); latLng = await BMFCalculateUtils.coordConvert( - coordinate: latLng, + coordinate: latLng!, fromType: BMF_COORD_TYPE.BD09LL, toType: BMF_COORD_TYPE.COMMON); await saveLatLng( - latLng, result.province, result.city, result.district); - print("union: Location result ${latLng.latitude} " - "${latLng.longitude}"); - Location.getInstance().stopLocation(); + latLng!, result.province, result.city, result.district); + print("union: Location result ${latLng!.latitude} " + "${latLng!.longitude}"); + Location.instance.stopLocation(); } else { await getLatLng(); } @@ -175,30 +169,36 @@ class UnionPageState extends State tempLatLng.containsKey("province") && tempLatLng.containsKey("city") && tempLatLng.containsKey("district")) { - latLng = BMFCoordinate(double.tryParse(tempLatLng.getString("latitude")), - double.tryParse(tempLatLng.getString("longitude"))); + latLng = BMFCoordinate( + double.tryParse(tempLatLng.getString("latitude") ?? "0") ?? 0, + double.tryParse(tempLatLng.getString("longitude") ?? "0") ?? 0); } } queryIpInfo() async { EasyLoading.show( - status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black, + ); try { ApiService apiIpService = ApiService(Dio(), context: context, isIp: true); - IpData baseData = await apiIpService.getIpInfo().catchError((onError) {}); - if (baseData?.city != null) { - areaName = baseData.city.replaceAll("市", ""); - } + IpData baseData = await apiIpService.getIpInfo().catchError((onError) { + print("onError: ${onError}"); + }); + areaName = baseData.city?.replaceAll("市", ""); } finally { getLocation(showLoading: false); } + EasyLoading.dismiss(); } loadFinish({bool showLoading = true}) { + EasyLoading.dismiss(); if (showLoading) EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black, + ); _allKey = [GlobalKey(), GlobalKey(), GlobalKey(), GlobalKey()]; setState(() {}); } @@ -210,144 +210,147 @@ class UnionPageState extends State key: Key('my-widget-key'), onVisibilityChanged: (visibilityInfo) { visiblePercentage = visibilityInfo.visibleFraction; - if(visiblePercentage == 1) - permissionSettings(); + if (visiblePercentage == 1) permissionSettings(); }, child: GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Stack( - alignment: Alignment.bottomCenter, - children: [ - Container( - child: Column( - children: [ - Row( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child: Stack( + alignment: Alignment.bottomCenter, + children: [ + Container( + child: Column( children: [ - Padding( - padding: EdgeInsets.only(left: 18.w, right: 10.w), - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pushNamed( - '/router/union_select_city', - arguments: {"cityName": areaName}).then((value) { - if (value != null) { - areaName = value; - loadFinish(); - } - }); - }, - child: Row( - children: [ - Text( - areaName ?? "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 14.sp, - fontWeight: FontWeight.bold, - color: Colors.white), + 45.d, + Row( + children: [ + Padding( + padding: EdgeInsets.only(left: 18.w, right: 10.w), + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + Navigator.of(context).pushNamed( + '/router/union_select_city', + arguments: { + "cityName": areaName + }).then((value) { + if (value != null) { + areaName = "$value"; + loadFinish(); + } + }); + }, + child: Row( + children: [ + Text( + areaName ?? "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + Icon( + Icons.keyboard_arrow_down, + color: Colors.white, + size: 24, + ) + ], ), - Icon( - Icons.keyboard_arrow_down, - color: Colors.white, - size: 24, - ) - ], + ), + ), + Expanded(child: buildSearchItem()) + ], + ), + Align( + alignment: Alignment.centerLeft, + child: TabBar( + controller: tabController, + isScrollable: true, + //可滚动 + indicatorColor: Colors.white, + labelColor: Colors.white, + labelStyle: TextStyle( + fontSize: 18.sp, + fontWeight: FontWeight.bold, ), + unselectedLabelStyle: TextStyle( + fontSize: 15.sp, + fontWeight: FontWeight.normal, + ), + //未选中文字颜色 + unselectedLabelColor: Colors.white, + indicatorSize: TabBarIndicatorSize.label, + //指示器与文字等宽 + tabs: [ + MyTab(text: S.of(context).quanbu), + MyTab(text: S.of(context).chi), + MyTab(text: S.of(context).he), + MyTab(text: S.of(context).wan), + ], ), ), - Expanded(child: buildSearchItem()) + _allKey.isEmpty + ? NoDataView( + src: "assets/image/di_zhi.webp", + isShowBtn: false, + text: "暂无店铺列表~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : Expanded( + child: TabBarView( + controller: tabController, + children: [ + UnionList(_allKey[0], "", latLng, + editingController.text, areaName), + UnionList(_allKey[1], "EATSTORE", latLng, + editingController.text, areaName), + UnionList(_allKey[2], "DRINKSTORE", latLng, + editingController.text, areaName), + UnionList(_allKey[3], "HAPPYSTORE", latLng, + editingController.text, areaName), + ], + ), + ) ], ), - Align( - alignment: Alignment.centerLeft, - child: TabBar( - controller: tabController, - isScrollable: true, - //可滚动 - indicatorColor: Colors.white, - labelColor: Colors.white, - labelStyle: TextStyle( - fontSize: 18.sp, - fontWeight: FontWeight.bold, - ), - unselectedLabelStyle: TextStyle( - fontSize: 15.sp, - fontWeight: FontWeight.normal, - ), - //未选中文字颜色 - unselectedLabelColor: Colors.white, - indicatorSize: TabBarIndicatorSize.label, - //指示器与文字等宽 - tabs: [ - MyTab(text: S.of(context).quanbu), - MyTab(text: S.of(context).chi), - MyTab(text: S.of(context).he), - MyTab(text: S.of(context).wan), - ], - ), + padding: EdgeInsets.only( + top: MediaQuery.of(context).padding.top + 17.h), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Color(0xFF32A060), + Color(0xFF32A060), + Colors.white, + Colors.white, + ], + stops: [ + 0, + 0.2, + 0.4, + 1 + ]), ), - _allKey.isEmpty - ? NoDataView( - src: "assets/image/di_zhi.webp", - isShowBtn: false, - text: "暂无店铺列表~", - fontSize: 16.sp, - margin: EdgeInsets.only(top: 120.h), - ) - : Expanded( - child: TabBarView( - controller: tabController, - children: [ - UnionList(_allKey[0], "", latLng, - editingController.text, areaName), - UnionList(_allKey[1], "EATSTORE", latLng, - editingController.text, areaName), - UnionList(_allKey[2], "DRINKSTORE", latLng, - editingController.text, areaName), - UnionList(_allKey[3], "HAPPYSTORE", latLng, - editingController.text, areaName), - ], - ), - ) - ], - ), - padding: - EdgeInsets.only(top: MediaQuery.of(context).padding.top + 17.h), - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Color(0xFF32A060), - Color(0xFF32A060), - Colors.white, - Colors.white, - ], - stops: [ - 0, - 0.2, - 0.4, - 1 - ]), - ), + ), + if (_isShowLocalTips) + Padding( + padding: EdgeInsets.only(bottom: 70.h), + child: LocationTips(() { + setState(() { + _isShowLocalTips = false; + }); + }), + ) + ], ), - if (_isShowLocalTips) - Padding( - padding: EdgeInsets.only(bottom: 70.h), - child: LocationTips(() { - setState(() { - _isShowLocalTips = false; - }); - }), - ) - ], - ), - )); + )); } Widget buildSearchItem() { diff --git a/lib/union/union_select_city.dart b/lib/union/union_select_city.dart index 11ece4f0..1795141b 100644 --- a/lib/union/union_select_city.dart +++ b/lib/union/union_select_city.dart @@ -1,18 +1,17 @@ import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; -import '../retrofit/data/ip_data.dart'; +import '../data/ip_data.dart'; import '../retrofit/retrofit_api.dart'; class UnionSelectCity extends StatefulWidget { - final Map arguments; + final Map? arguments; UnionSelectCity({this.arguments}); @override @@ -23,9 +22,9 @@ class UnionSelectCity extends StatefulWidget { class _UnionSelectCity extends State { RefreshController refreshController = RefreshController(); - Map areaMap; - ApiService apiIpService; - String ipName; + late Map areaMap; + ApiService? apiIpService; + String? ipName; int ipState = 0; List hotCity = []; List areaList = []; @@ -37,7 +36,7 @@ class _UnionSelectCity extends State { queryIpInfo(); } - void areaCode({String searchTxt}) async { + void areaCode({String? searchTxt}) async { var value = await rootBundle.loadString('assets/map_style/chinese_cities.json'); areaList.clear(); @@ -48,7 +47,7 @@ class _UnionSelectCity extends State { areaMap.remove("热门城市"); Map tempAreaMap = jsonDecode(value); areaMap.forEach((key, value) { - if (searchTxt != null && searchTxt.trim() != "") + if (searchTxt?.trim().isNotEmpty ?? false) value.forEach((element) { if (!element["area"].contains(searchTxt)) (tempAreaMap[key] as List) @@ -66,15 +65,13 @@ class _UnionSelectCity extends State { context: context, isIp: true ); - IpData baseData = await apiIpService.getIpInfo().catchError((onError) {}); - if (baseData?.city != null) { - ipName = baseData.city.replaceAll("市", ""); - if(ipName != widget.arguments["cityName"] ){ - ipState=2; - setState((){}); - } + IpData? baseData = await apiIpService?.getIpInfo().catchError((onError) {}); + ipName = baseData?.city?.replaceAll("市", ""); + if(ipName != widget.arguments?["cityName"] ){ + ipState = 2; + setState((){}); + } } - } @override Widget build(BuildContext context) { @@ -135,7 +132,7 @@ class _UnionSelectCity extends State { // left: 8.w, // ), child: Text( - (ipState== 1) ? (ipName??""):widget.arguments["cityName"] ?? "", + (ipState== 1) ? (ipName??"") : widget.arguments?["cityName"] ?? "", style: TextStyle( color: Color(0xFF4D4D4D), fontWeight: MyFontWeight.medium, diff --git a/lib/union/union_view/store_activity.dart b/lib/union/union_view/store_activity.dart index 5cded5d9..5a30c19f 100644 --- a/lib/union/union_view/store_activity.dart +++ b/lib/union/union_view/store_activity.dart @@ -1,17 +1,15 @@ - import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; +import 'package:huixiang/data/activity.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/item_title.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class StoreActivity extends StatefulWidget { - - final Map arguments; - final List activitys; + final Map? arguments; + final List? activitys; StoreActivity(this.arguments, this.activitys); @@ -19,7 +17,6 @@ class StoreActivity extends StatefulWidget { State createState() { return _StoreActivity(); } - } class _StoreActivity extends State { @@ -34,33 +31,32 @@ class _StoreActivity extends State { imgPath: "assets/image/icon_union_start_store.webp", ), ), - (widget.activitys != null && widget.activitys.length > 0) + (widget.activitys?.isNotEmpty ?? false) ? Container( - margin: EdgeInsets.only(bottom: 30.h), - child: AspectRatio( - aspectRatio: 1.55, - child: buildSwiper2Bottom(), - ), - ) + margin: EdgeInsets.only(bottom: 30.h), + child: AspectRatio( + aspectRatio: 1.55, + child: buildSwiper2Bottom(), + ), + ) : Container( - width: double.infinity, - height: 30.h, - margin: EdgeInsets.only(bottom: 30.h), - alignment: Alignment.center, - child: Text( - S.of(context).muqianzanwuxingdianhuodong, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFFA0A0A0), - ), - ), - ), + width: double.infinity, + height: 30.h, + margin: EdgeInsets.only(bottom: 30.h), + alignment: Alignment.center, + child: Text( + S.of(context).muqianzanwuxingdianhuodong, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFFA0A0A0), + ), + ), + ), ], ); } - Widget buildSwiper2Bottom() { return Container( child: Swiper( @@ -69,15 +65,14 @@ class _StoreActivity extends State { itemBuilder: (context, position) { return InkWell( onTap: () { - if (widget.arguments["source"] != null && - widget.arguments["source"] == widget.activitys[position].id) { + if (widget.arguments?["source"] != null && + widget.arguments!["source"] == widget.activitys?[position].id) { Navigator.of(context).pop(); } else { - Navigator.of(context).pushNamed('/router/web_page', - arguments: { - "activityId": widget.activitys[position].id, - "source": widget.arguments["id"] - }); + Navigator.of(context).pushNamed('/router/web_page', arguments: { + "activityId": widget.activitys?[position].id, + "source": widget.arguments?["id"] + }); } }, child: Container( @@ -103,8 +98,8 @@ class _StoreActivity extends State { mainAxisSize: MainAxisSize.max, children: [ MImage( - (widget.activitys != null && widget.activitys.length > position) - ? widget.activitys[position].coverImg + (widget.activitys!.length > position) + ? (widget.activitys![position].coverImg ?? "") : "", aspectRatio: 2.2, radius: BorderRadius.vertical( @@ -121,9 +116,8 @@ class _StoreActivity extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - (widget.activitys != null && - widget.activitys.length > position) - ? widget.activitys[position].storeName + (widget.activitys!.length > position) + ? (widget.activitys![position].storeName ?? "") : "", style: TextStyle( fontSize: 14.sp, @@ -135,9 +129,8 @@ class _StoreActivity extends State { height: 4.h, ), Text( - (widget.activitys != null && - widget.activitys.length > position) - ? widget.activitys[position].mainTitle + (widget.activitys!.length > position) + ? (widget.activitys![position].mainTitle ?? "") : "", style: TextStyle( fontSize: 12.sp, @@ -167,8 +160,8 @@ class _StoreActivity extends State { ), ), child: Text( - (widget.activitys != null && widget.activitys.length > position) - ? widget.activitys[position].startTime.split(" ")[0] + (widget.activitys!.length > position) + ? (widget.activitys![position].startTime?.split(" ")[0] ?? "") : "", style: TextStyle( fontWeight: MyFontWeight.semi_bold, @@ -183,11 +176,8 @@ class _StoreActivity extends State { ), ); }, - itemCount: - (widget.activitys != null && widget.activitys.length > 0) ? widget.activitys.length : 0, + itemCount: widget.activitys?.length ?? 0, ), ); } - - -} \ No newline at end of file +} diff --git a/lib/union/union_view/store_info.dart b/lib/union/union_view/store_info.dart index 6035babe..8fcf5d7d 100644 --- a/lib/union/union_view/store_info.dart +++ b/lib/union/union_view/store_info.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -11,7 +11,7 @@ import 'package:huixiang/view_widget/round_button.dart'; import 'package:url_launcher/url_launcher.dart'; class StoreInfos extends StatefulWidget { - final StoreInfo storeInfo; + final StoreInfo? storeInfo; StoreInfos(this.storeInfo); @@ -50,7 +50,7 @@ class _StoreInfos extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - widget.storeInfo != null ? widget.storeInfo.storeName : "", + widget.storeInfo?.storeName ?? "", overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 18.sp, @@ -64,11 +64,7 @@ class _StoreInfos extends State { Row( children: [ Text( - S.of(context).ren( - widget.storeInfo != null - ? widget.storeInfo.perCapitaConsumption - : "", - ), + S.of(context).ren(widget.storeInfo!.perCapitaConsumption ?? ""), overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 14.sp, @@ -80,11 +76,7 @@ class _StoreInfos extends State { width: 22.w, ), Row( - children: itemServer( - widget.storeInfo != null - ? widget.storeInfo.businessService - : "", - ), + children: itemServer(widget.storeInfo?.businessService ?? ""), ), ], ), @@ -92,7 +84,7 @@ class _StoreInfos extends State { height: 12.h, ), Text( - widget.storeInfo != null ? widget.storeInfo.address : "", + widget.storeInfo?.address ?? "", maxLines: 2, textAlign: TextAlign.justify, style: TextStyle( @@ -107,11 +99,10 @@ class _StoreInfos extends State { Text( S.of(context).yingyeshijian(widget.storeInfo == null ? "" - : (widget.storeInfo.openStartTime == null && - widget.storeInfo.openEndTime == null) + : ((widget.storeInfo!.openStartTime?.isEmpty ?? true) && (widget.storeInfo!.openEndTime?.isEmpty ?? true)) ? S.of(context).quantian - : "${widget.storeInfo.openStartTime.substring(0, widget.storeInfo.openStartTime.lastIndexOf(":"))} " - "- ${widget.storeInfo.openEndTime.substring(0, widget.storeInfo.openEndTime.lastIndexOf(":"))}"), + : "${widget.storeInfo!.openStartTime!.substring(0, widget.storeInfo!.openStartTime!.lastIndexOf(":"))} " + "- ${widget.storeInfo!.openEndTime!.substring(0, widget.storeInfo!.openEndTime!.lastIndexOf(":"))}"), style: TextStyle( color: Color(0xFF353535), fontWeight: MyFontWeight.regular, @@ -123,7 +114,7 @@ class _StoreInfos extends State { Column( children: [ MImage( - widget.storeInfo != null ? widget.storeInfo.logo : "", + widget.storeInfo!.logo ?? "", width: 69, height: 69, fit: BoxFit.cover, @@ -139,16 +130,13 @@ class _StoreInfos extends State { children: [ InkWell( onTap: () { - if (widget.storeInfo == null || - widget.storeInfo.latitude == null || - widget.storeInfo.longitude == null || - widget.storeInfo.latitude == "" || - widget.storeInfo.longitude == "") return; + if ((widget.storeInfo?.latitude?.isEmpty ?? true)|| + (widget.storeInfo?.longitude?.isEmpty ?? true)) return; Navigator.of(context) .pushNamed('/router/location_map', arguments: { - "lat": widget.storeInfo.latitude, - "lng": widget.storeInfo.longitude, - "storeName": widget.storeInfo.storeName, + "lat": widget.storeInfo!.latitude, + "lng": widget.storeInfo!.longitude, + "storeName": widget.storeInfo!.storeName, }); }, child: Image.asset( @@ -365,10 +353,8 @@ class _StoreInfos extends State { return Container( margin: EdgeInsets.only(left: 10.w, right: 10.w), child: MImage( - (widget.storeInfo != null && - widget.storeInfo.bannerList != null && - position < widget.storeInfo.bannerList.length) - ? widget.storeInfo.bannerList[position].imgUrl + (position < (widget.storeInfo!.bannerList?.length ?? 0)) + ? (widget.storeInfo!.bannerList![position].imgUrl ?? "") : "", fit: BoxFit.cover, radius: BorderRadius.circular(4), @@ -377,15 +363,12 @@ class _StoreInfos extends State { ), ); }, - itemCount: - (widget.storeInfo != null && widget.storeInfo.bannerList != null) - ? widget.storeInfo.bannerList.length - : 1), - ); + itemCount: widget.storeInfo?.bannerList?.length ?? 1, + )); } List itemServer(String businessService) { - if (businessService == null || businessService == "") return []; + if (businessService == "") return []; var list = businessService.split(","); return list .map((e) => Container( @@ -412,13 +395,11 @@ class _StoreInfos extends State { return CupertinoActionSheet( title: Text(S.of(context).bodadianhua), actions: [ - if (widget.storeInfo != null && - widget.storeInfo.tel != null && - widget.storeInfo.tel != "") + if (widget.storeInfo?.tel?.isNotEmpty ?? false) CupertinoActionSheetAction( - child: Text(widget.storeInfo.tel), + child: Text(widget.storeInfo!.tel ?? ""), onPressed: () { - callMobile(widget.storeInfo.tel); + callMobile(widget.storeInfo!.tel); Navigator.of(context).pop(); }, isDefaultAction: true, @@ -433,7 +414,8 @@ class _StoreInfos extends State { isDestructiveAction: true, ), ); - }); + }, + ); } callMobile(mobile) async { diff --git a/lib/union/union_view/union_coupon.dart b/lib/union/union_view/union_coupon.dart index b9c2ef64..f36e182d 100644 --- a/lib/union/union_view/union_coupon.dart +++ b/lib/union/union_view/union_coupon.dart @@ -1,20 +1,18 @@ - - - import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/utils/str_utils.dart'; import 'package:huixiang/view_widget/item_title.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/separator.dart'; class UnionCoupon extends StatefulWidget { - final StoreInfo storeInfo; + final StoreInfo? storeInfo; final bool coupon; - final Function(String id) receiveCoupon; + final Function(String? id) receiveCoupon; UnionCoupon(this.storeInfo, this.receiveCoupon, {this.coupon = false}); @@ -27,9 +25,8 @@ class UnionCoupon extends StatefulWidget { class _UnionCoupon extends State { @override Widget build(BuildContext context) { - return (widget.coupon != null && - widget.coupon && - (widget.storeInfo != null && widget.storeInfo.couponVOList != null)) + return (widget.coupon && + (widget.storeInfo?.couponVOList != null)) ? buildCoupon() : Column( children: [ @@ -40,8 +37,7 @@ class _UnionCoupon extends State { imgPath: "assets/image/icon_union_coupons.webp", ), ), - (widget.storeInfo != null && - widget.storeInfo.couponVOList != null) + (widget.storeInfo?.couponVOList != null) ? buildCoupon() : Container( width: double.infinity, @@ -64,9 +60,7 @@ class _UnionCoupon extends State { return Container( height: 116.h, child: ListView.builder( - itemCount: (widget.storeInfo != null && widget.storeInfo.couponVOList != null) - ? widget.storeInfo.couponVOList.length - : 0, + itemCount: widget.storeInfo?.couponVOList?.length ?? 0, physics: BouncingScrollPhysics(parent: PageScrollPhysics()), scrollDirection: Axis.horizontal, itemBuilder: (context, position) { @@ -98,10 +92,7 @@ class _UnionCoupon extends State { margin: EdgeInsets.only(left: 5), child: Text.rich(TextSpan(children: [ TextSpan( - text: (widget.storeInfo != null && - widget.storeInfo.couponVOList != null && - widget.storeInfo.couponVOList[position] - .bizType == 1) + text: (widget.storeInfo?.couponVOList![position].bizType == 1) ? "¥" : "", style: TextStyle( @@ -111,22 +102,11 @@ class _UnionCoupon extends State { ), ), TextSpan( - text: (widget.storeInfo != null && - widget.storeInfo.couponVOList != null && - widget.storeInfo.couponVOList[position] - .bizType == - 1) - ? "${double.tryParse(widget.storeInfo.couponVOList[position].discountAmount).toInt()}" - : (widget.storeInfo != null && - widget.storeInfo.couponVOList != - null && - widget - .storeInfo - .couponVOList[position] - .bizType == - 5) + text: (widget.storeInfo!.couponVOList![position].bizType == 1) + ? "${doubleStr2Int(widget.storeInfo!.couponVOList![position].discountAmount)}" + : (widget.storeInfo!.couponVOList![position].bizType == 5) ? S.of(context).duihuanquan - : "${widget.storeInfo.couponVOList[position].discountPercent / 10.0}折", + : "${(widget.storeInfo!.couponVOList![position].discountPercent ?? 0) / 10.0}折", style: TextStyle( fontSize: 36.sp, color: Color(0xFFFF7A1A), @@ -160,11 +140,7 @@ class _UnionCoupon extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - (widget.storeInfo != null && - widget.storeInfo.couponVOList != null) - ? widget.storeInfo.couponVOList[position] - .couponName - : "", + "${widget.storeInfo!.couponVOList![position].couponName}", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -174,26 +150,14 @@ class _UnionCoupon extends State { ), ), Text( - (widget.storeInfo != null && - widget.storeInfo.couponVOList != null) - ? (widget.storeInfo.couponVOList[position] + (widget.storeInfo!.couponVOList != null) + ? (widget.storeInfo!.couponVOList![position] .bizType == 1 ? S.of(context).manlijiandaijinquan( - double.tryParse(widget - .storeInfo - .couponVOList[position] - .fullAmount) - .toInt(), - double.tryParse(widget - .storeInfo - .couponVOList[position] - .discountAmount) - .toInt()) - : S.of(context).quanchangzhe(widget - .storeInfo - .couponVOList[position] - .discountPercent /10.0)) + doubleStr2Int(widget.storeInfo!.couponVOList![position].fullAmount), + doubleStr2Int(widget.storeInfo!.couponVOList![position].discountAmount)) + : S.of(context).quanchangzhe((widget.storeInfo!.couponVOList![position].discountPercent ?? 0) /10.0)) : "", overflow: TextOverflow.ellipsis, style: TextStyle( @@ -204,19 +168,8 @@ class _UnionCoupon extends State { ), Text( S.of(context).youxiaoqizhi( - (widget.storeInfo != null && - widget.storeInfo.couponVOList != - null && - // widget.storeInfo.couponVOList[position].useStartTime != null && - widget - .storeInfo - .couponVOList[position] - .useEndTime != - null) - // ? "${widget.storeInfo.couponVOList[position].useStartTime.replaceAll("-", ".").split(" ")[0]}-${widget.storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}" - ? "${widget.storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}" - : "", - ), + "${widget.storeInfo!.couponVOList![position].useEndTime?.replaceAll("-", ".").split(" ")[0]}" + ), overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -230,35 +183,23 @@ class _UnionCoupon extends State { ), InkWell( onTap: () { - if (widget.storeInfo != null && - widget.storeInfo.couponVOList != null && - widget.storeInfo.couponVOList[position] - .status == - 0) { - widget.receiveCoupon( - widget.storeInfo.couponVOList[position].id); + if (widget.storeInfo!.couponVOList![position].status == 0) { + widget.receiveCoupon(widget.storeInfo!.couponVOList![position].id); } }, child: Container( height: 25.h, child: RoundButton( - text: (widget.storeInfo != null && - widget.storeInfo.couponVOList != null && - widget.storeInfo.couponVOList[position] - .status > - 0) + text: ((widget.storeInfo!.couponVOList![position].status ?? 0) > 0) ? S.of(context).yilingqu : S.of(context).lingqu, textColor: Colors.white, - backgroup: (widget.storeInfo != null && - widget.storeInfo.couponVOList != null && - widget.storeInfo.couponVOList[position] - .status > - 0) + backgroup: ((widget.storeInfo!.couponVOList![position].status ?? 0) > 0) ? Colors.grey : Color(0xFF32A060), padding: EdgeInsets.symmetric( - horizontal: 8.w, vertical:2.h), + horizontal: 8.w, vertical:2.h, + ), fontSize: 12.sp, ), ), diff --git a/lib/union/union_view/vip.dart b/lib/union/union_view/vip.dart index 0b669f7d..e33864d8 100644 --- a/lib/union/union_view/vip.dart +++ b/lib/union/union_view/vip.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/data/store_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/round_button.dart'; class Vip extends StatefulWidget { - final StoreInfo storeInfo; + final StoreInfo? storeInfo; final Function receiveVip; final bool isReceive; @@ -30,7 +30,7 @@ class _Vip extends State { image: AssetImage("assets/image/icon_vip_bg.webp"), ), ), - child: (widget.storeInfo != null && widget.storeInfo.isVip) + child: (widget.storeInfo?.isVip ?? false) ? Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.max, @@ -56,7 +56,7 @@ class _Vip extends State { width: 8.w, ), Text( - "¥${(widget.storeInfo != null && widget.storeInfo.memberSource != null) ? widget.storeInfo.memberSource.balance : ""}", + "¥${(widget.storeInfo?.memberSource != null) ? widget.storeInfo?.memberSource?.balance : ""}", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.medium, @@ -87,9 +87,8 @@ class _Vip extends State { width: 8.w, ), Text( - (widget.storeInfo != null && - widget.storeInfo.memberSource != null) - ? "${widget.storeInfo.memberSource.integral}" + (widget.storeInfo?.memberSource != null) + ? "${widget.storeInfo!.memberSource!.integral}" : "", style: TextStyle( fontSize: 14.sp, diff --git a/lib/utils/ImgCachePath.dart b/lib/utils/ImgCachePath.dart index fa3c41a0..4a040e8a 100644 --- a/lib/utils/ImgCachePath.dart +++ b/lib/utils/ImgCachePath.dart @@ -7,11 +7,11 @@ class ImgCachePath{ static ImgCachePath get instance => _getInstance(); - static ImgCachePath _instance; + static ImgCachePath? _instance; - String _path; + String? _path; - String get path => _path; + String get path => _path ?? ""; ImgCachePath._internal(){ fileFromDocsDir(); @@ -27,9 +27,9 @@ class ImgCachePath{ } static ImgCachePath _getInstance(){ - if(_instance == null){ + if (_instance == null) { _instance = ImgCachePath._internal(); } - return _instance; + return _instance!; } } \ No newline at end of file diff --git a/lib/utils/MyPainter.dart b/lib/utils/MyPainter.dart index e0de0b0b..7a940544 100644 --- a/lib/utils/MyPainter.dart +++ b/lib/utils/MyPainter.dart @@ -11,9 +11,9 @@ class MyPainter extends CustomPainter { //默认的线的宽度 double width; //已完成线的颜色 - Color completeColor; + Color? completeColor; //已完成的百分比 - double completePercent; + double? completePercent; //已完成的线的宽度 double completeWidth; // 从哪开始 1从下开始, 2 从上开始 3 从左开始 4 从右开始 默认从下开始 @@ -25,17 +25,17 @@ class MyPainter extends CustomPainter { //结束的位置 double endAngle; //默认的线的背景颜色 - List lineColors; + List? lineColors; //实心圆阴影颜色 // Color shadowColor; //渐变圆 深色在下面 还是在左面 默认在下面 bool isTransfrom; MyPainter({ - this.lineColor, + required this.lineColor, this.completeColor, this.completePercent, - this.width, + required this.width, this.completeWidth = 0, this.startType = 1, this.isDividerRound = false, @@ -52,41 +52,39 @@ class MyPainter extends CustomPainter { double radius = min(size.width / 2, size.height / 2); // 半径 //是否有第二层圆 - if (lineColor != null) { - //是不是 虚线圆 - if (isDividerRound) { - //背景的线 - Paint line = Paint() - ..color = lineColor - // ..strokeCap = StrokeCap.round - ..style = PaintingStyle.stroke - ..isAntiAlias = true - ..strokeWidth = width; - - double i = 0.00; - while (i < pi * 2) { - canvas.drawArc(Rect.fromCircle(center: center, radius: radius), i, - 0.15, false, line); - i = i + 0.3; - } - } else { - //背景的线 实线 - Paint line = Paint() - ..color = lineColor - ..strokeCap = StrokeCap.round - ..style = PaintingStyle.stroke - ..strokeWidth = width; + //是不是 虚线圆 + if (isDividerRound) { + //背景的线 + Paint line = Paint() + ..color = lineColor + // ..strokeCap = StrokeCap.round + ..style = PaintingStyle.stroke + ..isAntiAlias = true + ..strokeWidth = width; - canvas.drawCircle( - // 画圆方法 - center, - radius, - line); + double i = 0.00; + while (i < pi * 2) { + canvas.drawArc(Rect.fromCircle(center: center, radius: radius), i, + 0.15, false, line); + i = i + 0.3; } + } else { + //背景的线 实线 + Paint line = Paint() + ..color = lineColor + ..strokeCap = StrokeCap.round + ..style = PaintingStyle.stroke + ..strokeWidth = width; + + canvas.drawCircle( + // 画圆方法 + center, + radius, + line); } - //画上面的圆 + //画上面的圆 if (completeWidth > 0) { - double arcAngle = 2 * pi * (completePercent / 100); + double arcAngle = 2 * pi * ((completePercent ?? 0) / 100); // 从哪开始 1从下开始, 2 从上开始 3 从左开始 4 从右开始 默认从下开始 double start = pi / 2; @@ -105,7 +103,7 @@ class MyPainter extends CustomPainter { ..strokeWidth = completeWidth; ///是渐变圆 - if (isGradient == true) { + if (isGradient && (lineColors?.isNotEmpty ?? false)) { //渐变圆 深色位置偏移量 默认深色在下面 double transfrom; if (isTransfrom == false) { @@ -118,7 +116,7 @@ class MyPainter extends CustomPainter { paint.shader = SweepGradient( startAngle: 0.0, endAngle: pi * 2, - colors: lineColors, + colors: lineColors!, tileMode: TileMode.clamp, transform: GradientRotation(transfrom), ).createShader( @@ -128,8 +126,10 @@ class MyPainter extends CustomPainter { canvas.drawArc(Rect.fromCircle(center: center, radius: radius), start, arcAngle, false, paint); } else { - ///是实体圆 - paint.color = completeColor; + if (completeColor != null) { + ///是实体圆 + paint.color = completeColor!; + } canvas.drawArc( Rect.fromCircle(center: center, radius: radius), start, // -pi / 2,从正上方开始 pi / 2,从下方开始 diff --git a/lib/utils/business_instance.dart b/lib/utils/business_instance.dart index 72f10f76..3fdf1eda 100644 --- a/lib/utils/business_instance.dart +++ b/lib/utils/business_instance.dart @@ -3,15 +3,15 @@ class BusinessInstance { static BusinessInstance get instance => _getInstance(); - static BusinessInstance _instance; + static BusinessInstance? _instance; - String _businessToken; + late String _businessToken; - String _businessTenant; + late String _businessTenant; - String _expirationTime; + late String _expirationTime; - String _serviceStatus; + late String _serviceStatus; String get businessToken => _businessToken; @@ -27,7 +27,7 @@ class BusinessInstance { if (_instance == null) { _instance = BusinessInstance._internal(); } - return _instance; + return _instance!; } String get businessTenant => _businessTenant; diff --git a/lib/utils/captcha_util.dart b/lib/utils/captcha_util.dart index a84cd08b..0d434ce9 100644 --- a/lib/utils/captcha_util.dart +++ b/lib/utils/captcha_util.dart @@ -7,7 +7,7 @@ class CaptchaUtil{ ///aes加密 /// [key]AesCrypt加密key /// [content] 需要加密的内容字符串 - static String aesEncode({String key, String content}) { + static String aesEncode({required String key, required String content}) { var aesCrypt = AesCrypt( key: base64UrlEncode(key.codeUnits), padding: PaddingAES.pkcs7); return aesCrypt.ecb.encrypt(inp: content); @@ -16,7 +16,7 @@ class CaptchaUtil{ ///aes解密 /// [key]aes解密key /// [content] 需要加密的内容字符串 - static String aesDecode({String key, String content}) { + static String aesDecode({required String key, required String content}) { var aesCrypt = AesCrypt( key: base64UrlEncode(key.codeUnits), padding: PaddingAES.pkcs7); return aesCrypt.ecb.decrypt(enc: content); diff --git a/lib/utils/constant.dart b/lib/utils/constant.dart new file mode 100644 index 00000000..ae3e95d2 --- /dev/null +++ b/lib/utils/constant.dart @@ -0,0 +1,242 @@ +import 'package:flutter/material.dart'; + +class Constant { + + VerticalDivider getVDivider(num width) { + return VerticalDivider( + width: width.toDouble(), + color: Colors.transparent, + ); + } + + Divider getDivider(num height) { + return Divider( + height: height.toDouble(), + color: Colors.transparent, + ); + } + + TextStyle getStyle(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + color: Colors.white, + ); + } + + TextStyle getTextStyle(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + color: const Color(0xFFE7E7E7), + ); + } + + TextStyle getGrayStyle(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + color: const Color(0xFF727272), + ); + } + + TextStyle getCCStyle(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + color: const Color(0xFFCCCCCC), + ); + } + + TextStyle get33Style(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + color: const Color(0xFF333333), + ); + } + + TextStyle getBlackStyle(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + fontWeight: FontWeight.w600, + color: Colors.black, + ); + } + + TextStyle getGray1Style(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + color: const Color(0xFFA1A1A1), + ); + } + + TextStyle getBlueStyle(num fontSize) { + return TextStyle( + fontSize: fontSize.toDouble(), + color: const Color(0xFF64A4FF), + ); + } + + EdgeInsets getMpa(num a) { + return EdgeInsets.all(a.toDouble()); + } + + EdgeInsets getMph(num h) { + return EdgeInsets.symmetric( + horizontal: h.toDouble(), + ); + } + + EdgeInsets getMpv(num v) { + return EdgeInsets.symmetric( + vertical: v.toDouble(), + ); + } + + EdgeInsets getMphv(Map hv) { + return EdgeInsets.symmetric( + horizontal: hv['h']?.toDouble() ?? 0 , + vertical: hv['v']?.toDouble() ?? 0, + ); + } + EdgeInsets getMpOnly(Map hv) { + return EdgeInsets.only( + left: hv['l']?.toDouble() ?? 0 , + top: hv['t']?.toDouble() ?? 0, + right: hv['r']?.toDouble() ?? 0, + bottom: hv['b']?.toDouble() ?? 0, + ); + } + + Widget getRoundBg(Widget widget) { + return Container( + padding: 13.mpa, + decoration: BoxDecoration( + color: const Color(0xFF2D2C31), + borderRadius: BorderRadius.circular(12), + ), + child: widget, + ); + } + + Widget getOutlinedBg(Widget widget) { + return Container( + padding: { + 'h': 7, + 'v': 2, + }.mphv, + decoration: BoxDecoration( + border: Border.all( + color: const Color(0xFF64A4FF), + width: 1, + ), + borderRadius: BorderRadius.circular(10.5), + ), + child: widget, + ); + } + + Widget getSlideBg(Widget widget) { + return Container( + alignment: Alignment.center, + padding: { + 'l':12 + }.mpOnly, + decoration: BoxDecoration( + color: const Color(0xFF64A4FF), + borderRadius: BorderRadius.circular(14), + ), + child: widget, + ); + } + + Widget padding(Widget widget) { + return Padding( + padding: 25.mph, + child: widget, + ); + } + +} + +extension WidgetExtension on Widget { + + Widget get roundBg => Constant().getRoundBg(this); + + Widget get outlinedBg => Constant().getOutlinedBg(this); + + Widget get slideBg => Constant().getSlideBg(this); + + Widget get padding => Constant().padding(this); + +} + + +extension NumExtension on num { + + VerticalDivider get vd => Constant().getVDivider(this); + + Divider get d => Constant().getDivider(this); + + TextStyle get whiteStyle => Constant().getStyle(this); + TextStyle get blackStyle => Constant().getBlackStyle(this); + TextStyle get ccStyle => Constant().getCCStyle(this); + TextStyle get c33Style => Constant().get33Style(this); + TextStyle get textStyle => Constant().getTextStyle(this); + TextStyle get grayStyle => Constant().getGrayStyle(this); + TextStyle get gray1Style => Constant().getGray1Style(this); + TextStyle get blueStyle => Constant().getBlueStyle(this); + + EdgeInsets get mpa => Constant().getMpa(this); + EdgeInsets get mph => Constant().getMph(this); + EdgeInsets get mpv => Constant().getMpv(this); + + +} + +extension MapExtension on Map { + + EdgeInsets get mphv => Constant().getMphv(this); + EdgeInsets get mpOnly => Constant().getMpOnly(this); + +} + + +extension OtherExtension on bool { + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/utils/flutter_utils.dart b/lib/utils/flutter_utils.dart index f9257c79..3c6aded5 100644 --- a/lib/utils/flutter_utils.dart +++ b/lib/utils/flutter_utils.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; @@ -12,8 +11,10 @@ class AppUtils { ///计算距离(当前位置到店位置直线距离) static Future calculateDistance( BMFCoordinate bmfCoordinate, BMFCoordinate myLatLng, {bool isMi = false}) async { - double mi = - await BMFCalculateUtils.getLocationDistance(bmfCoordinate, myLatLng); + double? mi = await BMFCalculateUtils.getLocationDistance(bmfCoordinate, myLatLng); + if (mi == null) { + return "0"; + } NumberFormat numberFormat = NumberFormat("#.#"); return "${numberFormat.format(mi / (isMi ? 1 :1000))}"; } @@ -49,15 +50,18 @@ class AppUtils { } ///版本号 - static bool versionCompare(String localVersion, String serverVersion) { + static bool versionCompare(String localVersion, String? serverVersion) { try { + if (serverVersion?.isNotEmpty ?? false) { + return false; + } var localVersionArr = localVersion.split("."); - var serverVersionArr = serverVersion.split("."); - if (int.tryParse(localVersionArr[0]) > int.tryParse(serverVersionArr[0])) + var serverVersionArr = serverVersion!.split("."); + if ((int.tryParse(localVersionArr[0]) ?? 0) > (int.tryParse(serverVersionArr[0]) ?? 0)) return false; - if (int.tryParse(localVersionArr[1]) > int.tryParse(serverVersionArr[1])) + if ((int.tryParse(localVersionArr[1]) ?? 0) > (int.tryParse(serverVersionArr[1]) ?? 0)) return false; - if (int.tryParse(localVersionArr[2]) >= int.tryParse(serverVersionArr[2])) + if ((int.tryParse(localVersionArr[2]) ?? 0) > (int.tryParse(serverVersionArr[2]) ?? 0)) return false; } catch (ex) {} return true; @@ -79,7 +83,7 @@ class AppUtils { } ///坐标系转换(高德转百度) - static Future coordConvert(BMFCoordinate latLng) async { + static Future coordConvert(BMFCoordinate latLng) async { return BMFCalculateUtils.coordConvert( coordinate: latLng, fromType: BMF_COORD_TYPE.COMMON, @@ -93,7 +97,7 @@ class AppUtils { } static String phoneEncode(String phone) { - if (phone == null || phone.length != 11) return phone; + if (phone.length != 11) return phone; return phone.substring(0, 3) + "****" + phone.substring(phone.length - 4); } @@ -129,7 +133,7 @@ class AppUtils { } static String getAgeByString(String birth) { - if (birth == null || birth == "") return ""; + if (birth == "") return ""; int age = 0; DateTime brt = DateFormat("yyyy-MM-dd").parse(birth); @@ -157,13 +161,13 @@ class AppUtils { } static String getHourMinuteByString(String birth) { - if (birth == null || birth == "") return ""; + if (birth == "") return ""; DateTime brt = DateFormat("yyyy-MM-dd HH:mm:ss").parse(birth); return DateFormat("HH:mm").format(brt); } static String getHourMinuteAfter30mByString(String birth) { - if (birth == null || birth == "") return ""; + if (birth == "") return ""; DateTime brt = DateFormat("yyyy-MM-dd HH:mm:ss").parse(birth); DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( brt.millisecondsSinceEpoch + 30 * 60 * 1000); @@ -173,7 +177,6 @@ class AppUtils { /// 获取缓存大小 static Future total() async { Directory tempDir = await getTemporaryDirectory(); - if (tempDir == null) return 0; int total = await _reduce(tempDir); return total; } @@ -181,7 +184,6 @@ class AppUtils { /// 清除缓存 static Future clear() async { Directory tempDir = await getTemporaryDirectory(); - if (tempDir == null) return 0; await _delete(tempDir); } @@ -197,7 +199,7 @@ class AppUtils { if (file is Directory) { final List children = file.listSync(); int total = 0; - if (children != null && children.isNotEmpty) + if (children.isNotEmpty) for (final FileSystemEntity child in children) total += await _reduce(child); return total; @@ -227,35 +229,38 @@ class AppUtils { } } - static String dioErrorTypeToString(DioErrorType type) { + static String dioErrorTypeToString(DioExceptionType? type) { String errorStr = ""; + if (type == null) { + return errorStr; + } switch (type) { - case DioErrorType.CANCEL: + case DioExceptionType.cancel: { errorStr = "取消请求"; break; } - case DioErrorType.CONNECT_TIMEOUT: + case DioExceptionType.connectionTimeout: { errorStr = "链接超时"; break; } - case DioErrorType.RECEIVE_TIMEOUT: + case DioExceptionType.receiveTimeout: { errorStr = "响应超时"; break; } - case DioErrorType.SEND_TIMEOUT: + case DioExceptionType.sendTimeout: { errorStr = "请求超时"; break; } - case DioErrorType.RESPONSE: + case DioExceptionType.badResponse: { errorStr = "服务器异常"; break; } - case DioErrorType.DEFAULT: + case DioExceptionType.unknown: default: { errorStr = "请求异常"; @@ -273,13 +278,13 @@ class AppUtils { } ///计算时间差/比较时间 - static bool compareTime(String time1, String time2) { - if (time1 == null || time2 == null) { + static bool compareTime(String? time1, String time2) { + var time1List = time1?.split(":"); + var time2List = time2.split(":"); + if (time1List?.length != 3 || time2List.length != 3) { return false; } - var time1List = time1.split(":"); - var time2List = time2.split(":"); - if (time1List.length != 3 || time2List.length != 3) { + if (time1List == null) { return false; } var hour1 = int.parse(time1List[0]); diff --git a/lib/utils/location.dart b/lib/utils/location.dart index 2b1f1482..c5a14085 100644 --- a/lib/utils/location.dart +++ b/lib/utils/location.dart @@ -63,20 +63,22 @@ BaiduLocationIOSOption initIOSOptions() { } class Location { - static Location _instance; + static Location? _instance; Location._internal() { aMapFlutterLocation = LocationFlutterPlugin(); } - static Location getInstance() { - if (_instance == null) { - _instance = Location._internal(); - } - return _instance; + static Location get instance => _getInstance(); + + factory Location() => _getInstance(); + + static Location _getInstance() { + _instance ??= Location._internal(); + return _instance!; } - LocationFlutterPlugin aMapFlutterLocation; + late LocationFlutterPlugin aMapFlutterLocation; Future startLocation( context, Function(BaiduLocation result) locationCallback) async { @@ -84,7 +86,6 @@ class Location { initAndroidOptions().getMap(), initIOSOptions().getMap()); var permissionStatus = await Permission.location.status; if (!permissionStatus.isGranted) { - if (permissionStatus.isUndetermined) showTipsAlertDialog(context); return false; } else { @@ -105,7 +106,7 @@ class Location { } void stopLocation() { - if (aMapFlutterLocation != null) aMapFlutterLocation.stopLocation(); + aMapFlutterLocation.stopLocation(); } enableLocation(context) { diff --git a/lib/utils/status_utils.dart b/lib/utils/status_utils.dart index a414556b..fdf9ba2f 100644 --- a/lib/utils/status_utils.dart +++ b/lib/utils/status_utils.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/view_widget/round_button.dart'; diff --git a/lib/utils/str_utils.dart b/lib/utils/str_utils.dart new file mode 100644 index 00000000..9c932e7a --- /dev/null +++ b/lib/utils/str_utils.dart @@ -0,0 +1,9 @@ + + + +String doubleStr2Int(String? doubleStr) { + double text = double.tryParse(doubleStr ?? "0") ?? 0; + return "${text.toInt()}"; +} + + diff --git a/lib/utils/upload_async.dart b/lib/utils/upload_async.dart index 8711fa3f..5c6fca27 100644 --- a/lib/utils/upload_async.dart +++ b/lib/utils/upload_async.dart @@ -5,20 +5,19 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/community/release_dynamic.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/upload_result.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:image_gallery_saver/image_gallery_saver.dart'; import 'package:image_pickers/image_pickers.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:thumbnails/thumbnails.dart'; -import '../community/release_dynamic.dart'; -import '../retrofit/data/base_data.dart'; -import '../retrofit/data/upload_result.dart'; -import '../retrofit/retrofit_api.dart'; -import '../view_widget/custom_image.dart'; import 'font_weight.dart'; class UploadAsync { static void upload(int dynamicType, List mediaPaths, - String addressText, String dynamicText) async { + String addressText, String dynamicText, BuildContext context) async { SmartDialog.show( widget: Container( alignment: Alignment.centerRight, @@ -32,31 +31,39 @@ class UploadAsync { width: 50.h, height: 70.h, decoration: BoxDecoration( - color: Colors.grey, borderRadius: BorderRadius.circular(2)), + color: Colors.grey, + borderRadius: BorderRadius.circular(2), + ), child: dynamicType == 0 - ? Expanded(child: Column( - children: [ - Text( - dynamicText, - maxLines: 5, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: dynamicText.length > 10 ? (dynamicText.length > 20?8.sp:10.sp):15.sp, - color: Color(0xFFCDCCCC), + ? Expanded( + child: Column( + children: [ + Text( + dynamicText, + maxLines: 5, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: dynamicText.length > 10 + ? (dynamicText.length > 20 ? 8.sp : 10.sp) + : 15.sp, + color: Color(0xFFCDCCCC), + ), + ), + Expanded( + child: Container( + height: 20.h, + ), + ), + ], ), - ), - Expanded(child: - Container( - height: 20.h, - )) - ])) + ) : ClipRRect( borderRadius: BorderRadius.circular(2), child: Image.file( File(mediaPaths[0].galleryMode == GalleryMode.video - ? mediaPaths[0].thumbPath - : mediaPaths[0].path), + ? "${mediaPaths[0].thumbPath}" + : "${mediaPaths[0].path}"), fit: BoxFit.cover, width: double.infinity, height: double.infinity, @@ -79,6 +86,7 @@ class UploadAsync { Dio(), token: sp.getString("token"), showLoading: false, + context: context, ); fileUpload(apiService, mediaPaths, dynamicType).then((value) async { @@ -96,14 +104,14 @@ class UploadAsync { String remoteVideoCoverImg = ""; if (mediaPaths.length > 0) { if (dynamicType == 1) { - remoteImageUrls = mediaPaths.map((e) => e.remotePath).toList(); + remoteImageUrls = mediaPaths.map((e) => "${e.remotePath}").toList(); } else if (dynamicType == 2) { - remoteVideoUrl = mediaPaths[0].remotePath; - remoteVideoCoverImg = mediaPaths[0].thumbPath; + remoteVideoUrl = "${mediaPaths[0].remotePath}"; + remoteVideoCoverImg = "${mediaPaths[0].thumbPath}"; } } - BaseData baseData = await apiService.trend({ + BaseData? baseData = await apiService.trend({ "images": remoteImageUrls, "subject": dynamicText, "subjectType": subjectType, @@ -115,11 +123,11 @@ class UploadAsync { }).catchError((onError) { SmartDialog.dismiss(); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("发布成功!"); UploadInstance.instance.notifyAllObservers(); } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData.msg}", alignment: Alignment.center); } SmartDialog.dismiss(); }); @@ -128,45 +136,49 @@ class UploadAsync { ///文件上传 static Future fileUpload( ApiService apiService, List mediaPaths, int dynamicType) async { - if (mediaPaths != null && mediaPaths.length > 0) { - await Future.forEach(mediaPaths, (element) async { - if ((element.remotePath == null || element.remotePath == "") && + if (mediaPaths?.isNotEmpty ?? false) { + await Future.forEach(mediaPaths, (Medias element) async { + if ((element?.remotePath == null || element.remotePath == "") && (element != null && element.path != null && element.path != "" && - await File(element.path).exists())) { - File file = File(element.path); + await File(element.path!).exists())) { + File file = File(element.path!); if (dynamicType == 2) { String thumbnail; if (element.thumbPath != null && element.thumbPath != "" && - await File(element.thumbPath).exists()) { - thumbnail = element.thumbPath; + await File(element.thumbPath!).exists()) { + thumbnail = element.thumbPath!; } else { - thumbnail = await Thumbnails.getThumbnail( - videoFile: file.path, - imageType: ThumbFormat.JPEG, - quality: 10, + var result = await ImageGallerySaver.saveFile( + element.path!, + isReturnPathOfIOS: true, ); + thumbnail = element.path!; + // thumbnail = await Thumbnails.getThumbnail( + // videoFile: file.path, + // imageType: ThumbFormat.JPEG, + // quality: 10, + // ); } - if (thumbnail != null && - thumbnail != "" && - await File(thumbnail).exists()) { + if (thumbnail.isNotEmpty && await File(thumbnail).exists()) { BaseData baseData = await apiService.upload( File(thumbnail), 123123123, dynamicType == 2); - if (baseData != null && baseData.isSuccess) { - UploadResult uploadResult = baseData.data; + if (baseData?.isSuccess ?? false) { + UploadResult? uploadResult = baseData!.data; mediaPaths[mediaPaths.indexOf(element)].thumbPath = - uploadResult.url; + uploadResult?.url; } } + return; } BaseData baseData = await apiService.upload(file, 123123123, dynamicType == 2); - if (baseData != null && baseData.isSuccess) { - UploadResult uploadResult = baseData.data; + if (baseData?.isSuccess ?? false) { + UploadResult? uploadResult = baseData!.data; mediaPaths[mediaPaths.indexOf(element)].remotePath = - uploadResult.url; + uploadResult?.url; } } }); @@ -183,9 +195,9 @@ class UploadInstance { static UploadInstance get instance => _getInstance(); - static UploadInstance _instance; + static UploadInstance? _instance; - List _uploadObserverList; + late List _uploadObserverList; List get uploadObserverList => _uploadObserverList; @@ -202,7 +214,7 @@ class UploadInstance { if (_instance == null) { _instance = UploadInstance._internal(); } - return _instance; + return _instance!; } void notifyAllObservers() { diff --git a/lib/utils/widget_util.dart b/lib/utils/widget_util.dart index dabac5cb..ccdd1e48 100644 --- a/lib/utils/widget_util.dart +++ b/lib/utils/widget_util.dart @@ -3,64 +3,21 @@ import 'dart:async'; import 'package:flutter/widgets.dart'; import 'captcha_util.dart'; -/** - * @Author: thl - * @GitHub: https://github.com/Sky24n - * @Email: 863764940@qq.com - * @Email: sky24no@gmail.com - * @Description: Widget Util. - * @Date: 2018/9/10 - */ + /// Widget Util. class WidgetUtil { - bool _hasMeasured = false; - double _width; - double _height; - - /// Widget rendering listener. - /// Widget渲染监听. - /// context: Widget context. - /// isOnce: true,Continuous monitoring false,Listen only once. - /// onCallBack: Widget Rect CallBack. - void asyncPrepare( - BuildContext context, bool isOnce, ValueChanged onCallBack) { - if (_hasMeasured) return; - WidgetsBinding.instance.addPostFrameCallback((Duration timeStamp) { - RenderObject box = context.findRenderObject(); - if (box != null) { - if (isOnce) _hasMeasured = true; - double width = box.semanticBounds.width; - double height = box.semanticBounds.height; - if (_width != width || _height != height) { - _width = width; - _height = height; - if (onCallBack != null) onCallBack(box.semanticBounds); - } - } - }); - } - - /// Widget渲染监听. - void asyncPrepares(bool isOnce, ValueChanged onCallBack) { - if (_hasMeasured) return; - WidgetsBinding.instance.addPostFrameCallback((Duration timeStamp) { - if (isOnce) _hasMeasured = true; - if (onCallBack != null) onCallBack(null); - }); - } - ///get Widget Bounds (width, height, left, top, right, bottom and so on).Widgets must be rendered completely. ///获取widget Rect static Rect getWidgetBounds(BuildContext context) { - RenderObject box = context.findRenderObject(); + RenderObject? box = context.findRenderObject(); return (box != null) ? box.semanticBounds : Rect.zero; } ///Get the coordinates of the widget on the screen.Widgets must be rendered completely. ///获取widget在屏幕上的坐标,widget必须渲染完成 static Offset getWidgetLocalToGlobal(BuildContext context) { - RenderBox box = context.findRenderObject() as RenderBox; + RenderBox? box = context.findRenderObject() as RenderBox?; return box == null ? Offset.zero : box.localToGlobal(Offset.zero); } @@ -70,16 +27,14 @@ class WidgetUtil { /// url network /// local url , package static Future getImageWH( - {Image image, String url, String localUrl, String package}) { + {required Image image, String? url, String? localUrl, String? package}) { if (CaptchaUtil.isEmpty(image) && - CaptchaUtil.isEmpty(url) && - CaptchaUtil.isEmpty(localUrl)) { + (url == null || CaptchaUtil.isEmpty(url)) && + (localUrl == null || CaptchaUtil.isEmpty(localUrl))) { return Future.value(Rect.zero); } Completer completer = Completer(); - Image img = image ?? ((url != null && url.isNotEmpty) - ? Image.network(url) - : Image.asset(localUrl, package: package)); + Image img = image; img.image .resolve(const ImageConfiguration()) .addListener(ImageStreamListener( @@ -87,7 +42,7 @@ class WidgetUtil { completer.complete(Rect.fromLTWH(0, 0, info.image.width.toDouble(), info.image.height.toDouble())); }, - onError: (Object exception, StackTrace stackTrace) { + onError: (Object exception, StackTrace? stackTrace) { completer.completeError(exception, stackTrace); }, )); @@ -101,21 +56,17 @@ class WidgetUtil { /// local url (full path/全路径,example:"assets/images/ali_connors.png",""assets/images/3.0x/ali_connors.png"" ); /// package static Future getImageWHE( - {Image image, - String url, - String localUrl, - String package}) { + {required Image image, + String? url, + String? localUrl, + String? package}) { if (CaptchaUtil.isEmpty(image) && - CaptchaUtil.isEmpty(url) && - CaptchaUtil.isEmpty(localUrl)) { + (url == null || CaptchaUtil.isEmpty(url)) && + (localUrl == null || CaptchaUtil.isEmpty(localUrl))) { return Future.error("image is null."); } Completer completer = Completer(); - Image img = image != null - ? image - : ((url != null && url.isNotEmpty) - ? Image.network(url) - : Image.asset(localUrl, package: package)); + Image img = image; img.image .resolve(const ImageConfiguration()) .addListener(ImageStreamListener( @@ -123,7 +74,7 @@ class WidgetUtil { completer.complete(Rect.fromLTWH(0, 0, info.image.width.toDouble(), info.image.height.toDouble())); }, - onError: (Object exception, StackTrace stackTrace) { + onError: (Object exception, StackTrace? stackTrace) { completer.completeError(exception, stackTrace); }, )); diff --git a/lib/view_widget/activity_coupons.dart b/lib/view_widget/activity_coupons.dart index c6e5c87f..a3b9ea59 100644 --- a/lib/view_widget/activity_coupons.dart +++ b/lib/view_widget/activity_coupons.dart @@ -1,15 +1,13 @@ import 'dart:collection'; import 'dart:convert'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/coupon.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import '../generated/l10n.dart'; @@ -28,7 +26,7 @@ class _ActivityCoupons extends State { var resultData; int pageNum = 1; List coupons = []; - ApiService apiService; + ApiService? apiService; var receiveCou = new Queue(); @override @@ -39,16 +37,8 @@ class _ActivityCoupons extends State { receiveCoupon() async { var id = receiveCou.removeFirst(); - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - ); - } - BaseData baseData = await apiService.receiveCoupon(id).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.receiveCoupon(id).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { if (receiveCou.length > 0) { receiveCoupon(); } else { @@ -57,7 +47,7 @@ class _ActivityCoupons extends State { } } else{ - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); Navigator.of(context).pop(); } } diff --git a/lib/view_widget/activity_poster.dart b/lib/view_widget/activity_poster.dart index 0756b7a2..753982d7 100644 --- a/lib/view_widget/activity_poster.dart +++ b/lib/view_widget/activity_poster.dart @@ -1,15 +1,15 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/activity_pos.dart'; +import 'package:huixiang/data/activity_pos.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import '../retrofit/data/login_info.dart'; +import '../data/login_info.dart'; import 'custom_image.dart'; import 'new_people_reward.dart'; class ActivityPoster extends StatefulWidget { - final ActivityPos activityPos; + final ActivityPos? activityPos; final List firstLoginCouponList; ActivityPoster(this.activityPos, this.firstLoginCouponList); @@ -26,14 +26,14 @@ class _ActivityPoster extends State { @override void initState() { super.initState(); - if (widget.firstLoginCouponList != null && - widget.firstLoginCouponList.length > 0) showNew = true; + if (widget.firstLoginCouponList.length > 0) showNew = true; } @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async => false, + return PopScope( + canPop: false, + onPopInvoked: (isPop) {}, child: Container( width: double.infinity, alignment: Alignment.center, @@ -54,7 +54,7 @@ class _ActivityPoster extends State { borderRadius: BorderRadius.circular(12), ), child: MImage( - widget?.activityPos?.showImage ?? "", + widget.activityPos?.showImage ?? "", aspectRatio: 0.75, fit: BoxFit.cover, noCompress: true, @@ -81,10 +81,13 @@ class _ActivityPoster extends State { height: 40, fit: BoxFit.cover, color: Colors.white, - ))) + ), + ), + ) ], ), - )); + ), + ); } ///新用户奖励弹窗 @@ -99,26 +102,29 @@ class _ActivityPoster extends State { } /// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章,4:页面跳转,5:课程,7:门店跳转) - jumpClick(ActivityPos activityPos) async { - switch (activityPos.jumpType) { + jumpClick(ActivityPos? activityPos) async { + switch (activityPos?.jumpType) { case 1: Navigator.of(context).popAndPushNamed('/router/integral_store_page', - arguments: {"goodsId": widget.activityPos.jumpUrl}); + arguments: {"goodsId": widget.activityPos?.jumpUrl}); break; case 2: Navigator.of(context).popAndPushNamed('/router/web_page', arguments: { - "activityId": widget.activityPos.jumpUrl, + "activityId": widget.activityPos?.jumpUrl, }); break; case 3: Navigator.of(context).popAndPushNamed('/router/web_page', arguments: { - "articleId": widget.activityPos.jumpUrl, + "articleId": widget.activityPos?.jumpUrl, }); break; case 4: - String router = widget.activityPos.jumpUrl; + String? router = widget.activityPos?.jumpUrl; + if (router?.isEmpty ?? true) { + return; + } // String router = "/router/store_order?{\"id\":\"1333246101343436800\",\"tenant\":\"1175\",\"storeName\":\"海峡姐妹茶(汉街店)\"}"; - if (router.contains("?")) { + if (router!.contains("?")) { String params = router.substring(router.indexOf("?")+1); Map map = jsonDecode(params); Navigator.of(context).popAndPushNamed(router.substring(0,router.indexOf("?")), arguments: map); @@ -128,13 +134,17 @@ class _ActivityPoster extends State { break; case 5: Navigator.of(context).popAndPushNamed('/router/class_details', arguments: { - "id": widget.activityPos.jumpUrl, + "id": widget.activityPos?.jumpUrl, }); break; case 7: - String params = widget.activityPos.jumpUrl.substring(widget.activityPos.jumpUrl.indexOf("?")+1); + String? router = widget.activityPos?.jumpUrl; + if (router?.isEmpty ?? true) { + return; + } + String params = router!.substring(router.indexOf("?")+1); Map map = jsonDecode(params); - Navigator.of(context).popAndPushNamed(widget.activityPos.jumpUrl.substring(0,widget.activityPos.jumpUrl.indexOf("?")), arguments: map); + Navigator.of(context).popAndPushNamed(router.substring(0,router.indexOf("?")), arguments: map); break; } } diff --git a/lib/view_widget/badge_attainment_dialog.dart b/lib/view_widget/badge_attainment_dialog.dart index 4bca4f64..a5b96182 100644 --- a/lib/view_widget/badge_attainment_dialog.dart +++ b/lib/view_widget/badge_attainment_dialog.dart @@ -1,10 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'custom_image.dart'; import 'my_appbar.dart'; diff --git a/lib/view_widget/border_text.dart b/lib/view_widget/border_text.dart index 536d1788..63be90bf 100644 --- a/lib/view_widget/border_text.dart +++ b/lib/view_widget/border_text.dart @@ -11,13 +11,14 @@ class BorderText extends StatelessWidget { final EdgeInsetsGeometry padding; BorderText( - {Key key, this.text, + {Key? key, + required this.text, this.textColor = Colors.black, this.fontSize = 10, this.borderWidth = 2, this.borderColor = Colors.white, this.radius = 2, - this.padding, + required this.padding, this.fontWeight = FontWeight.normal}); @override @@ -26,8 +27,14 @@ class BorderText extends StatelessWidget { padding: padding, alignment: Alignment.center, decoration: BoxDecoration( - border: Border.all(color: borderColor, width: borderWidth), - borderRadius: BorderRadius.all(Radius.circular(radius))), + border: Border.all( + color: borderColor, + width: borderWidth, + ), + borderRadius: BorderRadius.all( + Radius.circular(radius), + ), + ), child: Text( text, style: TextStyle( diff --git a/lib/view_widget/channel_dialog.dart b/lib/view_widget/channel_dialog.dart index 9b235dd9..38f92e1f 100644 --- a/lib/view_widget/channel_dialog.dart +++ b/lib/view_widget/channel_dialog.dart @@ -7,45 +7,44 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import '../retrofit/data/base_data.dart'; -import '../retrofit/data/channels_list.dart'; +import '../data/base_data.dart'; +import '../data/channels.dart'; import '../retrofit/retrofit_api.dart'; class ChannelDialog extends StatefulWidget { - @override State createState() { return _ChannelDialog(); } - } class _ChannelDialog extends State { - ApiService apiService; - ChannelsList channelsList; + late ApiService apiService; + Channels? channelsList; int channelIndex = 0; @override void initState() { super.initState(); - EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); queryChannels(); } - queryChannels() async{ + queryChannels() async { apiService = ApiService(Dio(), context: context); - BaseData baseData = await apiService.appChannels().catchError((error) { + BaseData baseData = + await apiService.appChannels().catchError((error) { print(error.message); SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), alignment: Alignment.center); }); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { channelsList = baseData.data; - setState((){}); + setState(() {}); EasyLoading.dismiss(); } else { - if (baseData?.msg != null) - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center); } } @@ -67,15 +66,14 @@ class _ChannelDialog extends State { decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8.w), - gradient:LinearGradient( - colors:[ + gradient: LinearGradient( + colors: [ Color(0xFFDFFFED), Color(0xFFFFFFFF), ], begin: Alignment.topLeft, end: Alignment.bottomLeft, - ) - ), + )), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -84,93 +82,105 @@ class _ChannelDialog extends State { children: [ Row( children: [ - SizedBox(width: 11.w,), + SizedBox( + width: 11.w, + ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( "assets/image/channel_text.webp", width: 138.w, - height:24.h, + height: 24.h, fit: BoxFit.fill, ), - Padding(padding: EdgeInsets.only(top: 11.h),child: Text( - "您是通过什么途径注册的呢?", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF353535), + Padding( + padding: EdgeInsets.only(top: 11.h), + child: Text( + "您是通过什么途径注册的呢?", + style: TextStyle( + fontSize: 15.sp, + fontWeight: MyFontWeight.bold, + color: Color(0xFF353535), + ), ), - ),), + ), ], ), Spacer(), Image.asset( "assets/image/channel_logo.webp", width: 89.w, - height:93.h, + height: 93.h, fit: BoxFit.fill, ), - SizedBox(width: 24.w,) + SizedBox( + width: 24.w, + ) ], ), Container( - margin: EdgeInsets.only(top: 24.h,right: 113.w), - child:Image.asset( + margin: EdgeInsets.only(top: 24.h, right: 113.w), + child: Image.asset( "assets/image/channel_jt.webp", width: 62.w, - height:15.h, + height: 15.h, fit: BoxFit.fill, ), ), ], ), ConstrainedBox( - constraints: BoxConstraints( - maxHeight:260.h), + constraints: BoxConstraints(maxHeight: 260.h), child: Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8.w), ), - margin: EdgeInsets.only(left:12.w,right: 12.w,bottom: 19.h), - child:ListView.builder( - padding: EdgeInsets.only(top: 16.h), - itemCount: (channelsList != null && (channelsList?.channels?.length ?? 0) > 0) ? channelsList.channels.length : 0, - shrinkWrap: true, - physics: BouncingScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - channelIndex = position; - }); - }, - child: channelItem(position), - ); - }), + margin: EdgeInsets.only( + left: 12.w, right: 12.w, bottom: 19.h, + ), + child: ListView.builder( + padding: EdgeInsets.only(top: 16.h), + itemCount: channelsList?.channel?.length ?? 0, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + String str = channelsList!.channel![position]; + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + channelIndex = position; + }); + }, + child: channelItem(str, position), + ); + }, + ), ), ), - if(channelsList != null && (channelsList.channels.length) > 0) - Align( - alignment:Alignment.center, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pop(); - }, - child: Text( - "我选好了", - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF32A060), + if (channelsList?.channel?.isNotEmpty ?? false) + Align( + alignment: Alignment.center, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + Navigator.of(context).pop(); + }, + child: Text( + "我选好了", + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.bold, + color: Color(0xFF32A060), + ), ), ), ), - ), - SizedBox(height: 16.h,) + SizedBox( + height: 16.h, + ) ], ), ) @@ -181,19 +191,25 @@ class _ChannelDialog extends State { ); } - Widget channelItem(index){ + Widget channelItem(String str, int index) { return Container( - padding: EdgeInsets.only(left:14.w,right: 14.w,bottom: 18.h), + padding: EdgeInsets.only( + left: 14.w, right: 14.w, bottom: 18.h, + ), child: Row( children: [ - Expanded(child: Text( - channelsList.channels[index], - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.bold, - color: channelIndex == index ? Color(0xFF32A060):Color(0xFF353535), + Expanded( + child: Text( + str, + style: TextStyle( + fontSize: 15.sp, + fontWeight: MyFontWeight.bold, + color: channelIndex == index + ? Color(0xFF32A060) + : Color(0xFF353535), + ), ), - )), + ), Image.asset( channelIndex == index ? "assets/image/icon_radio_selected.webp" diff --git a/lib/view_widget/classic_header.dart b/lib/view_widget/classic_header.dart index f61494e4..7e99d20e 100644 --- a/lib/view_widget/classic_header.dart +++ b/lib/view_widget/classic_header.dart @@ -11,7 +11,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:rive/rive.dart'; class MyHeader extends StatelessWidget { - final Color color; + final Color? color; MyHeader({this.color}); @override @@ -25,11 +25,11 @@ class MyHeader extends StatelessWidget { idleText: S.of(context).xialashuaxin, iconPos: IconPosition.left, completeTextStyle: TextStyle( - color:color?? Color(0xFF32A060), + color:color ?? Color(0xFF32A060), ), completeIcon: Icon( Icons.done, - color: color??Color(0xFF32A060), + color: color ?? Color(0xFF32A060), ), refreshingIcon: SpinKitCircle( color: Colors.grey, @@ -49,8 +49,8 @@ class CustomHeader extends RefreshIndicator { class _CustomHeader extends RefreshIndicatorState { FlareControls flareController = FlareControls(); - Artboard _riveArtboard; - RiveAnimationController _controllerIdle; + late Artboard _riveArtboard; + late RiveAnimationController _controllerIdle; @override void initState() { @@ -58,12 +58,9 @@ class _CustomHeader extends RefreshIndicatorState { // rootBundle.load("assets/riv/finger_tapping.riv").then((value) async { rootBundle.load("assets/riv/runner_boy.riv").then((value) async { - final riveFile = RiveFile(); - riveFile.import(value); + final riveFile = RiveFile.import(value); final artboard = riveFile.mainArtboard; artboard.addController(_controllerIdle = SimpleAnimation("Animation")); - // artboard.addController(_controllerIdle = SimpleAnimation("Idle_1")); - setState(() { _riveArtboard = artboard; }); @@ -72,14 +69,12 @@ class _CustomHeader extends RefreshIndicatorState { @override Widget buildContent(BuildContext context, RefreshStatus mode) { - if (_controllerIdle != null) { - if (mode == RefreshStatus.idle) { - _controllerIdle.isActive = false; - } else { - _controllerIdle.isActive = true; - } + if (mode == RefreshStatus.idle) { + _controllerIdle.isActive = false; + } else { + _controllerIdle.isActive = true; } - + return Container( height: 50, child: Rive( @@ -92,14 +87,14 @@ class _CustomHeader extends RefreshIndicatorState { } class MyClassicHeader extends RefreshIndicator { - final OuterBuilder outerBuilder; - final String releaseText, + final OuterBuilder? outerBuilder; + final String? releaseText, idleText, refreshingText, completeText, failedText, canTwoLevelText; - final Widget releaseIcon, + final Widget? releaseIcon, idleIcon, refreshingIcon, completeIcon, @@ -115,7 +110,6 @@ class MyClassicHeader extends RefreshIndicator { final TextStyle completeTextStyle; const MyClassicHeader({ - Key key, RefreshStyle refreshStyle: RefreshStyle.Follow, double height: 75.0, Duration completeDuration: const Duration(milliseconds: 600), @@ -138,11 +132,10 @@ class MyClassicHeader extends RefreshIndicator { this.idleIcon = const Icon(Icons.arrow_downward, color: Colors.grey), this.releaseIcon = const Icon(Icons.refresh, color: Colors.grey), }) : super( - key: key, - refreshStyle: refreshStyle, - completeDuration: completeDuration, - height: height, - ); + refreshStyle: refreshStyle, + completeDuration: completeDuration, + height: height, + ); @override State createState() { @@ -157,49 +150,48 @@ class _ClassicHeaderState extends RefreshIndicatorState { EnRefreshString(); return Text( mode == RefreshStatus.canRefresh - ? widget.releaseText ?? strings.canRefreshText + ? (widget.releaseText ?? strings.canRefreshText ?? "") : mode == RefreshStatus.completed - ? widget.completeText ?? strings.refreshCompleteText - : mode == RefreshStatus.failed - ? widget.failedText ?? strings.refreshFailedText - : mode == RefreshStatus.refreshing - ? widget.refreshingText ?? strings.refreshingText - : mode == RefreshStatus.idle - ? widget.idleText ?? strings.idleRefreshText - : mode == RefreshStatus.canTwoLevel - ? widget.canTwoLevelText ?? - strings.canTwoLevelText - : "", + ? (widget.completeText ?? strings.refreshCompleteText ?? "") + : mode == RefreshStatus.failed + ? (widget.failedText ?? strings.refreshFailedText ?? "") + : mode == RefreshStatus.refreshing + ? (widget.refreshingText ?? strings.refreshingText ?? "") + : mode == RefreshStatus.idle + ? (widget.idleText ?? strings.idleRefreshText ?? "") + : mode == RefreshStatus.canTwoLevel + ? (widget.canTwoLevelText ?? strings.canTwoLevelText ?? "") + : "", style: mode == RefreshStatus.completed ? widget.completeTextStyle : widget.textStyle); } Widget _buildIcon(mode) { - Widget icon = mode == RefreshStatus.canRefresh + Widget? icon = mode == RefreshStatus.canRefresh ? widget.releaseIcon : mode == RefreshStatus.idle - ? widget.idleIcon - : mode == RefreshStatus.completed - ? widget.completeIcon - : mode == RefreshStatus.failed - ? widget.failedIcon - : mode == RefreshStatus.canTwoLevel - ? widget.canTwoLevelIcon - : mode == RefreshStatus.canTwoLevel - ? widget.canTwoLevelIcon - : mode == RefreshStatus.refreshing - ? widget.refreshingIcon ?? - SizedBox( - width: 25.0, - height: 25.0, - child: defaultTargetPlatform == - TargetPlatform.iOS - ? const CupertinoActivityIndicator() - : const CircularProgressIndicator( - strokeWidth: 2.0), - ) - : widget.twoLevelView; + ? widget.idleIcon + : mode == RefreshStatus.completed + ? widget.completeIcon + : mode == RefreshStatus.failed + ? widget.failedIcon + : mode == RefreshStatus.canTwoLevel + ? widget.canTwoLevelIcon + : mode == RefreshStatus.canTwoLevel + ? widget.canTwoLevelIcon + : mode == RefreshStatus.refreshing + ? widget.refreshingIcon ?? + SizedBox( + width: 25.0, + height: 25.0, + child: defaultTargetPlatform == + TargetPlatform.iOS + ? const CupertinoActivityIndicator() + : const CircularProgressIndicator( + strokeWidth: 2.0), + ) + : widget.twoLevelView; return icon ?? Container(); } @@ -238,10 +230,10 @@ class _ClassicHeaderState extends RefreshIndicatorState { children: children, ),); return widget.outerBuilder != null - ? widget.outerBuilder(container) + ? widget.outerBuilder!(container) : Container( - child: Center(child: container), - height: widget.height, - ); + child: Center(child: container), + height: widget.height, + ); } } diff --git a/lib/view_widget/coupon_details_dialog.dart b/lib/view_widget/coupon_details_dialog.dart index 663ec786..9b09a866 100644 --- a/lib/view_widget/coupon_details_dialog.dart +++ b/lib/view_widget/coupon_details_dialog.dart @@ -1,18 +1,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/store.dart'; +import 'package:huixiang/data/coupon.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/border_text.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/round_button.dart'; class CouponDetailsWidget extends StatefulWidget { final Coupon coupon; + CouponDetailsWidget(this.coupon); + @override State createState() { return _CouponDetailsWidget(); @@ -26,7 +23,7 @@ class _CouponDetailsWidget extends State { Widget build(BuildContext context) { return Container( width: double.infinity, - height:355.h, + height: 355.h, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( @@ -35,63 +32,59 @@ class _CouponDetailsWidget extends State { ), ), child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - alignment: Alignment.center, - margin: EdgeInsets.symmetric(vertical: 12), - child: Text( - S.of(context).shiyongxiangqing, - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 15.sp, - color: Color(0xFF353535), - ), + physics: BouncingScrollPhysics(), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Container( + alignment: Alignment.center, + margin: EdgeInsets.symmetric(vertical: 12), + child: Text( + S.of(context).shiyongxiangqing, + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 15.sp, + color: Color(0xFF353535), ), - )), - GestureDetector( - onTap: () { - setState(() { - Navigator.of(context).pop(); - }); - }, - child: Icon( - Icons.clear, - color: Colors.black, - size: 18, - ), - ), - SizedBox(width: 14), - ], - ), - Container( - width: double.infinity, - height: 1.h, - color: Color(0xFFF2F2F2), - margin: EdgeInsets.only(bottom: 11.h), - ), - Container( - color: Colors.white, - margin: EdgeInsets.symmetric(horizontal: 12), - child: Html( - data: widget.coupon.remark ?? "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); + ), + )), + GestureDetector( + onTap: () { + setState(() { + Navigator.of(context).pop(); + }); }, + child: Icon( + Icons.clear, + color: Colors.black, + size: 18, + ), ), - }, + SizedBox(width: 14), + ], + ), + Container( + width: double.infinity, + height: 1.h, + color: Color(0xFFF2F2F2), + margin: EdgeInsets.only(bottom: 11.h), ), - ), - ]))); + Container( + color: Colors.white, + margin: EdgeInsets.symmetric(horizontal: 12), + child: Html( + data: widget.coupon.remark ?? "", + ), + ), + ], + ), + ), + ); } } diff --git a/lib/view_widget/coupon_widget.dart b/lib/view_widget/coupon_widget.dart index 5923cd1c..a7558b48 100644 --- a/lib/view_widget/coupon_widget.dart +++ b/lib/view_widget/coupon_widget.dart @@ -2,14 +2,14 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; +import 'package:huixiang/data/coupon.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/separator.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class CouponWidget extends StatelessWidget { - final GestureTapCallback callback; + final GestureTapCallback? callback; final Coupon coupon; CouponWidget(this.coupon, this.callback); @@ -73,11 +73,7 @@ class CouponWidget extends StatelessWidget { Container( margin: EdgeInsets.only(left: 20), child: MImage( - (coupon == null || - coupon.couponImg == null || - coupon.couponImg == "") - ? "" - : coupon.couponImg, + coupon.couponImg ?? "", ) // Image.network( // width: 60, @@ -201,13 +197,9 @@ class CouponWidget extends StatelessWidget { alignment: Alignment.centerLeft, child: Text( coupon.status == 0 - ? S - .of(context) - .faxingshijian(coupon.publishStartTime) + ? S.of(context).faxingshijian("${coupon.publishStartTime}") : coupon.status == 1 - ? S - .of(context) - .lingqushijian(coupon.receiveTime) + ? S.of(context).lingqushijian("${coupon.receiveTime}") : S.of(context).shiyongriqi, style: TextStyle( color: Color(0xFF727272), @@ -236,7 +228,10 @@ class CouponWidget extends StatelessWidget { backgroundColor: Colors.transparent, elevation: 0, shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(6))), + borderRadius: BorderRadius.all( + Radius.circular(6), + ), + ), children: [ Stack( alignment: Alignment.topCenter, @@ -245,7 +240,10 @@ class CouponWidget extends StatelessWidget { margin: EdgeInsets.only(top: 40), decoration: new BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(8))), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), + ), width: 218, height: 210, child: Column( @@ -257,13 +255,16 @@ class CouponWidget extends StatelessWidget { style: TextStyle( color: Color(0xff353535), fontSize: 16.sp, - fontWeight: FontWeight.bold), + fontWeight: FontWeight.bold, + ), ), ), Text( S.of(context).ninyichenggonglingquyouhuiquan, style: TextStyle( - color: Color(0xff353535), fontSize: 14.sp), + color: Color(0xff353535), + fontSize: 14.sp, + ), ), Row( mainAxisAlignment: MainAxisAlignment.center, @@ -274,14 +275,18 @@ class CouponWidget extends StatelessWidget { style: TextStyle( color: Color(0xffFF7A1A), fontSize: 14.sp, - fontWeight: FontWeight.bold), + fontWeight: FontWeight.bold, + ), ), - onTap: callback, + onTap: () { + callback?.call(); + }, ), Text( S.of(context).zhongchakan, style: TextStyle( - color: Color(0xff353535), fontSize: 14.sp), + color: Color(0xff353535), fontSize: 14.sp, + ), ), ], ), @@ -297,7 +302,8 @@ class CouponWidget extends StatelessWidget { Navigator.of(context).pop(); }, padding: EdgeInsets.only( - top: 2, bottom: 2, left: 8, right: 8), + top: 2, bottom: 2, left: 8, right: 8, + ), backgroup: Color(0xff32A060), ), ) @@ -311,7 +317,7 @@ class CouponWidget extends StatelessWidget { height: 80, ), ], - ) + ), ], ); }, diff --git a/lib/view_widget/cupertino_date_picker.dart b/lib/view_widget/cupertino_date_picker.dart index 95897df3..b21c65a8 100644 --- a/lib/view_widget/cupertino_date_picker.dart +++ b/lib/view_widget/cupertino_date_picker.dart @@ -5,13 +5,14 @@ import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; class CupertinoDatePickerWidget extends StatelessWidget { - final DateTime minimumDate; - final DateTime maximumDate; + final DateTime? minimumDate; + final DateTime? maximumDate; + DateTime dateTime = DateTime.now(); + CupertinoDatePickerWidget({this.minimumDate,this.maximumDate}); @override Widget build(BuildContext context) { - DateTime dateTime; return Container( height: 252, decoration: BoxDecoration( @@ -55,7 +56,8 @@ class CupertinoDatePickerWidget extends StatelessWidget { style: TextStyle( fontSize: 16, fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF32A060)), + color: Color(0xFF32A060), + ), ), margin: EdgeInsets.only(left: 6), padding: EdgeInsets.all(10), @@ -68,7 +70,8 @@ class CupertinoDatePickerWidget extends StatelessWidget { height: 2.h, color: Color(0xFFF4F4F4), ), - Expanded(child:Container( + Expanded( + child:Container( height: 200.h, child: CupertinoDatePicker( mode: CupertinoDatePickerMode.date, @@ -80,7 +83,8 @@ class CupertinoDatePickerWidget extends StatelessWidget { dateTime = data; }, ), - ),), + ), + ), ], ), ); diff --git a/lib/view_widget/custom_image.dart b/lib/view_widget/custom_image.dart index 7d0909ad..e956e785 100644 --- a/lib/view_widget/custom_image.dart +++ b/lib/view_widget/custom_image.dart @@ -10,8 +10,8 @@ class MImage extends StatelessWidget { final String fadeSrc; final BorderRadius radius; final double aspectRatio; - double width; - double height; + double? width; + double? height; final BoxFit fit; final bool isCircle; final bool noCompress;//不压缩图片 @@ -19,41 +19,65 @@ class MImage extends StatelessWidget { double scaleIndex = 2.5; MImage( - this.src, { - this.errorSrc = "assets/image/default_2_1.webp", - this.fadeSrc = "assets/image/default_2_1.webp", - this.aspectRatio, - this.width, - this.height, - this.fit, - this.isCircle = false, + this.src, { + this.errorSrc = "assets/image/default_2_1.webp", + this.fadeSrc = "assets/image/default_2_1.webp", + this.aspectRatio = 1, + this.width, + this.height, + this.fit = BoxFit.cover, + this.isCircle = false, this.noCompress = false, - this.radius = BorderRadius.zero, - }); + this.radius = BorderRadius.zero, + }); File fileFromDocsDir(String filename) { String pathName = p.join(ImgCachePath.instance.path, filename); return File(pathName); } + double getImageWidth(context, double widgetWidth) { + double width = MediaQuery.of(context).size.width; + if (widgetWidth < (width / 3)) { + return 300; + } else if (widgetWidth < (width / 2)) { + return 700; + } else { + return width; + } + } + + double getImageHeiget(context, double widgetHeiget) { + double height = MediaQuery.of(context).size.height; + if (widgetHeiget < (height / 3)) { + return 600; + } else if (widgetHeiget < (height / 2)) { + return 1400; + } else { + return height; + } + } + @override Widget build(BuildContext context) { Widget image = LayoutBuilder( builder: (context, constraints) { - String imageUrl = ""; + String? imageUrl = ""; ///压缩图片 // if (src != null && src != "" && src.startsWith("http")) { - // String oper = src.contains("?") ? "" :"?"; - // imageUrl = - // "$src$oper/imageMogr2/thumbnail/${constraints.constrainWidth() * scaleIndex}" - // "x${constraints.constrainHeight() * scaleIndex}/format/webp/quality/100"; + // String oper = src.contains("?") ? "" :"?"; + // imageUrl = + // "$src$oper/imageMogr2/thumbnail/${constraints.constrainWidth() * scaleIndex}" + // "x${constraints.constrainHeight() * scaleIndex}/format/webp/quality/100"; // } - int _w = ((constraints.constrainWidth()==double.infinity? - MediaQuery.of(context).size.width:constraints.constrainWidth()) * scaleIndex).toInt(); - int _h = ((constraints.constrainHeight()==double.infinity? - MediaQuery.of(context).size.height:constraints.constrainHeight()) * scaleIndex).toInt(); + int _w = ((constraints.constrainWidth()==double.infinity + ? MediaQuery.of(context).size.width + : getImageWidth(context, constraints.constrainWidth())) * scaleIndex).toInt(); + int _h = ((constraints.constrainHeight()==double.infinity + ? MediaQuery.of(context).size.height + : getImageHeiget(context, constraints.constrainHeight())) * scaleIndex).toInt(); ///压缩图片 - if ((src??"").startsWith("http")) { + if (src.startsWith("http")) { if(noCompress) imageUrl = src; else @@ -64,46 +88,49 @@ class MImage extends StatelessWidget { // print("constrainWidth: ${constraints.constrainWidth()}"); // print("constrainHeight: ${constraints.constrainHeight()}"); - if (imageUrl == null || imageUrl == "") { + if (imageUrl?.isEmpty ?? true) { return Image.asset( "assets/image/default_2_1.webp", fit: fit, ); } - Widget cachedNetworkImage; - if (src.startsWith("http")) { - cachedNetworkImage = Image( - image: ResizeImage(NetworkToFileImage( - url: imageUrl, - file: fileFromDocsDir("resize"+(noCompress?"noCompress":"$_w$_h")+src.replaceAll("https:", "") - .replaceAll("http:", "") - .replaceAll("pos.upload.gznl.top", "") - .replaceAll("/", "")), - debug: true, - ), + Widget? cachedNetworkImage; + if (src.startsWith("http")) { + cachedNetworkImage = Image( + image: ResizeImage(NetworkToFileImage( + url: imageUrl, + file: fileFromDocsDir("resize${(noCompress?"noCompress":"$_w$_h")}${src.replaceAll("https:", "") + .replaceAll("http:", "") + .replaceAll("pos.upload.gznl.top", "") + .replaceAll("/", "")}"), + debug: true, + ), width: _w, height: _h), - errorBuilder: (context, error, stackTrace) { - return Image.asset( - errorSrc, - fit: fit, - ); - }, - fit: fit, - ); - } else if (src.startsWith("file")) { - cachedNetworkImage = Image.file( - File(src), - fit: fit, - errorBuilder: (context, error, stackTrace) { - return Image.asset( - errorSrc, - fit: fit, - ); - }, - ); - } - return cachedNetworkImage; + errorBuilder: (context, error, stackTrace) { + return Image.asset( + errorSrc, + fit: fit, + ); + }, + fit: fit, + ); + } else if (src.startsWith("file")) { + cachedNetworkImage = Image.file( + File(src), + fit: fit, + errorBuilder: (context, error, stackTrace) { + return Image.asset( + errorSrc, + fit: fit, + ); + }, + ); + } + return cachedNetworkImage ?? Image.asset( + "assets/image/default_2_1.webp", + fit: fit, + ); }, ); @@ -117,14 +144,16 @@ class MImage extends StatelessWidget { ); } if (aspectRatio != null && aspectRatio > 0) { - return Container( + return SizedBox( + width: width, + height: height, child: AspectRatio( aspectRatio: aspectRatio, child: clipRRect, ), ); } else { - return Container( + return SizedBox( width: width, height: height, child: clipRRect, diff --git a/lib/view_widget/explosion_effect_widget.dart b/lib/view_widget/explosion_effect_widget.dart index a0ef6da0..5025cf71 100644 --- a/lib/view_widget/explosion_effect_widget.dart +++ b/lib/view_widget/explosion_effect_widget.dart @@ -11,7 +11,7 @@ class ExplosionWidget extends StatefulWidget { final Rect bound; final String tag; - const ExplosionWidget({Key key, this.child, this.bound, this.tag}) + const ExplosionWidget({Key? key, required this.child, required this.bound, required this.tag}) : super(key: key); @override @@ -20,14 +20,13 @@ class ExplosionWidget extends StatefulWidget { } } -class _ExplosionWidget extends State - with SingleTickerProviderStateMixin { - ByteData _byteData; - Size _imageSize; +class _ExplosionWidget extends State with SingleTickerProviderStateMixin { + ByteData? _byteData; + Size? _imageSize; - AnimationController _animationController; + late AnimationController _animationController; - GlobalObjectKey globalKey; + late GlobalObjectKey globalKey; @override void initState() { @@ -44,24 +43,10 @@ class _ExplosionWidget extends State } void onTap() { - if (_byteData == null || _imageSize == null) { - RenderRepaintBoundary boundary = - globalKey.currentContext.findRenderObject(); - boundary.toImage().then((image) { - _imageSize = Size(image.width.toDouble(), image.height.toDouble()); - image.toByteData().then((byteData) { - _byteData = byteData; - _animationController.value = 0; - _animationController.forward(); - setState(() {}); - }); - }); - } else { - _animationController.value = 0; - _animationController.forward(); - setState(() {}); + _animationController.value = 0; + _animationController.forward(); + setState(() {}); } - } @override void didUpdateWidget(ExplosionWidget oldWidget) { @@ -97,17 +82,17 @@ class _ExplosionWidget extends State } class ExplosionRenderObjectWidget extends RepaintBoundary { - final ByteData byteData; - final Size imageSize; + final ByteData? byteData; + final Size? imageSize; final double progress; - final Rect bound; + final Rect? bound; const ExplosionRenderObjectWidget( - {Key key, - Widget child, + {Key? key, + required Widget child, this.byteData, this.imageSize, - this.progress, + required this.progress, this.bound}) : super(key: key, child: child); @@ -117,24 +102,22 @@ class ExplosionRenderObjectWidget extends RepaintBoundary { byteData: byteData, imageSize: imageSize, bound: bound); @override - void updateRenderObject( - BuildContext context, _ExplosionRenderObject renderObject) { + void updateRenderObject(BuildContext context, _ExplosionRenderObject renderObject) { renderObject.update(byteData, imageSize, progress); } } class _ExplosionRenderObject extends RenderRepaintBoundary { - ByteData byteData; - Size imageSize; - double progress; - List<_Particle> particles; - Rect bound; + ByteData? byteData; + Size? imageSize; + double? progress; + List<_Particle>? particles; + Rect? bound; - _ExplosionRenderObject( - {this.byteData, this.imageSize, this.bound, RenderBox child}) + _ExplosionRenderObject({this.byteData, this.imageSize, this.bound, RenderBox? child}) : super(child: child); - void update(ByteData byteData, Size imageSize, double progress) { + void update(ByteData? byteData, Size? imageSize, double progress) { this.byteData = byteData; this.imageSize = imageSize; this.progress = progress; @@ -143,20 +126,12 @@ class _ExplosionRenderObject extends RenderRepaintBoundary { @override void paint(PaintingContext context, Offset offset) { - if (byteData != null && - imageSize != null && - progress != 0 && + if (progress != 0 && progress != 1) { - if (particles == null) { - if (bound == null) { - bound = Rect.fromLTWH(0, 0, size.width, size.height * 2); - } - particles = initParticleList(bound, byteData, imageSize); - } draw(context.canvas, particles, progress); } else { if (child != null) { - context.paintChild(child, offset); + context.paintChild(child!, offset); } } } @@ -171,7 +146,8 @@ const double W = 1; List<_Particle> initParticleList( Rect bound, ByteData byteData, Size imageSize) { int partLen = 15; - List<_Particle> particles = List(partLen * partLen); + List<_Particle> particles = <_Particle>[]; + particles.length = partLen * partLen; Math.Random random = new Math.Random(DateTime.now().millisecondsSinceEpoch); int w = imageSize.width ~/ (partLen + 2); int h = imageSize.height ~/ (partLen + 2); @@ -187,11 +163,12 @@ List<_Particle> initParticleList( return particles; } -bool draw(Canvas canvas, List<_Particle> particles, double progress) { +bool draw(Canvas canvas, List<_Particle>? particles, double? progress) { Paint paint = Paint(); - for (int i = 0; i < particles.length; i++) { - _Particle particle = particles[i]; - particle.advance(progress); + + for (int i = 0; i < (particles?.length ?? 0); i++) { + _Particle particle = particles![i]; + particle.advance(progress ?? 0); if (particle.alpha > 0) { paint.color = particle.color .withAlpha((particle.color.alpha * particle.alpha).toInt()); @@ -238,20 +215,20 @@ _Particle generateParticle(Color color, Math.Random random, Rect bound) { } class _Particle { - double alpha; - Color color; - double cx; - double cy; - double radius; - double baseCx; - double baseCy; - double baseRadius; - double top; - double bottom; - double mag; - double neg; - double life; - double overflow; + late double alpha; + late Color color; + late double cx; + late double cy; + late double radius; + late double baseCx; + late double baseCy; + late double baseRadius; + late double top; + late double bottom; + late double mag; + late double neg; + late double life; + late double overflow; void advance(double factor) { double f = 0; diff --git a/lib/view_widget/hot_item.dart b/lib/view_widget/hot_item.dart index 2397d28b..7e308e66 100644 --- a/lib/view_widget/hot_item.dart +++ b/lib/view_widget/hot_item.dart @@ -1,10 +1,9 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -17,7 +16,7 @@ class HotArticleItem extends StatefulWidget { final Article article; final bool isHot; - HotArticleItem({this.article, this.isHot}); + HotArticleItem({required this.article, required this.isHot}); @override State createState() { return _HotArticleItem(); @@ -25,21 +24,21 @@ class HotArticleItem extends StatefulWidget { } class _HotArticleItem extends State { - ApiService apiService; + ApiService? apiService; @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) => { - apiService = ApiService(Dio(), context: context, token: value.getString("token")), + apiService = ApiService(Dio(), context: context, token: value.getString("token") ?? ""), }); } ///关注/取关会员 _vipFollow(followId) async { - BaseData baseData = await apiService.follow(followId).catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.follow(followId).catchError((onError) {}); + if (baseData?.isSuccess ?? false) { SmartDialog.showToast("关注成功"); } } @@ -57,14 +56,14 @@ class _HotArticleItem extends State { click() async { await Navigator.of(context).pushNamed('/router/web_page', arguments: {"articleId": widget.article.id}); - widget.article.viewers = (widget.article.viewers + 1); + widget.article.viewers = ((widget.article.viewers ?? 0) + 1); setState(() {}); } Widget hotItem(BuildContext context) { return Container( - padding: EdgeInsets.all((widget.isHot == null || !widget.isHot) ? 4 : 0), + padding: EdgeInsets.all((!widget.isHot) ? 4 : 0), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -77,7 +76,7 @@ class _HotArticleItem extends State { ], borderRadius: BorderRadius.circular(4), ), - child: (widget.isHot == null || !widget.isHot) + child: (!widget.isHot) ? Column( children: [ // Row( @@ -170,19 +169,17 @@ class _HotArticleItem extends State { ), SizedBox(width: 12.w,), Expanded(child: Visibility( - visible: widget.article != null && - widget.article.coverImg != null && - widget.article.coverImg != "", + visible: widget.article.coverImg != "", child:Stack( alignment: Alignment.center, children: [ MImage( - widget.article?.coverImg ?? "", + widget.article.coverImg ?? "", fit: BoxFit.fill, height: double.infinity, ), Visibility( - visible: ((widget.article?.coverImg??"").endsWith(".mp4")), + visible: ((widget.article.coverImg??"").endsWith(".mp4")), child: Icon( Icons.play_circle_outline, size: 24, @@ -213,9 +210,9 @@ class _HotArticleItem extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - (widget.isHot == null || !widget.isHot) + (!widget.isHot) ? Text( - widget.article != null ? widget.article.mainTitle : "", + widget.article.mainTitle ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -240,9 +237,7 @@ class _HotArticleItem extends State { ), Expanded( child: Text( - widget.article != null - ? widget.article.mainTitle - : "", + widget.article.mainTitle ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -259,7 +254,7 @@ class _HotArticleItem extends State { height: 4.h, ), Text( - widget.article != null ? (widget.article.viceTitle ?? "") : "", + widget.article.viceTitle ?? "", maxLines: AppUtils.textScale(context) > 1.05 ? 1 : 2, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -280,11 +275,7 @@ class _HotArticleItem extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - // S.of(context).zuozhe(), - (widget.article != null && - widget.article.author != null) - ? widget.article.author.name - : "", + widget.article.author?.name ?? "", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.medium, @@ -369,8 +360,8 @@ class _HotArticleItem extends State { ), // if (widget.isHot != null && widget.isHot) IconText( - widget.article != null - ? (widget.article.createTime.split(" ")[0]) + widget.article.createTime != null + ? (widget.article.createTime!.split(" ")[0]) : "", textStyle: TextStyle( fontSize: 12.sp, @@ -395,9 +386,9 @@ class _HotArticleItem extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - (widget.isHot == null || !widget.isHot) + (!widget.isHot) ? Text( - widget.article != null ? widget.article.mainTitle : "", + widget.article.mainTitle ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -422,9 +413,7 @@ class _HotArticleItem extends State { ), Expanded( child: Text( - widget.article != null - ? widget.article.mainTitle - : "", + widget.article.mainTitle ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -544,15 +533,13 @@ class _HotArticleItem extends State { return [ Expanded( child: Visibility( - visible: widget.article != null && - widget.article.coverImg != null && - widget.article.coverImg != "", + visible: widget.article.coverImg != "", child: Stack( alignment: Alignment.center, children: [ Positioned( child: MImage( - widget.article != null ? widget.article.coverImg : "", + widget.article.coverImg ?? "", fit: BoxFit.cover, radius: BorderRadius.vertical(top: Radius.circular(4)), width: MediaQuery.of(context).size.width - 32.w, @@ -565,10 +552,8 @@ class _HotArticleItem extends State { ), Positioned( child: Visibility( - visible: (widget.article != null && - widget.article.coverImg != null && - widget.article.coverImg != "" && - widget.article.coverImg.endsWith(".mp4")), + visible: (widget.article.coverImg != "" && + widget.article.coverImg!.endsWith(".mp4")), child: Center( child: Icon( Icons.play_circle_outline, diff --git a/lib/view_widget/icon_text.dart b/lib/view_widget/icon_text.dart index 342f8151..ff4b4f3a 100644 --- a/lib/view_widget/icon_text.dart +++ b/lib/view_widget/icon_text.dart @@ -1,16 +1,14 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'custom_image.dart'; class IconText extends StatelessWidget { - final String leftImage; - final String rightImage; - final IconData leftIcon; - final IconData rightIcon; + final String? leftImage; + final String? rightImage; + final IconData? leftIcon; + final IconData? rightIcon; final String text; - final TextStyle textStyle; + final TextStyle? textStyle; final double iconSize; final double space; final Color iconColor; @@ -35,41 +33,18 @@ class IconText extends StatelessWidget { @override Widget build(BuildContext context) { var widgets = []; - if (leftIcon != null || (leftImage != null && leftImage != "")) { - if (leftIcon != null) { - widgets.add( - Padding( - padding: EdgeInsets.only(left: 2.w), - child: Icon( - leftIcon, - size: iconSize, - color: iconColor, - ), - ), - ); - } else if (leftImage != null && leftImage != "") { - widgets.add(Padding( + if (leftIcon != null || (leftImage != "")) { + widgets.add( + Padding( padding: EdgeInsets.only(left: 2.w), - child: leftImage.startsWith("http") - ? MImage( - leftImage, - width: iconSize, - height: iconSize, - ) - : (leftImage.endsWith(".svg") - ? SvgPicture.asset( - leftImage, - width: iconSize, - height: iconSize, - ) - : Image.asset( - leftImage, - width: iconSize, - height: iconSize, - )), - )); - } - } + child: Icon( + leftIcon, + size: iconSize, + color: iconColor, + ), + ), + ); + } widgets.add(SizedBox( width: space, @@ -97,43 +72,18 @@ class IconText extends StatelessWidget { width: space, )); - if (rightIcon != null || rightImage != null && rightImage != "") { - if (rightIcon != null) { - widgets.add( - Padding( - padding: EdgeInsets.only(left: 2.w), - child: Icon( - rightIcon, - size: iconSize, - color: iconColor, - ), - ), - ); - } else if (rightImage != null && rightImage != "") { - widgets.add( - Padding( - padding: EdgeInsets.only(left: 2.w), - child: rightImage.startsWith("http") - ? Image.network( - rightImage, - width: iconSize, - height: iconSize, - ) - : (rightImage.endsWith(".svg") - ? SvgPicture.asset( - rightImage, - width: iconSize, - height: iconSize, - ) - : Image.asset( - rightImage, - width: iconSize, - height: iconSize, - )), + if (rightIcon != null || rightImage != "") { + widgets.add( + Padding( + padding: EdgeInsets.only(left: 2.w), + child: Icon( + rightIcon, + size: iconSize, + color: iconColor, ), - ); - } - } + ), + ); + } return Container( child: Row( mainAxisAlignment: diff --git a/lib/view_widget/invite_success_dialog.dart b/lib/view_widget/invite_success_dialog.dart index c5736525..918bbc5f 100644 --- a/lib/view_widget/invite_success_dialog.dart +++ b/lib/view_widget/invite_success_dialog.dart @@ -1,23 +1,20 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/login_info.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/data/login_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/round_button.dart'; class InviteSuccessDialog extends StatefulWidget { final String invite; - final InterviewCouponList interviewCouponList; + final InterviewCouponList? interviewCouponList; - InviteSuccessDialog(this.invite,this.interviewCouponList); + InviteSuccessDialog(this.invite, this.interviewCouponList); @override State createState() { return _InviteSuccessDialog(); } - } class _InviteSuccessDialog extends State { @@ -31,88 +28,100 @@ class _InviteSuccessDialog extends State { borderRadius: BorderRadius.circular(6), ), children: [ - Column(children: [ - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w), - ), - padding: EdgeInsets.only(top:20.h,left: 12,right: 12), - margin: EdgeInsets.only(left:60.w,right:60.w), - child: Container( - padding: EdgeInsets.symmetric(vertical: 10.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/yq.webp", - width: 61, - height: 65, - ), - SizedBox(height: 9.h,), - Text( - S.of(context).yaoqingwancheng, - style: TextStyle( - color: Color(0xFF353535), - fontSize: 16.sp, - fontWeight: MyFontWeight.medium, + Column( + children: [ + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8.w), + ), + padding: EdgeInsets.only(top: 20.h, left: 12, right: 12), + margin: EdgeInsets.only(left: 60.w, right: 60.w), + child: Container( + padding: EdgeInsets.symmetric(vertical: 10.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/image/yq.webp", + width: 61, + height: 65, ), - ), - SizedBox(height: 6.h), - RichText( - textAlign: TextAlign.center, - text: TextSpan( - text: - "通过${widget.invite}的邀请码完成邀请,获得", + SizedBox( + height: 9.h, + ), + Text( + S.of(context).yaoqingwancheng, style: TextStyle( - color: Color(0xFF1A1A1A), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - height: 1.5.h), - children: [ - TextSpan( - text:"${widget.interviewCouponList.storeName}${widget.interviewCouponList.couponName} * ${widget.interviewCouponList.bizType}张", - style: TextStyle(color: Color(0xFF32A060),fontSize: 14.sp,fontWeight: MyFontWeight.regular), - ), - ] - ),), - SizedBox(height: 13,), - GestureDetector( - onTap: (){ - setState(() { - Navigator.of(context).pop(); - }); - }, - child:RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - width: 130.w, - height: 34.h, - padding: EdgeInsets.symmetric(vertical: 6.h), - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, - backgroup: Color(0xFF32A060), - radius: 4.w, + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox(height: 6.h), + RichText( + textAlign: TextAlign.center, + text: TextSpan( + text: "通过${widget.invite}的邀请码完成邀请,获得", + style: TextStyle( + color: Color(0xFF1A1A1A), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + height: 1.5.h), + children: [ + TextSpan( + text: + "${widget.interviewCouponList?.storeName}${widget.interviewCouponList?.couponName} * ${widget.interviewCouponList?.bizType}张", + style: TextStyle( + color: Color(0xFF32A060), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ]), ), - ), - SizedBox(height:20), - ], + SizedBox( + height: 13, + ), + GestureDetector( + onTap: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + child: RoundButton( + text: S.of(context).queren, + textColor: Colors.white, + width: 130.w, + height: 34.h, + padding: EdgeInsets.symmetric(vertical: 6.h), + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + backgroup: Color(0xFF32A060), + radius: 4.w, + ), + ), + SizedBox(height: 20), + ], + ), ), ), - ), - SizedBox(height:35), - GestureDetector(onTap: (){ - setState(() { - Navigator.of(context).pop(); - }); - },child:Image.asset( - "assets/image/yq_qx.webp", - width: 34, - height: 34, - ),) - - ],), + SizedBox(height: 35), + GestureDetector( + onTap: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + child: Image.asset( + "assets/image/yq_qx.webp", + width: 34, + height: 34, + ), + ), + ], + ), ], ); } diff --git a/lib/view_widget/item_input_widget.dart b/lib/view_widget/item_input_widget.dart index a5e15006..ed824637 100644 --- a/lib/view_widget/item_input_widget.dart +++ b/lib/view_widget/item_input_widget.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; import 'package:huixiang/utils/font_weight.dart'; class ItemInputWidget extends StatelessWidget { @@ -12,24 +11,24 @@ class ItemInputWidget extends StatelessWidget { final int inputState; - final TextEditingController controller; + final TextEditingController? controller; - final Function(String value) onChanged; - final Function() onTap; - final double discount; + final Function(String value)? onChanged; + final Function()? onTap; + final double? discount; final int inputLimit; final bool isShowBtn; final int btnState; - final String btnText; + final String? btnText; final String errorText; final Color errorTextColor; final Color titleColor; final double radius; final EdgeInsets padding; final TextInputType textInputType; - final TextInputFormatter textInputFormatter; + final TextInputFormatter? textInputFormatter; ItemInputWidget( this.title, { @@ -43,7 +42,7 @@ class ItemInputWidget extends StatelessWidget { this.radius = 4, this.onTap, this.discount, - this.textInputType, + required this.textInputType, this.errorText = "", this.errorTextColor = const Color(0xFFFF441A), this.titleColor = Colors.black, @@ -170,9 +169,11 @@ class ItemInputWidget extends StatelessWidget { ), ), textInputAction: TextInputAction.next, - inputFormatters: [ + inputFormatters: textInputFormatter != null ? [ + LengthLimitingTextInputFormatter(inputLimit), + textInputFormatter!, + ] : [ LengthLimitingTextInputFormatter(inputLimit), - textInputFormatter ], cursorColor: Colors.grey, maxLines: 1, @@ -183,7 +184,7 @@ class ItemInputWidget extends StatelessWidget { ), ), Offstage( - offstage: errorText == null || errorText == "", + offstage: errorText == "", child: Text( errorText ?? "", style: TextStyle( diff --git a/lib/view_widget/item_title.dart b/lib/view_widget/item_title.dart index 8ac81083..de982dbe 100644 --- a/lib/view_widget/item_title.dart +++ b/lib/view_widget/item_title.dart @@ -1,20 +1,20 @@ -import 'dart:ui'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ItemTitle extends StatelessWidget { final String text; - final String imgPath; + final String? imgPath; final int moreType; final String moreText; - final List> items; + final List>? items; + + final GestureTapCallback? onTap; + final Function(String)? onChanged; ItemTitle({ - this.text, + required this.text, this.imgPath = "", this.moreText = "", this.moreType = 0, @@ -54,7 +54,7 @@ class ItemTitle extends StatelessWidget { ), if(imgPath != "") Image.asset( - imgPath, + imgPath!, width: 24.w, height: 24.h, ), @@ -66,9 +66,6 @@ class ItemTitle extends StatelessWidget { ); } - final GestureTapCallback onTap; - final Function(String) onChanged; - Widget buildMore() { return moreType == 0 ? GestureDetector( @@ -116,7 +113,11 @@ class ItemTitle extends StatelessWidget { child: DropdownButton( items: items, value: moreText, - onChanged: onChanged, + onChanged: (String? value) { + if (value?.isNotEmpty ?? false) { + onChanged?.call(value!); + } + }, underline: Container(color: Colors.transparent), ), ); diff --git a/lib/view_widget/keyboard/custom_keyboard_button.dart b/lib/view_widget/keyboard/custom_keyboard_button.dart index 61d79e01..788f041f 100644 --- a/lib/view_widget/keyboard/custom_keyboard_button.dart +++ b/lib/view_widget/keyboard/custom_keyboard_button.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; class CustomKbBtn extends StatefulWidget { final String text; - CustomKbBtn({Key key, this.text, this.callback}) : super(key: key); + CustomKbBtn({Key? key, required this.text, this.callback}) : super(key: key); final callback; @override diff --git a/lib/view_widget/keyboard/custom_password_field_widget.dart b/lib/view_widget/keyboard/custom_password_field_widget.dart index 06728d37..4decb06d 100644 --- a/lib/view_widget/keyboard/custom_password_field_widget.dart +++ b/lib/view_widget/keyboard/custom_password_field_widget.dart @@ -1,5 +1,3 @@ -import 'dart:ui'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'dart:math'; diff --git a/lib/view_widget/location_tips.dart b/lib/view_widget/location_tips.dart index 726b94ad..f48abfa7 100644 --- a/lib/view_widget/location_tips.dart +++ b/lib/view_widget/location_tips.dart @@ -1,15 +1,10 @@ -import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/activity_pos.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:permission_handler/permission_handler.dart'; -import '../retrofit/data/login_info.dart'; import '../utils/font_weight.dart'; -import 'custom_image.dart'; -import 'new_people_reward.dart'; class LocationTips extends StatefulWidget { final Function disMissLocationTips; diff --git a/lib/view_widget/login_tips.dart b/lib/view_widget/login_tips.dart index 8cd8a292..1609fe36 100644 --- a/lib/view_widget/login_tips.dart +++ b/lib/view_widget/login_tips.dart @@ -1,4 +1,3 @@ -import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -8,7 +7,7 @@ import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/round_button.dart'; class LoginTips extends StatelessWidget { - final Function click; + final Function? click; LoginTips({this.click}); @@ -95,7 +94,7 @@ class LoginTips extends StatelessWidget { Expanded( child: InkWell( onTap: () { - click(); + click?.call(); SmartDialog.dismiss(); }, child: RoundButton( diff --git a/lib/view_widget/login_tips_dialog.dart b/lib/view_widget/login_tips_dialog.dart index 2dde3f6a..772e0192 100644 --- a/lib/view_widget/login_tips_dialog.dart +++ b/lib/view_widget/login_tips_dialog.dart @@ -5,16 +5,24 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'login_tips.dart'; class LoginTipsDialog { - static LoginTipsDialog _instance; - factory LoginTipsDialog() { - if (_instance == null) { - _instance = LoginTipsDialog._internal(); - } - return _instance; + LoginTipsDialog._internal(); + + factory LoginTipsDialog() => _getInstance(); + + // instance的getter方法,singletonManager.instance获取对象 + static LoginTipsDialog get instance => _getInstance(); + + // 静态变量_instance,存储唯一对象 + static LoginTipsDialog? _instance; + + + // 获取对象 + static LoginTipsDialog _getInstance() { + _instance ??= LoginTipsDialog._internal(); + return _instance!; } - LoginTipsDialog._internal(); bool isShow = false; diff --git a/lib/view_widget/mine_vip_entry.dart b/lib/view_widget/mine_vip_entry.dart index f931d0de..d59b878e 100644 --- a/lib/view_widget/mine_vip_entry.dart +++ b/lib/view_widget/mine_vip_entry.dart @@ -2,8 +2,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/retrofit/data/rank.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/rank.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -14,10 +14,10 @@ class MineVipEntry extends StatelessWidget { final int rankMax; final int rank; final String createTime; - final String tag; + final String? tag; final double padding; - final UserInfo userInfo; - final List ranks; + final UserInfo? userInfo; + final List? ranks; MineVipEntry( {this.vipLevel = 1, @@ -38,12 +38,9 @@ class MineVipEntry extends StatelessWidget { @override Widget build(BuildContext context) { - if (userInfo != null && - userInfo.memberRankVo != null && - ranks != null && - ranks.length > 0) { - curLevel = (ranks - .indexWhere((element) => element.id == userInfo.memberRankVo.id) + + if ((ranks?.length ?? 0) > 0) { + curLevel = (ranks!.indexWhere( + (element) => element.id == userInfo?.memberRankVo?.id) + 1); vipLevel = curLevel; } @@ -58,63 +55,63 @@ class MineVipEntry extends StatelessWidget { switch (vipLevel) { case 2: { - levelText = ranks[1].rankName; + levelText = ranks?[1].rankName ?? "普卡用户"; logoColor = Color(int.parse( - (ranks[1].textColor ?? "").replaceAll("#", "FF"), + (ranks?[1].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextColor = Color(int.parse( - (ranks[1].textColor ?? "").replaceAll("#", "FF"), + (ranks?[1].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextBackdrop = Color(int.parse( - (ranks[1].color ?? "").replaceAll("#", "FF"), + (ranks?[1].color ?? "").replaceAll("#", "FF"), radix: 16)); break; } case 3: { - levelText = ranks[2].rankName; + levelText = ranks?[2].rankName ?? "普卡用户"; logoColor = Color(int.parse( - (ranks[2].textColor ?? "").replaceAll("#", "FF"), + (ranks?[2].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextColor = Color(int.parse( - (ranks[2].textColor ?? "").replaceAll("#", "FF"), + (ranks?[2].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextBackdrop = Color(int.parse( - (ranks[2].color ?? "").replaceAll("#", "FF"), + (ranks?[2].color ?? "").replaceAll("#", "FF"), radix: 16)); break; } case 4: { - levelText = ranks[3].rankName; + levelText = ranks?[3].rankName ?? "普卡用户"; logoColor = Color(int.parse( - (ranks[3].textColor ?? "").replaceAll("#", "FF"), + (ranks?[3].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextColor = Color(int.parse( - (ranks[3].textColor ?? "").replaceAll("#", "FF"), + (ranks?[3].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextBackdrop = Color(int.parse( - (ranks[3].color ?? "").replaceAll("#", "FF"), + (ranks?[3].color ?? "").replaceAll("#", "FF"), radix: 16)); break; } case 5: { - levelText = ranks[4].rankName; + levelText = ranks?[4].rankName ?? "普卡用户"; logoColor = Color(int.parse( - (ranks[4].textColor ?? "").replaceAll("#", "FF"), + (ranks?[4].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextColor = Color(int.parse( - (ranks[4].textColor ?? "").replaceAll("#", "FF"), + (ranks?[4].textColor ?? "").replaceAll("#", "FF"), radix: 16)); levelTextBackdrop = Color(int.parse( - (ranks[4].color ?? "").replaceAll("#", "FF"), + (ranks?[4].color ?? "").replaceAll("#", "FF"), radix: 16)); break; } } - Widget widget = userInfo.memberRankVo.rankName != null + Widget widget = userInfo?.memberRankVo?.rankName != null ? Container( height: 20.h, width: double.infinity, @@ -351,29 +348,26 @@ class MineVipEntry extends StatelessWidget { return GestureDetector( onTap: () { - if (userInfo != null) { - SharedPreferences.getInstance().then((value) { - if (value.getString("token") == null || - value.getString("token") == "") { - LoginTipsDialog().show(context); - return; - } - // Navigator.of(context) - // .pushNamed('/router/mine_vip_level_page', arguments: { - // "rankLevel": curLevel, - // "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", - // "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, - // }); - Navigator.of(context) - .pushNamed('/router/mine_vip_core', arguments: { - "rankLevel": curLevel, - "userInfo": userInfo, - "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", - "expendAmount": - double.tryParse(userInfo?.expendAmount ?? "0").toInt(), - }); + SharedPreferences.getInstance().then((value) { + if (value.getString("token") == null || + value.getString("token") == "") { + LoginTipsDialog().show(context); + return; + } + // Navigator.of(context) + // .pushNamed('/router/mine_vip_level_page', arguments: { + // "rankLevel": curLevel, + // "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", + // "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, + // }); + Navigator.of(context).pushNamed('/router/mine_vip_core', arguments: { + "rankLevel": curLevel, + "userInfo": userInfo, + "createTime": (userInfo != null) ? "${userInfo!.createTime}" : "", + "expendAmount": + double.tryParse(userInfo?.expendAmount ?? "0")?.toInt(), }); - } + }); }, child: widget, ); diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index 884b7ad0..869f365c 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/retrofit/data/rank.dart'; -import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/data/rank.dart'; +import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; @@ -14,26 +14,25 @@ class MineVipView extends StatelessWidget { final int rankMax; final int rank; final String createTime; - final String tag; + final String? tag; final double padding; - final UserInfo userInfo; - final List ranks; - final bool showRank; - final String price; + final UserInfo? userInfo; + final List? ranks; + final bool? showRank; + final String? price; - MineVipView({ - this.vipLevel = 1, - this.ranks, - this.tag, - this.userInfo, - this.padding = 16, - this.curLevel = 1, - this.rankMax = 0, - this.rank = 0, - this.createTime = "", - this.showRank, - this.price - }); + MineVipView( + {this.vipLevel = 1, + this.ranks, + this.tag, + this.userInfo, + this.padding = 16, + this.curLevel = 1, + this.rankMax = 0, + this.rank = 0, + this.createTime = "", + this.showRank, + this.price}); String topLeft = ""; String levelText = "普通用户"; @@ -47,11 +46,10 @@ class MineVipView extends StatelessWidget { Color levelColor = Color(0xFF558B87); Color textColor = Colors.white; - if (userInfo != null && - userInfo.memberRankVo != null && - ranks != null && - ranks.length > 0) { - curLevel = (ranks.indexWhere((element) => element.id == userInfo.memberRankVo.id) + 1); + if ((ranks?.length ?? 0) > 0) { + curLevel = (ranks!.indexWhere( + (element) => element.id == userInfo?.memberRankVo?.id) + + 1); vipLevel = curLevel; } @@ -133,9 +131,8 @@ class MineVipView extends StatelessWidget { begin: Alignment.topLeft, end: Alignment.bottomRight, ), - borderRadius: isUserVip - ? BorderRadius.circular(8) - : BorderRadius.circular(8), + borderRadius: + isUserVip ? BorderRadius.circular(8) : BorderRadius.circular(8), boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), @@ -223,7 +220,7 @@ class MineVipView extends StatelessWidget { style: TextStyle( color: textColor, fontWeight: MyFontWeight.semi_bold, - fontSize:22.sp, + fontSize: 22.sp, ), ), ), @@ -261,9 +258,15 @@ class MineVipView extends StatelessWidget { // rank > rankMax // ? S.of(context).dangqiandengji // : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}", - !(showRank??true)?"":((vipLevel < curLevel)?"":(((rank ?? 0) > rankMax || curLevel == 3 || curLevel ==2) - ? S.of(context).dangqiandengji - : "消费¥${rankMax - (rank ?? 0)}元 ${S.of(context).daoxiayidengji}")), + !(showRank ?? true) + ? "" + : ((vipLevel < curLevel) + ? "" + : (((rank ?? 0) > rankMax || + curLevel == 3 || + curLevel == 2) + ? S.of(context).dangqiandengji + : "消费¥${rankMax - (rank ?? 0)}元 ${S.of(context).daoxiayidengji}")), overflow: TextOverflow.ellipsis, style: TextStyle( color: textColor, @@ -277,23 +280,27 @@ class MineVipView extends StatelessWidget { TextSpan( children: [ TextSpan( - text: !(showRank??true)?(vipLevel == 3?"":rankMax.toString()):((vipLevel < curLevel)?rankMax.toString():rank.toString()), + text: !(showRank ?? true) + ? (vipLevel == 3 ? "" : rankMax.toString()) + : ((vipLevel < curLevel) + ? rankMax.toString() + : rank.toString()), style: TextStyle( fontSize: 20.sp, fontWeight: MyFontWeight.semi_bold, color: textColor, ), ), - if(vipLevel == 3 && !(showRank??true)) - TextSpan( - text: "¥${price??""}/永久" , - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: textColor, + if (vipLevel == 3 && !(showRank ?? true)) + TextSpan( + text: "¥${price ?? ""}/永久", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: textColor, + ), ), - ), - if ((rank ?? 0) <= rankMax && (showRank??true)) + if ((rank ?? 0) <= rankMax && (showRank ?? true)) TextSpan( text: rankMax > 0 ? "/$rankMax" : "/0", style: TextStyle( @@ -307,42 +314,46 @@ class MineVipView extends StatelessWidget { ), ], ), - if(vipLevel <= curLevel && (showRank??true)) - Container( - height: 8.h, - child: ClipRRect( - borderRadius: BorderRadius.circular(6.5), - child: LinearProgressIndicator( - value: rankMax > (rank ?? 0) ? ((vipLevel < curLevel) ? rankMax/rankMax: (rank ?? 0) / rankMax) : 0, - backgroundColor: Colors.white, - color: levelColor, + if (vipLevel <= curLevel && (showRank ?? true)) + Container( + height: 8.h, + child: ClipRRect( + borderRadius: BorderRadius.circular(6.5), + child: LinearProgressIndicator( + value: rankMax > (rank ?? 0) + ? ((vipLevel < curLevel) + ? rankMax / rankMax + : (rank ?? 0) / rankMax) + : 0, + backgroundColor: Colors.white, + color: levelColor, + ), ), ), - ), // if (isUserVip) - Expanded(child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).kaitongriqi( - (createTime != null && createTime != "") - ? createTime.split(" ")[0] - : "$createTime" + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).kaitongriqi((createTime != "") + ? createTime.split(" ")[0] + : "$createTime"), + style: TextStyle( + color: textColor, + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + ), ), - style: TextStyle( + Icon( + Icons.qr_code, + size: 24, color: textColor, - fontWeight: MyFontWeight.regular, - fontSize: 12.sp, ), - ), - Icon( - Icons.qr_code, - size: 24, - color:textColor, - ), - ], - ),), + ], + ), + ), ], ), ), @@ -354,28 +365,26 @@ class MineVipView extends StatelessWidget { return GestureDetector( onTap: () { - if (userInfo != null) { - SharedPreferences.getInstance().then((value) { - if (value.getString("token") == null || - value.getString("token") == "") { - LoginTipsDialog().show(context); - return; - } - // Navigator.of(context) - // .pushNamed('/router/mine_vip_level_page', arguments: { - // "rankLevel": curLevel, - // "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", - // "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, - // }); - Navigator.of(context) - .pushNamed('/router/mine_vip_core', arguments: { - "rankLevel": curLevel, - "userInfo":userInfo.masterCardRankName, - "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", - "expendAmount": double.tryParse(userInfo?.expendAmount??"0").toInt(), - }); + SharedPreferences.getInstance().then((value) { + if (value.getString("token") == null || + value.getString("token") == "") { + LoginTipsDialog().show(context); + return; + } + // Navigator.of(context) + // .pushNamed('/router/mine_vip_level_page', arguments: { + // "rankLevel": curLevel, + // "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", + // "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, + // }); + Navigator.of(context).pushNamed('/router/mine_vip_core', arguments: { + "rankLevel": curLevel, + "userInfo": userInfo?.masterCardRankName, + "createTime": (userInfo != null) ? "${userInfo!.createTime}" : "", + "expendAmount": + double.tryParse(userInfo?.expendAmount ?? "0")?.toInt(), }); - } + }); }, child: widget, //(tag == null || tag == "") diff --git a/lib/view_widget/my_appbar.dart b/lib/view_widget/my_appbar.dart index 36f55441..e01710f7 100644 --- a/lib/view_widget/my_appbar.dart +++ b/lib/view_widget/my_appbar.dart @@ -1,14 +1,15 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/utils/font_weight.dart'; class MyAppBar extends StatelessWidget implements PreferredSizeWidget { - final Function onTap; - final Widget action; - List actions; - final Widget bottom; - final Widget titleChild; - final String title; + final Function? onTap; + final Widget? action; + List? actions; + final PreferredSizeWidget? bottom; + final Widget? titleChild; + final String? title; final double titleSize; final Color titleColor; final Color leadingColor; @@ -17,37 +18,35 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { final double toolbarHeight; final bool leading; final bool centerTitle; - final Brightness brightness; - final Function exit; + final SystemUiOverlayStyle systemUiOverlayStyle; + final Function? exit; - MyAppBar({ - Key key, - this.onTap, - this.action, - this.actions, - this.bottom, - this.titleChild, - this.title, - this.toolbarHeight, - this.background = const Color(0xFFF7F7F7), - this.leadingColor = Colors.black, - this.titleColor = Colors.black, - this.titleSize = 18, - this.brightness = Brightness.light, - this.leading = true, - this.centerTitle = false, - this.exit - }) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight), - super(key: key) { - if (actions == null) - actions = []; + MyAppBar( + {this.onTap, + this.action, + this.actions, + this.bottom, + this.titleChild, + this.title, + this.toolbarHeight = kToolbarHeight + 38, + this.background = const Color(0xFFF7F7F7), + this.leadingColor = Colors.black, + this.titleColor = Colors.black, + this.titleSize = 18, + this.systemUiOverlayStyle = SystemUiOverlayStyle.dark, + this.leading = true, + this.centerTitle = true, + this.exit}) + : preferredSize = + Size.fromHeight(toolbarHeight + (bottom != null ? 35 : 0)) { + if (actions == null) actions = []; if (action != null) { - actions.add( + actions!.add( Container( margin: EdgeInsets.only(right: 15), alignment: Alignment.center, child: GestureDetector( - onTap: onTap, + onTap: onTap?.call(), child: action, ), ), @@ -60,54 +59,99 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { return AppBar( backgroundColor: background, elevation: 0, - brightness: brightness, + systemOverlayStyle: systemUiOverlayStyle, leading: leading ? GestureDetector( - behavior: HitTestBehavior.opaque, + behavior: HitTestBehavior.opaque, onTap: () { - if(exit == null) - Navigator.of(context).pop(); - else exit(); + if (exit == null) + Navigator.of(context).pop(); + else + exit!.call(); }, - child: Container( - alignment: Alignment.centerRight, - padding: EdgeInsets.only(top: 6.h,bottom: 6.h,left:20.w,right:6.w), - child: Icon( - Icons.arrow_back_ios, - color: leadingColor, - size: 24, - ), + child: Icon( + Icons.arrow_back_ios, + color: leadingColor, + size: 22, ), ) : Container(), - titleSpacing: 2, - centerTitle: centerTitle, - leadingWidth: leading ? 56 : 10.w, title: ((title == null || title == "") && titleChild != null) ? titleChild : GestureDetector( - onTap: () { - if(exit == null) - Navigator.of(context).pop(); - else exit(); - }, - child: Container( - width: double.infinity, - margin: EdgeInsets.only(right:34.w), - padding: EdgeInsets.all(10), - alignment: Alignment.center, - child: Text( - title, - style: TextStyle( - color: titleColor, - fontWeight: MyFontWeight.medium, - fontSize: titleSize, + onTap: () { + if (exit == null) + Navigator.of(context).pop(); + else + exit!.call(); + }, + child: Text( + title ?? "", + style: TextStyle( + color: titleColor, + fontWeight: MyFontWeight.medium, + fontSize: titleSize, + ), + ), ), - ), - ), - ), actions: actions, bottom: bottom, ); } } + +// MyAppBar( +// leading: false, +// centerTitle: false, +// toolbarHeight: kToolbarHeight + 58, +// titleChild: PreferredSize( +// preferredSize: Size( +// MediaQuery.of(context).size.width - 60.w, +// kToolbarHeight, +// ), +// child: Theme( +// data: ThemeData( +// splashColor: Colors.transparent, // 点击时的水波纹颜色设置为透明 +// highlightColor: Colors.transparent, // 点击时的背景高亮颜色设置为透明 +// ), +// child: Container( +// alignment: Alignment.bottomCenter, +// child: TabBar( +// controller: tabcontroller, +// automaticIndicatorColorAdjustment: true, +// isScrollable: true, +// indicatorWeight: 2, +// indicatorColor: Color(0xFF39B54A), +// labelPadding: EdgeInsets.only(left: 8.w, right: 8.w), +// indicatorSize: TabBarIndicatorSize.label, +// unselectedLabelStyle: TextStyle( +// fontSize: MediaQuery.of(context).size.width >= 650 ? 10.sp : 15.sp, +// fontWeight: FontWeight.w400, +// ), +// labelStyle: TextStyle( +// color: Colors.black, +// fontSize: +// MediaQuery.of(context).size.width >= 650 ? 12.sp : 18.sp, +// fontWeight: FontWeight.bold, +// ), +// labelColor: Colors.black, +// tabs: lables.map((e) => MyTab(text: e)).toList(), +// ), +// ), +// ), +// ), +// // onTap: () { +// // _toRelease(); +// // }, +// // action: GestureDetector( +// // behavior: HitTestBehavior.opaque, +// // child: Container(color: Colors.transparent, +// // padding: EdgeInsets.only(left: 20,right: 20), +// // child: SvgPicture.asset( +// // "assets/svg/shequ_fabu.svg", +// // fit: BoxFit.contain, +// // width: 24, +// // height: 24, +// // ),) +// // ) +// ) diff --git a/lib/view_widget/my_footer.dart b/lib/view_widget/my_footer.dart index 4e16c020..9f60dc6d 100644 --- a/lib/view_widget/my_footer.dart +++ b/lib/view_widget/my_footer.dart @@ -1,7 +1,6 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/view_widget/my_tab.dart b/lib/view_widget/my_tab.dart index 3165c92e..727b6c71 100644 --- a/lib/view_widget/my_tab.dart +++ b/lib/view_widget/my_tab.dart @@ -5,10 +5,9 @@ const double _kTabHeight = 35.0; class MyTab extends StatelessWidget { MyTab({ - Key key, - this.text, - }) : assert(text != null), - super(key: key); + Key? key, + required this.text, + }) : super(key: key); final String text; diff --git a/lib/view_widget/new_coupon_widget.dart b/lib/view_widget/new_coupon_widget.dart index 8072bf49..919500dc 100644 --- a/lib/view_widget/new_coupon_widget.dart +++ b/lib/view_widget/new_coupon_widget.dart @@ -1,9 +1,8 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; +import 'package:huixiang/data/coupon.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/separator.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class NewCouponWidget extends StatelessWidget { @@ -21,10 +20,10 @@ class NewCouponWidget extends StatelessWidget { return buildCoupon(context); } - String getCouponStoreName(){ - String couponStoreName = coupon.tenantName; - if(coupon?.storeList != null && coupon.storeId != "0"){ - coupon.storeList.forEach((element) { + String? getCouponStoreName(){ + String? couponStoreName = coupon.tenantName; + if(coupon.storeId != "0"){ + coupon.storeList?.forEach((element) { if(element.id == coupon.storeId) couponStoreName = element.storeName; }); @@ -43,7 +42,7 @@ class NewCouponWidget extends StatelessWidget { // } return Container( - height: (coupon != null && coupon.isEx) ? 163.h : 143.h, + height: (coupon.isEx) ? 163.h : 143.h, width: double.infinity, margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), padding: EdgeInsets.only(right: 5), @@ -125,7 +124,7 @@ class NewCouponWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "${coupon?.useStartTime ??""} ~", + "${coupon.useStartTime ??""} ~", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -136,7 +135,7 @@ class NewCouponWidget extends StatelessWidget { ), SizedBox(height: 5,), Text( - "${coupon?.useEndTime ?? ""}", + "${coupon.useEndTime ?? ""}", maxLines:1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -196,190 +195,190 @@ class NewCouponWidget extends StatelessWidget { ], ), ); - Container( - height: (coupon != null && coupon.isEx) ? 168.h : 151.h, - width: double.infinity, - margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ], - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - margin: EdgeInsets.only(top: 14.h, bottom: 8.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - child: priceWidget(context), - ), - flex: 1, - ), - Expanded( - flex: 2, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container( - padding: EdgeInsets.fromLTRB(4, 2, 4, 2), - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(2), - border: Border.all( - width: 1, - color: Color(0xFFFF7A1A), - style: BorderStyle.solid, - ), - ), - child: Text( - S.of(context).shangjiaquan, - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFFF7A1A), - ), - ), - ), - SizedBox( - width: 8.w, - ), - Expanded( - child: Text(getCouponStoreName(), - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 16.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xff353535), - ), - ), - flex: 1, - ) - ], - ), - Text( - coupon != null ? coupon.couponName ?? "" : "", - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff727272), - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Visibility( - child: Text( - // S.of(context).quanchangtongyong, - (coupon?.allProduct ?? false) ? S.of(context).quanchangtongyong :"", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - ), - ), - visible: - (coupon != null && (coupon.bizType == 1)) ?? - false, - ), - Container( - margin: EdgeInsets.only(right: 23.w), - child: rightBtn(context), - ) - ], - ), - ], - ), - ), - ], - ), - ), - flex: (coupon != null && coupon.isEx) ? 97 : 97, - ), - Container( - padding: EdgeInsets.symmetric(horizontal: 23.w), - child: MySeparator( - width: 5.w, - height: 1.h, - color: Color(0xFF353535), - ), - ), - Expanded( - flex: (coupon != null && coupon.isEx) ? 56 : 42, - child: Container( - margin: EdgeInsets.symmetric(horizontal: 23.w, vertical: 7.h), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).xiangqing, - style: TextStyle( - color: Color(0xFF353535), - fontSize: 10.sp, - ), - ), - GestureDetector( - child: Icon( - (coupon != null && !coupon.isEx) - ? Icons.keyboard_arrow_down - : Icons.keyboard_arrow_up, - color: Colors.black, - size: 18, - ), //点击按钮布局 - onTap: callbackEx, - ), - ], - ), - if (coupon != null && coupon.isEx) - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - S.of(context).shiyongriqi, - style: TextStyle( - color: Color(0xFF353535), - fontSize: 10.sp, - ), - ), - Text( - (coupon.useStartTime == null && - coupon.useEndTime == null) - ? S.of(context).quantian - : "${coupon.useStartTime} - ${coupon.useEndTime}", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 10.sp, - ), - ), - ], - ), - ], - ), - ), - ), - ], - ), - ); + // Container( + // height: (coupon.isEx) ? 168.h : 151.h, + // width: double.infinity, + // margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.circular(8), + // boxShadow: [ + // BoxShadow( + // color: Colors.black.withAlpha(12), + // offset: Offset(0, 3), + // blurRadius: 14, + // spreadRadius: 0, + // ) + // ], + // ), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Expanded( + // child: Container( + // margin: EdgeInsets.only(top: 14.h, bottom: 8.h), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Expanded( + // child: Container( + // child: priceWidget(context), + // ), + // flex: 1, + // ), + // Expanded( + // flex: 2, + // child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Row( + // children: [ + // Container( + // padding: EdgeInsets.fromLTRB(4, 2, 4, 2), + // decoration: BoxDecoration( + // borderRadius: + // BorderRadius.circular(2), + // border: Border.all( + // width: 1, + // color: Color(0xFFFF7A1A), + // style: BorderStyle.solid, + // ), + // ), + // child: Text( + // S.of(context).shangjiaquan, + // style: TextStyle( + // fontSize: 10.sp, + // fontWeight: MyFontWeight.medium, + // color: Color(0xFFFF7A1A), + // ), + // ), + // ), + // SizedBox( + // width: 8.w, + // ), + // Expanded( + // child: Text(getCouponStoreName(), + // overflow: TextOverflow.ellipsis, + // style: TextStyle( + // fontSize: 16.sp, + // fontWeight: MyFontWeight.semi_bold, + // color: Color(0xff353535), + // ), + // ), + // flex: 1, + // ) + // ], + // ), + // Text( + // coupon != null ? coupon.couponName ?? "" : "", + // overflow: TextOverflow.ellipsis, + // style: TextStyle( + // fontSize: 14.sp, + // color: Color(0xff727272), + // ), + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // crossAxisAlignment: CrossAxisAlignment.end, + // children: [ + // Visibility( + // child: Text( + // // S.of(context).quanchangtongyong, + // (coupon.allProduct ?? false) ? S.of(context).quanchangtongyong :"", + // style: TextStyle( + // color: Color(0xFF353535), + // fontSize: 12.sp, + // ), + // ), + // visible: + // ((coupon.bizType == 1)) ?? + // false, + // ), + // Container( + // margin: EdgeInsets.only(right: 23.w), + // child: rightBtn(context), + // ) + // ], + // ), + // ], + // ), + // ), + // ], + // ), + // ), + // flex: (coupon.isEx) ? 97 : 97, + // ), + // Container( + // padding: EdgeInsets.symmetric(horizontal: 23.w), + // child: MySeparator( + // width: 5.w, + // height: 1.h, + // color: Color(0xFF353535), + // ), + // ), + // Expanded( + // flex: (coupon.isEx) ? 56 : 42, + // child: Container( + // margin: EdgeInsets.symmetric(horizontal: 23.w, vertical: 7.h), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // children: [ + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Text( + // S.of(context).xiangqing, + // style: TextStyle( + // color: Color(0xFF353535), + // fontSize: 10.sp, + // ), + // ), + // GestureDetector( + // child: Icon( + // (!coupon.isEx) + // ? Icons.keyboard_arrow_down + // : Icons.keyboard_arrow_up, + // color: Colors.black, + // size: 18, + // ), //点击按钮布局 + // onTap: callbackEx, + // ), + // ], + // ), + // if (coupon.isEx) + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Text( + // S.of(context).shiyongriqi, + // style: TextStyle( + // color: Color(0xFF353535), + // fontSize: 10.sp, + // ), + // ), + // Text( + // (coupon.useStartTime == null && + // coupon.useEndTime == null) + // ? S.of(context).quantian + // : "${coupon.useStartTime} - ${coupon.useEndTime}", + // style: TextStyle( + // color: Color(0xFF353535), + // fontSize: 10.sp, + // ), + // ), + // ], + // ), + // ], + // ), + // ), + // ), + // ], + // ), + // ); } Widget priceWidget(BuildContext context) { @@ -406,10 +405,8 @@ class NewCouponWidget extends StatelessWidget { ), Text( coupon != null - ? double.tryParse("${coupon.discountAmount}" ?? "0") - .toInt() - .toString() - : "", + ? double.tryParse("${coupon.discountAmount}")?.toInt().toString() ?? "0" + : "0", style: TextStyle( fontSize: 35.sp, fontWeight: MyFontWeight.semi_bold, @@ -498,7 +495,7 @@ class NewCouponWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - if(coupon?.limitAmount != "0.00") + if(coupon.limitAmount != "0.00") Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.baseline, @@ -517,7 +514,7 @@ class NewCouponWidget extends StatelessWidget { ), Text( coupon != null - ? "${AppUtils.calculateDouble(double.tryParse(coupon.limitAmount) ?? 0)}" + ? "${AppUtils.calculateDouble(double.tryParse(coupon.limitAmount ?? "0") ?? 0)}" : "", style: TextStyle( fontSize: 35.sp, @@ -542,7 +539,7 @@ class NewCouponWidget extends StatelessWidget { children: [ Text( coupon.discountPercent != 0?( coupon != null - ? "${(coupon.discountPercent / 10.0 >= 10) ? 10 : coupon.discountPercent / 10.0}" ?? + ? "${((coupon.discountPercent ?? 0) / 10.0 >= 10) ? 10 : (coupon.discountPercent ?? 0) / 10.0}" ?? "0" : ""):"", style: TextStyle( @@ -579,7 +576,7 @@ class NewCouponWidget extends StatelessWidget { Widget rightBtn(context) { if (type == 1) { - if (coupon != null && coupon.status == 0) { + if (coupon.status == 0) { return Align( alignment: Alignment.centerRight, child: InkWell( @@ -624,7 +621,7 @@ class NewCouponWidget extends StatelessWidget { ); } } else { - if (coupon != null && coupon.status == 1) { + if (coupon.status == 1) { return Align( alignment: Alignment.centerRight, child: InkWell( @@ -669,7 +666,7 @@ class NewCouponWidget extends StatelessWidget { // ), ), ); - } else if (coupon != null && coupon.status == 2) { + } else if (coupon.status == 2) { return Align( alignment: Alignment.centerRight, child: Container( diff --git a/lib/view_widget/new_people_reward.dart b/lib/view_widget/new_people_reward.dart index 691c7708..416ec05b 100644 --- a/lib/view_widget/new_people_reward.dart +++ b/lib/view_widget/new_people_reward.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/login_info.dart'; +import 'package:huixiang/data/login_info.dart'; import 'package:huixiang/utils/font_weight.dart'; class NewPeopleReward extends StatefulWidget { @@ -27,7 +27,9 @@ class _NewPeopleReward extends State { width: double.infinity, height: 500.h, padding: EdgeInsets.only(top: 210.h), - margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w), + margin: EdgeInsets.only( + top: 20.h, left: 20.w, right: 20.w, + ), decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.fill, @@ -46,7 +48,8 @@ class _NewPeopleReward extends State { }, child: Container( margin: EdgeInsets.only( - left: 60.w, right: 60.w, top: 20.h, bottom: 10.h), + left: 60.w, right: 60.w, top: 20.h, bottom: 10.h, + ), decoration: BoxDecoration( gradient: new LinearGradient( begin: Alignment.centerLeft, @@ -54,7 +57,8 @@ class _NewPeopleReward extends State { colors: [ Color(0xFFFFDCA1), Color(0xFFFAE4C0), - ]), + ], + ), borderRadius: BorderRadius.circular(22.5), ), width: MediaQuery.of(context).size.width, @@ -135,11 +139,7 @@ class _NewPeopleReward extends State { ), ), TextSpan( - text: double.tryParse( - "${firstLoginCouponList.discountAmount}" ?? "0") - .toInt() - .toString() ?? - "", + text: double.tryParse("${firstLoginCouponList.discountAmount}")?.toInt().toString() ?? "0", style: TextStyle( fontSize: 35.sp, fontWeight: MyFontWeight.semi_bold, @@ -156,7 +156,7 @@ class _NewPeopleReward extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - firstLoginCouponList.couponName, + "${firstLoginCouponList.couponName}", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -166,7 +166,7 @@ class _NewPeopleReward extends State { ), ), Text( - firstLoginCouponList.storeName, + "${firstLoginCouponList.storeName}", overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( @@ -176,8 +176,8 @@ class _NewPeopleReward extends State { ), ), Text( - "有效期至:${(firstLoginCouponList.useEndTime != null && firstLoginCouponList.useEndTime != "") - ? firstLoginCouponList.useEndTime.split(" ")[0] + "有效期至:${(firstLoginCouponList.useEndTime != "") + ? firstLoginCouponList.useEndTime!.split(" ")[0] : "$firstLoginCouponList.useEndTime"}", overflow: TextOverflow.ellipsis, maxLines: 2, diff --git a/lib/view_widget/no_data_view.dart b/lib/view_widget/no_data_view.dart index 7f74d674..eac70b6c 100644 --- a/lib/view_widget/no_data_view.dart +++ b/lib/view_widget/no_data_view.dart @@ -13,10 +13,10 @@ class NoDataView extends StatelessWidget { final EdgeInsets margin; NoDataView({ - this.src, + required this.src, + required this.text, + required this.fontSize, this.isShowBtn = true, - this.text, - this.fontSize, this.iconWidth = 270, this.iconHeight = 180, this.margin = const EdgeInsets.only(top: 30), diff --git a/lib/view_widget/receiving_method_dialog.dart b/lib/view_widget/receiving_method_dialog.dart index b945ec67..8705dd28 100644 --- a/lib/view_widget/receiving_method_dialog.dart +++ b/lib/view_widget/receiving_method_dialog.dart @@ -1,13 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/round_button.dart'; -import 'custom_image.dart'; -import 'my_appbar.dart'; class ReceivingMethodDialog extends StatefulWidget { final int takeType; diff --git a/lib/view_widget/recharge_details_dialog.dart b/lib/view_widget/recharge_details_dialog.dart index aa93077e..27991638 100644 --- a/lib/view_widget/recharge_details_dialog.dart +++ b/lib/view_widget/recharge_details_dialog.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/data/preferential.dart'; import 'package:huixiang/utils/font_weight.dart'; -import '../retrofit/data/rechargeActLists.dart'; class RechargeWidget extends StatefulWidget { - final PreferentialList preferentialList; + final PreferentialList? preferentialList; RechargeWidget(this.preferentialList); @override State createState() { @@ -25,7 +25,9 @@ class _RechargeWidget extends State { color: Colors.white, borderRadius: new BorderRadius.only( topLeft: const Radius.circular(25.0), - topRight: const Radius.circular(25.0))), + topRight: const Radius.circular(25.0), + ), + ), child: Container( height:355, child:SingleChildScrollView( @@ -81,14 +83,14 @@ class _RechargeWidget extends State { child: Container( color: Colors.white, child: Html( - data: widget.preferentialList.remark ?? "", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, - ), - }, + data: widget.preferentialList?.remark ?? "", + // customImageRenders: { + // networkSourceMatcher(): networkImageRender( + // loadingWidget: () { + // return Container(); + // }, + // ), + // }, ), ), ) diff --git a/lib/view_widget/rename_dialog.dart b/lib/view_widget/rename_dialog.dart index 9ad45101..fff911c8 100644 --- a/lib/view_widget/rename_dialog.dart +++ b/lib/view_widget/rename_dialog.dart @@ -1,12 +1,13 @@ import 'package:flutter/material.dart'; class RenameDialog extends AlertDialog { - RenameDialog({Widget contentWidget}) + RenameDialog({Widget? contentWidget}) : super( content: contentWidget, contentPadding: EdgeInsets.zero, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20), - side: BorderSide(color: Colors.white, width: 3)), + side: BorderSide(color: Colors.white, width: 3), + ), ); } diff --git a/lib/view_widget/rename_dialog_content.dart b/lib/view_widget/rename_dialog_content.dart index fbb8de46..17ce29c1 100644 --- a/lib/view_widget/rename_dialog_content.dart +++ b/lib/view_widget/rename_dialog_content.dart @@ -1,16 +1,15 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/generated/l10n.dart'; double btnHeight = 60; double borderWidth = 2; class RenameDialogContent extends StatefulWidget { - final String title; - final VoidCallback cancelBtnTap; - final VoidCallback okBtnTap; - final TextEditingController vc; + late String title; + final VoidCallback? cancelBtnTap; + final VoidCallback? okBtnTap; + final TextEditingController? vc; RenameDialogContent( - {@required this.title, + {required this.title, this.cancelBtnTap, this.okBtnTap, this.vc}); diff --git a/lib/view_widget/rotate_container.dart b/lib/view_widget/rotate_container.dart index 74f173af..86c7c30a 100644 --- a/lib/view_widget/rotate_container.dart +++ b/lib/view_widget/rotate_container.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class RotateContainer extends StatefulWidget { final bool rotated; - final Widget child; + final Widget? child; RotateContainer({this.child, this.rotated = false}); @@ -15,7 +15,7 @@ class RotateContainer extends StatefulWidget { class _RotateContainer extends State with SingleTickerProviderStateMixin { - AnimationController _controller; + late AnimationController _controller; @override void initState() { diff --git a/lib/view_widget/round_button.dart b/lib/view_widget/round_button.dart index 1858c859..d9fccfe0 100644 --- a/lib/view_widget/round_button.dart +++ b/lib/view_widget/round_button.dart @@ -1,21 +1,21 @@ import 'package:flutter/material.dart'; class RoundButton extends StatelessWidget { - final String text; - final String img; - final Widget icons; + final String? text; + final String? img; + final Widget? icons; final Color textColor; final Color backgroup; final double fontSize; final double radius; - final double height; - final double width; + final double? height; + final double? width; final FontWeight fontWeight; - final EdgeInsetsGeometry padding; - final GestureTapCallback callback; + final EdgeInsetsGeometry? padding; + final GestureTapCallback? callback; RoundButton({ - Key key, + Key? key, this.text, this.textColor = Colors.black, this.fontSize = 10, @@ -50,7 +50,7 @@ class RoundButton extends StatelessWidget { Widget buildText() { Widget textWidget = Text( - text, + text ?? "", style: TextStyle( color: textColor, fontSize: fontSize, @@ -61,29 +61,20 @@ class RoundButton extends StatelessWidget { return Row( mainAxisSize: MainAxisSize.min, children: [ - icons, + icons!, SizedBox( width: 4, ), textWidget, ], ); - } else if (img != null && img != "") { + } else { return Row( + mainAxisSize: MainAxisSize.min, children: [ - Image.asset( - img, - width: 12, - height: 12, - ), - SizedBox( - width: 4, - ), textWidget, ], ); - } else { - return textWidget; } } } diff --git a/lib/view_widget/selector_store_dialog.dart b/lib/view_widget/selector_store_dialog.dart index 8aefc7b0..b4d6bed4 100644 --- a/lib/view_widget/selector_store_dialog.dart +++ b/lib/view_widget/selector_store_dialog.dart @@ -1,14 +1,9 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/store.dart'; +import 'package:huixiang/data/store.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/store/scan.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/view_widget/border_text.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/round_button.dart'; -import 'no_data_view.dart'; class SelectorStoreWidget extends StatefulWidget { final List stores; @@ -93,7 +88,7 @@ class _SelectorStoreWidget extends State { ? (widget.stores.length > 4 ? 4 : widget.stores.length) : 0) * 60.h, - child: (widget.stores == null || widget.stores.length == 0) + child: (widget.stores.length == 0) ? Padding( padding: EdgeInsets.symmetric(horizontal: 16.w), child: Text( @@ -123,7 +118,7 @@ class _SelectorStoreWidget extends State { )), GestureDetector( onTap: () { - if (widget.stores == null || widget.stores.length == 0) { + if (widget.stores.length == 0) { Navigator.of(context).pop(); } // if (widget.stores[selectIndex].posType.code == @@ -259,7 +254,7 @@ class _SelectorStoreWidget extends State { left: 12, ), child: Text( - store.storeName, + store.storeName ?? "", style: TextStyle( fontWeight: MyFontWeight.bold, fontSize: 15.sp, diff --git a/lib/view_widget/settlement_tips_dialog.dart b/lib/view_widget/settlement_tips_dialog.dart index 437fecdf..35eb290c 100644 --- a/lib/view_widget/settlement_tips_dialog.dart +++ b/lib/view_widget/settlement_tips_dialog.dart @@ -6,8 +6,8 @@ import 'package:huixiang/utils/font_weight.dart'; class SettlementTips extends StatefulWidget { final Function tips; - final String text; - final Color color; + final String? text; + final Color? color; SettlementTips(this.tips, {this.text,this.color}); @override @@ -67,7 +67,7 @@ class _SettlementTips extends State { style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.medium, - color: widget?.color ?? Color(0xFF32A060), + color: widget.color ?? Color(0xFF32A060), ), ), ), diff --git a/lib/view_widget/store_title_tab.dart b/lib/view_widget/store_title_tab.dart index 9d6b393e..ab1991ba 100644 --- a/lib/view_widget/store_title_tab.dart +++ b/lib/view_widget/store_title_tab.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/retrofit/data/brand.dart'; +import 'package:huixiang/data/brand.dart'; import 'package:huixiang/view_widget/icon_text.dart'; class StoreTitleTab extends StatefulWidget { @@ -35,20 +35,15 @@ class _StoreTitleTab extends State { void initState() { super.initState(); - if (widget.brands != null) { - widget.brands.forEach((element) { - _globalKeys.add(GlobalKey()); - }); - } - - if (widget.scrollController != null && - widget.globaKeys != null && - widget.globaKeys.length > 0) { - widget.scrollController?.addListener(() { + widget.brands.forEach((element) { + _globalKeys.add(GlobalKey()); + }); + + if (widget.globaKeys.length > 0) { + widget.scrollController.addListener(() { if (widget.globaKeys[0].currentContext == null) return; - RenderBox firstRenderBox = - widget.globaKeys[0].currentContext.findRenderObject(); - Offset first = firstRenderBox?.localToGlobal(Offset.zero); + RenderBox firstRenderBox = widget.globaKeys[0].currentContext!.findRenderObject() as RenderBox; + Offset first = firstRenderBox.localToGlobal(Offset.zero); var top = 96.h; if (first.dy <= top) { @@ -67,14 +62,13 @@ class _StoreTitleTab extends State { if (widget.globaKeys.indexOf(element) < (widget.globaKeys.length - 1)) { if (element.currentContext == null) return; - RenderBox renderBox = element.currentContext.findRenderObject(); - Offset offset = renderBox?.localToGlobal(Offset.zero); + RenderBox renderBox = element.currentContext!.findRenderObject() as RenderBox; + Offset offset = renderBox.localToGlobal(Offset.zero); int nextIndex = widget.globaKeys.indexOf(element) + 1; - RenderBox nextRenderBox = - widget.globaKeys[nextIndex].currentContext.findRenderObject(); - Offset nextOffset = nextRenderBox?.localToGlobal(Offset.zero); + RenderBox? nextRenderBox = widget.globaKeys[nextIndex].currentContext?.findRenderObject() as RenderBox?; + Offset? nextOffset = nextRenderBox?.localToGlobal(Offset.zero); - if (offset.dy <= top && nextOffset.dy > top) { + if (offset.dy <= top && (nextOffset?.dy ?? 0) > top) { selectedIndex = widget.globaKeys.indexOf(element); if (selectedIndex1 != selectedIndex) { setState(() { @@ -91,8 +85,9 @@ class _StoreTitleTab extends State { return; } } else { - RenderBox lastRenderBox = element.currentContext.findRenderObject(); - Offset lastOffset = lastRenderBox?.localToGlobal(Offset.zero); + if (element.currentContext == null) return; + RenderBox lastRenderBox = element.currentContext!.findRenderObject() as RenderBox; + Offset lastOffset = lastRenderBox.localToGlobal(Offset.zero); if (lastOffset.dy <= top) { selectedIndex = widget.globaKeys.indexOf(element); if (selectedIndex1 != selectedIndex) { @@ -117,8 +112,8 @@ class _StoreTitleTab extends State { scrollTab(index) { if (_globalKeys[index].currentContext == null) return; - RenderBox renderBox = _globalKeys[index].currentContext.findRenderObject(); - Offset nextOffset = renderBox?.localToGlobal(Offset.zero); + RenderBox renderBox = _globalKeys[index].currentContext!.findRenderObject() as RenderBox; + Offset nextOffset = renderBox.localToGlobal(Offset.zero); double widgetWidth = renderBox.size.width; double screenWidth = MediaQuery.of(context).size.width; if (nextOffset.dx < 0 || (nextOffset.dx + widgetWidth) > screenWidth) { @@ -147,7 +142,7 @@ class _StoreTitleTab extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, - children: (widget.brands == null || widget.brands.length == 0) + children: (widget.brands.length == 0) ? [] : (widget.brands.map((e) { return item(e, selectedIndex == widget.brands.indexOf(e), @@ -165,8 +160,11 @@ class _StoreTitleTab extends State { Widget item(Brand text, isSelected, index) { return GestureDetector( onTap: () { - FlexParentData parentData = widget.globaKeys[index].currentContext.findRenderObject().parentData; - double offset = parentData.offset.dy - 52.h + 20.h; + FlexParentData? parentData = widget.globaKeys[index].currentContext?.findRenderObject()?.parentData as FlexParentData?; + double offset = 0; + if (parentData != null) { + offset = parentData.offset.dy - 52.h + 20.h; + } isClickScroll = true; clickIndex = index; widget.scrollController.animateTo(offset, duration: Duration(seconds: 1), curve: Curves.ease); @@ -182,7 +180,7 @@ class _StoreTitleTab extends State { Widget tabItem(Brand text, isSelected) { if (isSelected) { return IconText( - text.name, + text.name ?? "", isMax: false, rightImage: text.icon ?? "assets/image/icon_xuanzhong.webp", iconSize: 16, @@ -195,7 +193,7 @@ class _StoreTitleTab extends State { ); } else { return IconText( - text.name, + text.name ?? "", isMax: false, textStyle: TextStyle( fontWeight: FontWeight.bold, diff --git a/lib/view_widget/tips_dialog.dart b/lib/view_widget/tips_dialog.dart index 35bda7fd..1fd3a95a 100644 --- a/lib/view_widget/tips_dialog.dart +++ b/lib/view_widget/tips_dialog.dart @@ -6,7 +6,7 @@ import 'package:huixiang/utils/font_weight.dart'; class Tips extends StatefulWidget { final Function tips; - final String text; + final String? text; Tips(this.tips, {this.text}); @override diff --git a/lib/view_widget/update_dialog.dart b/lib/view_widget/update_dialog.dart index 2aaad41d..5edf4f9e 100644 --- a/lib/view_widget/update_dialog.dart +++ b/lib/view_widget/update_dialog.dart @@ -2,11 +2,9 @@ import 'dart:io'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/app_update.dart'; -import 'package:huixiang/utils/bridge.dart'; +import 'package:huixiang/data/app_update.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:path_provider/path_provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -14,7 +12,7 @@ import '../generated/l10n.dart'; class UpdateDialog extends StatefulWidget { final String version; - final AppUpdate appUpdate; + final AppUpdate? appUpdate; UpdateDialog(this.version, this.appUpdate); @@ -62,7 +60,10 @@ class _UpdateDialog extends State { decoration: BoxDecoration( color: Colors.white, border: Border.all( - color: Colors.white, width: 0, style: BorderStyle.solid), + color: Colors.white, + width: 0, + style: BorderStyle.solid, + ), borderRadius: BorderRadius.only( bottomLeft: Radius.circular(8.r), bottomRight: Radius.circular(8.r), @@ -75,7 +76,7 @@ class _UpdateDialog extends State { height: 32.h, ), Text( - widget.appUpdate.appLastVersionExplain ?? "", + widget.appUpdate?.appLastVersionExplain ?? "", textAlign: TextAlign.center, style: TextStyle( fontSize: 17.sp, @@ -98,7 +99,8 @@ class _UpdateDialog extends State { borderRadius: BorderRadius.circular(27), ), margin: EdgeInsets.only( - left: 14.w, right: 14.w, bottom: 8.h), + left: 14.w, right: 14.w, bottom: 8.h, + ), padding: EdgeInsets.symmetric(vertical: 11.h), alignment: Alignment.center, child: Text( @@ -111,8 +113,7 @@ class _UpdateDialog extends State { ), ), ), - if (!AppUtils.versionCompare( - widget.version, widget.appUpdate.appLastVersionUp)) + if (!AppUtils.versionCompare(widget.version, widget.appUpdate?.appLastVersionUp)) InkWell( onTap: () { doNotUpdate(); @@ -143,16 +144,16 @@ class _UpdateDialog extends State { doNotUpdate() async { SharedPreferences value = await SharedPreferences.getInstance(); - value.setString("appLastVersion", widget.appUpdate.appLastVersion); + value.setString("appLastVersion", widget.appUpdate?.appLastVersion ?? ""); Navigator.of(context).pop(); } updateApp() async { - String url = Platform.isIOS + Uri url = Uri.parse(Platform.isIOS ? "itms-apps://itunes.apple.com/app/id1575124838" - : "http://application.lotus-wallet.com/huixiang?release_id="; - if (await canLaunch(url)) { - await launch(url); + : "http://application.lotus-wallet.com/huixiang?release_id="); + if (await canLaunchUrl(url)) { + await launchUrl(url); } else { throw 'Could not launch $url'; } diff --git a/lib/view_widget/vip_dialog.dart b/lib/view_widget/vip_dialog.dart index b83554a1..c319b03a 100644 --- a/lib/view_widget/vip_dialog.dart +++ b/lib/view_widget/vip_dialog.dart @@ -2,8 +2,8 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/vip_benefit_list.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/vip_benefit.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -23,29 +23,32 @@ class VipDialog extends StatefulWidget { } class _VipDialog extends State { - ApiService apiService; - List vipBenefitList = []; + ApiService? apiService; + List vipBenefitList = []; @override void initState() { super.initState(); SharedPreferences.getInstance().then((value) { - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); + apiService = ApiService(Dio(), + context: context, + token: value.getString("token") ?? "", + ); queryBenefitList(); }); } ///会员权益列表 queryBenefitList() async { - BaseData> baseData = - await apiService.benefitList().catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + BaseData>? baseData = await apiService?.benefitList().catchError((onError) {}); + if (baseData?.isSuccess ?? false) { setState(() { - vipBenefitList.clear(); - vipBenefitList.addAll(baseData.data); - vipBenefitList.sort((a, b) => (a.sort).compareTo(b.sort)); + if (baseData!.data?.isNotEmpty ?? false) { + vipBenefitList.clear(); + vipBenefitList.addAll(baseData.data!); + vipBenefitList.sort((a, b) => ((a.sort ?? 0)).compareTo((b.sort ?? 0))); + } }); } EasyLoading.dismiss(); @@ -206,7 +209,7 @@ class _VipDialog extends State { ); } - Widget vipUpgradeItem(VipBenefitList vipBenefitList) { + Widget vipUpgradeItem(VipBenefit vipBenefit) { return Container( alignment: Alignment.center, child: Column( @@ -215,15 +218,16 @@ class _VipDialog extends State { alignment: Alignment.bottomCenter, children: [ MImage( - (!vipBenefitList.actived || (!vipBenefitList.actived && !vipBenefitList.have) || (vipBenefitList.actived && !vipBenefitList.have))? - (vipBenefitList?.iconGrey ?? ""):(vipBenefitList?.icon ?? ""), + (!(vipBenefit.actived ?? false) || (!(vipBenefit.actived ?? false) && !(vipBenefit.have ?? false)) + || ((vipBenefit.actived ?? false) && !(vipBenefit.have ?? false)))? + (vipBenefit.iconGrey ?? ""):(vipBenefit.icon ?? ""), width: 36, height: 36, // fit: BoxFit.cover, errorSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp", ), - if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have ) + if (!(vipBenefit.actived ?? false) || !(vipBenefit.actived ?? false) && !(vipBenefit.have ?? false)) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -251,7 +255,7 @@ class _VipDialog extends State { ], ), ), - if (vipBenefitList.actived && !vipBenefitList.have ) + if ((vipBenefit.actived ?? false) && !(vipBenefit.have ?? false)) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -285,7 +289,7 @@ class _VipDialog extends State { height: 5.h, ), Text( - vipBenefitList?.name ?? "", + vipBenefit.name ?? "", maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, diff --git a/lib/vip/user_vip_service_page.dart b/lib/vip/user_vip_service_page.dart index 038ec2d9..e498ec22 100644 --- a/lib/vip/user_vip_service_page.dart +++ b/lib/vip/user_vip_service_page.dart @@ -1,13 +1,10 @@ import 'dart:io'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; -import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:shared_preferences/shared_preferences.dart'; import 'package:webview_flutter/webview_flutter.dart'; -import 'package:webview_flutter/src/webview_cupertino.dart'; import '../generated/l10n.dart'; @@ -21,13 +18,34 @@ class UserVipServicePage extends StatefulWidget { class _UserVipServicePage extends State with WidgetsBindingObserver { var controller = new ScrollController(); + late WebViewController _webViewController; + String? token; + @override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); - if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); - if (Platform.isIOS) WebView.platform = CupertinoWebView(); + + _webViewController = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) { + // Update loading bar. + }, + onPageStarted: (String url) {}, + onPageFinished: (String url) {}, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + // if (request.url.startsWith('https://www.youtube.com/')) { + // return NavigationDecision.prevent; + // } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse("http://huixiang.lotus-wallet.com/vip.html")); } @override @@ -43,14 +61,10 @@ class _UserVipServicePage extends State with WidgetsBindingO width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, alignment: Alignment.center, - child: - WebView( - initialUrl: "http://huixiang.lotus-wallet.com/vip.html", - javascriptMode: JavascriptMode.unrestricted, - onPageFinished: (initialUrl){ - EasyLoading.dismiss(); - }, - )), + child: WebViewWidget( + controller: _webViewController, + ), + ), ); } } diff --git a/lib/vip/vip_page.dart b/lib/vip/vip_page.dart index cddee8a4..020b41bd 100644 --- a/lib/vip/vip_page.dart +++ b/lib/vip/vip_page.dart @@ -1,23 +1,17 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:huixiang/retrofit/data/vip_card_home.dart'; +import 'package:huixiang/data/vip_card_home.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/vip/vip_view/exclusive_coupon.dart'; -import 'package:huixiang/vip/vip_view/vip_goods_discount.dart'; import 'package:huixiang/vip/vip_view/vip_top.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import '../generated/l10n.dart'; -import '../retrofit/data/base_data.dart'; -import '../retrofit/data/user_info.dart'; +import '../data/base_data.dart'; +import '../data/user_info.dart'; import '../retrofit/retrofit_api.dart'; import '../utils/flutter_utils.dart'; import '../utils/font_weight.dart'; -import '../view_widget/my_appbar.dart'; class VipPage extends StatefulWidget { @@ -31,15 +25,15 @@ class VipPage extends StatefulWidget { class _VipPageState extends State with AutomaticKeepAliveClientMixin { final RefreshController _refreshController = RefreshController(); - ApiService apiService; - VipCardHome vipHome; - UserInfo userInfo; + ApiService? apiService; + VipCardHome? vipHome; + UserInfo? userInfo; @override void dispose() { super.dispose(); - if (_refreshController != null) _refreshController.dispose(); + _refreshController.dispose(); } @override @@ -51,26 +45,16 @@ class _VipPageState extends State with AutomaticKeepAliveClientMixin { ///查询会员信息 queryUserBalance() async { try{ - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - showLoading: true - ); - } - BaseData baseData = - await apiService.queryInfo().catchError((onError) { + BaseData? baseData = await apiService?.queryInfo().catchError((onError) { _refreshController.refreshFailed(); _refreshController.loadFailed();}); - if (baseData != null && baseData.isSuccess) { - userInfo = baseData.data; + if (baseData?.isSuccess ?? false) { + userInfo = baseData!.data; if (mounted) setState(() {}); _refreshController.refreshCompleted(); _refreshController.loadComplete(); - }else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + } else { + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); _refreshController.refreshFailed(); _refreshController.loadFailed(); } @@ -82,28 +66,18 @@ class _VipPageState extends State with AutomaticKeepAliveClientMixin { ///Vip季卡,月卡,首页接口(暂不用) queryVipHome() async { try{ - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService( - Dio(), - context: context, - token: value.getString("token"), - showLoading: true - ); - } - BaseData baseData = - await apiService.vipCardIndex().catchError((onError) { + BaseData? baseData = await apiService?.vipCardIndex().catchError((onError) { SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), alignment: Alignment.center); _refreshController.loadFailed(); _refreshController.refreshFailed(); }); - if (baseData != null && baseData.isSuccess) { - vipHome = baseData.data; + if (baseData?.isSuccess ?? false) { + vipHome = baseData!.data; _refreshController.refreshCompleted(); _refreshController.loadComplete(); }else{ - SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); _refreshController.loadFailed(); _refreshController.refreshFailed(); } diff --git a/lib/vip/vip_view/exclusive_coupon.dart b/lib/vip/vip_view/exclusive_coupon.dart index 0f4f27a8..46023540 100644 --- a/lib/vip/vip_view/exclusive_coupon.dart +++ b/lib/vip/vip_view/exclusive_coupon.dart @@ -1,16 +1,15 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../../generated/l10n.dart'; -import '../../retrofit/data/user_info.dart'; -import '../../view_widget/my_appbar.dart'; +import '../../data/user_info.dart'; class ExclusiveCoupon extends StatefulWidget { - final UserInfo userInfo; + final UserInfo? userInfo; ExclusiveCoupon(this.userInfo); + @override State createState() { return _ExclusiveCoupon(); @@ -22,67 +21,68 @@ class _ExclusiveCoupon extends State { Widget build(BuildContext context) { return Column( children: [ - (widget?.userInfo?.isVip ?? false) + (widget.userInfo?.isVip ?? false) ? Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/vip_discount_left.webp", - width: 21.w, - height: 39.h, - fit: BoxFit.fill, - ), - SizedBox( - width: 11.w, - ), - Text( - S.of(context).huixiangvipkazhuanxiang, - style: TextStyle( - color: Color(0xff32A060), - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, - ), - ), - SizedBox( - width: 11.w, - ), - Image.asset( - "assets/image/vip_discount_right.webp", - width: 21.w, - height: 39.h, - fit: BoxFit.fill, - ), - ], - ) + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/image/vip_discount_left.webp", + width: 21.w, + height: 39.h, + fit: BoxFit.fill, + ), + SizedBox( + width: 11.w, + ), + Text( + S.of(context).huixiangvipkazhuanxiang, + style: TextStyle( + color: Color(0xff32A060), + fontSize: 15.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + SizedBox( + width: 11.w, + ), + Image.asset( + "assets/image/vip_discount_right.webp", + width: 21.w, + height: 39.h, + fit: BoxFit.fill, + ), + ], + ) : Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/vip_lock.webp", - width: 20, - height: 20, - fit: BoxFit.cover, - ), - SizedBox( - width: 2.w, - ), - Text( - "解锁回乡VIP卡获取更多权益", - style: TextStyle( - color: Colors.black, - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/image/vip_lock.webp", + width: 20, + height: 20, + fit: BoxFit.cover, + ), + SizedBox( + width: 2.w, + ), + Text( + "解锁回乡VIP卡获取更多权益", + style: TextStyle( + color: Colors.black, + fontSize: 15.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + ], ), - ), - ], - ), Container( - margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom:16.h,top: 17.h), + margin: + EdgeInsets.only(left: 14.w, right: 14.w, bottom: 16.h, top: 17.h), width: double.infinity, padding: - EdgeInsets.only(top: 20.h, left: 20.h, bottom: 10.h, right: 20.w), + EdgeInsets.only(top: 20.h, left: 20.h, bottom: 10.h, right: 20.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(6.w), color: Colors.white, @@ -160,49 +160,49 @@ class _ExclusiveCoupon extends State { children: [ Expanded( child: Padding( - padding: EdgeInsets.only(top: 25.h, left: 19.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "海峡姐妹饮品券", - style: TextStyle( - color: Color(0xff32A060), - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, + padding: EdgeInsets.only(top: 25.h, left: 19.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "海峡姐妹饮品券", + style: TextStyle( + color: Color(0xff32A060), + fontSize: 15.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + SizedBox( + height: 5.h, + ), + Text.rich( + TextSpan( + children: [ + TextSpan( + text: "9.2", + style: TextStyle( + fontWeight: MyFontWeight.extra_bold, + fontSize: 36.sp, + fontFamily: 'JDZhengHT', + color: Color(0xffFF7E12), + ), ), - ), - SizedBox( - height: 5.h, - ), - Text.rich( TextSpan( - children: [ - TextSpan( - text: "9.2", - style: TextStyle( - fontWeight: MyFontWeight.extra_bold, - fontSize: 36.sp, - fontFamily: 'JDZhengHT', - color: Color(0xffFF7E12), - ), - ), - TextSpan( - text: " 折", - style: TextStyle( - fontSize: 24.sp, - color: Color(0xffFF7E12), - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], + text: " 折", + style: TextStyle( + fontSize: 24.sp, + color: Color(0xffFF7E12), + fontWeight: MyFontWeight.semi_bold, + ), ), - textDirection: TextDirection.ltr, - ), - ], + ], + ), + textDirection: TextDirection.ltr, ), - )), + ], + ), + )), Image.asset( "assets/image/vip_shop_hx.webp", fit: BoxFit.fill, //填充剩余空间 @@ -233,49 +233,49 @@ class _ExclusiveCoupon extends State { children: [ Expanded( child: Padding( - padding: EdgeInsets.only(top: 25.h, left: 19.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "前进麦味烘焙券", - style: TextStyle( - color: Color(0xff32A060), - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, + padding: EdgeInsets.only(top: 25.h, left: 19.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "前进麦味烘焙券", + style: TextStyle( + color: Color(0xff32A060), + fontSize: 15.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + SizedBox( + height: 5.h, + ), + Text.rich( + TextSpan( + children: [ + TextSpan( + text: "9.2", + style: TextStyle( + fontWeight: MyFontWeight.extra_bold, + fontSize: 36.sp, + fontFamily: 'JDZhengHT', + color: Color(0xffFF7E12), + ), ), - ), - SizedBox( - height: 5.h, - ), - Text.rich( TextSpan( - children: [ - TextSpan( - text: "9.2", - style: TextStyle( - fontWeight: MyFontWeight.extra_bold, - fontSize: 36.sp, - fontFamily: 'JDZhengHT', - color: Color(0xffFF7E12), - ), - ), - TextSpan( - text: " 折", - style: TextStyle( - fontSize: 24.sp, - color: Color(0xffFF7E12), - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], + text: " 折", + style: TextStyle( + fontSize: 24.sp, + color: Color(0xffFF7E12), + fontWeight: MyFontWeight.semi_bold, + ), ), - textDirection: TextDirection.ltr, - ), - ], + ], + ), + textDirection: TextDirection.ltr, ), - )), + ], + ), + )), Image.asset( "assets/image/vip_shop_qj.webp", fit: BoxFit.fill, //填充剩余空间 @@ -306,49 +306,49 @@ class _ExclusiveCoupon extends State { children: [ Expanded( child: Padding( - padding: EdgeInsets.only(top: 25.h, left: 19.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "门店火锅券", - style: TextStyle( - color: Color(0xff32A060), - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, + padding: EdgeInsets.only(top: 25.h, left: 19.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "门店火锅券", + style: TextStyle( + color: Color(0xff32A060), + fontSize: 15.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + SizedBox( + height: 5.h, + ), + Text.rich( + TextSpan( + children: [ + TextSpan( + text: "9.2", + style: TextStyle( + fontWeight: MyFontWeight.extra_bold, + fontSize: 36.sp, + fontFamily: 'JDZhengHT', + color: Color(0xffFF7E12), + ), ), - ), - SizedBox( - height: 5.h, - ), - Text.rich( TextSpan( - children: [ - TextSpan( - text: "9.2", - style: TextStyle( - fontWeight: MyFontWeight.extra_bold, - fontSize: 36.sp, - fontFamily: 'JDZhengHT', - color: Color(0xffFF7E12), - ), - ), - TextSpan( - text: " 折", - style: TextStyle( - fontSize: 24.sp, - color: Color(0xffFF7E12), - fontWeight: MyFontWeight.semi_bold, - ), - ), - ], + text: " 折", + style: TextStyle( + fontSize: 24.sp, + color: Color(0xffFF7E12), + fontWeight: MyFontWeight.semi_bold, + ), ), - textDirection: TextDirection.ltr, - ), - ], + ], + ), + textDirection: TextDirection.ltr, ), - )), + ], + ), + )), Image.asset( "assets/image/vip_shop_hg.webp", fit: BoxFit.fill, //填充剩余空间 @@ -373,19 +373,23 @@ class _ExclusiveCoupon extends State { showModalBottomSheet( builder: (BuildContext context) { return StatefulBuilder(builder: ( - context, - state, - ) { - return WillPopScope( - ///点击背景不收起弹窗; + context, + state, + ) { + return PopScope( + + ///点击背景不收起弹窗; // onWillPop: () async => false, - child:Stack( + canPop: true, + onPopInvoked: (isPop) {}, + child: Stack( alignment: Alignment.topRight, children: [ Container( width: double.infinity, height: 370.h, - padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h), + padding: EdgeInsets.symmetric( + horizontal: 14.w, vertical: 16.h), decoration: new BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( @@ -397,8 +401,7 @@ class _ExclusiveCoupon extends State { physics: BouncingScrollPhysics(), child: Container( padding: EdgeInsets.only(right: 18.w), - child: - Column( + child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -407,22 +410,22 @@ class _ExclusiveCoupon extends State { ), Text( "VIP会员专享优惠券:" - "\n ①海峡姐妹饮品券" - "\n *用户开通回乡VIP卡,可享全单饮品6折优惠。" - "\n *适用饮品:门店现制奶茶类饮品及现制咖啡类饮品。" - "\n *适用门店:海峡姐妹茶汉街店、前进麦味*海峡姐妹茶哈乐城店" - "\n ②前进麦味烘焙券" - "\n *用户开通回乡VIP卡,可享全单面包7折优惠。" - "\n *适用产品:门店现制面包类产品及甜品类产品。" - "\n *适用门店:前进麦味凯德1818店、前进麦味*海峡姐妹茶哈乐城店" - "\n ③回乡农场火锅券" - "\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。" - "\n *适用产品:门店现制菜品" - "\n *适用门店:回乡农场火锅汉街店" - "\n ④百年川椒火锅券" - "\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。" - "\n *适用产品:门店现制菜品" - "\n *适用门店:百年川椒重庆老火锅光谷店", + "\n ①海峡姐妹饮品券" + "\n *用户开通回乡VIP卡,可享全单饮品6折优惠。" + "\n *适用饮品:门店现制奶茶类饮品及现制咖啡类饮品。" + "\n *适用门店:海峡姐妹茶汉街店、前进麦味*海峡姐妹茶哈乐城店" + "\n ②前进麦味烘焙券" + "\n *用户开通回乡VIP卡,可享全单面包7折优惠。" + "\n *适用产品:门店现制面包类产品及甜品类产品。" + "\n *适用门店:前进麦味凯德1818店、前进麦味*海峡姐妹茶哈乐城店" + "\n ③回乡农场火锅券" + "\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。" + "\n *适用产品:门店现制菜品" + "\n *适用门店:回乡农场火锅汉街店" + "\n ④百年川椒火锅券" + "\n *用户开通回乡VIP卡,可享全单菜品(小料、酒水、饮品不参与)8折优惠。" + "\n *适用产品:门店现制菜品" + "\n *适用门店:百年川椒重庆老火锅光谷店", style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 14.sp, @@ -440,14 +443,15 @@ class _ExclusiveCoupon extends State { Navigator.of(context).pop(); }, child: Container( - margin: EdgeInsets.only(right: 14.w,top: 16.h), + margin: EdgeInsets.only(right: 14.w, top: 16.h), child: Image.asset( "assets/image/cancel.webp", width: 24, height: 24, ), ), - )], + ) + ], )); }); }, diff --git a/lib/vip/vip_view/vip_goods_discount.dart b/lib/vip/vip_view/vip_goods_discount.dart index a419cecc..5af7289d 100644 --- a/lib/vip/vip_view/vip_goods_discount.dart +++ b/lib/vip/vip_view/vip_goods_discount.dart @@ -1,10 +1,9 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../../generated/l10n.dart'; -import '../../retrofit/data/vip_card_home.dart'; +import '../../data/vip_card_home.dart'; import '../../utils/flutter_utils.dart'; import '../../view_widget/custom_image.dart'; @@ -28,7 +27,7 @@ class _VipGoodsDiscount extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - (widget?.vipCardHome?.member?.isVip ?? false) + (widget.vipCardHome.member?.isVip ?? false) ? Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -141,7 +140,8 @@ class _VipGoodsDiscount extends State { }, child: Container( padding: EdgeInsets.only( - left: 8.w, right: 30.w, top: 3.h, bottom: 3.h), + left: 8.w, right: 30.w, top: 3.h, bottom: 3.h, + ), child: Image.asset( "assets/image/vip_tips.webp", fit: BoxFit.fill, //填充剩余空间 @@ -167,23 +167,22 @@ class _VipGoodsDiscount extends State { child: ListView.builder( scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), - itemCount: widget.vipCardHome?.productVips?.length ?? 0, + itemCount: widget.vipCardHome.productVips?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { Navigator.of(context).pushNamed( '/router/store_order', arguments: { - "id": widget?.vipCardHome?.productVips[position].storeId, - "tenant": - widget?.vipCardHome?.productVips[position].tenantCode, + "id": widget.vipCardHome.productVips?[position].storeId, + "tenant": widget.vipCardHome.productVips?[position].tenantCode, "storeName": - widget?.vipCardHome?.productVips[position].supplierName + widget.vipCardHome.productVips?[position].supplierName }, ); }, child: - vipGoodsRecommendItem(widget.vipCardHome.productVips[position]), + vipGoodsRecommendItem(widget.vipCardHome.productVips![position]), ); }, ), @@ -226,7 +225,7 @@ class _VipGoodsDiscount extends State { ), ), child: Text( - "省${AppUtils.calculateDouble(double.tryParse(productVips.vipDiscount ?? "0"))}元", + "省${AppUtils.calculateDouble(double.tryParse(productVips.vipDiscount ?? "0") ?? 0)}元", style: TextStyle( color: Colors.white, fontSize: 13.sp, @@ -238,7 +237,9 @@ class _VipGoodsDiscount extends State { ], ), Padding( - padding: EdgeInsets.only(top: 10.h, bottom: 7.h), + padding: EdgeInsets.only( + top: 10.h, bottom: 7.h, + ), child: Text( productVips.productName ?? "", maxLines: 1, @@ -253,7 +254,7 @@ class _VipGoodsDiscount extends State { Row( children: [ Text( - "¥${AppUtils.calculateDouble(double.tryParse(productVips.vipPrice ?? "0.00"))}", + "¥${AppUtils.calculateDouble(double.tryParse(productVips.vipPrice ?? "0.00") ?? 0)}", textAlign: TextAlign.end, style: TextStyle( color: Color(0xff32A060), @@ -266,7 +267,7 @@ class _VipGoodsDiscount extends State { width: 4.w, ), Text( - "¥${AppUtils.calculateDouble(double.tryParse(productVips.applyPrice ?? "0.00"))}", + "¥${AppUtils.calculateDouble(double.tryParse(productVips.applyPrice ?? "0.00") ?? 0)}", textAlign: TextAlign.end, style: TextStyle( color: Color(0xffB2B2B2), @@ -291,67 +292,69 @@ class _VipGoodsDiscount extends State { context, state, ) { - return WillPopScope( + return PopScope( ///点击背景不收起弹窗; // onWillPop: () async => false, + canPop: false, child: Stack( - alignment: Alignment.topRight, - children: [ - Container( - width: double.infinity, - height: 370.h, - padding: - EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h), - decoration: new BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(8), - topRight: Radius.circular(8), - ), - ), - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Container( - padding: EdgeInsets.only(right: 18.w), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10.h, - ), - Text( - "VIP会员专享价格" + alignment: Alignment.topRight, + children: [ + Container( + width: double.infinity, + height: 370.h, + padding: EdgeInsets.symmetric( + horizontal: 14.w, vertical: 16.h, + ), + decoration: new BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + padding: EdgeInsets.only(right: 18.w), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10.h, + ), + Text( + "VIP会员专享价格" "\n*用户开通回乡VIP卡,可享以专享优惠价格购买海峡姐妹APP入驻商户部分门店商品的会员权益。" "\n*权益适用产品及专享价格,以会员权益页面公示为准。" "\n为满足不同用户的需求,海峡姐妹将可能适时调整权益适用产品及专享价格,具体权益内容以会员权益页面公示为准。", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 14.sp, - height: 1.7.h, - color: Colors.black, - ), + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + height: 1.7.h, + color: Colors.black, + ), + ), + ], ), - ], + ), ), ), - ), - ), - GestureDetector( - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - margin: EdgeInsets.only(right: 14.w, top: 16.h), - child: Image.asset( - "assets/image/cancel.webp", - width: 24, - height: 24, - ), - ), - ) - ], - )); + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Container( + margin: EdgeInsets.only(right: 14.w, top: 16.h), + child: Image.asset( + "assets/image/cancel.webp", + width: 24, + height: 24, + ), + ), + ) + ], + )); }); }, backgroundColor: Colors.transparent, diff --git a/lib/vip/vip_view/vip_top.dart b/lib/vip/vip_view/vip_top.dart index 3ddad0dc..7d7fc7ef 100644 --- a/lib/vip/vip_view/vip_top.dart +++ b/lib/vip/vip_view/vip_top.dart @@ -1,25 +1,23 @@ import 'dart:io'; -import 'package:dio/dio.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:fluwx/fluwx.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:shared_preferences/shared_preferences.dart'; +import 'package:tobias/tobias.dart'; import '../../generated/l10n.dart'; -import '../../retrofit/data/base_data.dart'; -import '../../retrofit/data/vip_card_home.dart'; -import '../../retrofit/data/wx_pay.dart'; +import '../../data/base_data.dart'; +import '../../data/vip_card_home.dart'; +import '../../data/wx_pay.dart'; import '../../retrofit/retrofit_api.dart'; import '../../utils/flutter_utils.dart'; import '../../utils/min.dart'; -import 'package:tobias/tobias.dart' as tobias; class VipTop extends StatefulWidget { - final VipCardHome vipCardHome; + final VipCardHome? vipCardHome; + // final Function queryVipHome; VipTop(this.vipCardHome); @@ -32,16 +30,19 @@ class VipTop extends StatefulWidget { class _VipTop extends State { int selectIndex = 0; - ApiService apiService; + ApiService? apiService; var payType = 1; - dynamic payListen; + + Fluwx fluwx = Fluwx(); + Tobias tobias = Tobias(); @override void initState() { super.initState(); - payListen = weChatResponseEventHandler.listen((event) async { - print("payCallback: ${event.errCode}"); - if (event.errCode == 0) { + + fluwx.addSubscriber((response) { + print("payCallback: ${response.errCode}"); + if (response.errCode == 0) { // widget.queryVipHome(); SmartDialog.showToast("支付成功", alignment: Alignment.center); } else { @@ -51,24 +52,12 @@ class _VipTop extends State { }); } - @override - void dispose() { - super.dispose(); - if (payListen != null) payListen.cancel(); - } - - rechargeVIP() async { - if (apiService == null) { - SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), - context: context, token: value.getString("token"), showLoading: true); - } - BaseData baseData = await apiService.orderVip({ - "cardId": widget?.vipCardHome?.cards[selectIndex]?.id, + BaseData? baseData = await apiService?.orderVip({ + "cardId": widget.vipCardHome?.cards?[selectIndex].id, "type": payType }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (payType == 1) { if (Platform.isAndroid) { if (!(await Min.isInitialize())) { @@ -78,29 +67,35 @@ class _VipTop extends State { await Min.initialize(); } } - WxPay wxPay = WxPay.fromJson(baseData.data); - await registerWxApi( - appId: wxPay.appId, + WxPay wxPay = WxPay.fromJson(baseData!.data); + if (wxPay.isAnyEmpty()) { + SmartDialog.showToast("微信支付参数错误", alignment: Alignment.center); + return; + } + + await fluwx.registerApi( + appId: wxPay.appId!, doOnAndroid: true, universalLink: "https://hx.lotus-wallet.com/app/", ); - payWithWeChat( - appId: wxPay.appId, - partnerId: wxPay.partnerId, - prepayId: wxPay.prepayId, - packageValue: wxPay.packageValue, - nonceStr: wxPay.nonceStr, - timeStamp: int.tryParse(wxPay.timeStamp), - sign: wxPay.sign, - ); + fluwx.pay( + which: Payment( + appId: wxPay.appId!, + partnerId: wxPay.partnerId!, + prepayId: wxPay.prepayId!, + packageValue: wxPay.packageValue!, + nonceStr: wxPay.nonceStr!, + timestamp: int.tryParse(wxPay.timeStamp!) ?? 0, + sign: wxPay.sign!, + )); } else { - tobias.isAliPayInstalled().then((value) => { + tobias.isAliPayInstalled.then((value) => { // 判断是否安装了支付宝 if (!value) {SmartDialog.showToast("请安装支付宝", alignment: Alignment.center)} else { - tobias.aliPay(baseData.data["body"]).then((payRes) { + tobias.pay(baseData!.data["body"]).then((payRes) { if (payRes['resultStatus'] == 9000 || payRes['resultStatus'] == '9000') { // widget.queryVipHome(); @@ -115,7 +110,7 @@ class _VipTop extends State { }); } } else { - SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); } } @@ -272,9 +267,9 @@ class _VipTop extends State { ///充值引导 Widget rechargeGuide() { return Container( - margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom:21.h,top:16.h), + margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 21.h, top: 16.h), width: double.infinity, - padding: EdgeInsets.only(top:14.h, left:12.h, bottom:8.h, right:14.w), + padding: EdgeInsets.only(top: 14.h, left: 12.h, bottom: 8.h, right: 14.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(6.w), color: Colors.white, @@ -290,8 +285,8 @@ class _VipTop extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded(child: - Column( + Expanded( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text.rich( @@ -349,7 +344,7 @@ class _VipTop extends State { ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ + onTap: () { Navigator.of(context).pushNamed('/router/recharge_page'); }, child: Container( @@ -362,7 +357,8 @@ class _VipTop extends State { ), color: Color(0xFFFFFFFF), ), - padding: EdgeInsets.symmetric(vertical: 4.h,horizontal: 12.w), + padding: + EdgeInsets.symmetric(vertical: 4.h, horizontal: 12.w), child: Row(children: [ Text( "去储值", @@ -374,9 +370,9 @@ class _VipTop extends State { ), Image.asset( "assets/image/icon_right.webp", - width:13, + width: 13, fit: BoxFit.fill, - height:13, + height: 13, color: Color(0xFF32A060), ) ]), @@ -386,14 +382,18 @@ class _VipTop extends State { ) ], )), - SizedBox(width: 11.h,), - Padding(padding:EdgeInsets.only(top:4.h), - child: Image.asset( - "assets/image/vip_cz.webp", - fit: BoxFit.fill, //填充剩余空间 - height:50.w, - width: 54.h, - ),) + SizedBox( + width: 11.h, + ), + Padding( + padding: EdgeInsets.only(top: 4.h), + child: Image.asset( + "assets/image/vip_cz.webp", + fit: BoxFit.fill, //填充剩余空间 + height: 50.w, + width: 54.h, + ), + ) ], ), ); @@ -435,7 +435,7 @@ class _VipTop extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - widget?.vipCardHome?.member?.nickname ?? "", + widget.vipCardHome?.member?.nickname ?? "", style: TextStyle( color: Color(0xff32A060), fontSize: 15.sp, @@ -445,9 +445,9 @@ class _VipTop extends State { SizedBox( height: 15.h, ), - if (widget?.vipCardHome?.member?.isVip ?? false) + if (widget.vipCardHome?.member?.isVip ?? false) Text( - "有效期至 ${(widget?.vipCardHome?.member?.vipExpire ?? "").substring(0, (widget?.vipCardHome?.member?.vipExpire ?? "").indexOf(" "))}", + "有效期至 ${(widget.vipCardHome?.member?.vipExpire ?? "").substring(0, (widget.vipCardHome?.member?.vipExpire ?? "").indexOf(" "))}", style: TextStyle( color: Color(0xff32A060), fontSize: 13.sp, @@ -470,20 +470,20 @@ class _VipTop extends State { child: ListView.builder( scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), - itemCount: widget?.vipCardHome?.cards?.length ?? 0, + itemCount: widget.vipCardHome?.cards?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { setState(() { selectIndex = position; - if (widget?.vipCardHome?.member?.isVip ?? false) { + if (widget.vipCardHome?.member?.isVip ?? false) { vipShowBottomSheet(); } else { vipTreatyShowBottomSheet(); } }); }, - child: vipCardItem(widget?.vipCardHome?.cards[position], position), + child: vipCardItem(widget.vipCardHome!.cards![position], position), ); }, ), @@ -522,7 +522,7 @@ class _VipTop extends State { children: [ Expanded( child: Text( - "${cards?.duration.toString() ?? ""}天", + "${cards.duration.toString() ?? ""}天", textAlign: TextAlign.center, style: TextStyle( color: Colors.black, @@ -534,7 +534,7 @@ class _VipTop extends State { ), Expanded( child: Text( - cards?.name ?? "", + cards.name ?? "", textAlign: TextAlign.center, maxLines: 1, overflow: TextOverflow.ellipsis, @@ -563,7 +563,7 @@ class _VipTop extends State { ), TextSpan( text: - "${AppUtils.calculateDouble(double.tryParse(cards?.price ?? ""))}", + "${AppUtils.calculateDouble(double.tryParse(cards.price ?? "0") ?? 0)}", style: TextStyle( fontSize: 36.sp, color: Color(0xff32A060), @@ -576,7 +576,7 @@ class _VipTop extends State { ], ), ), - if (cards.autoSubscribe) + if (cards.autoSubscribe ?? false) Container( padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 6.w), margin: EdgeInsets.only(right: 15.w), @@ -624,7 +624,7 @@ class _VipTop extends State { color: Colors.white, borderRadius: new BorderRadius.only( topLeft: const Radius.circular(8.0), - topRight: const Radius.circular(8.0))), + topRight: const Radius.circular(8.0),),), child: Container( height: 275.h, child: Column( @@ -644,7 +644,7 @@ class _VipTop extends State { fontSize: 15.sp, color: Color(0xff0D0D0D), ), - )), + ),), GestureDetector( onTap: () { Navigator.of(context).pop(); @@ -655,7 +655,8 @@ class _VipTop extends State { ), ), ], - )), + ), + ), SizedBox( height: 11.h, ), @@ -665,7 +666,7 @@ class _VipTop extends State { child: ListView.builder( scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), - itemCount: widget?.vipCardHome?.cards?.length ?? 0, + itemCount: widget.vipCardHome?.cards?.length ?? 0, itemBuilder: (context, position) { return GestureDetector( onTap: () { @@ -673,8 +674,7 @@ class _VipTop extends State { selectIndex = position; }); }, - child: vipCardItem( - widget?.vipCardHome?.cards[position], position), + child: vipCardItem(widget.vipCardHome!.cards![position], position), ); }, ), @@ -683,10 +683,12 @@ class _VipTop extends State { width: double.infinity, height: 40.h, margin: EdgeInsets.only( - top: 14.h, left: 14.w, right: 14.w, bottom: 5.h), - decoration: new BoxDecoration( + top: 14.h, left: 14.w, right: 14.w, bottom: 5.h, + ), + decoration: BoxDecoration( color: Color(0xff383A38), - borderRadius: BorderRadius.circular(24)), + borderRadius: BorderRadius.circular(24), + ), child: GestureDetector( onTap: () { Navigator.of(context).pop(); @@ -698,7 +700,8 @@ class _VipTop extends State { padding: EdgeInsets.symmetric(horizontal: 16.w), decoration: new BoxDecoration( color: Color(0xff32A060), - borderRadius: BorderRadius.circular(24)), + borderRadius: BorderRadius.circular(24), + ), child: Text( S.of(context).likexufei, style: TextStyle( @@ -713,11 +716,12 @@ class _VipTop extends State { ), GestureDetector( onTap: () { - Navigator.of(context) - .pushNamed('/router/user_vip_service_page'); + Navigator.of(context).pushNamed('/router/user_vip_service_page'); }, child: Padding( - padding: EdgeInsets.only(left: 14.w, bottom: 15.h), + padding: EdgeInsets.only( + left: 14.w, bottom: 15.h, + ), child: Text.rich( TextSpan( children: [ @@ -745,7 +749,8 @@ class _VipTop extends State { ), ], ), - )); + ), + ); } ///会员卡包月协议弹窗 @@ -766,7 +771,7 @@ class _VipTop extends State { color: Colors.white, borderRadius: new BorderRadius.only( topLeft: const Radius.circular(6.0), - topRight: const Radius.circular(6.0))), + topRight: const Radius.circular(6.0),),), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -815,7 +820,8 @@ class _VipTop extends State { padding: EdgeInsets.symmetric(horizontal: 16.w), decoration: new BoxDecoration( color: Color(0xff32A060), - borderRadius: BorderRadius.circular(24)), + borderRadius: BorderRadius.circular(24), + ), child: Text( S.of(context).likekaitong, style: TextStyle( @@ -828,7 +834,8 @@ class _VipTop extends State { ), ) ], - )); + ), + ); } ///会员卡包月购买弹窗 @@ -843,18 +850,21 @@ class _VipTop extends State { }); }, backgroundColor: Colors.transparent, - context: context); + context: context, + ); } Widget buildBottomSheetWidget(BuildContext context, state) { return Container( padding: - EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w, bottom: 35.h), + EdgeInsets.only( + top: 16.h, left: 16.w, right: 16.w, bottom: 35.h, + ), decoration: new BoxDecoration( color: Colors.white, borderRadius: new BorderRadius.only( topLeft: const Radius.circular(8.0), - topRight: const Radius.circular(8.0))), + topRight: const Radius.circular(8.0),),), child: Container( height: 230.h, child: Column( @@ -884,8 +894,7 @@ class _VipTop extends State { ), ], ), - if (!(widget?.vipCardHome?.cards[selectIndex]?.autoSubscribe ?? - false)) + if (!(widget.vipCardHome?.cards?[selectIndex].autoSubscribe ?? false)) GestureDetector( onTap: () { state(() { @@ -894,7 +903,8 @@ class _VipTop extends State { }, child: Container( padding: EdgeInsets.only( - left: 14.w, right: 32.w, top: 11.h, bottom: 11.h), + left: 14.w, right: 32.w, top: 11.h, bottom: 11.h, + ), margin: EdgeInsets.only(top: 17.h), decoration: BoxDecoration( borderRadius: BorderRadius.circular(4.w), @@ -909,7 +919,7 @@ class _VipTop extends State { offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], ), child: Row( @@ -996,7 +1006,8 @@ class _VipTop extends State { height: 40.h, decoration: new BoxDecoration( color: Color(0xff383A38), - borderRadius: BorderRadius.circular(24)), + borderRadius: BorderRadius.circular(24), + ), child: Row( children: [ SizedBox( @@ -1016,10 +1027,7 @@ class _VipTop extends State { ), ), TextSpan( - text: AppUtils.calculateDouble(double.tryParse( - widget?.vipCardHome?.cards[selectIndex] - ?.price ?? - "")), + text: "${AppUtils.calculateDouble(double.tryParse(widget.vipCardHome?.cards?[selectIndex].price ?? "0") ?? 0)}", style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 20.sp, @@ -1030,7 +1038,8 @@ class _VipTop extends State { ], ), textDirection: TextDirection.ltr, - )), + ), + ), GestureDetector( onTap: () { Navigator.of(context).pop(); @@ -1042,7 +1051,8 @@ class _VipTop extends State { padding: EdgeInsets.symmetric(horizontal: 16.w), decoration: new BoxDecoration( color: Color(0xff32A060), - borderRadius: BorderRadius.circular(24)), + borderRadius: BorderRadius.circular(24), + ), child: Text( S.of(context).likezhifu, style: TextStyle( @@ -1059,6 +1069,7 @@ class _VipTop extends State { ), ], ), - )); + ), + ); } } diff --git a/lib/web/web_page.dart b/lib/web/web_page.dart index 48d27768..24114afc 100644 --- a/lib/web/web_page.dart +++ b/lib/web/web_page.dart @@ -1,16 +1,14 @@ import 'dart:io'; import 'dart:ui'; -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/examine_instance.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/article.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/examine_instance.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/share_dialog.dart'; @@ -23,11 +21,9 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:sharesdk_plugin/sharesdk_defines.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart'; import 'package:sharesdk_plugin/sharesdk_map.dart'; -import 'package:webview_flutter/webview_flutter.dart'; -import 'package:flutter/cupertino.dart'; class WebPage extends StatefulWidget { - final Map arguments; + final Map? arguments; ///富文本 文章 活动 WebPage({this.arguments}); @@ -39,13 +35,13 @@ class WebPage extends StatefulWidget { } class _WebPage extends State with WidgetsBindingObserver { - ApiService apiService; + ApiService? apiService; int commentTotal = 0; String hintText = S.current.liuxianinjingcaidepinglunba; var commentFocus = FocusNode(); String parenId = "0"; - Activity activity; - Article article; + Activity? activity; + Article? article; final double fontSize = 16.sp; final GlobalKey commentKey = GlobalKey(); final GlobalKey inputKey = GlobalKey(); @@ -61,8 +57,6 @@ class _WebPage extends State with WidgetsBindingObserver { super.initState(); WidgetsBinding.instance.addObserver(this); commentFocus.addListener(_focusNodeListener); - if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); - queryHtml(); } @@ -136,25 +130,20 @@ class _WebPage extends State with WidgetsBindingObserver { queryHtml() async { SharedPreferences value = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = - ApiService(Dio(), context: context, token: value.getString("token")); - if (widget.arguments["activityId"] != null) { - BaseData baseData = await apiService - .activityInfo(widget.arguments["activityId"]) + if (widget.arguments?["activityId"] != null) { + BaseData? baseData = await apiService?.activityInfo(widget.arguments!["activityId"]) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - activity = baseData.data; + if (baseData?.isSuccess ?? false) { + activity = baseData!.data; setState(() {}); } } - if (widget.arguments["articleId"] != null) { - BaseData
baseData = await apiService - .informationInfo(widget.arguments["articleId"]) + if (widget.arguments?["articleId"] != null) { + BaseData
? baseData = await apiService?.informationInfo(widget.arguments!["articleId"]) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - article = baseData.data; + if (baseData?.isSuccess ?? false) { + article = baseData!.data; setState(() {}); } } @@ -162,15 +151,14 @@ class _WebPage extends State with WidgetsBindingObserver { //发布评论 _queryMemberComment(String content) async { - BaseData baseData = await apiService.memberComment({ + BaseData? baseData = await apiService?.memberComment({ "content": content, "parentId": parenId, - "relationalId": - widget.arguments["activityId"] ?? widget.arguments["articleId"], + "relationalId": widget.arguments?["activityId"] ?? widget.arguments?["articleId"], "relationalType": 1 }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { - CommentListState _commentList = commentKey.currentState; + if (baseData?.isSuccess ?? false) { + CommentListState _commentList = commentKey.currentState as CommentListState; _commentList.queryMemberCommentList(); commentTextController.text = ""; FocusScope.of(context).unfocus(); @@ -181,28 +169,20 @@ class _WebPage extends State with WidgetsBindingObserver { share() async { SSDKMap params = SSDKMap() ..setGeneral( + activity?.mainTitle ?? article?.mainTitle ?? "", activity != null - ? activity.mainTitle + ? activity!.viceTitle : article != null - ? article.mainTitle - : "", - activity != null - ? activity.viceTitle - : article != null - ? article.viceTitle + ? article!.viceTitle : "", [ activity != null - ? activity.coverImg + ? activity!.coverImg : article != null - ? article.coverImg + ? article!.coverImg : "", ], - activity != null - ? activity.coverImg - : article != null - ? article.coverImg - : "", + activity!.coverImg ?? article!.coverImg ?? "", "", buildShareUrl(), "", @@ -220,7 +200,7 @@ class _WebPage extends State with WidgetsBindingObserver { if (platform == ShareSDKPlatforms.line) { params.map["type"] = SSDKContentTypes.text.value; params.map["text"] = - "${activity != null ? activity.viceTitle : article != null ? article.viceTitle : ""} ${buildShareUrl()}"; + "${activity != null ? activity!.viceTitle : article != null ? article!.viceTitle : ""} ${buildShareUrl()}"; } SharesdkPlugin.share(platform, params, (state, userData, contentEntity, error) { @@ -231,32 +211,24 @@ class _WebPage extends State with WidgetsBindingObserver { } String buildShareUrl() { - return "https://hx.lotus-wallet.com/index.html?id=${widget.arguments["activityId"] ?? widget.arguments["articleId"]}&type=${activity != null ? "activity" : article != null ? "article" : ""}"; + return "https://hx.lotus-wallet.com/index.html?id=${widget.arguments?["activityId"] ?? widget.arguments?["articleId"]}&type=${activity != null ? "activity" : article != null ? "article" : ""}"; } //给文章/活动点赞 _queryInformationLikes() async { - BaseData baseData = await apiService - .informationLikes( - widget.arguments["activityId"] ?? widget.arguments["articleId"]) + BaseData? baseData = await apiService?.informationLikes(widget.arguments?["activityId"] ?? widget.arguments?["articleId"]) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { if (article != null) { - if (article.liked) { - article.likes -= 1; - } else { - article.likes += 1; - } - article.liked = !article.liked; - } else if (activity != null) { - if (activity.liked) { - activity.likes -= 1; + int likes = article!.likes ?? 0; + if (article!.liked ?? false) { + article!.likes = (likes - 1); } else { - activity.likes += 1; + article!.likes = (likes + 1); } - activity.liked = !activity.liked; + article!.liked = !(article!.liked ?? false); } - commentKey.currentState.setState(() {}); + commentKey.currentState?.setState(() {}); } else { // SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } @@ -297,9 +269,9 @@ class _WebPage extends State with WidgetsBindingObserver { background: Color(0xFFFFFFFFF), leadingColor: Colors.black, title: activity != null - ? activity.mainTitle + ? activity!.mainTitle : article != null - ? article.mainTitle + ? article!.mainTitle : "", titleSize: fontSize, titleColor: Colors.black, @@ -312,7 +284,7 @@ class _WebPage extends State with WidgetsBindingObserver { onTap: () { commentFocus.unfocus(); hintText = S.of(context).liuxianinjingcaidepinglunba; - inputKey.currentState.setState(() {}); + inputKey.currentState?.setState(() {}); parenId = "0"; }, child: SingleChildScrollView( @@ -337,8 +309,8 @@ class _WebPage extends State with WidgetsBindingObserver { CommentList( commentKey, article?.likes ?? activity?.likes ?? 0, - widget.arguments["activityId"] ?? - widget.arguments["articleId"], + widget.arguments?["activityId"] ?? + widget.arguments?["articleId"], 1, isKeyBoardShow, _reply, @@ -390,12 +362,11 @@ class _WebPage extends State with WidgetsBindingObserver { ///删除评论 delComment() async { - BaseData baseData = await apiService - .delComment( - widget.arguments["activityId"] ?? widget.arguments["articleId"]) + BaseData? baseData = await apiService?.delComment( + widget.arguments?["activityId"] ?? widget.arguments?["articleId"]) .catchError((onError) {}); - if (baseData != null && baseData.isSuccess) { - CommentListState _commentList = commentKey.currentState; + if (baseData?.isSuccess ?? false) { + CommentListState _commentList = commentKey.currentState as CommentListState; _commentList.queryMemberCommentList(); } } @@ -410,7 +381,7 @@ class _WebPage extends State with WidgetsBindingObserver { ///滑动到评论列表 _toComment() { if (commentKey.currentContext == null) return; - RenderBox firstRenderBox = commentKey.currentContext.findRenderObject(); + RenderBox firstRenderBox = commentKey.currentContext!.findRenderObject() as RenderBox; Offset first = firstRenderBox.localToGlobal(Offset.zero); scrollController.animateTo( first.dy + diff --git a/lib/web/web_turntable_activity.dart b/lib/web/web_turntable_activity.dart index 3c4b49db..d108c98f 100644 --- a/lib/web/web_turntable_activity.dart +++ b/lib/web/web_turntable_activity.dart @@ -1,16 +1,11 @@ -import 'dart:io'; -import 'dart:ui'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:webview_flutter/webview_flutter.dart'; -import 'package:webview_flutter/src/webview_cupertino.dart'; -import 'package:flutter/cupertino.dart'; class WebTurntableActivity extends StatefulWidget { - final Map arguments; + final Map? arguments; ///转盘活动 WebTurntableActivity({this.arguments}); @@ -23,7 +18,9 @@ class WebTurntableActivity extends StatefulWidget { class _WebTurntableActivity extends State with WidgetsBindingObserver { final ScrollController scrollController = ScrollController(); - String token; + String? token; + + late WebViewController _webViewController; @override void initState() { @@ -32,10 +29,26 @@ class _WebTurntableActivity extends State with WidgetsBind SharedPreferences.getInstance().then((value) => { token = value.getString('token'), + _webViewController = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) { + // Update loading bar. + }, + onPageStarted: (String url) {}, + onPageFinished: (String url) {}, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + // if (request.url.startsWith('https://www.youtube.com/')) { + // return NavigationDecision.prevent; + // } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse("http://192.168.10.90:5500/lottery.html?token=${token}")) }); - if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); - if (Platform.isIOS) WebView.platform = CupertinoWebView(); - } @override @@ -63,11 +76,10 @@ class _WebTurntableActivity extends State with WidgetsBind width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, alignment: Alignment.center, - child: - WebView( - initialUrl: "http://192.168.10.90:5500/lottery.html?token=${token}", - javascriptMode: JavascriptMode.unrestricted, - )), + child: WebViewWidget( + controller: _webViewController, + ), + ), ); } } diff --git a/lib/web/web_view/comment_list.dart b/lib/web/web_view/comment_list.dart index 6a5481a6..6700c2fd 100644 --- a/lib/web/web_view/comment_list.dart +++ b/lib/web/web_view/comment_list.dart @@ -1,13 +1,10 @@ -import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/article.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/member_comment_list.dart'; -import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/data/base_data.dart'; +import 'package:huixiang/data/member_comment.dart'; +import 'package:huixiang/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/comment_menu.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -20,10 +17,10 @@ class CommentList extends StatefulWidget { final Function reply; final Function delCommentTips; final double fontSize; - final String relationalId; + final String? relationalId; final int relationalType; final int like; - final Function requestApiFinish; + final Function? requestApiFinish; CommentList(Key key, this.like, this.relationalId, this.relationalType, this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize, @@ -38,26 +35,27 @@ class CommentList extends StatefulWidget { class CommentListState extends State { int commentTotal = 0; - List memberList = []; - ApiService apiService; + List memberList = []; + ApiService? apiService; //评论点赞 queryCommentLike(String id) async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - String token = sharedPreferences.getString("token"); - if (token == null || token == "") { + String token = sharedPreferences.getString("token") ?? ""; + if (token == "") { LoginTipsDialog().show(context); return; } - BaseData baseData = await apiService.commentLike(id).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + BaseData? baseData = await apiService?.commentLike(id).catchError((error) {}); + if (baseData?.isSuccess ?? false) { memberList.forEach((element) { if (element.id == id) { - if (element.liked) { - element.likes -= 1; + int likes = element.likes ?? 0; + if (element.liked ?? false) { + element.likes = (likes - 1); element.liked = false; } else { - element.likes += 1; + element.likes = (likes + 1); element.liked = true; } } @@ -109,11 +107,11 @@ class CommentListState extends State { ], ), ), - if (memberList != null && memberList.length > 0) + if (memberList.length > 0) ListView.builder( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), - itemCount: memberList != null ? memberList.length : 0, + itemCount: memberList?.length ?? 0, scrollDirection: Axis.vertical, itemBuilder: (context, position) { return Material( @@ -128,7 +126,7 @@ class CommentListState extends State { ); }, ), - if (memberList != null && memberList.length >= 1) + if (memberList.length >= 1) Container( decoration: BoxDecoration( color: Color(0xFFF2F2F2), @@ -189,28 +187,20 @@ class CommentListState extends State { //评论列表 queryMemberCommentList() async { - if (widget?.relationalId == null || widget.relationalId.isEmpty) return; + if (widget.relationalId?.isEmpty ?? true) return; SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); - if (apiService == null) - apiService = ApiService( - Dio(), - context: context, - token: sharedPreferences.getString("token"), - showLoading: false, - ); - BaseData> baseData = - await apiService.memberCommentList({ + BaseData>? baseData = await apiService?.memberCommentList({ "pageNum": 1, "pageSize": 100, "relationalId": widget.relationalId, "relationalType": widget.relationalType, }).catchError((error) {}); - if (baseData != null && baseData.isSuccess) { + if (baseData?.isSuccess ?? false) { setState(() { memberList.clear(); - commentTotal = baseData.data.size; - widget.requestApiFinish(commentTotal); - memberList.addAll(baseData.data.list); + commentTotal = baseData!.data?.size; + widget.requestApiFinish?.call(commentTotal); + memberList.addAll(baseData.data?.list ?? []); contentHeight(); setState(() {}); }); @@ -242,7 +232,7 @@ class CommentListState extends State { }); } - Widget commentItem(MemberCommentList memberList) { + Widget commentItem(MemberComment member) { return Container( padding: EdgeInsets.symmetric(vertical: 8.w), child: Column( @@ -258,13 +248,13 @@ class CommentListState extends State { setState(() { Navigator.of(context) .pushNamed('/router/personal_page', arguments: { - "memberId": memberList.createUser, + "memberId": member.createUser, }); }); }, behavior: HitTestBehavior.opaque, child: MImage( - memberList.userAvatarUrl ?? "", + member.userAvatarUrl ?? "", fit: BoxFit.cover, isCircle: true, width: 40, @@ -288,7 +278,7 @@ class CommentListState extends State { TextSpan( children: [ TextSpan( - text: memberList.username, + text: member.username, style: TextStyle( fontWeight: FontWeight.bold, fontSize: widget.fontSize + 2, @@ -303,7 +293,7 @@ class CommentListState extends State { height: 3.h, ), Text( - memberList.createTime, + member.createTime ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -345,15 +335,17 @@ class CommentListState extends State { height: 16, ); }, - isLiked: memberList.liked ?? false, + isLiked: member.liked ?? false, onTap: (isLiked) async { - await queryCommentLike(memberList.id); - return (memberList == null || memberList.liked == null) + if (member.id?.isNotEmpty ?? false) { + await queryCommentLike(member.id!); + } + return (member.liked == null) ? false - : memberList.liked; + : member.liked; }, - likeCount: memberList.likes, - countBuilder: (int count, bool isLiked, String text) { + likeCount: member.likes, + countBuilder: (int? count, bool isLiked, String text) { return Text( text, style: TextStyle( @@ -371,10 +363,10 @@ class CommentListState extends State { GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - setState(() { - showPressMenu(memberList.createUser, - memberList); - }); + if (member.createUser?.isNotEmpty ?? false) { + showPressMenu(member.createUser!, memberList); + } + setState(() {}); }, child: Container( @@ -387,7 +379,7 @@ class CommentListState extends State { child: Align( alignment: Alignment.centerLeft, child: Text( - memberList.content, + member.content ?? "", style: TextStyle( fontSize: widget.fontSize + 2, color: Color(0xff1A1A1A), @@ -398,40 +390,39 @@ class CommentListState extends State { SizedBox( height: 12.h, ), - if (memberList.parentContent != null) - Container( - margin: EdgeInsets.only(left: 68.w, right: 16.w), - decoration: BoxDecoration( - color: Color(0xffF2F2F2), - borderRadius: BorderRadius.circular(2.0), - ), - child: Padding( - padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "${memberList.parentUserName}:" ?? "", + Container( + margin: EdgeInsets.only(left: 68.w, right: 16.w), + decoration: BoxDecoration( + color: Color(0xffF2F2F2), + borderRadius: BorderRadius.circular(2.0), + ), + child: Padding( + padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "${member.parentUserName}:" ?? "", + style: TextStyle( + fontSize: widget.fontSize, + color: Color(0xff808080), + ), + ), + Expanded( + flex: 1, + child: Text( + member.parentContent ?? "", style: TextStyle( fontSize: widget.fontSize, color: Color(0xff808080), ), ), - Expanded( - flex: 1, - child: Text( - memberList.parentContent ?? "", - style: TextStyle( - fontSize: widget.fontSize, - color: Color(0xff808080), - ), - ), - ), - ], - ), + ), + ], ), ), + ), ], ), ); diff --git a/lib/web/web_view/input_comment.dart b/lib/web/web_view/input_comment.dart index 09a616ba..cb9d7716 100644 --- a/lib/web/web_view/input_comment.dart +++ b/lib/web/web_view/input_comment.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/article.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/article.dart'; import 'package:like_button/like_button.dart'; import 'dart:io'; @@ -10,8 +10,8 @@ import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; class InputComment extends StatefulWidget { final String hintText; - final Activity activity; - final Article article; + final Activity? activity; + final Article? article; final bool isKeyBoardShow; final double keyboard; final bool emojiShowing; @@ -22,8 +22,8 @@ class InputComment extends StatefulWidget { final Function(String text) queryMemberComment; final Function() queryInformationLikes; final TextEditingController commentTextController; - final bool isLike; - final Function(bool emojiShow) emojiShowFunction; + final bool? isLike; + final Function(bool emojiShow)? emojiShowFunction; InputComment( Key key, @@ -148,7 +148,9 @@ class _InputComment extends State { ), if (!widget.isKeyBoardShow) InkWell( - onTap: widget.toComment, + onTap: () { + widget.toComment.call(); + }, child: Tooltip( message: S.of(context).daopinglunliebiaodingbu, child: Container( @@ -191,19 +193,19 @@ class _InputComment extends State { ); }, isLiked: (widget.activity != null - ? widget.activity.liked + ? widget.activity!.liked : widget.article != null - ? widget.article.liked + ? widget.article!.liked : widget.isLike??false), onTap: (isLiked) async { await widget.queryInformationLikes(); return (widget.activity != null - ? widget.activity.liked + ? widget.activity!.liked : widget.article != null - ? widget.article.liked - : widget.isLike??false); + ? widget.article!.liked + : widget.isLike ?? false); }, - countBuilder: (int count, bool isLiked, String text) { + countBuilder: (int? count, bool isLiked, String text) { return Text( text, style: TextStyle( @@ -226,35 +228,45 @@ class _InputComment extends State { EmojiPicker( textEditingController: widget.commentTextController, config: Config( - columns: 7, - emojiSizeMax: 32 * (Platform.isIOS ? 1.10 : 1.0), - verticalSpacing: 0, - horizontalSpacing: 0, - gridPadding: EdgeInsets.zero, - initCategory: Category.RECENT, - bgColor: const Color(0xFFF2F2F2), - // indicatorColor: Colors.blue, - iconColor: Colors.grey, - iconColorSelected: Colors.blue, - backspaceColor: Colors.blue, - skinToneDialogBgColor: Colors.white, - skinToneIndicatorColor: Colors.grey, - enableSkinTones: true, - showRecentsTab: true, - recentsLimit: 28, - replaceEmojiOnLimitExceed: false, - noRecents:Text( - "最近使用", - style: TextStyle(fontSize: 20, color: Colors.black26), - textAlign: TextAlign.center, + emojiViewConfig: EmojiViewConfig( + columns: 7, + emojiSizeMax: 32 * (Platform.isIOS ? 1.10 : 1.0), + verticalSpacing: 0, + horizontalSpacing: 0, + gridPadding: EdgeInsets.zero, + recentsLimit: 28, + buttonMode: ButtonMode.MATERIAL, + replaceEmojiOnLimitExceed: false, + loadingIndicator: const SizedBox.shrink(), + noRecents:Text( + "最近使用", + style: TextStyle(fontSize: 20, color: Colors.black26), + textAlign: TextAlign.center, + ), + backgroundColor: const Color(0xFFF2F2F2), + ), + skinToneConfig: SkinToneConfig( + enabled: true, + dialogBackgroundColor: Colors.white, + indicatorColor: Colors.grey, ), - loadingIndicator: const SizedBox.shrink(), - tabIndicatorAnimDuration: Duration(milliseconds: 0), - categoryIcons: const CategoryIcons(), - buttonMode: ButtonMode.MATERIAL, + categoryViewConfig: CategoryViewConfig( + initCategory: Category.RECENT, + iconColorSelected: Colors.blue, + backspaceColor: Colors.blue, + tabIndicatorAnimDuration: Duration(milliseconds: 0), + categoryIcons: const CategoryIcons(), + iconColor: Colors.grey, + ), + bottomActionBarConfig: BottomActionBarConfig( + buttonIconColor: Colors.grey, + ), + // indicatorColor: Colors.blue, + swapCategoryAndBottomBar: true, checkPlatformCompatibility: true, ), - )), + ), + ), ), ], ), diff --git a/lib/web/web_view/web_content.dart b/lib/web/web_view/web_content.dart index fcbc63f9..3f546837 100644 --- a/lib/web/web_view/web_content.dart +++ b/lib/web/web_view/web_content.dart @@ -1,21 +1,22 @@ import 'package:chewie/chewie.dart'; +import 'package:chewie_audio/chewie_audio.dart'; import 'package:flutter_html/flutter_html.dart'; -import 'package:flutter_html/image_render.dart'; -import 'package:chewie/src/chewie_progress_colors.dart' as chewie; import 'package:flutter/material.dart'; -import 'package:flutter_html/src/replaced_element.dart'; -import 'package:flutter_html/style.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/article.dart'; +import 'package:flutter_html_audio/flutter_html_audio.dart'; +import 'package:flutter_html_iframe/flutter_html_iframe.dart'; +import 'package:flutter_html_svg/flutter_html_svg.dart'; +import 'package:flutter_html_video/flutter_html_video.dart'; +import 'package:html/dom.dart' as dom; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/article.dart'; import 'package:video_player/video_player.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; class WebContent extends StatefulWidget { - final Activity activity; - final Article article; + final Activity? activity; + final Article? article; final Function exitFull; WebContent(this.activity, this.article, this.exitFull); @@ -36,21 +37,21 @@ class _WebContent extends State { var match = regex.allMatches(htmlCnt); if(match.length > 0){ match.forEach((element) { - var viewType = RegExp("viewType=\"(.+?)\"").firstMatch(element.group(0)).group(1); + var viewType = RegExp("viewType=\"(.+?)\"").firstMatch(element.group(0) ?? "")?.group(1); if(viewType == "text"){ - var cnt = RegExp("\\](.*?)\\[").firstMatch(element.group(0)).group(1); - var storeId = RegExp("storeId=\"(.+?)\"").firstMatch(element.group(0)).group(1); - var storeName = RegExp("storeName=\"(.+?)\"").firstMatch(element.group(0)).group(1); - var tenantCode = RegExp("tenantCode=\"(.+?)\"").firstMatch(element.group(0)).group(1); + var cnt = RegExp("\\](.*?)\\[").firstMatch(element.group(0) ?? "")?.group(1); + var storeId = RegExp("storeId=\"(.+?)\"").firstMatch(element.group(0) ?? "")?.group(1); + var storeName = RegExp("storeName=\"(.+?)\"").firstMatch(element.group(0) ?? "")?.group(1); + var tenantCode = RegExp("tenantCode=\"(.+?)\"").firstMatch(element.group(0) ?? "")?.group(1); var textCnt = "${cnt}"; - htmlCnt = htmlCnt.replaceAll(element.group(0), textCnt); + htmlCnt = htmlCnt.replaceAll(element.group(0) ?? "", textCnt); }else if(viewType == "img"){ - var cnt = RegExp("\\](.*?)\\[").firstMatch(element.group(0)).group(1); - var storeId = RegExp("storeId=\"(.+?)\"").firstMatch(element.group(0)).group(1); - var storeName = RegExp("storeName=\"(.+?)\"").firstMatch(element.group(0)).group(1); - var tenantCode = RegExp("tenantCode=\"(.+?)\"").firstMatch(element.group(0)).group(1); + var cnt = RegExp("\\](.*?)\\[").firstMatch(element.group(0) ?? "")?.group(1); + var storeId = RegExp("storeId=\"(.+?)\"").firstMatch(element.group(0) ?? "")?.group(1); + var storeName = RegExp("storeName=\"(.+?)\"").firstMatch(element.group(0) ?? "")?.group(1); + var tenantCode = RegExp("tenantCode=\"(.+?)\"").firstMatch(element.group(0) ?? "")?.group(1); var textCnt = ""; - htmlCnt = htmlCnt.replaceAll(element.group(0), textCnt); + htmlCnt = htmlCnt.replaceAll(element.group(0) ?? "", textCnt); } }); } @@ -62,7 +63,7 @@ class _WebContent extends State { backgroundColor: Color(0xffffffff) ) }, - onLinkTap: (url, ct, attributes, element) { + onLinkTap: (url, attributes, element) { if(attributes.containsKey("storeid")){ Navigator.of(context).pushNamed( '/router/store_order', @@ -74,7 +75,7 @@ class _WebContent extends State { ); } }, - onImageTap: (url,ct,attributes, element) { + onAnchorTap: (url, attributes, element) { if(attributes.containsKey("storeid")){ Navigator.of(context).pushNamed( '/router/store_order', @@ -86,155 +87,47 @@ class _WebContent extends State { ); } }, - customImageRenders: { - assetUriMatcher(): assetImageRender(), - networkSourceMatcher(extension: "svg"): - svgNetworkImageRender(), - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); - }, + extensions: [ + SvgHtmlExtension(), + VideoHtmlExtension( + videoControllerCallback: (dom.Element? element, ChewieController chewieController, VideoPlayerController videoPlayerController) { + this.videoPlayerController = videoPlayerController; + this.chewieController = chewieController; + } ), - }, - customRender: { - "video": - (context, parsedChild) { - var src = context.tree.element.attributes["src"]; - return videoWidget( - double.tryParse(context.tree.element.attributes["width"] ?? ""), - double.tryParse( - context.tree.element.attributes["height"] ?? ""), - (src != null && - src != "" && - src.endsWith(".mp4")) - ? src - : context.tree.children.first.attributes["src"], - context.tree.attributes["sandbox"]); - }, - "iframe": - (context, parsedChild) { - var src = context.tree.element.children.firstWhere((element) => element.localName == "source").attributes["src"]; - return videoWidget( - double.tryParse(context.style.width ?? ""), - double.tryParse(context.style.height ?? ""), - (src != null && - src != "" && - src.endsWith(".mp4")) - ? src - : context.tree.children.first.attributes["src"], - context.tree.attributes["sandbox"]); - }, - "audio": - (context, parsedChild) { - final sources = [ - if (context.tree.attributes['src'] != null) - context.tree.attributes['src'], - ]; - if (sources == null || - sources.isEmpty || - sources.first == null) { - return EmptyContentElement(); - } - return audioWidget( - context.tree.attributes['controls'] != null, - context.tree.attributes['loop'] != null, - context.tree.attributes['autoplay'] != null, - sources, - context.style.width ?? 300.w, - ); - }, - }, - ); - } - - VideoPlayerController videoPlayerController; - ChewieController chewieAudioController; - Chewie chewies; - - Widget videoWidget(double width, double height, src, sandboxMode) { - print("src : $src"); - chewieAudioController = ChewieController( - videoPlayerController: videoPlayerController = - VideoPlayerController.network( - src, - ), - aspectRatio: width / height, - //宽高比 - autoPlay: false, - //自动播放 - looping: false, - //循环播放 - allowFullScreen: true, - // systemOverlaysAfterFullScreen: [], - // systemOverlaysOnEnterFullScreen: [], - // deviceOrientationsAfterFullScreen: [], - // deviceOrientationsOnEnterFullScreen: [], - // 拖动条样式颜色 - materialProgressColors: chewie.ChewieProgressColors( - playedColor: Colors.white, - handleColor: Colors.white, - backgroundColor: Colors.grey, - bufferedColor: Colors.transparent, - ), - autoInitialize: true, - ); - - chewieAudioController.addListener(_fullScreenListener); - - return MediaQuery( - data: MediaQuery.of(context).copyWith( - textScaleFactor: 0.9, - ), - child: Container( - width: MediaQuery.of(context).size.width - 17, - height: (MediaQuery.of(context).size.width) / (width / height), - child: chewies = Chewie( - controller: chewieAudioController, + IframeHtmlExtension(), + AudioHtmlExtension( + audioControllerCallback: (dom.Element? element, ChewieAudioController chewieAudioController, VideoPlayerController videoPlayerController) { + this.videoPlayerController = videoPlayerController; + this.chewieAudioController = chewieAudioController; + } ), - ), + ], ); } - Future _fullScreenListener() async { - print("object: isPlaying: ${videoPlayerController.value.isPlaying}"); - print("object: isFullScreen: ${chewieAudioController.isFullScreen}"); - - if (!chewieAudioController.isFullScreen) { - Future.delayed(Duration(seconds: 1), () { - widget.exitFull(); - }); - } - } - - Widget audioWidget(showControls, loop, autoplay, src, width) { - return Container( - width: width, - child: chewies = Chewie( - controller: chewieAudioController = ChewieController( - videoPlayerController: VideoPlayerController.network( - src.first ?? "", - ), - autoPlay: autoplay, - looping: loop, - showControls: showControls, - autoInitialize: true, - ), - ), - ); - } + VideoPlayerController? videoPlayerController; + ChewieAudioController? chewieAudioController; + ChewieController? chewieController; @override void dispose() { + if (chewieController != null) { + chewieController!.pause(); + chewieController!.dispose(); + chewieController = null; + } + if (chewieAudioController != null) { - chewieAudioController.pause(); - chewieAudioController.dispose(); + chewieAudioController!.pause(); + chewieAudioController!.dispose(); chewieAudioController = null; } if (videoPlayerController != null) { - videoPlayerController.pause(); - videoPlayerController.dispose(); + videoPlayerController!.pause(); + videoPlayerController!.dispose(); } super.dispose(); diff --git a/lib/web/web_view/web_header.dart b/lib/web/web_view/web_header.dart index d4356941..2ae1ebd9 100644 --- a/lib/web/web_view/web_header.dart +++ b/lib/web/web_view/web_header.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; -import 'package:huixiang/retrofit/data/activity.dart'; -import 'package:huixiang/retrofit/data/article.dart'; +import 'package:huixiang/data/activity.dart'; +import 'package:huixiang/data/article.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class WebHeader extends StatefulWidget { - final Map arguments; - final Activity activity; - final Article article; + final Map? arguments; + final Activity? activity; + final Article? article; final double fontSize; WebHeader(this.arguments, this.activity, this.article, this.fontSize); @@ -27,11 +27,7 @@ class _WebHeader extends State { padding: EdgeInsets.all(12), alignment: Alignment.centerLeft, child: Text( - widget.activity != null - ? widget.activity.mainTitle - : widget.article != null - ? widget.article.mainTitle - : "", + widget.activity!.mainTitle ?? widget.article!.mainTitle ?? "", style: TextStyle( fontSize: widget.fontSize, fontWeight: FontWeight.bold, @@ -46,9 +42,9 @@ class _WebHeader extends State { children: [ InkWell( child: Text( - "${widget.activity != null ? (widget.activity.storeName ?? "") - : ((widget.article != null && widget.article.author != null) - ? (widget.article.author.name ?? "") : "")}", + "${widget.activity != null ? (widget.activity!.storeName ?? "") + : ((widget.article?.author != null) + ? (widget.article?.author?.name ?? "") : "")}", style: TextStyle( fontWeight: FontWeight.normal, fontSize: widget.fontSize - 2, @@ -56,45 +52,39 @@ class _WebHeader extends State { ), ), onTap: () { - if (widget.activity != null) { - if (widget.arguments["source"] != null && - widget.arguments["source"] == widget.activity.storeId) { - Navigator.of(context).pop(); - } else { - // Navigator.of(context).pushNamed( - // '/router/union_detail_page', - // arguments: { - // "id": widget.activity.storeId, - // "source": widget.arguments["activityId"] - // }, - // ); - ///TODO: 进入店铺 - // if(widget.stores[selectIndex].posType.code == "NORMALSTORE") { - // toScan(widget.stores[selectIndex]); - // } else { - // Navigator.of(context).pushNamed( - // '/router/store_order', - // arguments: { - // "id": widget.activity.storeId, - // "tenant": widget.stores[selectIndex].tenantCode, - // "storeName": widget.activity.storeName - // }, - // ); - // } - } + if (widget.arguments?["source"] != null && + widget.arguments?["source"] == widget.activity?.storeId) { + Navigator.of(context).pop(); + } else { + // Navigator.of(context).pushNamed( + // '/router/union_detail_page', + // arguments: { + // "id": widget.activity.storeId, + // "source": widget.arguments["activityId"] + // }, + // ); + ///TODO: 进入店铺 + // if(widget.stores[selectIndex].posType.code == "NORMALSTORE") { + // toScan(widget.stores[selectIndex]); + // } else { + // Navigator.of(context).pushNamed( + // '/router/store_order', + // arguments: { + // "id": widget.activity.storeId, + // "tenant": widget.stores[selectIndex].tenantCode, + // "storeName": widget.activity.storeName + // }, + // ); + // } } - }, + }, ), - if((widget?.activity?.storeName ?? "") != "" || (widget?.article?.author?.name ?? "") != "") + if((widget.activity?.storeName ?? "") != "" || (widget.article?.author?.name ?? "") != "") SizedBox( width: 10.w, ), Text( - widget.activity != null - ? widget.activity.createTime - : widget.article != null - ? widget.article.createTime - : "", + widget.activity!.createTime ?? widget.article!.createTime ?? "", style: TextStyle( fontWeight: FontWeight.normal, fontSize: widget.fontSize - 4, diff --git a/pubspec.lock b/pubspec.lock index 87884e3c..b8688979 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,24 +1,35 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - ai_decimal_accuracy: - dependency: "direct main" + _fe_analyzer_shared: + dependency: transitive description: - name: ai_decimal_accuracy + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.4.1" android_intent_plus: dependency: "direct main" description: name: android_intent_plus + sha256: e1c62bb41c90e15083b7fb84dc327fe90396cc9c1445b55ff1082144fabfb4d9 url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.2" + version: "4.0.3" args: dependency: transitive description: name: args + sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515 url: "https://pub.flutter-io.cn" source: hosted version: "2.3.1" @@ -26,104 +37,183 @@ packages: dependency: transitive description: name: asn1lib + sha256: c9c85fedbe2188b95133cbe960e16f5f448860f7133330e272edbbca5893ddc6 url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.1" + version: "1.5.2" async: dependency: transitive description: name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.flutter-io.cn" source: hosted - version: "2.8.2" + version: "2.11.0" barcode: dependency: transitive description: name: barcode + sha256: "91b143666f7bb13636f716b6d4e412e372ab15ff7969799af8c9e30a382e9385" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.2.6" barcode_widget: dependency: "direct main" description: name: barcode_widget + sha256: "6f2c5b08659b1a5f4d88d183e6007133ea2f96e50e7b8bb628f03266c3931427" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.1" + version: "2.0.4" boolean_selector: dependency: transitive description: name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.1" bubble_tab_indicator: dependency: "direct main" description: name: bubble_tab_indicator + sha256: "0aa37980a00e3374d917f9da8e83acd7f59ba872a3d05c306220063f28f945aa" url: "https://pub.flutter-io.cn" source: hosted version: "0.1.6" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "6c4dd11d05d056e76320b828a1db0fc01ccd376922526f8e9d6c796a5adbac20" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.1" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.8" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "30859c90e9ddaccc484f56303931f477b1f1ba2bab74aa32ed5d6ce15870f8cf" + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.2.8" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e + url: "https://pub.flutter-io.cn" + source: hosted + version: "8.9.1" characters: dependency: transitive description: name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.3.0" charcode: dependency: transitive description: name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" - charts_common: + checked_yaml: dependency: transitive description: - name: charts_common - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.12.0" - charts_flutter: - dependency: "direct main" - description: - name: charts_flutter + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.0" + version: "2.0.3" chewie: dependency: transitive description: name: chewie + sha256: "8bc4ac4cf3f316e50a25958c0f5eb9bb12cf7e8308bb1d74a43b230da2cfc144" url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.3" + version: "1.7.5" chewie_audio: dependency: "direct main" description: name: chewie_audio + sha256: "73948a8b9841d050433af3498a1f8b11320bd5a2cd70b449bdbe16d4405e97c5" url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.0" + version: "1.5.0" clock: dependency: transitive description: name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.10.0" collection: dependency: transitive description: name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.flutter-io.cn" source: hosted - version: "1.16.0" + version: "1.18.0" convert: dependency: transitive description: name: convert + sha256: "1be13198012c1d5bc042dc40ad1d7f16cbd522350984c0c1abf471d6d7e305c6" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" @@ -131,76 +221,119 @@ packages: dependency: transitive description: name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.2" + version: "3.0.3" csslib: dependency: transitive description: name: csslib + sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f" url: "https://pub.flutter-io.cn" source: hosted - version: "0.17.2" + version: "0.17.3" cupertino_icons: dependency: "direct main" description: name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.5" - dio: - dependency: "direct main" + version: "1.0.6" + dart_style: + dependency: transitive description: - name: dio + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.6" + dbus: + dependency: transitive + description: + name: dbus + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.10" - dio_log: + version: "0.7.10" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: "77f757b789ff68e4eaf9c56d1752309bd9f7ad557cb105b938a7f8eb89e59110" + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.1.2" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.0.0" + dio: dependency: "direct main" description: - name: dio_log + name: dio + sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8" url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.5" + version: "5.4.1" emoji_picker_flutter: dependency: "direct main" description: name: emoji_picker_flutter + sha256: "871339250c00dc469b7fdaaec84f4e10ffa435e730a4f3f3fd06ebd5289ea5ad" url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.1" + version: "2.1.0" encrypt: dependency: "direct main" description: name: encrypt + sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2" url: "https://pub.flutter-io.cn" source: hosted - version: "5.0.1" + version: "5.0.3" equatable: dependency: transitive description: name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" event_bus: - dependency: "direct main" + dependency: transitive description: name: event_bus + sha256: "44baa799834f4c803921873e7446a2add0f3efa45e101a054b1f0ab9b95f8edc" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" + event_bus_plus: + dependency: "direct main" + description: + name: event_bus_plus + sha256: a8381b29384d04ccd742e53668bc8b3ea99ee80496b26adf23fcceba8cdeb673 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.6.2" fake_async: dependency: transitive description: name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" @@ -208,20 +341,23 @@ packages: dependency: transitive description: name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" url: "https://pub.flutter-io.cn" source: hosted version: "6.1.4" - fl_chart: - dependency: "direct main" + fixnum: + dependency: transitive description: - name: fl_chart + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.flutter-io.cn" source: hosted - version: "0.62.0" + version: "1.1.0" flare_flutter: dependency: "direct main" description: name: flare_flutter + sha256: "99d63c60f00fac81249ce6410ee015d7b125c63d8278a30da81edf3317a1f6a0" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" @@ -234,88 +370,124 @@ packages: dependency: "direct main" description: name: flutter_baidu_mapapi_base + sha256: e8046026992e98bac20599a462712b2a79e8df105a3a90b33d18c9e4967e7232 url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.0" + version: "3.6.0" flutter_baidu_mapapi_map: dependency: "direct main" description: name: flutter_baidu_mapapi_map + sha256: "87fbb94b97d320af7fe9feb3967b46020d9666c67e1655655229dd8b280160e7" url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.1" + version: "3.6.0" flutter_baidu_mapapi_search: dependency: "direct main" description: name: flutter_baidu_mapapi_search + sha256: "13cd3ad532115eadd45f780a8e6024d3e16eefbcdc14e048c9b9f84ebc8a0254" url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.0" + version: "3.6.0" flutter_baidu_mapapi_utils: dependency: "direct main" description: name: flutter_baidu_mapapi_utils + sha256: cd6f4eafa8372f6292da4726497756704cc80eaa3c4263e10397283625b3dff4 url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.0" + version: "3.6.0" flutter_bmflocation: dependency: "direct main" description: name: flutter_bmflocation + sha256: "74a9d96c4e95cbcd1c8dadc0d05004c48032bda1eee6fa2dbddf9ff0cfbd94f7" url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.1" - flutter_datetime_picker: + version: "3.6.0" + flutter_datetime_picker_plus: dependency: "direct main" description: - name: flutter_datetime_picker + name: flutter_datetime_picker_plus + sha256: "3b2ebcd7b4d2c253171dc6ba78a850af7dcb68fd965b9133dd254ff662a9023b" url: "https://pub.flutter-io.cn" source: hosted - version: "1.5.1" + version: "2.1.0" flutter_easyloading: dependency: "direct main" description: name: flutter_easyloading + sha256: ba21a3c883544e582f9cc455a4a0907556714e1e9cf0eababfcb600da191d17c url: "https://pub.flutter-io.cn" source: hosted version: "3.0.5" + flutter_gbk2utf8: + dependency: "direct main" + description: + name: flutter_gbk2utf8 + sha256: e058ad7a64919baa85f0c7b1afa1c4930aae867b20b4e83a930cc63ba11521e3 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" flutter_html: dependency: "direct main" description: name: flutter_html + sha256: "02ad69e813ecfc0728a455e4bf892b9379983e050722b1dce00192ee2e41d1ee" url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.1" - flutter_layout_grid: - dependency: transitive + version: "3.0.0-beta.2" + flutter_html_audio: + dependency: "direct main" description: - name: flutter_layout_grid + name: flutter_html_audio + sha256: "94ae28ab56a8d556b7c5409e3eb59ca5215812bda87c67ddfa768812b76f8511" url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.6" - flutter_localizations: + version: "3.0.0-beta.2" + flutter_html_iframe: dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_math_fork: - dependency: transitive description: - name: flutter_math_fork + name: flutter_html_iframe + sha256: "979405fafcbd29c930bf96d9f3f0ade9d87dfd567a03180b13424a0e89a5de46" url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.2+2" - flutter_page_indicator: - dependency: transitive + version: "3.0.0-beta.2" + flutter_html_svg: + dependency: "direct main" description: - name: flutter_page_indicator + name: flutter_html_svg + sha256: "793be10cfa6fd0925a7adde9f58d73d2ce6a84c02ae12d01a985244f55ee631a" url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.3" + version: "3.0.0-beta.2" + flutter_html_video: + dependency: "direct main" + description: + name: flutter_html_video + sha256: ecc8bcc614dd8a8286d32ace462481817660f5a7e854c663c1fcb3424fc3be89 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.0-beta.2" + flutter_localization: + dependency: "direct main" + description: + name: flutter_localization + sha256: faaeb1eba307473032e2c2af737f36ced61fc98735608410d0a6d9c231b50912 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle + sha256: "96af49aa6b57c10a312106ad6f71deed5a754029c24789bbf620ba784f0bd0b0" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.14" @@ -323,20 +495,23 @@ packages: dependency: "direct main" description: name: flutter_screenutil + sha256: "8cf100b8e4973dc570b6415a2090b0bfaa8756ad333db46939efc3e774ee100d" url: "https://pub.flutter-io.cn" source: hosted - version: "5.0.0+1" + version: "5.9.0" flutter_slidable: dependency: "direct main" description: name: flutter_slidable + sha256: "19ed4813003a6ff4e9c6bcce37e792a2a358919d7603b2b31ff200229191e44c" url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.2" + version: "3.0.1" flutter_smart_dialog: dependency: "direct main" description: name: flutter_smart_dialog + sha256: "3f99d33847629b223f28bb339eff58687d64efed3965a7e44d650d0c89739325" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.6" @@ -344,6 +519,7 @@ packages: dependency: "direct main" description: name: flutter_spinkit + sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e url: "https://pub.flutter-io.cn" source: hosted version: "5.2.0" @@ -351,23 +527,26 @@ packages: dependency: "direct main" description: name: flutter_staggered_grid_view + sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395" url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.1" + version: "0.7.0" flutter_svg: dependency: "direct main" description: name: flutter_svg + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.flutter-io.cn" source: hosted - version: "0.22.0" - flutter_swiper: + version: "2.0.10+1" + flutter_swiper_view: dependency: "direct main" description: - name: flutter_swiper + name: flutter_swiper_view + sha256: "2a165b259e8a4c49d4da5626b967ed42a73dac2d075bd9e266ad8d23b9f01879" url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.6" + version: "1.1.8" flutter_test: dependency: "direct dev" description: flutter @@ -382,27 +561,47 @@ packages: dependency: "direct main" description: name: fluwx + sha256: "373fa0006b4d188e0123cc9a5b8c2686be0eaaa364a010b1aedfb582002404c4" url: "https://pub.flutter-io.cn" source: hosted - version: "3.9.0+2" + version: "4.5.0" font_awesome_flutter: dependency: "direct main" description: name: font_awesome_flutter + sha256: "275ff26905134bcb59417cf60ad979136f1f8257f2f449914b2c3e05bbb4cd6f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "10.7.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" url: "https://pub.flutter-io.cn" source: hosted - version: "9.2.0" - gbk2utf8: + version: "3.2.0" + get: dependency: "direct main" description: - name: gbk2utf8 + name: get + sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.1" + version: "4.6.6" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.2" gradient_widgets: dependency: "direct main" description: name: gradient_widgets + sha256: d337a8a329da9aefa50b82155d11875c1b9992982f65d15c805aa057a2670536 url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" @@ -410,55 +609,79 @@ packages: dependency: transitive description: name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.0" + version: "2.3.1" html: dependency: transitive description: name: html + sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8" url: "https://pub.flutter-io.cn" source: hosted version: "0.15.3" + http: + dependency: transitive + description: + name: http + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.4" + version: "4.0.2" image_gallery_saver: dependency: "direct main" description: name: image_gallery_saver + sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816" url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.1" + version: "2.0.3" image_pickers: dependency: "direct main" description: name: image_pickers + sha256: "79de5abf134256eb148565d45c4e0bee406399f353b8d56de18b52c4c509faa6" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" - infinite_listview: - dependency: transitive - description: - name: infinite_listview - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.0" + version: "2.0.4+8" intl: dependency: "direct main" description: name: intl + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.18.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.flutter-io.cn" source: hosted - version: "0.17.0" + version: "1.0.4" js: dependency: transitive description: name: js + sha256: a5e201311cb08bf3912ebbe9a2be096e182d703f881136ec1e81a2338a9e120d url: "https://pub.flutter-io.cn" source: hosted version: "0.6.4" @@ -466,34 +689,79 @@ packages: dependency: "direct main" description: name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.1" + version: "4.8.1" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969 + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.7.1" keframe: dependency: "direct main" description: name: keframe + sha256: a84add1826c54cd68e6095dbcc00cdd84fd4d97820712bfc8e1d06f41b0bfac3 url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.flutter-io.cn" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" like_button: dependency: "direct main" description: name: like_button + sha256: "08e6a45b78888412df5d351786c550205ad3a677e72a0820d5bbc0b063c8a463" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" + list_counter: + dependency: transitive + description: + name: list_counter + sha256: c447ae3dfcd1c55f0152867090e67e219d42fe6d4f2807db4bbe8b8d69912237 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.2" logger: dependency: "direct main" description: name: logger + sha256: b3ff55aeb08d9d8901b767650285872cb1bb8f508373b3e348d60268b0c7f770 url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.2+1" + version: "2.1.0" logging: dependency: transitive description: name: logging + sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946 url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" @@ -501,34 +769,47 @@ packages: dependency: transitive description: name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.11" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.4" + version: "0.8.0" meta: dependency: transitive description: name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.0" + version: "1.11.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.5" mqtt_client: dependency: "direct main" description: name: mqtt_client + sha256: aa2bed04e239b9199ce95ae2553cb16a2c39110a5f56b21ce8c09be3261ea3d2 url: "https://pub.flutter-io.cn" source: hosted - version: "9.6.8" + version: "10.2.0" nested: dependency: transitive description: name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" @@ -536,125 +817,183 @@ packages: dependency: "direct main" description: name: network_to_file_image + sha256: fda3fbe1b66d9fcab1336f04729b4016ed8d26d783e1a26cdb1bc4513fbacb7f url: "https://pub.flutter-io.cn" source: hosted - version: "4.0.1" + version: "6.0.1" number_precision: dependency: "direct main" description: name: number_precision + sha256: "397639f584cdd4fb5965e3b91c03b911b0c8fa9c5be7e7236bbf102bf6f75681" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2+1" - numerus: + package_config: dependency: transitive description: - name: numerus + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" - package_info: + version: "2.1.0" + package_info_plus: dependency: "direct main" description: - name: package_info + name: package_info_plus + sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.2" - path: + version: "5.0.1" + package_info_plus_platform_interface: dependency: transitive description: - name: path + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" - path_drawing: + version: "2.0.1" + path: dependency: transitive description: - name: path_drawing + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.flutter-io.cn" source: hosted - version: "0.5.1+1" + version: "1.9.0" path_parsing: dependency: transitive description: name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.1" + version: "1.0.1" path_provider: dependency: "direct main" description: name: path_provider + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.4" - path_provider_linux: + version: "2.1.2" + path_provider_android: dependency: transitive description: - name: path_provider_linux + name: path_provider_android + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.10" - path_provider_macos: + version: "2.2.2" + path_provider_foundation: dependency: transitive description: - name: path_provider_macos + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.3" + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.6" + version: "2.2.1" permission_handler: dependency: "direct main" description: name: permission_handler + sha256: "74e962b7fad7ff75959161bb2c0ad8fe7f2568ee82621c9c2660b751146bfe44" + url: "https://pub.flutter-io.cn" + source: hosted + version: "11.3.0" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" + url: "https://pub.flutter-io.cn" + source: hosted + version: "12.0.5" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: bdafc6db74253abb63907f4e357302e6bb786ab41465e8635f362ee71fd8707b + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.4.0" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" url: "https://pub.flutter-io.cn" source: hosted - version: "5.1.0+2" + version: "0.1.1" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface + sha256: "23dfba8447c076ab5be3dee9ceb66aad345c4a648f0cac292c77b1eb0e800b78" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.2" + version: "4.2.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.1" petitparser: dependency: transitive description: name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.flutter-io.cn" source: hosted - version: "5.0.0" + version: "6.0.2" photo_view: dependency: "direct main" description: name: photo_view + sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb" url: "https://pub.flutter-io.cn" source: hosted - version: "0.13.0" + version: "0.14.0" pin_input_text_field: dependency: "direct main" description: name: pin_input_text_field + sha256: "8d6fc670aa673a4df5976086f0e8039972a5b2bcb783c8db8dd3b9b4b072ca90" url: "https://pub.flutter-io.cn" source: hosted - version: "4.4.1" + version: "4.5.1" platform: dependency: transitive description: name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" @@ -662,34 +1001,71 @@ packages: dependency: transitive description: name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.3" + version: "2.1.8" pointycastle: dependency: transitive description: name: pointycastle + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" url: "https://pub.flutter-io.cn" source: hosted version: "3.7.3" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.5.1" process: dependency: transitive description: name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" url: "https://pub.flutter-io.cn" source: hosted version: "4.2.4" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.0" provider: dependency: transitive description: name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f url: "https://pub.flutter-io.cn" source: hosted version: "6.0.5" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.3" pull_to_refresh: dependency: "direct main" description: name: pull_to_refresh + sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -697,48 +1073,63 @@ packages: dependency: transitive description: name: qr + sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "3.0.1" qr_flutter: dependency: "direct main" description: name: qr_flutter + sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097" url: "https://pub.flutter-io.cn" source: hosted - version: "4.0.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.2.1" + version: "4.1.0" retrofit: dependency: "direct main" description: name: retrofit + sha256: "13a2865c0d97da580ea4e3c64d412d81f365fd5b26be2a18fca9582e021da37a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.0" + retrofit_generator: + dependency: "direct dev" + description: + name: retrofit_generator + sha256: a962be21403c2ecdd82d06c863340cff759642ae6ecac5a2c74a9a60377592c3 url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.4+1" + version: "8.1.0" rive: dependency: "direct main" description: name: rive + sha256: "23ffbeb1d45956b2d5ecd4b2c2d3bae2e61bc32b61fc2e9a48021e28feab6b5f" url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.8" + version: "0.13.0" + rive_common: + dependency: transitive + description: + name: rive_common + sha256: "3fcaa47dd20dde59d197fc71dce174ca0a7ce9083a0fb73cf457e2cd111b0bbc" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.2" rxdart: dependency: "direct main" description: name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" url: "https://pub.flutter-io.cn" source: hosted - version: "0.26.0" + version: "0.27.7" scan: dependency: "direct main" description: name: scan + sha256: b343ec36f863a88d41eb4c174b810c055c6bd1f1822b2188ab31aab684fb7cdb url: "https://pub.flutter-io.cn" source: hosted version: "1.6.0" @@ -746,62 +1137,87 @@ packages: dependency: "direct main" description: name: shared_preferences + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.20" + version: "2.2.2" shared_preferences_android: dependency: transitive description: name: shared_preferences_android + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.17" + version: "2.2.1" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation + sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.5" + version: "2.3.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.5" + version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.3.2" shared_preferences_web: dependency: transitive description: name: shared_preferences_web + sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.6" + version: "2.2.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.5" + version: "2.3.2" sharesdk_plugin: dependency: "direct main" description: name: sharesdk_plugin + sha256: a1a18d01f362c119df1931082e3694591a24b3b00eef2576522e00ef8da3b25e url: "https://pub.flutter-io.cn" source: hosted version: "1.3.10" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.4" shimmer: dependency: "direct main" description: name: shimmer + sha256: "5f88c883a22e9f9f299e5ba0e4f7e6054857224976a5d9f839d4ebdc94a14ac9" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" @@ -809,32 +1225,52 @@ packages: dependency: transitive description: name: simple_gesture_detector + sha256: ba2cd5af24ff20a0b8d609cec3f40e5b0744d2a71804a2616ae086b9c19d19a3 url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.6" + version: "0.2.1" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.4" source_span: dependency: transitive description: name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.2" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.flutter-io.cn" source: hosted - version: "1.10.0" + version: "1.11.1" steel_crypt: dependency: "direct main" description: name: steel_crypt + sha256: "4f86a8ddc690ed1adff486faeb4ceece9e09f59cd90c8bd7e2ff48c42ca271dd" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0+1" @@ -842,6 +1278,15 @@ packages: dependency: transitive description: name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" @@ -849,48 +1294,55 @@ packages: dependency: transitive description: name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.2.0" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core + sha256: "7666506885ebc8f62bb928ad4588a73e20caaff2b2cf2b2b56f67d98f4113525" url: "https://pub.flutter-io.cn" source: hosted - version: "19.4.56" + version: "24.2.9" syncfusion_flutter_datepicker: dependency: "direct main" description: name: syncfusion_flutter_datepicker + sha256: c010440ccef2beecb988684af3557c57ade8ea300d1177536f01059e3a16ce5d url: "https://pub.flutter-io.cn" source: hosted - version: "19.4.56" + version: "24.2.9" table_calendar: dependency: "direct main" description: name: table_calendar + sha256: "1e3521a3e6d3fc7f645a58b135ab663d458ab12504f1ea7f9b4b81d47086c478" url: "https://pub.flutter-io.cn" source: hosted - version: "2.3.3" + version: "3.0.9" term_glyph: dependency: transitive description: name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.9" - thumbnails: - dependency: "direct main" + version: "0.6.1" + timing: + dependency: transitive description: - name: thumbnails + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" @@ -898,9 +1350,10 @@ packages: dependency: "direct main" description: name: tobias + sha256: "3dfbc0b075982b0ac641bb8dbc9dc32e7f61d50da304cc93edc334d04b3b917e" url: "https://pub.flutter-io.cn" source: hosted - version: "2.4.1" + version: "3.3.1" tpns_flutter_plugin: dependency: "direct main" description: @@ -910,17 +1363,11 @@ packages: url: "https://github.com/TencentCloud/TPNS-Flutter-Plugin" source: git version: "1.1.6" - transformer_page_view: - dependency: transitive - description: - name: transformer_page_view - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.6" tuple: dependency: transitive description: name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" @@ -928,6 +1375,7 @@ packages: dependency: transitive description: name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.flutter-io.cn" source: hosted version: "1.3.2" @@ -935,90 +1383,159 @@ packages: dependency: "direct main" description: name: umeng_common_sdk + sha256: "60d7ac8093d42e236dbecb5fc8558b16644808a70d24514ad926be7ddf56d5e9" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.7" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.6" + version: "2.2.2" url_launcher: dependency: "direct main" description: name: url_launcher + sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.2.5" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745 + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.0" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.flutter-io.cn" source: hosted - version: "5.7.10" + version: "6.2.5" url_launcher_linux: dependency: transitive description: name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+4" + version: "3.1.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+9" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.9" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web + sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.5+3" + version: "2.2.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.11+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.11+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+3" + version: "1.1.11+1" vector_math: dependency: transitive description: name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.2" + version: "2.1.4" video_player: dependency: "direct main" description: name: video_player + sha256: afc65f4b8bcb2c188f64a591f84fb471f4f2e19fc607c65fd8d2f8fedb3dec23 url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.19" + version: "2.8.3" video_player_android: dependency: transitive description: name: video_player_android + sha256: "4dd9b8b86d70d65eecf3dcabfcdfbb9c9115d244d022654aba49a00336d540c2" url: "https://pub.flutter-io.cn" source: hosted - version: "2.3.4" + version: "2.4.12" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation + sha256: "309e3962795e761be010869bae65c0b0e45b5230c5cee1bec72197ca7db040ed" url: "https://pub.flutter-io.cn" source: hosted - version: "2.3.9" + version: "2.5.6" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface + sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6" url: "https://pub.flutter-io.cn" source: hosted - version: "4.2.0" + version: "6.2.2" video_player_web: dependency: transitive description: name: video_player_web + sha256: fb3bbeaf0302cb0c31340ebd6075487939aa1fe3b379d1a8784ef852b679940e url: "https://pub.flutter-io.cn" source: hosted version: "2.0.15" @@ -1026,69 +1543,111 @@ packages: dependency: "direct main" description: name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.3" - wakelock: + version: "0.4.0+2" + vm_service: dependency: transitive description: - name: wakelock + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.2" - wakelock_macos: + version: "13.0.0" + wakelock_plus: dependency: transitive description: - name: wakelock_macos + name: wakelock_plus + sha256: f268ca2116db22e57577fb99d52515a24bdc1d570f12ac18bb762361d43b043d url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.0" - wakelock_platform_interface: + version: "1.1.4" + wakelock_plus_platform_interface: dependency: transitive description: - name: wakelock_platform_interface + name: wakelock_plus_platform_interface + sha256: "40fabed5da06caff0796dc638e1f07ee395fb18801fbff3255a2372db2d80385" url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" - wakelock_web: + version: "1.1.0" + watcher: dependency: transitive description: - name: wakelock_web + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.0" - wakelock_windows: + version: "1.1.0" + web: dependency: transitive description: - name: wakelock_windows + name: web + sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05" url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.1" - webview_flutter: + version: "0.4.2" + web_socket_channel: dependency: transitive description: - name: webview_flutter + name: web_socket_channel + sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.14" - widgetpicker: + version: "2.4.3" + webview_flutter: dependency: "direct main" description: - name: widgetpicker + name: webview_flutter + sha256: "25e1b6e839e8cbfbd708abc6f85ed09d1727e24e08e08c6b8590d7c65c9a8932" url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.1" + version: "4.7.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "3e5f4e9d818086b0d01a66fb1ff9cc72ab0cc58c71980e3d3661c5685ea0efb0" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.15.0" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: "9bf168bccdf179ce90450b5f37e36fe263f591c9338828d6bf09b6f8d0f57f86" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.12.0" win32: dependency: transitive description: name: win32 + sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.0.6" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9 url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.4" + version: "1.1.1" xdg_directories: dependency: transitive description: name: xdg_directories + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" @@ -1096,9 +1655,18 @@ packages: dependency: transitive description: name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.flutter-io.cn" source: hosted - version: "5.4.1" + version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.2" sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=3.2.3 <4.0.0" + flutter: ">=3.16.6" diff --git a/pubspec.yaml b/pubspec.yaml index 1a77c6ee..2775c00d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,17 +6,34 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 3.2.22+65 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: ">=2.15.0 <3.0.0" + +fluwx: + app_id: '123456' + debug_logging: true # Logging in debug mode. + android: + # interrupt_wx_request: true # Defaults to true. + # flutter_activity: 'MainActivity' # Defaults to app's launcher + ios: + universal_link: http://huixiang.com + # scene_delegate: true # Defaults to false. + no_pay: false # Set to false to disable payment. + ignore_security: true # Set to true to disable security seetings. + +tobias: + url_scheme: "" + ios: + ignore_security: true + no_utdid: true dependencies: flutter: sdk: flutter - flutter_localizations: - sdk: flutter - fluwx: 3.9.0+2 - - tobias: 2.4.1 + flutter_localization: ^0.2.0 + fluwx: ^4.5.0 + get: ^4.6.6 + tobias: ^3.3.1 gradient_widgets: ^0.6.0 @@ -28,111 +45,111 @@ dependencies: url: https://github.com/TencentCloud/TPNS-Flutter-Plugin ref: V1.1.6 - umeng_common_sdk: ^1.2.3 - fl_chart: ^0.62.0 - charts_flutter: ^0.12.0 - like_button: ^2.0.2 - cupertino_icons: ^1.0.2 - flutter_swiper: ^1.1.6 - flutter_staggered_grid_view: ^0.4.0 # Null safety + umeng_common_sdk: ^1.2.7 + like_button: ^2.0.5 + cupertino_icons: ^1.0.6 + flutter_swiper_view: ^1.1.8 + flutter_staggered_grid_view: ^0.7.0 # Null safety pull_to_refresh: ^2.0.0 # Null safety number_precision: ^2.0.2+1 - permission_handler: ^5.0.1+1 + permission_handler: ^11.3.0 - flutter_bmflocation: 3.2.1 - flutter_baidu_mapapi_base: 3.2.0 - flutter_baidu_mapapi_map: 3.2.1 - flutter_baidu_mapapi_search: 3.2.0 - flutter_baidu_mapapi_utils: 3.2.0 + flutter_bmflocation: ^3.6.0 + flutter_baidu_mapapi_base: ^3.6.0 + flutter_baidu_mapapi_map: ^3.6.0 + flutter_baidu_mapapi_search: ^3.6.0 + flutter_baidu_mapapi_utils: ^3.6.0 - dio: ^3.0.10 - rxdart: ^0.26.0 - retrofit: ^1.3.4+1 - json_annotation: ^3.1.1 - logger: ^2.0.2+1 - dio_log: ^1.3.5 - pin_input_text_field: ^4.1.2 + dio: ^5.4.1 + rxdart: ^0.27.07 + retrofit: ^4.1.0 + json_annotation: ^4.8.1 + logger: ^2.1.0 +# dio_log: ^1.3.5 + pin_input_text_field: ^4.5.1 - android_intent_plus: ^1.0.2 - flutter_screenutil: 5.0.0+1 + android_intent_plus: ^4.0.3 + flutter_screenutil: 5.9.0 bubble_tab_indicator: ^0.1.6 - gbk2utf8: ^1.0.1 + flutter_gbk2utf8: ^1.0.0 - visibility_detector: ^0.3.3 + visibility_detector: ^0.4.0+2 steel_crypt: ^3.0.0+1 - encrypt: ^5.0.1 + encrypt: ^5.0.3 - event_bus: ^2.0.0 - intl: ^0.17.0 + event_bus_plus: ^0.6.2 + intl: ^0.18.1 shared_preferences: ^2.0.6 flutter_smart_dialog: ^3.0.6 - barcode_widget: ^2.0.1 - qr_flutter: ^4.0.0 - url_launcher: ^5.0.0 + barcode_widget: ^2.0.4 + qr_flutter: ^4.1.0 + url_launcher: ^6.2.5 #多图, 裁剪 - image_pickers: 2.0.0 + image_pickers: 2.0.4+8 # flutter_scankit: ^1.2.0 # qrscan: ^0.3.1 - scan: ^1.5.0 + scan: ^1.6.0 - path_provider: ^2.0.4 - network_to_file_image: ^4.0.1 - image_gallery_saver: ^1.7.0 + path_provider: ^2.1.2 + network_to_file_image: ^6.0.1 + image_gallery_saver: ^2.0.3 - flutter_html: ^2.1.5 #2.1.0 - chewie_audio: ^1.1.2 + flutter_html: ^3.0.0-beta.2 + flutter_html_svg: ^3.0.0-beta.2 + flutter_html_iframe: ^3.0.0-beta.2 + flutter_html_video: ^3.0.0-beta.2 + flutter_html_audio: ^3.0.0-beta.2 + chewie_audio: ^1.5.0 - photo_view: ^0.13.0 - video_player: ^2.2.3 - thumbnails: ^1.0.1 - # media_info: ^0.9.0 - # flutter_ffmpeg: ^0.4.2 + photo_view: ^0.14.0 + video_player: ^2.8.2 - package_info: ^2.0.2 + package_info_plus: ^5.0.1 - sharesdk_plugin: ^1.3.4 + sharesdk_plugin: ^1.3.10 - flutter_spinkit: ^5.0.0 - flutter_easyloading: ^3.0.0 + flutter_spinkit: ^5.2.0 + flutter_easyloading: ^3.0.5 - rive: ^0.6.8 + rive: ^0.13.0 flare_flutter: ^3.0.2 - flutter_svg: ^0.22.0 - font_awesome_flutter: ^9.1.0 + flutter_svg: ^2.0.10+1 + font_awesome_flutter: ^10.7.0 - ai_decimal_accuracy: ^1.1.0 +# ai_decimal_accuracy: ^1.1.0 - table_calendar: ^2.3.3 + table_calendar: any - flutter_slidable: ^1.3.0 + flutter_slidable: ^3.0.1 - emoji_picker_flutter: ^1.4.1 + emoji_picker_flutter: ^2.1.0 - mqtt_client: ^9.6.8 + mqtt_client: ^10.2.0 shimmer: ^3.0.0 # 时间选择器 - flutter_datetime_picker: ^1.5.1 + flutter_datetime_picker_plus: ^2.1.0 - widgetpicker: ^0.1.1 +# widgetpicker: ^0.1.1 - syncfusion_flutter_datepicker: ^19.4.38 + webview_flutter: ^4.7.0 + syncfusion_flutter_datepicker: ^24.2.9 dev_dependencies: flutter_test: sdk: flutter -# retrofit_generator: ^1.4.1+3 -# build_runner: ^1.11.5 -# json_serializable: ^3.5.1 + retrofit_generator: ^8.1.0 + build_runner: ^2.4.8 + json_serializable: ^6.7.1 flutter: @@ -162,4 +179,3 @@ flutter: flutter_intl: enabled: true -umeng_common_sdk:path: umeng_common_sdk-1.2.6 diff --git a/umeng_common_sdk-1.2.6/.gitignore b/umeng_common_sdk-1.2.6/.gitignore deleted file mode 100644 index 4e2c7044..00000000 --- a/umeng_common_sdk-1.2.6/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ -example/.flutter-plugins-dependencies -example/ios/Flutter/flutter_export_environment.sh -**/pubspec.lock - -build/ -.idea/ -**/.idea/ -**/gradle/ -**/gradlew -**/gradlew.bat \ No newline at end of file diff --git a/umeng_common_sdk-1.2.6/.metadata b/umeng_common_sdk-1.2.6/.metadata deleted file mode 100644 index 70a9f943..00000000 --- a/umeng_common_sdk-1.2.6/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 - channel: stable - -project_type: plugin diff --git a/umeng_common_sdk-1.2.6/CHANGELOG.md b/umeng_common_sdk-1.2.6/CHANGELOG.md deleted file mode 100644 index b0ba85c0..00000000 --- a/umeng_common_sdk-1.2.6/CHANGELOG.md +++ /dev/null @@ -1,43 +0,0 @@ -##1.2.6 --Android端plugin插件项目依赖的common包版本升级到9.5.6,asms包版本升级到1.6.3。 --Android端example工程增加MyApp类文件,将UMConfigure.preInit函数放到MyApp类中io.flutter.app.FlutterApplication -.onCreate生命周期函数中执行。 - -##1.2.5 --Android 稳定性优化; - -##1.2.4 --Android 上下文获取优化; - -##1.2.3 --Android 依赖库asms更新1.4.1; - -##1.2.2 --Android 依赖更新;初始化简化; - -##1.2.1 --Android Example工程初始化优化; - -##1.2.0 --支持空安全; - -##1.1.3 --Android Example工程优化;Android依赖库迁移maven center; - -##1.1.2 --Android Example工程添加release包混淆规则 - -##1.1.1 --Android依赖库改为线上maven形式 - -##1.1.0 --优化描述,同步友盟+官方下载flutter插件 - -## 0.0.3 --example工程完善基础组件初始化 - -## 0.0.2 --同步最新友盟+common库 - -## 0.0.1 --初始提交 diff --git a/umeng_common_sdk-1.2.6/LICENSE b/umeng_common_sdk-1.2.6/LICENSE deleted file mode 100644 index e84282a4..00000000 --- a/umeng_common_sdk-1.2.6/LICENSE +++ /dev/null @@ -1 +0,0 @@ -Add your license here. diff --git a/umeng_common_sdk-1.2.6/README.md b/umeng_common_sdk-1.2.6/README.md deleted file mode 100644 index 2805b8c7..00000000 --- a/umeng_common_sdk-1.2.6/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# umeng_common_sdk Flutter Plugin - -# 安装 - -在工程 pubspec.yaml 中加入 dependencies - -dependencies: - umeng_common_sdk: 1.2.6 - -# 使用 - -import 'package:umeng_common_sdk/umeng_common_sdk.dart'; - -**注意** : 需要先调用 UMConfigure.init 来初始化插件(Appkey可在统计后台 “管理->应用管理->应用列表” 页面查看,或在 “我的产品”选择某应用->设置->应用信息 查看Appkey),才能保证其他功能正常工作。 \ No newline at end of file diff --git a/umeng_common_sdk-1.2.6/android/.gitignore b/umeng_common_sdk-1.2.6/android/.gitignore deleted file mode 100644 index c6cbe562..00000000 --- a/umeng_common_sdk-1.2.6/android/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures diff --git a/umeng_common_sdk-1.2.6/android/build.gradle b/umeng_common_sdk-1.2.6/android/build.gradle deleted file mode 100644 index 2439e6cc..00000000 --- a/umeng_common_sdk-1.2.6/android/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -group 'com.umeng.umeng_common_sdk' -version '1.0' - -buildscript { - repositories { - google() - jcenter() - maven { url 'https://repo1.maven.org/maven2/'} - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - } -} - -rootProject.allprojects { - repositories { - google() - jcenter() - maven { url 'https://repo1.maven.org/maven2/'} - } -} - -apply plugin: 'com.android.library' - -android { - compileSdkVersion 29 - - defaultConfig { - minSdkVersion 16 - } - lintOptions { - disable 'InvalidPackage' - } -} - -dependencies { - api 'com.umeng.umsdk:common:9.5.6'// 必选 - api 'com.umeng.umsdk:asms:1.6.3'// 必选 -} \ No newline at end of file diff --git a/umeng_common_sdk-1.2.6/android/gradle.properties b/umeng_common_sdk-1.2.6/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/umeng_common_sdk-1.2.6/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/umeng_common_sdk-1.2.6/android/settings.gradle b/umeng_common_sdk-1.2.6/android/settings.gradle deleted file mode 100644 index 7a33a47e..00000000 --- a/umeng_common_sdk-1.2.6/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'umeng_common_sdk' diff --git a/umeng_common_sdk-1.2.6/android/src/main/AndroidManifest.xml b/umeng_common_sdk-1.2.6/android/src/main/AndroidManifest.xml deleted file mode 100644 index 1c05ffd6..00000000 --- a/umeng_common_sdk-1.2.6/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/umeng_common_sdk-1.2.6/android/src/main/java/com/umeng/umeng_common_sdk/UmengCommonSdkPlugin.java b/umeng_common_sdk-1.2.6/android/src/main/java/com/umeng/umeng_common_sdk/UmengCommonSdkPlugin.java deleted file mode 100644 index 4c6e17a0..00000000 --- a/umeng_common_sdk-1.2.6/android/src/main/java/com/umeng/umeng_common_sdk/UmengCommonSdkPlugin.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.umeng.umeng_common_sdk; - -import android.content.Context; - -import androidx.annotation.NonNull; - -import com.umeng.analytics.MobclickAgent; -import com.umeng.commonsdk.UMConfigure; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.List; -import java.util.Map; - -import io.flutter.embedding.engine.plugins.FlutterPlugin; -import io.flutter.plugin.common.MethodCall; -import io.flutter.plugin.common.MethodChannel; -import io.flutter.plugin.common.MethodChannel.MethodCallHandler; -import io.flutter.plugin.common.MethodChannel.Result; -import io.flutter.plugin.common.PluginRegistry.Registrar; - -/** UmengCommonSdkPlugin */ -public class UmengCommonSdkPlugin implements FlutterPlugin, MethodCallHandler { - /// The MethodChannel that will the communication between Flutter and native Android - /// - /// This local reference serves to register the plugin with the Flutter Engine and unregister it - /// when the Flutter Engine is detached from the Activity - private MethodChannel channel; - - public static void registerWith(Registrar registrar) { - final MethodChannel channel = new MethodChannel(registrar.messenger(), "umeng_common_sdk"); - UmengCommonSdkPlugin plugin = new UmengCommonSdkPlugin(); - plugin.mContext = registrar.context(); - channel.setMethodCallHandler(plugin); - onAttachedEngineAdd(); - } - - private static void onAttachedEngineAdd() { -// add by umeng - try { - Class agent = Class.forName("com.umeng.analytics.MobclickAgent"); - Method[] methods = agent.getDeclaredMethods(); - for (Method m : methods) { - android.util.Log.e("UMLog", "Reflect:"+m); - if(m.getName().equals("onEventObject")) { - versionMatch = true; - break; - } - } - if(!versionMatch) { - android.util.Log.e("UMLog", "安卓SDK版本过低,建议升级至8以上"); - //return; - } - else { - android.util.Log.e("UMLog", "安卓依赖版本检查成功"); - } - } - catch (Exception e) { - e.printStackTrace(); - android.util.Log.e("UMLog", "SDK版本过低,请升级至8以上"+e.toString()); - return; - } - - Method method = null; - try { - Class config = Class.forName("com.umeng.commonsdk.UMConfigure"); - method = config.getDeclaredMethod("setWraperType", String.class, String.class); - method.setAccessible(true); - method.invoke(null, "flutter","1.0"); - android.util.Log.i("UMLog", "setWraperType:flutter1.0 success"); - } - catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | ClassNotFoundException e) { - e.printStackTrace(); - android.util.Log.e("UMLog", "setWraperType:flutter1.0"+e.toString()); - } - } - - @Override - public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) { - mContext = flutterPluginBinding.getApplicationContext(); - channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "umeng_common_sdk"); - channel.setMethodCallHandler(this); - onAttachedEngineAdd(); - } - - private static Context mContext = null; - - @Override - public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { - if(!versionMatch) { - android.util.Log.e("UMLog", "onMethodCall:"+call.method+":安卓SDK版本过低,请升级至8以上"); - //return; - } - try { - List args = (List) call.arguments; - switch (call.method) { - case "getPlatformVersion": - result.success("Android " + android.os.Build.VERSION.RELEASE); - break; - case "initCommon": - initCommon(args); - break; - case "onEvent": - onEvent(args); - break; - case "onProfileSignIn": - onProfileSignIn(args); - break; - case "onProfileSignOff": - onProfileSignOff(); - break; - case "setPageCollectionModeAuto": - setPageCollectionModeAuto(); - break; - case "setPageCollectionModeManual": - setPageCollectionModeManual(); - break; - case "onPageStart": - onPageStart(args); - break; - case "onPageEnd": - onPageEnd(args); - break; - case "reportError": - reportError(args); - break; - default: - result.notImplemented(); - break; - } - } catch (Exception e) { - e.printStackTrace(); - android.util.Log.e("Umeng", "Exception:"+e.getMessage()); - } - } - - @Override - public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { - channel.setMethodCallHandler(null); - } - - private static Boolean versionMatch = false; - - public static void setContext (Context ctx) { - mContext = ctx; - } - - public static Context getContext () { - return mContext; - } - - private void initCommon(List args) { - String appkey = (String)args.get(0); - String channel = (String)args.get(2); - UMConfigure.init(getContext(), appkey, channel, UMConfigure.DEVICE_TYPE_PHONE, null); - android.util.Log.i("UMLog", "initCommon:"+appkey+"@"+channel); - } - - private void onEvent(List args) { - String event = (String)args.get(0); - Map map = null ; - if(args.size()>1) { - map = (Map) args.get(1); - } - //JSONObject properties = new JSONObject(map); - MobclickAgent.onEventObject(getContext(), event, map); - - if(map!=null) { -// android.util.Log.i("UMLog", "onEventObject:"+event+"("+map.toString()+")"); - } - else { -// android.util.Log.i("UMLog", "onEventObject:"+event); - } - } - - private void onProfileSignIn (List args) { - String userID = (String)args.get(0); - MobclickAgent.onProfileSignIn(userID); - android.util.Log.i("UMLog", "onProfileSignIn:"+userID); - } - - private void onProfileSignOff () { - MobclickAgent.onProfileSignOff(); - android.util.Log.i("UMLog", "onProfileSignOff"); - } - - private void setPageCollectionModeAuto () { - MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO); - android.util.Log.i("UMLog", "setPageCollectionModeAuto"); - } - - private void setPageCollectionModeManual () { - MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.MANUAL); - android.util.Log.i("UMLog", "setPageCollectionModeManual"); - } - - private void onPageStart(List args) { - String event = (String)args.get(0); - MobclickAgent.onPageStart(event); - android.util.Log.i("UMLog", "onPageStart:"+event); - } - - private void onPageEnd(List args) { - String event = (String)args.get(0); - MobclickAgent.onPageEnd(event); - android.util.Log.i("UMLog", "onPageEnd:"+event); - } - - private void reportError(List args){ - String error = (String)args.get(0); - MobclickAgent.reportError(getContext(), error); - android.util.Log.i("UMLog", "reportError:"+error); - } -} diff --git a/umeng_common_sdk-1.2.6/ios/.gitignore b/umeng_common_sdk-1.2.6/ios/.gitignore deleted file mode 100644 index aa479fd3..00000000 --- a/umeng_common_sdk-1.2.6/ios/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/umeng_common_sdk-1.2.6/ios/Assets/.gitkeep b/umeng_common_sdk-1.2.6/ios/Assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/umeng_common_sdk-1.2.6/ios/Classes/UmengCommonSdkPlugin.h b/umeng_common_sdk-1.2.6/ios/Classes/UmengCommonSdkPlugin.h deleted file mode 100644 index a3c1e373..00000000 --- a/umeng_common_sdk-1.2.6/ios/Classes/UmengCommonSdkPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface UmengCommonSdkPlugin : NSObject -@end diff --git a/umeng_common_sdk-1.2.6/ios/Classes/UmengCommonSdkPlugin.m b/umeng_common_sdk-1.2.6/ios/Classes/UmengCommonSdkPlugin.m deleted file mode 100644 index 057855e2..00000000 --- a/umeng_common_sdk-1.2.6/ios/Classes/UmengCommonSdkPlugin.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "UmengCommonSdkPlugin.h" -#import -#import - -@interface UMengflutterpluginForUMCommon : NSObject -@end -@implementation UMengflutterpluginForUMCommon - -+ (BOOL)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result{ - BOOL resultCode = YES; - if ([@"initCommon" isEqualToString:call.method]){ - NSArray* arguments = (NSArray *)call.arguments; - NSString* appkey = arguments[1]; - NSString* channel = arguments[2]; - [UMConfigure initWithAppkey:appkey channel:channel]; - //result(@"success"); - } - else{ - resultCode = NO; - } - return resultCode; -} -@end - -@interface UMengflutterpluginForAnalytics : NSObject -@end -@implementation UMengflutterpluginForAnalytics : NSObject - -+ (BOOL)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result{ - BOOL resultCode = YES; - NSArray* arguments = (NSArray *)call.arguments; - if ([@"onEvent" isEqualToString:call.method]){ - NSString* eventName = arguments[0]; - NSDictionary* properties = arguments[1]; - [MobClick event:eventName attributes:properties]; - //result(@"success"); - } - else if ([@"onProfileSignIn" isEqualToString:call.method]){ - NSString* userID = arguments[0]; - [MobClick profileSignInWithPUID:userID]; - //result(@"success"); - } - else if ([@"onProfileSignOff" isEqualToString:call.method]){ - [MobClick profileSignOff]; - //result(@"success"); - } - else if ([@"setPageCollectionModeAuto" isEqualToString:call.method]){ - [MobClick setAutoPageEnabled:YES]; - //result(@"success"); - } - else if ([@"setPageCollectionModeManual" isEqualToString:call.method]){ - [MobClick setAutoPageEnabled:NO]; - //result(@"success"); - } - else if ([@"onPageStart" isEqualToString:call.method]){ - NSString* pageName = arguments[0]; - [MobClick beginLogPageView:pageName]; - //result(@"success"); - } - else if ([@"onPageEnd" isEqualToString:call.method]){ - NSString* pageName = arguments[0]; - [MobClick endLogPageView:pageName]; - //result(@"success"); - } - else if ([@"reportError" isEqualToString:call.method]){ - NSLog(@"reportError API not existed "); - //result(@"success"); - } - else{ - resultCode = NO; - } - return resultCode; -} - -@end - -@implementation UmengCommonSdkPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - FlutterMethodChannel* channel = [FlutterMethodChannel - methodChannelWithName:@"umeng_common_sdk" - binaryMessenger:[registrar messenger]]; - UmengCommonSdkPlugin* instance = [[UmengCommonSdkPlugin alloc] init]; - [registrar addMethodCallDelegate:instance channel:channel]; -} - -- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { - if ([@"getPlatformVersion" isEqualToString:call.method]) { - result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]); - } else { - //result(FlutterMethodNotImplemented); - } - - BOOL resultCode = [UMengflutterpluginForUMCommon handleMethodCall:call result:result]; - if (resultCode) return; - - resultCode = [UMengflutterpluginForAnalytics handleMethodCall:call result:result]; - if (resultCode) return; - - result(FlutterMethodNotImplemented); -} - -@end diff --git a/umeng_common_sdk-1.2.6/ios/umeng_common_sdk.podspec b/umeng_common_sdk-1.2.6/ios/umeng_common_sdk.podspec deleted file mode 100644 index 9640954d..00000000 --- a/umeng_common_sdk-1.2.6/ios/umeng_common_sdk.podspec +++ /dev/null @@ -1,26 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint umeng_common_sdk.podspec' to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'umeng_common_sdk' - s.version = '0.0.1' - s.summary = 'A new Flutter plugin.' - s.description = <<-DESC -A new Flutter plugin. - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' - s.dependency 'Flutter' - s.platform = :ios, '8.0' - s.dependency 'UMCommon' - s.dependency 'UMDevice' - s.static_framework = true - - # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } -end diff --git a/umeng_common_sdk-1.2.6/lib/umeng_common_sdk.dart b/umeng_common_sdk-1.2.6/lib/umeng_common_sdk.dart deleted file mode 100644 index e6da3c18..00000000 --- a/umeng_common_sdk-1.2.6/lib/umeng_common_sdk.dart +++ /dev/null @@ -1,57 +0,0 @@ - -import 'dart:async'; - -import 'package:flutter/services.dart'; - -class UmengCommonSdk { - static const MethodChannel _channel = - const MethodChannel('umeng_common_sdk'); - - static Future get platformVersion async { - final String version = await _channel.invokeMethod('getPlatformVersion'); - return version; - } - - static Future initCommon(String androidAppkey, String iosAppkey, String channel) async { - List params = [androidAppkey, iosAppkey ,channel]; - final dynamic result = await _channel.invokeMethod('initCommon', params); - return result; - } - - static void onEvent(String event, Map properties) { - List args = [event,properties]; - _channel.invokeMethod('onEvent', args); - } - - static void onProfileSignIn (String userID) { - List args = [userID]; - _channel.invokeMethod('onProfileSignIn', args); - } - - static void onProfileSignOff () { - _channel.invokeMethod('onProfileSignOff'); - } - - static void setPageCollectionModeManual() { - _channel.invokeMethod('setPageCollectionModeManual'); - } - - static void onPageStart(String viewName) { - List args = [viewName]; - _channel.invokeMethod('onPageStart', args); - } - - static void onPageEnd(String viewName) { - List args = [viewName]; - _channel.invokeMethod('onPageEnd', args); - } - - static void setPageCollectionModeAuto() { - _channel.invokeMethod('setPageCollectionModeAuto'); - } - - static void reportError(String error) { - List args = [error]; - _channel.invokeMethod('reportError', args); - } -} diff --git a/umeng_common_sdk-1.2.6/pubspec.yaml b/umeng_common_sdk-1.2.6/pubspec.yaml deleted file mode 100644 index 0785ad5f..00000000 --- a/umeng_common_sdk-1.2.6/pubspec.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: umeng_common_sdk -description: 友盟+组件化基础库:Common Flutter plugin(Android & iOS). -version: 1.2.6 -homepage: https://www.umeng.com - -environment: - sdk: '>=2.12.0 <3.0.0' - flutter: ">=1.10.0" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - # This section identifies this Flutter project as a plugin project. - # The 'pluginClass' and Android 'package' identifiers should not ordinarily - # be modified. They are used by the tooling to maintain consistency when - # adding or updating assets for this project. - plugin: - platforms: - android: - package: com.umeng.umeng_common_sdk - pluginClass: UmengCommonSdkPlugin - ios: - pluginClass: UmengCommonSdkPlugin - - # To add assets to your plugin package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/assets-and-images/#from-packages - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # To add custom fonts to your plugin package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/custom-fonts/#from-packages diff --git a/umeng_common_sdk-1.2.6/test/umeng_common_sdk_test.dart b/umeng_common_sdk-1.2.6/test/umeng_common_sdk_test.dart deleted file mode 100644 index 8e5b1052..00000000 --- a/umeng_common_sdk-1.2.6/test/umeng_common_sdk_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:umeng_common_sdk/umeng_common_sdk.dart'; - -void main() { - const MethodChannel channel = MethodChannel('umeng_common_sdk'); - - TestWidgetsFlutterBinding.ensureInitialized(); - - setUp(() { - channel.setMockMethodCallHandler((MethodCall methodCall) async { - return '42'; - }); - }); - - tearDown(() { - channel.setMockMethodCallHandler(null); - }); - - test('getPlatformVersion', () async { - expect(await UmengCommonSdk.platformVersion, '42'); - }); -}